diff --git a/dune/grid/io/file/dgfparser/dgfug.cc b/dune/grid/io/file/dgfparser/dgfug.cc index ae4ab31cbc1a4caef9bc2b8019431afdb58f004a..872bf331ec5ce396ffd688f743f382780ac62ee8 100644 --- a/dune/grid/io/file/dgfparser/dgfug.cc +++ b/dune/grid/io/file/dgfparser/dgfug.cc @@ -106,11 +106,7 @@ namespace Dune // get grid parameter block dgf::UGGridParameterBlock gridParam( input ); - // create grid here to set heap size // create grid factory (passed grid is returned by createGrid method) - if( gridParam.heapSize() > 0 ) - UGGrid< dim >::setDefaultHeapSize( gridParam.heapSize() ); - for( int n = 0; n < dgf_.nofvtx; n++ ) { FieldVector< double, dim > v; diff --git a/dune/grid/uggrid.hh b/dune/grid/uggrid.hh index 86cd673548dcd392cd915c3f537d9c7915a8f041..e42d3c12b718b55412b806bed4a7f4ce04c3244c 100644 --- a/dune/grid/uggrid.hh +++ b/dune/grid/uggrid.hh @@ -286,9 +286,6 @@ namespace Dune { typedef unsigned int Rank; /** \brief Default constructor - * - * Uses the default heapsize, which can be set using the static method - * setDefaultHeapSize(). */ UGGrid(UGCollectiveCommunication comm = {}); @@ -767,9 +764,9 @@ namespace Dune { * specified on grid creation (at the latest). This sets the default heap * size, which is used when no heap size is given to the constructor. */ - static void setDefaultHeapSize(unsigned size) { - heapSize_ = size; - } + static void setDefaultHeapSize(unsigned size) + DUNE_DEPRECATED_MSG("Do not set the UGGrid default heap size---it is ignored anyway!") + {} /** \brief Sets a vertex to a new position @@ -852,12 +849,6 @@ namespace Dune { */ bool someElementHasBeenMarkedForCoarsening_; - /** \brief The size of UG's internal heap in megabytes - * - * It is handed over to UG for each new multigrid. - */ - static unsigned int heapSize_; - /** \brief The classes implementing the geometry of the boundary segments, if requested */ std::vector<std::shared_ptr<BoundarySegment<dim> > > boundarySegments_; @@ -870,10 +861,6 @@ namespace Dune { }; // end Class UGGrid - // those are defined in uggrid/uggrid.cc - template<> unsigned int UGGrid<2>::heapSize_; - template<> unsigned int UGGrid<3>::heapSize_; - namespace Capabilities { /** \struct hasEntity diff --git a/dune/grid/uggrid/uggrid.cc b/dune/grid/uggrid/uggrid.cc index 72920104710a2b34613cfbed84347070fce27aa7..b7924cad0c88e10d055be67231509f4763c51a20 100644 --- a/dune/grid/uggrid/uggrid.cc +++ b/dune/grid/uggrid/uggrid.cc @@ -31,9 +31,6 @@ namespace Dune { template<> int UGGrid<2>::numOfUGGrids = 0; template<> int UGGrid<3>::numOfUGGrids = 0; -template<> unsigned int UGGrid<2>::heapSize_ = 500; -template<> unsigned int UGGrid<3>::heapSize_ = 500; - template <int dim> UGGrid < dim >::UGGrid(UGCollectiveCommunication comm) @@ -587,7 +584,7 @@ void UGGrid<dim>::loadState(const std::string& filename) type, problemName.c_str(), formatName.c_str(), - heapSize_, + 0, // dummy heap size true, //force, true, //optimizedIO, false //autosave @@ -603,7 +600,7 @@ void UGGrid<dim>::loadState(const std::string& filename) type, problemName.c_str(), formatName.c_str(), - heapSize_, + 0, // dummy heap size true, //force, true, //optimizedIO, false //autosave diff --git a/dune/grid/uggrid/uggridfactory.cc b/dune/grid/uggrid/uggridfactory.cc index a4af96d6de25d6a657dec5b0052b6a7a26932824..aaae72016d23313b7bede73f70d630ba9b6ca0f5 100644 --- a/dune/grid/uggrid/uggridfactory.cc +++ b/dune/grid/uggrid/uggridfactory.cc @@ -458,25 +458,24 @@ createGrid() DUNE_THROW(GridError, "Calling UG::" << dimworld << "d::ConfigureCommand failed!"); //new @PROBLEM $b @PROBLEM $f @FORMAT $h @HEAP; - char* newArgs[4]; - for (int i=0; i<4; i++) + char* newArgs[3]; + for (int i=0; i<3; i++) newArgs[i] = (char*)::malloc(50*sizeof(char)); sprintf(newArgs[0], "new %s", grid_->name_.c_str()); sprintf(newArgs[1], "b %s_Problem", grid_->name_.c_str()); sprintf(newArgs[2], "f DuneFormat%dd", dimworld); - sprintf(newArgs[3], "h %dM", grid_->heapSize_); if (UG_NS<dimworld>::NewCommand( - 4, newArgs + 3, newArgs #if ModelP and DUNE_UGGRID_HAVE_PPIFCONTEXT , std::make_shared<PPIF::PPIFContext>(grid_->comm()) #endif )) DUNE_THROW(GridError, "UGGrid<" << dimworld << ">::makeNewMultigrid failed!"); - for (int i=0; i<4; i++) + for (int i=0; i<3; i++) free(newArgs[i]); // Get a direct pointer to the newly created multigrid