diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f0a210d36cb2c4def87547c28537388e74b0dce..ae686d52bc25eea6da88ed55ad4463414fcee8f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +Differences Between DuMux 3.5 and DuMux 3.4 +============================================= + +### Improvements and Enhancements +- __Construction and update of GridGeometries changed__: Grid geometries are fully updated after construction. + Additional call of update functions are therefore only needed after grid adaption. Calling the update functions after construction now leads to a performance penalty. + +### Immediate interface changes not allowing/requiring a deprecation period: +- __Virtual interface of GridDataTransfer__: The `GridDataTransfer` abstract base class now required the Grid type as a template argument. Furthermore, the `store` and `reconstruct` interface functions do now expect the grid as a function argument. This allows to correctly update grid geometries and corresponding mapper (see "Construction and update of GridGeometries changed" above in the changelog) + +### Deprecated properties/classes/functions/files, to be removed after 3.5: + +- `update()` functions of grid geometries, which do not receive the `gridView`, are deprecated, use `update(gridView)` instead. + +### New experimental features (possibly subject to backwards-incompatible changes in the future) + +### Continuous integration + Differences Between DuMux 3.4 and DuMux 3.3 ============================================= diff --git a/dumux/adaptive/adapt.hh b/dumux/adaptive/adapt.hh index b5cc28e80f3761f2a032d96b4a600db7a3794ce3..64dc9716e28c64ba1bd4fc3963a188b0b2915d6a 100644 --- a/dumux/adaptive/adapt.hh +++ b/dumux/adaptive/adapt.hh @@ -37,19 +37,19 @@ namespace Dumux { * transfer from the old to the new grid. */ template -bool adapt(Grid& grid, GridDataTransfer& dataTransfer) +bool adapt(Grid& grid, GridDataTransfer& dataTransfer) { // Do pre-adaption step of the grid const bool mightCoarsen = grid.preAdapt(); // Let the helper do storage of variables - dataTransfer.store(); + dataTransfer.store(grid); // adapt the grid const bool refine = grid.adapt(); // (Re-)construct variables to new grid - dataTransfer.reconstruct(); + dataTransfer.reconstruct(grid); // delete markers in grid grid.postAdapt(); diff --git a/dumux/adaptive/griddatatransfer.hh b/dumux/adaptive/griddatatransfer.hh index 043b3686f45e4d5ec20448ece3fba42e3b84ac41..48b0401954de8c65a56a44024177ff222ee33dd0 100644 --- a/dumux/adaptive/griddatatransfer.hh +++ b/dumux/adaptive/griddatatransfer.hh @@ -30,6 +30,7 @@ namespace Dumux { * \ingroup Adaptive * \brief Interface to be used by classes transferring grid data on adpative grids */ +template class GridDataTransfer { public: @@ -37,12 +38,11 @@ public: virtual ~GridDataTransfer() = default; //! store user data before grid adaption - virtual void store() = 0; + virtual void store(const Grid&) = 0; - //! store user data after adaption - virtual void reconstruct() = 0; + //! store user data after grid adaption + virtual void reconstruct(const Grid&) = 0; }; - } // end namespace Dumux #endif diff --git a/dumux/discretization/basegridgeometry.hh b/dumux/discretization/basegridgeometry.hh index 56f76901357e07a753a53e8947c98a4dd2659640..7ffc3dfb9d17443bfaccc1bd2d83a90e07cf3895 100644 --- a/dumux/discretization/basegridgeometry.hh +++ b/dumux/discretization/basegridgeometry.hh @@ -24,6 +24,7 @@ #ifndef DUMUX_DISCRETIZATION_BASE_GRID_GEOMETRY_HH #define DUMUX_DISCRETIZATION_BASE_GRID_GEOMETRY_HH +#include #include #include @@ -83,30 +84,34 @@ public: , bBoxMax_(-std::numeric_limits::max()) { computeGlobalBoundingBox_(); + update_(); } /*! * \brief Update all fvElementGeometries (do this again after grid adaption) */ + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update() { - //! Update the mappers - if constexpr (Deprecated::hasUpdateGridView()) - elementMapper_.update(gridView_); - else - Deprecated::update(elementMapper_); - - if constexpr (Deprecated::hasUpdateGridView()) - vertexMapper_.update(gridView_); - else - Deprecated::update(vertexMapper_); + update_(); + } - //! Compute the bouding box of the entire domain, for e.g. setting boundary conditions - computeGlobalBoundingBox_(); + /*! + * \brief Update all fvElementGeometries (call this after grid adaption) + */ + void update(const GridView& gridView) + { + gridView_ = gridView; + update_(); + } - //! reset bounding box tree and the element map until requested the next time - boundingBoxTree_.release(); - elementMap_.reset(); + /*! + * \brief Update all fvElementGeometries (call this after grid adaption) + */ + void update(GridView&& gridView) + { + gridView_ = std::move(gridView); + update_(); } /*! @@ -243,8 +248,29 @@ private: } } + void update_() + { + //! Update the mappers + if constexpr (Deprecated::hasUpdateGridView()) + elementMapper_.update(gridView_); + else + Deprecated::update(elementMapper_); + + if constexpr (Deprecated::hasUpdateGridView()) + vertexMapper_.update(gridView_); + else + Deprecated::update(vertexMapper_); + + //! Compute the bouding box of the entire domain, for e.g. setting boundary conditions + computeGlobalBoundingBox_(); + + //! reset bounding box tree and the element map until requested the next time + boundingBoxTree_.release(); + elementMap_.reset(); + } + //! the process grid view - const GridView gridView_; + GridView gridView_; //! entity mappers ElementMapper elementMapper_; diff --git a/dumux/discretization/box/fvgridgeometry.hh b/dumux/discretization/box/fvgridgeometry.hh index 58479f227609e9c1ccb3abc246d7966afd56f3b4..95938a6bd58a8f31eb59b11a72b17943db1afe07 100644 --- a/dumux/discretization/box/fvgridgeometry.hh +++ b/dumux/discretization/box/fvgridgeometry.hh @@ -26,6 +26,7 @@ #ifndef DUMUX_DISCRETIZATION_BOX_GRID_FVGEOMETRY_HH #define DUMUX_DISCRETIZATION_BOX_GRID_FVGEOMETRY_HH +#include #include #include @@ -117,7 +118,9 @@ public: //! Constructor BoxFVGridGeometry(const GridView gridView) : ParentType(gridView) - {} + { + update_(); + } //! the vertex mapper is the dofMapper //! this is convenience to have better chance to have the same main files for box/tpfa/mpfa... @@ -142,10 +145,62 @@ public: { return this->vertexMapper().size(); } //! update all fvElementGeometries (do this again after grid adaption) + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update() { ParentType::update(); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(const GridView& gridView) + { + ParentType::update(gridView); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(GridView&& gridView) + { + ParentType::update(std::move(gridView)); + update_(); + } + + //! The finite element cache for creating local FE bases + const FeCache& feCache() const + { return feCache_; } + + //! Get the local scvs for an element + const std::vector& scvs(GridIndexType eIdx) const + { return scvs_[eIdx]; } + + //! Get the local scvfs for an element + const std::vector& scvfs(GridIndexType eIdx) const + { return scvfs_[eIdx]; } + + //! If a vertex / d.o.f. is on the boundary + bool dofOnBoundary(GridIndexType dofIdx) const + { return boundaryDofIndices_[dofIdx]; } + + //! If a vertex / d.o.f. is on a periodic boundary + bool dofOnPeriodicBoundary(GridIndexType dofIdx) const + { return periodicVertexMap_.count(dofIdx); } + + //! The index of the vertex / d.o.f. on the other side of the periodic boundary + GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const + { return periodicVertexMap_.at(dofIdx); } + //! Returns the map between dofs across periodic boundaries + const std::unordered_map& periodicVertexMap() const + { return periodicVertexMap_; } + + //! Returns whether one of the geometry's scvfs lies on a boundary + bool hasBoundaryScvf(GridIndexType eIdx) const + { return hasBoundaryScvf_[eIdx]; } + +private: + void update_() + { scvs_.clear(); scvfs_.clear(); @@ -291,40 +346,6 @@ public: DUNE_THROW(Dune::NotImplemented, "Periodic boundaries for box method for parallel simulations!"); } - //! The finite element cache for creating local FE bases - const FeCache& feCache() const - { return feCache_; } - - //! Get the local scvs for an element - const std::vector& scvs(GridIndexType eIdx) const - { return scvs_[eIdx]; } - - //! Get the local scvfs for an element - const std::vector& scvfs(GridIndexType eIdx) const - { return scvfs_[eIdx]; } - - //! If a vertex / d.o.f. is on the boundary - bool dofOnBoundary(GridIndexType dofIdx) const - { return boundaryDofIndices_[dofIdx]; } - - //! If a vertex / d.o.f. is on a periodic boundary - bool dofOnPeriodicBoundary(GridIndexType dofIdx) const - { return periodicVertexMap_.count(dofIdx); } - - //! The index of the vertex / d.o.f. on the other side of the periodic boundary - GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const - { return periodicVertexMap_.at(dofIdx); } - - //! Returns the map between dofs across periodic boundaries - const std::unordered_map& periodicVertexMap() const - { return periodicVertexMap_; } - - //! Returns whether one of the geometry's scvfs lies on a boundary - bool hasBoundaryScvf(GridIndexType eIdx) const - { return hasBoundaryScvf_[eIdx]; } - -private: - const FeCache feCache_; std::vector> scvs_; @@ -385,7 +406,9 @@ public: //! Constructor BoxFVGridGeometry(const GridView gridView) : ParentType(gridView) - {} + { + update_(); + } //! the vertex mapper is the dofMapper //! this is convenience to have better chance to have the same main files for box/tpfa/mpfa... @@ -410,10 +433,51 @@ public: { return this->vertexMapper().size(); } //! update all fvElementGeometries (do this again after grid adaption) + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update() { ParentType::update(); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(const GridView& gridView) + { + ParentType::update(gridView); + update_(); + } + //! update all fvElementGeometries (call this after grid adaption) + void update(GridView&& gridView) + { + ParentType::update(std::move(gridView)); + update_(); + } + + //! The finite element cache for creating local FE bases + const FeCache& feCache() const + { return feCache_; } + + //! If a vertex / d.o.f. is on the boundary + bool dofOnBoundary(GridIndexType dofIdx) const + { return boundaryDofIndices_[dofIdx]; } + + //! If a vertex / d.o.f. is on a periodic boundary + bool dofOnPeriodicBoundary(GridIndexType dofIdx) const + { return periodicVertexMap_.count(dofIdx); } + + //! The index of the vertex / d.o.f. on the other side of the periodic boundary + GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const + { return periodicVertexMap_.at(dofIdx); } + + //! Returns the map between dofs across periodic boundaries + const std::unordered_map& periodicVertexMap() const + { return periodicVertexMap_; } + +private: + + void update_() + { boundaryDofIndices_.assign(numDofs(), false); // save global data on the grid's scvs and scvfs @@ -494,28 +558,6 @@ public: DUNE_THROW(Dune::NotImplemented, "Periodic boundaries for box method for parallel simulations!"); } - //! The finite element cache for creating local FE bases - const FeCache& feCache() const - { return feCache_; } - - //! If a vertex / d.o.f. is on the boundary - bool dofOnBoundary(GridIndexType dofIdx) const - { return boundaryDofIndices_[dofIdx]; } - - //! If a vertex / d.o.f. is on a periodic boundary - bool dofOnPeriodicBoundary(GridIndexType dofIdx) const - { return periodicVertexMap_.count(dofIdx); } - - //! The index of the vertex / d.o.f. on the other side of the periodic boundary - GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const - { return periodicVertexMap_.at(dofIdx); } - - //! Returns the map between dofs across periodic boundaries - const std::unordered_map& periodicVertexMap() const - { return periodicVertexMap_; } - -private: - const FeCache feCache_; // Information on the global number of geometries diff --git a/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh b/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh index aa8d4ae436fc68c3397fb0b260dd5e462b80e58a..b9969e58190abe0996ba2ee210d8277b7e4e2e81 100644 --- a/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh +++ b/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh @@ -26,6 +26,8 @@ #ifndef DUMUX_DISCRETIZATION_CC_MPFA_FV_GRID_GEOMETRY_HH #define DUMUX_DISCRETIZATION_CC_MPFA_FV_GRID_GEOMETRY_HH +#include + #include #include #include @@ -125,6 +127,7 @@ public: { return is.boundary() || isBranching; } ) { checkOverlapSizeCCMpfa(gridView); + update_(); } //! Constructor with user-defined indicator function for secondary interaction volumes @@ -133,6 +136,7 @@ public: , secondaryIvIndicator_(indicator) { checkOverlapSizeCCMpfa(gridView); + update_(); } //! the element mapper is the dofMapper @@ -169,10 +173,69 @@ public: { return false; } //! update all fvElementGeometries (do this again after grid adaption) + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update() { ParentType::update(); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(const GridView& gridView) + { + ParentType::update(gridView); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(GridView&& gridView) + { + ParentType::update(std::move(gridView)); + update_(); + } + + //! Returns instance of the mpfa helper type + MpfaHelper mpfaHelper() const + { return MpfaHelper(); } + + //! Get a sub control volume with a global scv index + const SubControlVolume& scv(GridIndexType scvIdx) const + { return scvs_[scvIdx]; } + + //! Get a sub control volume face with a global scvf index + const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const + { return scvfs_[scvfIdx]; } + + //! Returns the connectivity map of which dofs + //! have derivatives with respect to a given dof. + const ConnectivityMap& connectivityMap() const + { return connectivityMap_; } + + //! Returns the grid interaction volume index set class. + const GridIVIndexSets& gridInteractionVolumeIndexSets() const + { return ivIndexSets_; } + + //! Get the sub control volume face indices of an scv by global index + const std::vector& scvfIndicesOfScv(GridIndexType scvIdx) const + { return scvfIndicesOfScv_[scvIdx]; } + + //! Returns the flip scvf index set + const FlipScvfIndexSet& flipScvfIndexSet() const + { return flipScvfIndices_; } + + //! Get the scvf on the same face but from the other side + //! Note that e.g. the normals might be different in the case of surface grids + const SubControlVolumeFace& flipScvf(GridIndexType scvfIdx, unsigned int outsideScvfIdx = 0) const + { return scvfs_[flipScvfIndices_[scvfIdx][outsideScvfIdx]]; } + + //! Returns whether one of the geometry's scvfs lies on a boundary + bool hasBoundaryScvf(GridIndexType eIdx) const + { return hasBoundaryScvf_[eIdx]; } + +private: + void update_() + { // stop the time required for the update Dune::Timer timer; @@ -365,45 +428,6 @@ public: std::cout << "Initializing of the connectivity map took " << timer.elapsed() << " seconds." << std::endl; } - //! Returns instance of the mpfa helper type - MpfaHelper mpfaHelper() const - { return MpfaHelper(); } - - //! Get a sub control volume with a global scv index - const SubControlVolume& scv(GridIndexType scvIdx) const - { return scvs_[scvIdx]; } - - //! Get a sub control volume face with a global scvf index - const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const - { return scvfs_[scvfIdx]; } - - //! Returns the connectivity map of which dofs - //! have derivatives with respect to a given dof. - const ConnectivityMap& connectivityMap() const - { return connectivityMap_; } - - //! Returns the grid interaction volume index set class. - const GridIVIndexSets& gridInteractionVolumeIndexSets() const - { return ivIndexSets_; } - - //! Get the sub control volume face indices of an scv by global index - const std::vector& scvfIndicesOfScv(GridIndexType scvIdx) const - { return scvfIndicesOfScv_[scvIdx]; } - - //! Returns the flip scvf index set - const FlipScvfIndexSet& flipScvfIndexSet() const - { return flipScvfIndices_; } - - //! Get the scvf on the same face but from the other side - //! Note that e.g. the normals might be different in the case of surface grids - const SubControlVolumeFace& flipScvf(GridIndexType scvfIdx, unsigned int outsideScvfIdx = 0) const - { return scvfs_[flipScvfIndices_[scvfIdx][outsideScvfIdx]]; } - - //! Returns whether one of the geometry's scvfs lies on a boundary - bool hasBoundaryScvf(GridIndexType eIdx) const - { return hasBoundaryScvf_[eIdx]; } - -private: // connectivity map for efficient assembly ConnectivityMap connectivityMap_; @@ -494,6 +518,7 @@ public: { return is.boundary() || isBranching; } ) { checkOverlapSizeCCMpfa(gridView); + update_(); } //! Constructor with user-defined indicator function for secondary interaction volumes @@ -502,6 +527,7 @@ public: , secondaryIvIndicator_(indicator) { checkOverlapSizeCCMpfa(gridView); + update_(); } //! the element mapper is the dofMapper @@ -546,9 +572,61 @@ public: { return isGhostVertex_[vIdxGlobal]; } //! Updates all finite volume geometries of the grid. Has to be called again after grid adaption. + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update() { ParentType::update(); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(const GridView& gridView) + { + ParentType::update(gridView); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(GridView&& gridView) + { + ParentType::update(std::move(gridView)); + update_(); + } + + //! Returns instance of the mpfa helper type + MpfaHelper mpfaHelper() const + { return MpfaHelper(); } + + //! Returns the sub control volume face indices of an scv by global index. + const std::vector& scvfIndicesOfScv(GridIndexType scvIdx) const + { return scvfIndicesOfScv_[scvIdx]; } + + //! Returns the neighboring vol var indices for each scvf contained in an scv. + const std::vector& neighborVolVarIndices(GridIndexType scvIdx) const + { return neighborVolVarIndices_[scvIdx]; } + + //! Get the index scvf on the same face but from the other side + //! Note that e.g. the normals might be different in the case of surface grids + const GridIndexType flipScvfIdx(GridIndexType scvfIdx, unsigned int outsideScvfIdx = 0) const + { return flipScvfIndices_[scvfIdx][outsideScvfIdx]; } + + //! Returns the flip scvf index set + const FlipScvfIndexSet& flipScvfIndexSet() const + { return flipScvfIndices_; } + + //! Returns the connectivity map of which dofs + //! have derivatives with respect to a given dof. + const ConnectivityMap& connectivityMap() const + { return connectivityMap_; } + + //! Returns the grid interaction volume seeds class. + const GridIVIndexSets& gridInteractionVolumeIndexSets() const + { return ivIndexSets_; } + +private: + + void update_() + { // stop the time required for the update Dune::Timer timer; @@ -728,37 +806,6 @@ public: std::cout << "Initializing of the connectivity map took " << timer.elapsed() << " seconds." << std::endl; } - //! Returns instance of the mpfa helper type - MpfaHelper mpfaHelper() const - { return MpfaHelper(); } - - //! Returns the sub control volume face indices of an scv by global index. - const std::vector& scvfIndicesOfScv(GridIndexType scvIdx) const - { return scvfIndicesOfScv_[scvIdx]; } - - //! Returns the neighboring vol var indices for each scvf contained in an scv. - const std::vector& neighborVolVarIndices(GridIndexType scvIdx) const - { return neighborVolVarIndices_[scvIdx]; } - - //! Get the index scvf on the same face but from the other side - //! Note that e.g. the normals might be different in the case of surface grids - const GridIndexType flipScvfIdx(GridIndexType scvfIdx, unsigned int outsideScvfIdx = 0) const - { return flipScvfIndices_[scvfIdx][outsideScvfIdx]; } - - //! Returns the flip scvf index set - const FlipScvfIndexSet& flipScvfIndexSet() const - { return flipScvfIndices_; } - - //! Returns the connectivity map of which dofs - //! have derivatives with respect to a given dof. - const ConnectivityMap& connectivityMap() const - { return connectivityMap_; } - - //! Returns the grid interaction volume seeds class. - const GridIVIndexSets& gridInteractionVolumeIndexSets() const - { return ivIndexSets_; } - -private: // connectivity map for efficient assembly ConnectivityMap connectivityMap_; diff --git a/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh b/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh index 76d6be3cec93992b888f0dc8178e64b4e86a66c3..538031d5f49b63b829def74a8fbb8aaee110c6a1 100644 --- a/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh +++ b/dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh @@ -26,6 +26,7 @@ #ifndef DUMUX_DISCRETIZATION_CCTPFA_FV_GRID_GEOMETRY_HH #define DUMUX_DISCRETIZATION_CCTPFA_FV_GRID_GEOMETRY_HH +#include #include #include @@ -127,6 +128,8 @@ public: if (!CheckOverlapSize::isValid(gridView)) DUNE_THROW(Dune::InvalidStateException, "The cctpfa discretization method needs at least an overlap of 1 for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); + + update_(); } //! the element mapper is the dofMapper @@ -157,10 +160,67 @@ public: { return this->gridView().size(0); } //! update all fvElementGeometries (do this again after grid adaption) + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update() { ParentType::update(); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(const GridView& gridView) + { + ParentType::update(gridView); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(GridView&& gridView) + { + ParentType::update(std::move(gridView)); + update_(); + } + + //! Get a sub control volume with a global scv index + const SubControlVolume& scv(GridIndexType scvIdx) const + { + return scvs_[scvIdx]; + } + + //! Get a sub control volume face with a global scvf index + const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const + { + return scvfs_[scvfIdx]; + } + + //! Get the scvf on the same face but from the other side + //! Note that e.g. the normals might be different in the case of surface grids + const SubControlVolumeFace& flipScvf(GridIndexType scvfIdx, unsigned int outsideScvfIdx = 0) const + { + return scvfs_[flipScvfIndices_[scvfIdx][outsideScvfIdx]]; + } + //! Get the sub control volume face indices of an scv by global index + const std::vector& scvfIndicesOfScv(GridIndexType scvIdx) const + { + return scvfIndicesOfScv_[scvIdx]; + } + + /*! + * \brief Returns the connectivity map of which dofs have derivatives with respect + * to a given dof. + */ + const ConnectivityMap &connectivityMap() const + { return connectivityMap_; } + + //! Returns whether one of the geometry's scvfs lies on a boundary + bool hasBoundaryScvf(GridIndexType eIdx) const + { return hasBoundaryScvf_[eIdx]; } + +private: + + void update_() + { // clear containers (necessary after grid refinement) scvs_.clear(); scvfs_.clear(); @@ -290,43 +350,6 @@ public: connectivityMap_.update(*this); } - //! Get a sub control volume with a global scv index - const SubControlVolume& scv(GridIndexType scvIdx) const - { - return scvs_[scvIdx]; - } - - //! Get a sub control volume face with a global scvf index - const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const - { - return scvfs_[scvfIdx]; - } - - //! Get the scvf on the same face but from the other side - //! Note that e.g. the normals might be different in the case of surface grids - const SubControlVolumeFace& flipScvf(GridIndexType scvfIdx, unsigned int outsideScvfIdx = 0) const - { - return scvfs_[flipScvfIndices_[scvfIdx][outsideScvfIdx]]; - } - - //! Get the sub control volume face indices of an scv by global index - const std::vector& scvfIndicesOfScv(GridIndexType scvIdx) const - { - return scvfIndicesOfScv_[scvIdx]; - } - - /*! - * \brief Returns the connectivity map of which dofs have derivatives with respect - * to a given dof. - */ - const ConnectivityMap &connectivityMap() const - { return connectivityMap_; } - - //! Returns whether one of the geometry's scvfs lies on a boundary - bool hasBoundaryScvf(GridIndexType eIdx) const - { return hasBoundaryScvf_[eIdx]; } - -private: // find the scvf that has insideScvIdx in its outsideScvIdx list and outsideScvIdx as its insideScvIdx GridIndexType findFlippedScvfIndex_(GridIndexType insideScvIdx, GridIndexType outsideScvIdx) { @@ -411,6 +434,8 @@ public: if (!CheckOverlapSize::isValid(gridView)) DUNE_THROW(Dune::InvalidStateException, "The cctpfa discretization method needs at least an overlap of 1 for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); + + update_(); } //! the element mapper is the dofMapper @@ -441,10 +466,45 @@ public: { return this->gridView().size(0); } //! update all fvElementGeometries (do this again after grid adaption) + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update() { ParentType::update(); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(const GridView& gridView) + { + ParentType::update(gridView); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(GridView&& gridView) + { + ParentType::update(std::move(gridView)); + update_(); + } + + const std::vector& scvfIndicesOfScv(GridIndexType scvIdx) const + { return scvfIndicesOfScv_[scvIdx]; } + + //! Return the neighbor volVar indices for all scvfs in the scv with index scvIdx + const std::vector& neighborVolVarIndices(GridIndexType scvIdx) const + { return neighborVolVarIndices_[scvIdx]; } + + /*! + * \brief Returns the connectivity map of which dofs have derivatives with respect + * to a given dof. + */ + const ConnectivityMap &connectivityMap() const + { return connectivityMap_; } +private: + + void update_() + { // clear local data scvfIndicesOfScv_.clear(); neighborVolVarIndices_.clear(); @@ -532,22 +592,6 @@ public: connectivityMap_.update(*this); } - const std::vector& scvfIndicesOfScv(GridIndexType scvIdx) const - { return scvfIndicesOfScv_[scvIdx]; } - - //! Return the neighbor volVar indices for all scvfs in the scv with index scvIdx - const std::vector& neighborVolVarIndices(GridIndexType scvIdx) const - { return neighborVolVarIndices_[scvIdx]; } - - /*! - * \brief Returns the connectivity map of which dofs have derivatives with respect - * to a given dof. - */ - const ConnectivityMap &connectivityMap() const - { return connectivityMap_; } - -private: - //! Information on the global number of geometries std::size_t numScvs_; std::size_t numScvf_; diff --git a/dumux/discretization/porenetwork/gridgeometry.hh b/dumux/discretization/porenetwork/gridgeometry.hh index c790bbb5a68a5949849b69f530aa77e8d4b1b026..ee3407341f38b4f77b784aa38526bab0255a5e60 100644 --- a/dumux/discretization/porenetwork/gridgeometry.hh +++ b/dumux/discretization/porenetwork/gridgeometry.hh @@ -25,6 +25,7 @@ #define DUMUX_DISCRETIZATION_PNM_GRID_GEOMETRY_HH #include +#include #include #include @@ -528,12 +529,21 @@ public: using GridView = GV; //! Constructor + [[deprecated("Use GridGeometry(gridView, gridData) instead! Will be removed after release 3.5.")]] GridGeometry(const GridView gridView) : ParentType(gridView) { static_assert(GridView::dimension == 1, "Porenetwork model only allow GridView::dimension == 1!"); } + template + GridGeometry(const GridView& gridView, const GridData& gridData) + : ParentType(gridView) + { + static_assert(GridView::dimension == 1, "Porenetwork model only allow GridView::dimension == 1!"); + update_(gridData); + } + //! the vertex mapper is the dofMapper //! this is convenience to have better chance to have the same main files for box/tpfa/mpfa... const DofMapper& dofMapper() const @@ -558,9 +568,66 @@ public: //! update all fvElementGeometries (do this again after grid adaption) template + [[deprecated("Use update(gridView, gridData) instead! Will be removed after release 3.5.")]] void update(const GridData& gridData) { ParentType::update(); + update_(gridData); + } + + //! update all fvElementGeometries (call this after grid adaption) + template + void update(const GridView& gridView, const GridData& gridData) + { + ParentType::update(gridView); + update_(gridData); + } + + //! update all fvElementGeometries (call this after grid adaption) + template + void update(GridView&& gridView, const GridData& gridData) + { + ParentType::update(std::move(gridView)); + update_(gridData); + } + + //! The finite element cache for creating local FE bases + const FeCache& feCache() const + { return feCache_; } + + //! Get the local scvs for an element + const std::array& scvs(GridIndexType eIdx) const + { return scvs_[eIdx]; } + + //! Get the local scvfs for an element + const std::array& scvfs(GridIndexType eIdx) const + { return scvfs_[eIdx]; } + + //! If a vertex / d.o.f. is on the boundary + bool dofOnBoundary(GridIndexType dofIdx) const + { return boundaryDofIndices_[dofIdx]; } + + //! If a vertex / d.o.f. is on a periodic boundary (not implemented) + bool dofOnPeriodicBoundary(GridIndexType dofIdx) const + { return false; } + + //! The index of the vertex / d.o.f. on the other side of the periodic boundary + GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const + { DUNE_THROW(Dune::NotImplemented, "Periodic boundaries"); } + + //! Returns the map between dofs across periodic boundaries + std::unordered_map periodicVertexMap() const + { return std::unordered_map{}; } + + //! Returns whether one of the geometry's scvfs lies on a boundary + bool hasBoundaryScvf(GridIndexType eIdx) const + { return hasBoundaryScvf_[eIdx]; } + +private: + + template + void update_(const GridData& gridData) + { PNMData::update(this->gridView(), gridData); scvs_.clear(); @@ -622,39 +689,6 @@ public: } } - //! The finite element cache for creating local FE bases - const FeCache& feCache() const - { return feCache_; } - - //! Get the local scvs for an element - const std::array& scvs(GridIndexType eIdx) const - { return scvs_[eIdx]; } - - //! Get the local scvfs for an element - const std::array& scvfs(GridIndexType eIdx) const - { return scvfs_[eIdx]; } - - //! If a vertex / d.o.f. is on the boundary - bool dofOnBoundary(GridIndexType dofIdx) const - { return boundaryDofIndices_[dofIdx]; } - - //! If a vertex / d.o.f. is on a periodic boundary (not implemented) - bool dofOnPeriodicBoundary(GridIndexType dofIdx) const - { return false; } - - //! The index of the vertex / d.o.f. on the other side of the periodic boundary - GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const - { DUNE_THROW(Dune::NotImplemented, "Periodic boundaries"); } - - //! Returns the map between dofs across periodic boundaries - std::unordered_map periodicVertexMap() const - { return std::unordered_map{}; } - - //! Returns whether one of the geometry's scvfs lies on a boundary - bool hasBoundaryScvf(GridIndexType eIdx) const - { return hasBoundaryScvf_[eIdx]; } - -private: const FeCache feCache_; std::vector> scvs_; @@ -711,12 +745,22 @@ public: using GridView = GV; //! Constructor + [[deprecated("Use GridGeometry(gridView, gridData) instead! Will be removed after release 3.5.")]] GridGeometry(const GridView gridView) : ParentType(gridView) { static_assert(GridView::dimension == 1, "Porenetwork model only allow GridView::dimension == 1!"); } + template + GridGeometry(const GridView& gridView, const GridData& gridData) + : ParentType(gridView) + { + static_assert(GridView::dimension == 1, "Porenetwork model only allow GridView::dimension == 1!"); + update_(gridData); + } + + //! the vertex mapper is the dofMapper //! this is convenience to have better chance to have the same main files for box/tpfa/mpfa... const DofMapper& dofMapper() const @@ -741,32 +785,27 @@ public: //! update all fvElementGeometries (do this again after grid adaption) template + [[deprecated("Use update(gridView, gridData) instead! Will be removed after release 3.5.")]] void update(const GridData& gridData) { ParentType::update(); - PNMData::update(this->gridView(), gridData); - - boundaryDofIndices_.assign(numDofs(), false); - - // save global data on the grid's scvs and scvfs - numScvf_ = this->gridView().size(0); - numScv_ = 2*numScvf_; + update_(gridData); + } - for (const auto& element : elements(this->gridView())) - { - // treat boundaries - for (LocalIndexType vIdxLocal = 0; vIdxLocal < 2; ++vIdxLocal) - { - const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdxLocal, dim); - if (this->poreLabel(vIdxGlobal) > 0) - { - if (boundaryDofIndices_[vIdxGlobal]) - continue; + //! update all fvElementGeometries (call this after grid adaption) + template + void update(const GridView& gridView, const GridData& gridData) + { + ParentType::update(gridView); + update_(gridData); + } - boundaryDofIndices_[vIdxGlobal] = true; - } - } - } + //! update all fvElementGeometries (call this after grid adaption) + template + void update(GridView&& gridView, const GridData& gridData) + { + ParentType::update(std::move(gridView)); + update_(gridData); } //! The finite element cache for creating local FE bases @@ -791,6 +830,34 @@ public: private: + template + void update_(const GridData& gridData) + { + PNMData::update(this->gridView(), gridData); + + boundaryDofIndices_.assign(numDofs(), false); + + // save global data on the grid's scvs and scvfs + numScvf_ = this->gridView().size(0); + numScv_ = 2*numScvf_; + + for (const auto& element : elements(this->gridView())) + { + // treat boundaries + for (LocalIndexType vIdxLocal = 0; vIdxLocal < 2; ++vIdxLocal) + { + const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdxLocal, dim); + if (this->poreLabel(vIdxGlobal) > 0) + { + if (boundaryDofIndices_[vIdxGlobal]) + continue; + + boundaryDofIndices_[vIdxGlobal] = true; + } + } + } + } + const FeCache feCache_; // Information on the global number of geometries diff --git a/dumux/discretization/staggered/fvgridgeometry.hh b/dumux/discretization/staggered/fvgridgeometry.hh index 02a1d936363d47df296e2b2441f15d6794f213cf..496317c4baa831ea524941802c1ecce0de2a773a 100644 --- a/dumux/discretization/staggered/fvgridgeometry.hh +++ b/dumux/discretization/staggered/fvgridgeometry.hh @@ -24,6 +24,8 @@ #ifndef DUMUX_DISCRETIZATION_STAGGERED_FV_GRID_GEOMETRY #define DUMUX_DISCRETIZATION_STAGGERED_FV_GRID_GEOMETRY +#include + #include #include #include @@ -239,6 +241,8 @@ public: if (!CheckOverlapSize::isValid(gridView)) DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); + + update_(); } //! The total number of sub control volumes @@ -277,16 +281,110 @@ public: { return this->gridView().size(1); } //! update all fvElementGeometries (do this again after grid adaption) + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update() { - // clear containers (necessary after grid refinement) - scvs_.clear(); - scvfs_.clear(); - scvfIndicesOfScv_.clear(); + ParentType::update(); + updateIntersectionMapper_(); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(const GridView& gridView) + { + ParentType::update(gridView); + updateIntersectionMapper_(); + update_(); + } + + //! update all fvElementGeometries (call this after grid adaption) + void update(GridView&& gridView) + { + ParentType::update(std::move(gridView)); + updateIntersectionMapper_(); + update_(); + } + + //! Get a sub control volume with a global scv index + const SubControlVolume& scv(GridIndexType scvIdx) const + { + return scvs_[scvIdx]; + } + + //! Get a sub control volume face with a global scvf index + const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const + { + return scvfs_[scvfIdx]; + } + + //! Get the sub control volume face indices of an scv by global index + const std::vector& scvfIndicesOfScv(GridIndexType scvIdx) const + { + return scvfIndicesOfScv_[scvIdx]; + } + + GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const + { + return localToGlobalScvfIndices_[eIdx][localScvfIdx]; + } + + const SubControlVolumeFace& scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const + { + return scvf(localToGlobalScvfIndex(eIdx, localScvfIdx)); + } + + /*! + * \brief Returns the connectivity map of which dofs have derivatives with respect + * to a given dof. + */ + const ConnectivityMap &connectivityMap() const + { return connectivityMap_; } + + //! Returns a pointer the cell center specific auxiliary class. Required for the multi-domain FVAssembler's ctor. + std::unique_ptr> cellCenterFVGridGeometryPtr() const + { + return std::make_unique>(this); + } + + //! Returns a pointer the face specific auxiliary class. Required for the multi-domain FVAssembler's ctor. + std::unique_ptr> faceFVGridGeometryPtr() const + { + return std::make_unique>(this); + } + + //! Return a copy of the cell center specific auxiliary class. + CellCenterFVGridGeometry cellCenterFVGridGeometry() const + { + return CellCenterFVGridGeometry(this); + } + + //! Return a copy of the face specific auxiliary class. + FaceFVGridGeometry faceFVGridGeometry() const + { + return FaceFVGridGeometry(this); + } + + //! Returns whether one of the geometry's scvfs lies on a boundary + bool hasBoundaryScvf(GridIndexType eIdx) const + { return hasBoundaryScvf_[eIdx]; } + +private: + + void updateIntersectionMapper_() + { if constexpr (Deprecated::hasUpdateGridView()) intersectionMapper_.update(this->gridView()); else Deprecated::update(intersectionMapper_); + } + + void update_() + { + // clear containers (necessary after grid refinement) + scvs_.clear(); + scvfs_.clear(); + scvfIndicesOfScv_.clear(); + // determine size of containers std::size_t numScvs = this->gridView().size(0); std::size_t numScvf = 0; @@ -359,71 +457,6 @@ public: connectivityMap_.update(*this); } - //! Get a sub control volume with a global scv index - const SubControlVolume& scv(GridIndexType scvIdx) const - { - return scvs_[scvIdx]; - } - - //! Get a sub control volume face with a global scvf index - const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const - { - return scvfs_[scvfIdx]; - } - - //! Get the sub control volume face indices of an scv by global index - const std::vector& scvfIndicesOfScv(GridIndexType scvIdx) const - { - return scvfIndicesOfScv_[scvIdx]; - } - - GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const - { - return localToGlobalScvfIndices_[eIdx][localScvfIdx]; - } - - const SubControlVolumeFace& scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const - { - return scvf(localToGlobalScvfIndex(eIdx, localScvfIdx)); - } - - /*! - * \brief Returns the connectivity map of which dofs have derivatives with respect - * to a given dof. - */ - const ConnectivityMap &connectivityMap() const - { return connectivityMap_; } - - //! Returns a pointer the cell center specific auxiliary class. Required for the multi-domain FVAssembler's ctor. - std::unique_ptr> cellCenterFVGridGeometryPtr() const - { - return std::make_unique>(this); - } - - //! Returns a pointer the face specific auxiliary class. Required for the multi-domain FVAssembler's ctor. - std::unique_ptr> faceFVGridGeometryPtr() const - { - return std::make_unique>(this); - } - - //! Return a copy of the cell center specific auxiliary class. - CellCenterFVGridGeometry cellCenterFVGridGeometry() const - { - return CellCenterFVGridGeometry(this); - } - - //! Return a copy of the face specific auxiliary class. - FaceFVGridGeometry faceFVGridGeometry() const - { - return FaceFVGridGeometry(this); - } - - //! Returns whether one of the geometry's scvfs lies on a boundary - bool hasBoundaryScvf(GridIndexType eIdx) const - { return hasBoundaryScvf_[eIdx]; } - -private: - // mappers ConnectivityMap connectivityMap_; IntersectionMapper intersectionMapper_; @@ -506,62 +539,33 @@ public: if (!CheckOverlapSize::isValid(gridView)) DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. " << " Set the parameter \"Grid.Overlap\" in the input file."); + + update_(); } //! update all fvElementGeometries (do this again after grid adaption) + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update() { - // clear containers (necessary after grid refinement) - scvfIndicesOfScv_.clear(); - if constexpr (Deprecated::hasUpdateGridView()) - intersectionMapper_.update(this->gridView()); - else - Deprecated::update(intersectionMapper_); - neighborVolVarIndices_.clear(); - - numScvs_ = numCellCenterDofs(); - numScvf_ = 0; - numBoundaryScvf_ = 0; - scvfIndicesOfScv_.resize(numScvs_); - localToGlobalScvfIndices_.resize(numScvs_); - neighborVolVarIndices_.resize(numScvs_); - - // Build the scvs and scv faces - for (const auto& element : elements(this->gridView())) - { - auto eIdx = this->elementMapper().index(element); - - // the element-wise index sets for finite volume geometry - auto numLocalFaces = intersectionMapper_.numFaces(element); - std::vector scvfsIndexSet; - scvfsIndexSet.reserve(numLocalFaces); - localToGlobalScvfIndices_[eIdx].resize(numLocalFaces); - - std::vector neighborVolVarIndexSet; - neighborVolVarIndexSet.reserve(numLocalFaces); - - for (const auto& intersection : intersections(this->gridView(), element)) - { - const auto localFaceIndex = intersection.indexInInside(); - localToGlobalScvfIndices_[eIdx][localFaceIndex] = numScvf_; - scvfsIndexSet.push_back(numScvf_++); - - if (intersection.neighbor()) - { - const auto nIdx = this->elementMapper().index(intersection.outside()); - neighborVolVarIndexSet.emplace_back(nIdx); - } - else - neighborVolVarIndexSet.emplace_back(numScvs_ + numBoundaryScvf_++); - } + ParentType::update(); + updateIntersectionMapper_(); + update_(); + } - // Save the scvf indices belonging to this scv to build up fv element geometries fast - scvfIndicesOfScv_[eIdx] = scvfsIndexSet; - neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet; - } + //! update all fvElementGeometries (call this after grid adaption) + void update(const GridView& gridView) + { + ParentType::update(gridView); + updateIntersectionMapper_(); + update_(); + } - // build the connectivity map for an effecient assembly - connectivityMap_.update(*this); + //! update all fvElementGeometries (call this after grid adaption) + void update(GridView&& gridView) + { + ParentType::update(std::move(gridView)); + updateIntersectionMapper_(); + update_(); } //! The total number of sub control volumes @@ -649,6 +653,65 @@ public: private: + void updateIntersectionMapper_() + { + if constexpr (Deprecated::hasUpdateGridView()) + intersectionMapper_.update(this->gridView()); + else + Deprecated::update(intersectionMapper_); + } + + void update_() + { + // clear containers (necessary after grid refinement) + scvfIndicesOfScv_.clear(); + neighborVolVarIndices_.clear(); + + numScvs_ = numCellCenterDofs(); + numScvf_ = 0; + numBoundaryScvf_ = 0; + scvfIndicesOfScv_.resize(numScvs_); + localToGlobalScvfIndices_.resize(numScvs_); + neighborVolVarIndices_.resize(numScvs_); + + // Build the scvs and scv faces + for (const auto& element : elements(this->gridView())) + { + auto eIdx = this->elementMapper().index(element); + + // the element-wise index sets for finite volume geometry + auto numLocalFaces = intersectionMapper_.numFaces(element); + std::vector scvfsIndexSet; + scvfsIndexSet.reserve(numLocalFaces); + localToGlobalScvfIndices_[eIdx].resize(numLocalFaces); + + std::vector neighborVolVarIndexSet; + neighborVolVarIndexSet.reserve(numLocalFaces); + + for (const auto& intersection : intersections(this->gridView(), element)) + { + const auto localFaceIndex = intersection.indexInInside(); + localToGlobalScvfIndices_[eIdx][localFaceIndex] = numScvf_; + scvfsIndexSet.push_back(numScvf_++); + + if (intersection.neighbor()) + { + const auto nIdx = this->elementMapper().index(intersection.outside()); + neighborVolVarIndexSet.emplace_back(nIdx); + } + else + neighborVolVarIndexSet.emplace_back(numScvs_ + numBoundaryScvf_++); + } + + // Save the scvf indices belonging to this scv to build up fv element geometries fast + scvfIndicesOfScv_[eIdx] = scvfsIndexSet; + neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet; + } + + // build the connectivity map for an effecient assembly + connectivityMap_.update(*this); + } + //! Information on the global number of geometries std::size_t numScvs_; std::size_t numScvf_; diff --git a/dumux/multidomain/facet/box/fvgridgeometry.hh b/dumux/multidomain/facet/box/fvgridgeometry.hh index d16a2f9170e61dfdaba31aaa1225bc7892f82f13..deff0e2f51b51405a28a1465f0d6f3b67e079477 100644 --- a/dumux/multidomain/facet/box/fvgridgeometry.hh +++ b/dumux/multidomain/facet/box/fvgridgeometry.hh @@ -28,10 +28,12 @@ #define DUMUX_FACETCOUPLING_BOX_GRID_FVGEOMETRY_HH #include +#include #include #include +#include #include #include #include @@ -126,9 +128,20 @@ public: using GridView = GV; //! Constructor + [[deprecated("Use BoxFacetCouplingFVGridGeometry(gridView, facetGridView, codimOneGridAdapter) instead! Will be removed after release 3.5.")]] BoxFacetCouplingFVGridGeometry(const GridView& gridView) : ParentType(gridView) {} + template + BoxFacetCouplingFVGridGeometry(const GridView& gridView, + const FacetGridView& facetGridView, + const CodimOneGridAdapter& codimOneGridAdapter, + bool verbose = false) + : ParentType(gridView) + { + update_(facetGridView, codimOneGridAdapter, verbose); + } + //! the vertex mapper is the dofMapper const DofMapper& dofMapper() const { return this->vertexMapper(); } @@ -162,13 +175,89 @@ public: * \param verbose Verbosity level for vertex enrichment */ template + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update(const FacetGridView& facetGridView, const CodimOneGridAdapter& codimOneGridAdapter, bool verbose = false) { // first update the parent (mappers etc) ParentType::update(); + update_(facetGridView, codimOneGridAdapter, verbose); + } + + /*! + * \brief update all fvElementGeometries (call this after grid adaption) + * \note This assumes conforming grids! + * + * \param gridView The grid view of a dim-dimensional grid. + * + * \param facetGridView The grid view of a (dim-1)-dimensional grid conforming + * with the facets of this grid view, indicating on which facets + * nodal dofs should be enriched. + * \param codimOneGridAdapter Adapter class that allows access to information on the d- + * dimensional grid for entities of the (d-1)-dimensional grid + * \param verbose Verbosity level for vertex enrichment + */ + template + void update(const GridView& gridView, + const FacetGridView& facetGridView, + const CodimOneGridAdapter& codimOneGridAdapter, + bool verbose = false) + { + ParentType::update(gridView); + update_(facetGridView, codimOneGridAdapter, verbose); + } + + //! update all fvElementGeometries (call this after grid adaption) + template + void update(GridView&& gridView, + const FacetGridView& facetGridView, + const CodimOneGridAdapter& codimOneGridAdapter, + bool verbose = false) + { + ParentType::update(std::move(gridView)); + update_(facetGridView, codimOneGridAdapter, verbose); + } + + //! The finite element cache for creating local FE bases + const FeCache& feCache() const + { return feCache_; } + + //! Get the local scvs for an element + const std::vector& scvs(GridIndexType eIdx) const + { return scvs_[eIdx]; } + + //! Get the local scvfs for an element + const std::vector& scvfs(GridIndexType eIdx) const + { return scvfs_[eIdx]; } + + //! If a d.o.f. is on the boundary + bool dofOnBoundary(GridIndexType dofIdx) const + { return boundaryDofIndices_[dofIdx]; } + + //! If a d.o.f. is on an interior boundary + bool dofOnInteriorBoundary(GridIndexType dofIdx) const + { return interiorBoundaryDofIndices_[dofIdx]; } + + //! Periodic boundaries are not supported for the box facet coupling scheme + bool dofOnPeriodicBoundary(GridIndexType dofIdx) const + { return false; } + + //! The index of the vertex / d.o.f. on the other side of the periodic boundary + GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const + { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme"); } + + //! Returns the map between dofs across periodic boundaries + std::unordered_map periodicVertexMap() const + { return std::unordered_map(); } + +private: + template + void update_(const FacetGridView& facetGridView, + const CodimOneGridAdapter& codimOneGridAdapter, + bool verbose = false) + { // enrich the vertex mapper subject to the provided facet grid this->vertexMapper().enrich(facetGridView, codimOneGridAdapter, verbose); @@ -294,39 +383,6 @@ public: } } - //! The finite element cache for creating local FE bases - const FeCache& feCache() const - { return feCache_; } - - //! Get the local scvs for an element - const std::vector& scvs(GridIndexType eIdx) const - { return scvs_[eIdx]; } - - //! Get the local scvfs for an element - const std::vector& scvfs(GridIndexType eIdx) const - { return scvfs_[eIdx]; } - - //! If a d.o.f. is on the boundary - bool dofOnBoundary(GridIndexType dofIdx) const - { return boundaryDofIndices_[dofIdx]; } - - //! If a d.o.f. is on an interior boundary - bool dofOnInteriorBoundary(GridIndexType dofIdx) const - { return interiorBoundaryDofIndices_[dofIdx]; } - - //! Periodic boundaries are not supported for the box facet coupling scheme - bool dofOnPeriodicBoundary(GridIndexType dofIdx) const - { return false; } - - //! The index of the vertex / d.o.f. on the other side of the periodic boundary - GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const - { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme"); } - - //! Returns the map between dofs across periodic boundaries - std::unordered_map periodicVertexMap() const - { return std::unordered_map(); } - -private: const FeCache feCache_; std::vector> scvs_; @@ -385,11 +441,23 @@ public: using GridView = GV; //! Constructor + [[deprecated("Use BoxFacetCouplingFVGridGeometry(gridView, facetGridView, codimOneGridAdapter) instead! Will be removed after release 3.5.")]] BoxFacetCouplingFVGridGeometry(const GridView gridView) : ParentType(gridView) , facetMapper_(gridView, Dune::mcmgLayout(Dune::template Codim<1>())) {} + template + BoxFacetCouplingFVGridGeometry(const GridView& gridView, + const FacetGridView& facetGridView, + const CodimOneGridAdapter& codimOneGridAdapter, + bool verbose = false) + : ParentType(gridView) + , facetMapper_(gridView, Dune::mcmgLayout(Dune::template Codim<1>())) + { + update_(facetGridView, codimOneGridAdapter, verbose); + } + //! the vertex mapper is the dofMapper //! this is convenience to have better chance to have the same main files for box/tpfa/mpfa... const DofMapper& dofMapper() const @@ -424,13 +492,96 @@ public: * \param verbose Verbosity level */ template + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update(const FacetGridView& facetGridView, const CodimOneGridAdapter& codimOneGridAdapter, bool verbose = false) { // first update the parent (mappers etc) ParentType::update(); + updateFacetMapper_(); + update_(facetGridView, codimOneGridAdapter, verbose); + } + + /*! + * \brief update all fvElementGeometries (call this after grid adaption) + * \note This assumes conforming grids! + * + * \param gridView The grid view of a dim-dimensional grid. + * + * \param facetGridView The grid view of a (dim-1)-dimensional grid conforming + * with the facets of this grid view, indicating on which facets + * nodal dofs should be enriched. + * \param codimOneGridAdapter Adapter class that allows access to information on the d- + * dimensional grid for entities of the (d-1)-dimensional grid + * \param verbose Verbosity level for vertex enrichment + */ + template + void update(const GridView& gridView, + const FacetGridView& facetGridView, + const CodimOneGridAdapter& codimOneGridAdapter, + bool verbose = false) + { + ParentType::update(gridView); + updateFacetMapper_(); + update_(facetGridView, codimOneGridAdapter, verbose); + } + + //! update all fvElementGeometries (call this after grid adaption) + template + void update(GridView&& gridView, + const FacetGridView& facetGridView, + const CodimOneGridAdapter& codimOneGridAdapter, + bool verbose = false) + { + ParentType::update(std::move(gridView)); + updateFacetMapper_(); + update_(facetGridView, codimOneGridAdapter, verbose); + } + + //! The finite element cache for creating local FE bases + const FeCache& feCache() const + { return feCache_; } + + //! If a d.o.f. is on the boundary + bool dofOnBoundary(unsigned int dofIdx) const + { return boundaryDofIndices_[dofIdx]; } + + //! If a d.o.f. is on an interior boundary + bool dofOnInteriorBoundary(unsigned int dofIdx) const + { return interiorBoundaryDofIndices_[dofIdx]; } + + //! returns true if an intersection is on an interior boundary + bool isOnInteriorBoundary(const Element& element, const Intersection& intersection) const + { return facetIsOnInteriorBoundary_[ facetMapper_.subIndex(element, intersection.indexInInside(), 1) ]; } + //! Periodic boundaries are not supported for the box facet coupling scheme + bool dofOnPeriodicBoundary(GridIndexType dofIdx) const + { return false; } + + //! The index of the vertex / d.o.f. on the other side of the periodic boundary + GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const + { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the facet coupling scheme"); } + + //! Returns the map between dofs across periodic boundaries + std::unordered_map periodicVertexMap() const + { return std::unordered_map(); } + +private: + + void updateFacetMapper_() + { + if constexpr (Deprecated::hasUpdateGridView()) + facetMapper_.update(this->gridView()); + else + Deprecated::update(facetMapper_); + } + + template + void update_(const FacetGridView& facetGridView, + const CodimOneGridAdapter& codimOneGridAdapter, + bool verbose) + { // enrich the vertex mapper subject to the provided facet grid this->vertexMapper().enrich(facetGridView, codimOneGridAdapter, verbose); @@ -504,35 +655,6 @@ public: } } - //! The finite element cache for creating local FE bases - const FeCache& feCache() const - { return feCache_; } - - //! If a d.o.f. is on the boundary - bool dofOnBoundary(unsigned int dofIdx) const - { return boundaryDofIndices_[dofIdx]; } - - //! If a d.o.f. is on an interior boundary - bool dofOnInteriorBoundary(unsigned int dofIdx) const - { return interiorBoundaryDofIndices_[dofIdx]; } - - //! returns true if an intersection is on an interior boundary - bool isOnInteriorBoundary(const Element& element, const Intersection& intersection) const - { return facetIsOnInteriorBoundary_[ facetMapper_.subIndex(element, intersection.indexInInside(), 1) ]; } - - //! Periodic boundaries are not supported for the box facet coupling scheme - bool dofOnPeriodicBoundary(GridIndexType dofIdx) const - { return false; } - - //! The index of the vertex / d.o.f. on the other side of the periodic boundary - GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const - { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the facet coupling scheme"); } - - //! Returns the map between dofs across periodic boundaries - std::unordered_map periodicVertexMap() const - { return std::unordered_map(); } - -private: const FeCache feCache_; // Information on the global number of geometries diff --git a/dumux/porousmediumflow/2p/griddatatransfer.hh b/dumux/porousmediumflow/2p/griddatatransfer.hh index a10fff8980c41d4b19b0921b059bed958913d6b3..e7a87d189ee73ef3f4569a5dce10ceaff595f262 100644 --- a/dumux/porousmediumflow/2p/griddatatransfer.hh +++ b/dumux/porousmediumflow/2p/griddatatransfer.hh @@ -45,12 +45,14 @@ namespace Dumux { * \brief Class performing the transfer of data on a grid from before to after adaptation. */ template -class TwoPGridDataTransfer : public GridDataTransfer +class TwoPGridDataTransfer : public GridDataTransfer> { using Grid = GetPropType; + using ParentType = GridDataTransfer; using Scalar = GetPropType; using Problem = GetPropType; using GridGeometry = GetPropType; + using GridView = typename GridGeometry::GridView; using FVElementGeometry = typename GridGeometry::LocalView; using SubControlVolume = typename FVElementGeometry::SubControlVolume; using Extrusion = Extrusion_t; @@ -119,7 +121,7 @@ public: std::shared_ptr gridGeometry, std::shared_ptr gridVariables, SolutionVector& sol) - : GridDataTransfer() + : ParentType() , problem_(problem) , gridGeometry_(gridGeometry) , gridVariables_(gridVariables) @@ -135,11 +137,10 @@ public: * into a container object, before the grid is adapted. Father elements hold averaged * information from the son cells for the case of the sons being coarsened. */ - void store() override + void store(const Grid& grid) override { adaptionMap_.resize(); - const auto& grid = gridGeometry_->gridView().grid(); for (auto level = grid.maxLevel(); level >= 0; level--) { for (const auto& element : elements(grid.levelGridView(level))) @@ -201,11 +202,18 @@ public: * and then a new son is created. That is then stored into the general data * structure (AdaptedValues). */ - void reconstruct() override + void reconstruct(const Grid& grid) override + { + gridGeometry_->update(grid.leafGridView()); + reconstruct_(); + } + + private: + + void reconstruct_() { // resize stuff (grid might have changed) adaptionMap_.resize(); - gridGeometry_->update(); sol_.resize(gridGeometry_->numDofs()); // vectors storing the mass associated with each vertex, when using the box method @@ -392,8 +400,6 @@ public: //#endif } - private: - /*! * \brief Stores sons entries into father element for averaging * diff --git a/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh b/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh index 2d5a23fa1a4f4f7b24a2c1dca8919cd6adba816d..16dd5b706c767b383041da5cacea35b25f5c2a98 100644 --- a/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh +++ b/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh @@ -29,12 +29,14 @@ #ifndef DUMUX_POROUSMEDIUMFLOW_BOXDFM_GRID_FVGEOMETRY_HH #define DUMUX_POROUSMEDIUMFLOW_BOXDFM_GRID_FVGEOMETRY_HH +#include #include #include #include #include +#include #include #include #include @@ -132,9 +134,17 @@ public: using GridView = GV; //! Constructor + [[deprecated("Use BoxDfmFVGridGeometry(gridView, fractureGridAdapter) instead! Will be removed after release 3.5.")]] BoxDfmFVGridGeometry(const GridView gridView) : ParentType(gridView) {} + template< class FractureGridAdapter > + BoxDfmFVGridGeometry(const GridView gridView, const FractureGridAdapter& fractureGridAdapter) + : ParentType(gridView) + { + update_(fractureGridAdapter); + } + //! The vertex mapper is the dofMapper //! This is convenience to have better chance to have the same main files for box/tpfa/mpfa... const DofMapper& dofMapper() const @@ -159,10 +169,55 @@ public: //! Update all fvElementGeometries (do this again after grid adaption) template< class FractureGridAdapter > + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update(const FractureGridAdapter& fractureGridAdapter) { ParentType::update(); + update_(fractureGridAdapter); + } + + //! update all fvElementGeometries (call this after grid adaption) + template< class FractureGridAdapter > + void update(const GridView& gridView, const FractureGridAdapter& fractureGridAdapter) + { + ParentType::update(gridView); + update_(fractureGridAdapter); + } + + //! update all fvElementGeometries (call this after grid adaption) + template< class FractureGridAdapter > + void update(GridView&& gridView, const FractureGridAdapter& fractureGridAdapter) + { + ParentType::update(std::move(gridView)); + update_(fractureGridAdapter); + } + + //! The finite element cache for creating local FE bases + const FeCache& feCache() const { return feCache_; } + //! Get the local scvs for an element + const std::vector& scvs(GridIndexType eIdx) const { return scvs_[eIdx]; } + //! Get the local scvfs for an element + const std::vector& scvfs(GridIndexType eIdx) const { return scvfs_[eIdx]; } + //! If a vertex / d.o.f. is on the boundary + bool dofOnBoundary(unsigned int dofIdx) const { return boundaryDofIndices_[dofIdx]; } + //! If a vertex / d.o.f. is on a fracture + bool dofOnFracture(unsigned int dofIdx) const { return fractureDofIndices_[dofIdx]; } + //! Periodic boundaries are not supported for the box-dfm scheme + bool dofOnPeriodicBoundary(std::size_t dofIdx) const { return false; } + + //! The index of the vertex / d.o.f. on the other side of the periodic boundary + std::size_t periodicallyMappedDof(std::size_t dofIdx) const + { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme"); } + + //! Returns the map between dofs across periodic boundaries + std::unordered_map periodicVertexMap() const + { return std::unordered_map(); } + +private: + template< class FractureGridAdapter > + void update_(const FractureGridAdapter& fractureGridAdapter) + { scvs_.clear(); scvfs_.clear(); @@ -353,28 +408,6 @@ public: } } - //! The finite element cache for creating local FE bases - const FeCache& feCache() const { return feCache_; } - //! Get the local scvs for an element - const std::vector& scvs(GridIndexType eIdx) const { return scvs_[eIdx]; } - //! Get the local scvfs for an element - const std::vector& scvfs(GridIndexType eIdx) const { return scvfs_[eIdx]; } - //! If a vertex / d.o.f. is on the boundary - bool dofOnBoundary(unsigned int dofIdx) const { return boundaryDofIndices_[dofIdx]; } - //! If a vertex / d.o.f. is on a fracture - bool dofOnFracture(unsigned int dofIdx) const { return fractureDofIndices_[dofIdx]; } - //! Periodic boundaries are not supported for the box-dfm scheme - bool dofOnPeriodicBoundary(std::size_t dofIdx) const { return false; } - - //! The index of the vertex / d.o.f. on the other side of the periodic boundary - std::size_t periodicallyMappedDof(std::size_t dofIdx) const - { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme"); } - - //! Returns the map between dofs across periodic boundaries - std::unordered_map periodicVertexMap() const - { return std::unordered_map(); } - -private: const FeCache feCache_; std::vector> scvs_; @@ -432,11 +465,20 @@ public: using GridView = GV; //! Constructor + [[deprecated("Use BoxDfmFVGridGeometry(gridView, fractureGridAdapter) instead! Will be removed after release 3.5.")]] BoxDfmFVGridGeometry(const GridView gridView) : ParentType(gridView) , facetMapper_(gridView, Dune::mcmgLayout(Dune::template Codim<1>())) {} + template< class FractureGridAdapter > + BoxDfmFVGridGeometry(const GridView gridView, const FractureGridAdapter& fractureGridAdapter) + : ParentType(gridView) + , facetMapper_(gridView, Dune::mcmgLayout(Dune::template Codim<1>())) + { + update_(fractureGridAdapter); + } + //! the vertex mapper is the dofMapper //! this is convenience to have better chance to have the same main files for box/tpfa/mpfa... const DofMapper& dofMapper() const @@ -459,12 +501,68 @@ public: std::size_t numDofs() const { return this->gridView().size(dim); } - //! update all fvElementGeometries (do this again after grid adaption) + //! Update all fvElementGeometries (do this again after grid adaption) template< class FractureGridAdapter > + [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]] void update(const FractureGridAdapter& fractureGridAdapter) { ParentType::update(); + updateFacetMapper_(); + update_(fractureGridAdapter); + } + + //! update all fvElementGeometries (call this after grid adaption) + template< class FractureGridAdapter > + void update(const GridView& gridView, const FractureGridAdapter& fractureGridAdapter) + { + ParentType::update(gridView); + updateFacetMapper_(); + update_(fractureGridAdapter); + } + + //! update all fvElementGeometries (call this after grid adaption) + template< class FractureGridAdapter > + void update(GridView&& gridView, const FractureGridAdapter& fractureGridAdapter) + { + ParentType::update(std::move(gridView)); + updateFacetMapper_(); + update_(fractureGridAdapter); + } + + //! The finite element cache for creating local FE bases + const FeCache& feCache() const { return feCache_; } + //! If a vertex / d.o.f. is on the boundary + bool dofOnBoundary(unsigned int dofIdx) const { return boundaryDofIndices_[dofIdx]; } + //! If a vertex / d.o.f. is on a fracture + bool dofOnFracture(unsigned int dofIdx) const { return fractureDofIndices_[dofIdx]; } + //! Periodic boundaries are not supported for the box-dfm scheme + bool dofOnPeriodicBoundary(std::size_t dofIdx) const { return false; } + + //! Returns true if an intersection coincides with a fracture element + bool isOnFracture(const Element& element, const Intersection& intersection) const + { return facetOnFracture_[facetMapper_.subIndex(element, intersection.indexInInside(), 1)]; } + + //! The index of the vertex / d.o.f. on the other side of the periodic boundary + std::size_t periodicallyMappedDof(std::size_t dofIdx) const + { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme"); } + + //! Returns the map between dofs across periodic boundaries + std::unordered_map periodicVertexMap() const + { return std::unordered_map(); } + +private: + void updateFacetMapper_() + { + if constexpr (Deprecated::hasUpdateGridView()) + facetMapper_.update(this->gridView()); + else + Deprecated::update(facetMapper_); + } + + template< class FractureGridAdapter > + void update_(const FractureGridAdapter& fractureGridAdapter) + { boundaryDofIndices_.assign(numDofs(), false); fractureDofIndices_.assign(numDofs(), false); facetOnFracture_.assign(this->gridView().size(1), false); @@ -532,29 +630,6 @@ public: } } - //! The finite element cache for creating local FE bases - const FeCache& feCache() const { return feCache_; } - //! If a vertex / d.o.f. is on the boundary - bool dofOnBoundary(unsigned int dofIdx) const { return boundaryDofIndices_[dofIdx]; } - //! If a vertex / d.o.f. is on a fracture - bool dofOnFracture(unsigned int dofIdx) const { return fractureDofIndices_[dofIdx]; } - //! Periodic boundaries are not supported for the box-dfm scheme - bool dofOnPeriodicBoundary(std::size_t dofIdx) const { return false; } - - //! Returns true if an intersection coincides with a fracture element - bool isOnFracture(const Element& element, const Intersection& intersection) const - { return facetOnFracture_[facetMapper_.subIndex(element, intersection.indexInInside(), 1)]; } - - //! The index of the vertex / d.o.f. on the other side of the periodic boundary - std::size_t periodicallyMappedDof(std::size_t dofIdx) const - { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme"); } - - //! Returns the map between dofs across periodic boundaries - std::unordered_map periodicVertexMap() const - { return std::unordered_map(); } - -private: - const FeCache feCache_; // Information on the global number of geometries diff --git a/examples/1protationsymmetry/doc/main.md b/examples/1protationsymmetry/doc/main.md index 8fafcb7edbb6aa2fa92f31e10f592cd49f25f366..2d475ca49e09862011e5a0cd66b4f4b8511bf22e 100644 --- a/examples/1protationsymmetry/doc/main.md +++ b/examples/1protationsymmetry/doc/main.md @@ -80,7 +80,6 @@ int main(int argc, char** argv) try // instantiate the grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); ``` ### Initialize the problem and grid variables @@ -171,7 +170,7 @@ in the input file. // update the grid geometry, the grid variables and // the solution vectors now that the grid has been refined - gridGeometry->update(); + gridGeometry->update(gridManager.grid().leafGridView()); gridVariables->updateAfterGridAdaption(p); p.resize(gridGeometry->numDofs()); diff --git a/examples/1protationsymmetry/main.cc b/examples/1protationsymmetry/main.cc index e25029a781aa041bb83b2b8be4f6596236b009d3..f75766827fcccc4536f59791b1f63692a490cb72 100644 --- a/examples/1protationsymmetry/main.cc +++ b/examples/1protationsymmetry/main.cc @@ -74,7 +74,6 @@ int main(int argc, char** argv) try // instantiate the grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // [[/codeblock]] // ### Initialize the problem and grid variables @@ -158,7 +157,7 @@ int main(int argc, char** argv) try // update the grid geometry, the grid variables and // the solution vectors now that the grid has been refined - gridGeometry->update(); + gridGeometry->update(gridManager.grid().leafGridView()); gridVariables->updateAfterGridAdaption(p); p.resize(gridGeometry->numDofs()); diff --git a/examples/1ptracer/doc/main.md b/examples/1ptracer/doc/main.md index 24d3ffd9544d9c8546c54151ef765f581755c0bf..045bfc3e38c43c60943f7dd3b217c5f9125288bb 100644 --- a/examples/1ptracer/doc/main.md +++ b/examples/1ptracer/doc/main.md @@ -129,7 +129,6 @@ of the grid partition. ```cpp using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); ``` We now instantiate the problem, in which we define the boundary and initial conditions. diff --git a/examples/1ptracer/main.cc b/examples/1ptracer/main.cc index 7cf95abb433e1dfff806355e76c6fa6f7c21c3e2..21569bc52d9f5fd532aa140a8be8f529de6573b5 100644 --- a/examples/1ptracer/main.cc +++ b/examples/1ptracer/main.cc @@ -105,7 +105,6 @@ int main(int argc, char** argv) try // of the grid partition. using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // We now instantiate the problem, in which we define the boundary and initial conditions. using OnePProblem = GetPropType; diff --git a/examples/2pinfiltration/doc/main.md b/examples/2pinfiltration/doc/main.md index e1295b8b9a9c18744648c19347795c835d570898..88b4655dff7451a33c4084126620d4babff3a083 100644 --- a/examples/2pinfiltration/doc/main.md +++ b/examples/2pinfiltration/doc/main.md @@ -129,7 +129,6 @@ We need the finite volume geometry to build up the subcontrolvolumes (scv) and s ```cpp using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); ``` In the problem, we define the boundary and initial conditions and compute the point sources. The `computePointSourceMap` method is inherited from the fvproblem and therefore specified in the `dumux/common/fvproblem.hh`. It calls the `addPointSources` method specified in the `problem.hh` file. diff --git a/examples/2pinfiltration/main.cc b/examples/2pinfiltration/main.cc index 80458c97f433c1c928dd9eebe425cc3026101f7f..3f590b274546bebd1eba4a735fb43f429cde2cc7 100644 --- a/examples/2pinfiltration/main.cc +++ b/examples/2pinfiltration/main.cc @@ -98,7 +98,6 @@ int main(int argc, char** argv) try // We need the finite volume geometry to build up the subcontrolvolumes (scv) and subcontrolvolume faces (scvf) for each element of the grid partition. using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // In the problem, we define the boundary and initial conditions and compute the point sources. The `computePointSourceMap` method is inherited from the fvproblem and therefore specified in the `dumux/common/fvproblem.hh`. It calls the `addPointSources` method specified in the `problem.hh` file. // [[codeblock]] diff --git a/examples/biomineralization/doc/mainfile.md b/examples/biomineralization/doc/mainfile.md index 3fbcc53d68d0377e7de6af9842f6f7fc3c2e8c23..165c57104573c0b925fe6afe9479e5af5e92a109 100644 --- a/examples/biomineralization/doc/mainfile.md +++ b/examples/biomineralization/doc/mainfile.md @@ -121,7 +121,6 @@ We need the finite volume geometry to build up the subcontrolvolumes (scv) and s ```cpp using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); ``` We now instantiate the problem, in which we define the boundary and initial conditions. diff --git a/examples/biomineralization/main.cc b/examples/biomineralization/main.cc index 8ae2cc3b8400f2a5dc178810a7b56a6856540ccb..45fa5a95e6cde4bf857163572cdb15e36ab7e2b1 100644 --- a/examples/biomineralization/main.cc +++ b/examples/biomineralization/main.cc @@ -96,7 +96,6 @@ int main(int argc, char** argv) try // We need the finite volume geometry to build up the subcontrolvolumes (scv) and subcontrolvolume faces (scvf) for each element of the grid partition. using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // We now instantiate the problem, in which we define the boundary and initial conditions. using Problem = GetPropType; diff --git a/examples/freeflowchannel/README.md b/examples/freeflowchannel/README.md index 083f38209d72e0a7b047c3be819a798206b183c8..8cff6b94eb67a539ae9d5ac83914260a49b42788 100644 --- a/examples/freeflowchannel/README.md +++ b/examples/freeflowchannel/README.md @@ -477,7 +477,6 @@ of the grid partition. ```cpp using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); ``` We now instantiate the problem, in which we define the boundary and initial conditions. diff --git a/examples/freeflowchannel/main.cc b/examples/freeflowchannel/main.cc index 8994914603f92b90486c858a87779978ad7b934c..abe4b4e163b70ecf368d6ef6acfd126ac9aa8f7a 100644 --- a/examples/freeflowchannel/main.cc +++ b/examples/freeflowchannel/main.cc @@ -106,7 +106,6 @@ int main(int argc, char** argv) try // of the grid partition. using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // We now instantiate the problem, in which we define the boundary and initial conditions. using Problem = GetPropType; diff --git a/examples/liddrivencavity/doc/problem.md b/examples/liddrivencavity/doc/problem.md index 1e2d99474d0cfa94dadffbc5eb82af70d4ffdee3..5f139b903a3689ee4de9f1859bb24766c986a10e 100644 --- a/examples/liddrivencavity/doc/problem.md +++ b/examples/liddrivencavity/doc/problem.md @@ -429,7 +429,6 @@ of the grid partition. ```cpp using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); ``` We now instantiate the problem, in which we define the boundary and initial conditions. diff --git a/examples/liddrivencavity/main.cc b/examples/liddrivencavity/main.cc index d8c88134d8293980af9fce9ff33c91e1a519e09b..0b6680b1a41989fcc4694f638da953bc9c3e5cda 100644 --- a/examples/liddrivencavity/main.cc +++ b/examples/liddrivencavity/main.cc @@ -126,7 +126,6 @@ int main(int argc, char** argv) // of the grid partition. using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // We now instantiate the problem, in which we define the boundary and initial conditions. using Problem = GetPropType; diff --git a/examples/porenetwork_upscaling/doc/main.md b/examples/porenetwork_upscaling/doc/main.md index a42d8e3a9917a7015146c9a1abd19a6544372ca3..4433880183bc7c5797fec360cdddf27f36ad13a7 100644 --- a/examples/porenetwork_upscaling/doc/main.md +++ b/examples/porenetwork_upscaling/doc/main.md @@ -79,10 +79,9 @@ int main(int argc, char** argv) try const auto& leafGridView = gridManager.grid().leafGridView(); // instantiate the grid geometry - using GridGeometry = GetPropType; - auto gridGeometry = std::make_shared(leafGridView); auto gridData = gridManager.getGridData(); - gridGeometry->update(*gridData); + using GridGeometry = GetPropType; + auto gridGeometry = std::make_shared(leafGridView, *gridData); ``` ### Initialize the problem and grid variables diff --git a/examples/porenetwork_upscaling/main.cc b/examples/porenetwork_upscaling/main.cc index dfd431878d62fcdaf3a031e311744e68b56742e8..af9cb30c19e1b41649836347c1ea941b156a3325 100644 --- a/examples/porenetwork_upscaling/main.cc +++ b/examples/porenetwork_upscaling/main.cc @@ -73,10 +73,9 @@ int main(int argc, char** argv) try const auto& leafGridView = gridManager.grid().leafGridView(); // instantiate the grid geometry - using GridGeometry = GetPropType; - auto gridGeometry = std::make_shared(leafGridView); auto gridData = gridManager.getGridData(); - gridGeometry->update(*gridData); + using GridGeometry = GetPropType; + auto gridGeometry = std::make_shared(leafGridView, *gridData); // [[/codeblock]] // ### Initialize the problem and grid variables diff --git a/examples/shallowwaterfriction/doc/main.md b/examples/shallowwaterfriction/doc/main.md index ebf2c5f6c926adde4e12b31c626affc2d242355f..6989c8bb8bb2e0c119fa21dc635f964797e854f4 100644 --- a/examples/shallowwaterfriction/doc/main.md +++ b/examples/shallowwaterfriction/doc/main.md @@ -122,7 +122,6 @@ of the grid partition. ```cpp using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); ``` We now instantiate the problem, in which we define the boundary and initial conditions. diff --git a/examples/shallowwaterfriction/main.cc b/examples/shallowwaterfriction/main.cc index f231708a7aa0bc9b8dfb4f06ce5a28a5f18a3bb8..5e6dfd4ed05d693e5fb967454ee84cc52c40d1e6 100644 --- a/examples/shallowwaterfriction/main.cc +++ b/examples/shallowwaterfriction/main.cc @@ -97,7 +97,6 @@ int main(int argc, char** argv) try // of the grid partition. using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // We now instantiate the problem, in which we define the boundary and initial conditions. using Problem = GetPropType; diff --git a/test/discretization/box/test_boxfvgeometry.cc b/test/discretization/box/test_boxfvgeometry.cc index da016a1757f0af72099b69592ea6908efadfca35..1434154d32ef052190f9f230096f444e31f34290 100644 --- a/test/discretization/box/test_boxfvgeometry.cc +++ b/test/discretization/box/test_boxfvgeometry.cc @@ -73,7 +73,6 @@ int main (int argc, char *argv[]) auto leafGridView = grid->leafGridView(); GridGeometry gridGeometry(leafGridView); - gridGeometry.update(); // iterate over elements. For every element get fv geometry and loop over scvs and scvfaces for (const auto& element : elements(leafGridView)) diff --git a/test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc b/test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc index a106e92a85adab6042a01834f06ef7cb605a396b..435fb6e8620e254971d64b8c23be53cc95b7137e 100644 --- a/test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc +++ b/test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc @@ -74,7 +74,6 @@ int main (int argc, char *argv[]) // obtain leaf and make GridGeometry auto leafGridView = grid->leafGridView(); GridGeometry gridGeometry(leafGridView); - gridGeometry.update(); // iterate over elements. For every element get fv geometry and loop over scvs and scvfaces for (const auto& element : elements(leafGridView)) diff --git a/test/discretization/cellcentered/tpfa/test_tpfafvgeometry_nonconforming.cc b/test/discretization/cellcentered/tpfa/test_tpfafvgeometry_nonconforming.cc index 36218567fb11e49b33366f069ee1f4dc0b5db5b7..aa91b0b44bfa88dde3724b15482c5530b936ccc6 100644 --- a/test/discretization/cellcentered/tpfa/test_tpfafvgeometry_nonconforming.cc +++ b/test/discretization/cellcentered/tpfa/test_tpfafvgeometry_nonconforming.cc @@ -143,7 +143,6 @@ int main (int argc, char *argv[]) //! instantiate and update gridGeometry GridGeometry gridGeometry(leafGridView); - gridGeometry.update(); //! We should have constructed 12 scvfs if (gridGeometry.numScv() != 12) diff --git a/test/discretization/rotationsymmetry/test_rotationsymmetric_gridgeometry.cc b/test/discretization/rotationsymmetry/test_rotationsymmetric_gridgeometry.cc index 2f4ebe24c5d4a24ce49c7625986d8e43afd3eb2c..fb1094e1d8e928cc4203add85f2351bec3280ddc 100644 --- a/test/discretization/rotationsymmetry/test_rotationsymmetric_gridgeometry.cc +++ b/test/discretization/rotationsymmetry/test_rotationsymmetric_gridgeometry.cc @@ -114,7 +114,6 @@ int main (int argc, char *argv[]) // obtain leaf and make GridGeometry auto leafGridView = grid->leafGridView(); GridGeometry gg(leafGridView); - gg.update(); // compute the annulus area and the surface const double refVolume = M_PI*(outerRadius*outerRadius - innerRadius*innerRadius); @@ -144,7 +143,6 @@ int main (int argc, char *argv[]) // obtain leaf and make GridGeometry auto leafGridView = grid->leafGridView(); GridGeometry gg(leafGridView); - gg.update(); // compute the ball volume and the surface const double refVolume = 4.0/3.0*M_PI*(outerRadius*outerRadius*outerRadius - innerRadius*innerRadius*innerRadius); @@ -177,7 +175,6 @@ int main (int argc, char *argv[]) // make GridGeometry GridGeometry gg(leafGridView); - gg.update(); // compute the volume and the surface const auto centroidRadius = 0.5*(innerRadius + outerRadius); @@ -195,7 +192,6 @@ int main (int argc, char *argv[]) { using Extrusion = RotationalExtrusion<1>; }; using GridGeometry = CCTpfaFVGridGeometry; GridGeometry gg(leafGridView); - gg.update(); // compute the volume and the surface const auto centroidRadius = 0.5*height; diff --git a/test/discretization/staggered/test_staggered_free_flow_geometry.cc b/test/discretization/staggered/test_staggered_free_flow_geometry.cc index 5fce7aa9e48242cab6edaf55fa728203d4036281..d5d034c2dbbb2ab4fd17473f7f05715e7b628cf2 100644 --- a/test/discretization/staggered/test_staggered_free_flow_geometry.cc +++ b/test/discretization/staggered/test_staggered_free_flow_geometry.cc @@ -88,7 +88,6 @@ int main (int argc, char *argv[]) auto leafGridView = grid->leafGridView(); GridGeometry gridGeometry(leafGridView); - gridGeometry.update(); std::cout << "Abbreviatons:\n" << "pos - postition of face center\n" diff --git a/test/discretization/staggered/test_staggeredfvgeometry.cc b/test/discretization/staggered/test_staggeredfvgeometry.cc index 44214918e25f6160b4f6d56061c801ac37cd8a8e..bf1377d0ffba6f6d38293299b121649feb0453dc 100644 --- a/test/discretization/staggered/test_staggeredfvgeometry.cc +++ b/test/discretization/staggered/test_staggeredfvgeometry.cc @@ -124,7 +124,6 @@ int main (int argc, char *argv[]) auto leafGridView = grid->leafGridView(); GridGeometry gridGeometry(leafGridView); - gridGeometry.update(); // iterate over elements. For every element get fv geometry and loop over scvs and scvfaces for (const auto& element : elements(leafGridView)) diff --git a/test/freeflow/navierstokes/angeli/main.cc b/test/freeflow/navierstokes/angeli/main.cc index bf7b1d7009895ecf80a6d9b49bb711dc07fca2d8..2ec5ab225d6d57bc16cb823af2dbc5dda5ab3c58 100644 --- a/test/freeflow/navierstokes/angeli/main.cc +++ b/test/freeflow/navierstokes/angeli/main.cc @@ -132,7 +132,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // get some time loop parameters using Scalar = GetPropType; diff --git a/test/freeflow/navierstokes/channel/1d/main.cc b/test/freeflow/navierstokes/channel/1d/main.cc index 5af6b617798079aa9388189e31e1a4cdadbdac0c..f1aa15c4465948b231fc8c564180bd9dd1a99977 100644 --- a/test/freeflow/navierstokes/channel/1d/main.cc +++ b/test/freeflow/navierstokes/channel/1d/main.cc @@ -75,7 +75,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/navierstokes/channel/2d/main.cc b/test/freeflow/navierstokes/channel/2d/main.cc index bbcb337b629b2cfba38b11ca34fc3b5cfda9942e..2c180790aa28daa3df6e7cca86cf110db7b0d98f 100644 --- a/test/freeflow/navierstokes/channel/2d/main.cc +++ b/test/freeflow/navierstokes/channel/2d/main.cc @@ -76,7 +76,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/navierstokes/channel/3d/main.cc b/test/freeflow/navierstokes/channel/3d/main.cc index bc41689723d955a234a1d0fabfdbb38a8605940b..40df458c2b91d7bb9eaeaad5bfd6cd977d3f9fe8 100644 --- a/test/freeflow/navierstokes/channel/3d/main.cc +++ b/test/freeflow/navierstokes/channel/3d/main.cc @@ -101,7 +101,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/navierstokes/channel/pipe/main.cc b/test/freeflow/navierstokes/channel/pipe/main.cc index d8980e127014624ce58e85ccd069ec8d2a8eb96b..5e5a62fbada4d8dc5a8518216da3c9381a53b80d 100644 --- a/test/freeflow/navierstokes/channel/pipe/main.cc +++ b/test/freeflow/navierstokes/channel/pipe/main.cc @@ -90,7 +90,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(gridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/navierstokes/donea/main.cc b/test/freeflow/navierstokes/donea/main.cc index b0dffe48ad481716d9f99249d155251b8e034571..177bb4f4349c2c8549076732e2c8145479bae0f8 100644 --- a/test/freeflow/navierstokes/donea/main.cc +++ b/test/freeflow/navierstokes/donea/main.cc @@ -77,7 +77,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/navierstokes/kovasznay/main.cc b/test/freeflow/navierstokes/kovasznay/main.cc index e0c81ef42e0dcf5744f6174d9a84445d545c4e35..c9af40ea99d41d8dd953c7f255e6a75c3e753742 100644 --- a/test/freeflow/navierstokes/kovasznay/main.cc +++ b/test/freeflow/navierstokes/kovasznay/main.cc @@ -105,7 +105,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/navierstokes/sincos/main.cc b/test/freeflow/navierstokes/sincos/main.cc index 8830ec2ba660aa97b39d10911167afe6351e2d1f..ecfd4a251a30d0cdc82cd92f1ac41fd606b63841 100644 --- a/test/freeflow/navierstokes/sincos/main.cc +++ b/test/freeflow/navierstokes/sincos/main.cc @@ -197,7 +197,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // get some time loop parameters using Scalar = GetPropType; diff --git a/test/freeflow/navierstokesnc/channel/main.cc b/test/freeflow/navierstokesnc/channel/main.cc index 28e799b1064b86ceb110e7b4a5b7daedcde5b8dc..c09c219c9b800fb8e04ce8f6cee73add9514ef7c 100644 --- a/test/freeflow/navierstokesnc/channel/main.cc +++ b/test/freeflow/navierstokesnc/channel/main.cc @@ -75,7 +75,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/navierstokesnc/densitydrivenflow/main.cc b/test/freeflow/navierstokesnc/densitydrivenflow/main.cc index 0f595dbe68f12e3c0bda9b8189322e2fd9a6e90d..b67b928577ad5de1431fe344a7bbe3a06f083363 100644 --- a/test/freeflow/navierstokesnc/densitydrivenflow/main.cc +++ b/test/freeflow/navierstokesnc/densitydrivenflow/main.cc @@ -75,7 +75,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/navierstokesnc/maxwellstefan/main.cc b/test/freeflow/navierstokesnc/maxwellstefan/main.cc index a9348bc5ed2f7b367951775ce7b58af98dd06e66..85c094f25abe4981e8db61e560b8eaf0fa255957 100644 --- a/test/freeflow/navierstokesnc/maxwellstefan/main.cc +++ b/test/freeflow/navierstokesnc/maxwellstefan/main.cc @@ -75,7 +75,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/rans/main.cc b/test/freeflow/rans/main.cc index 2360d7879bc2560ba7af6f4cbebb71751335592a..39e2a52fa781efcef1cfd9b0185e21f19dbf5803 100644 --- a/test/freeflow/rans/main.cc +++ b/test/freeflow/rans/main.cc @@ -99,7 +99,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/ransnc/main.cc b/test/freeflow/ransnc/main.cc index 9b55db443ebe2951afbc919d545db07956150538..518732f24bd3e25bcf2f224e9e7b563fc2dd0b7f 100644 --- a/test/freeflow/ransnc/main.cc +++ b/test/freeflow/ransnc/main.cc @@ -97,7 +97,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/shallowwater/bowl/main.cc b/test/freeflow/shallowwater/bowl/main.cc index f777814f217e692d69ac1428d126046b11358e74..4f9e24fab4e1d464a0150a98c66a70d924f9a342 100644 --- a/test/freeflow/shallowwater/bowl/main.cc +++ b/test/freeflow/shallowwater/bowl/main.cc @@ -154,7 +154,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/shallowwater/dambreak/main.cc b/test/freeflow/shallowwater/dambreak/main.cc index 7755ceefac4cc759859221cc8d0d2b62cb5fb773..3d9aa15439d37bf62db4a2c30c0b6e9e345c40ba 100644 --- a/test/freeflow/shallowwater/dambreak/main.cc +++ b/test/freeflow/shallowwater/dambreak/main.cc @@ -88,7 +88,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/freeflow/shallowwater/poiseuilleflow/main.cc b/test/freeflow/shallowwater/poiseuilleflow/main.cc index 932bb3d1fb4e3f76a74eb9f8e6f0cb4e59e02c5b..8d31944398240cff2e6c1c99ec6356c3a46262db 100644 --- a/test/freeflow/shallowwater/poiseuilleflow/main.cc +++ b/test/freeflow/shallowwater/poiseuilleflow/main.cc @@ -57,7 +57,6 @@ int main(int argc, char** argv) using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // problem, in which we define the boundary and initial conditions. using Problem = GetPropType; diff --git a/test/freeflow/shallowwater/roughchannel/main.cc b/test/freeflow/shallowwater/roughchannel/main.cc index 3976a282c3a6025080b4b2c0fab4b80bc2229425..a1c1201043ce336e3c33acf644b6967570a7d80c 100644 --- a/test/freeflow/shallowwater/roughchannel/main.cc +++ b/test/freeflow/shallowwater/roughchannel/main.cc @@ -78,7 +78,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/geomechanics/elastic/main.cc b/test/geomechanics/elastic/main.cc index c613701af2c8fec95e549b56644ba9e763f1ebfa..a6b49e382ffef415c5859b13a31a0c25b61e9e9f 100644 --- a/test/geomechanics/elastic/main.cc +++ b/test/geomechanics/elastic/main.cc @@ -82,7 +82,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/geomechanics/poroelastic/main.cc b/test/geomechanics/poroelastic/main.cc index 64d9b6abb964924bcb332b5caf6497d7db359528..2dd74851c078730be06a33c2587eb6be6ae131d3 100644 --- a/test/geomechanics/poroelastic/main.cc +++ b/test/geomechanics/poroelastic/main.cc @@ -125,7 +125,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/io/gridmanager/test_gmshboundaryflag.cc b/test/io/gridmanager/test_gmshboundaryflag.cc index df8a729257412479a3d8debc30fcfc5741c79bc1..41529064581e57b9b1ac6221006ff27298f5b441 100644 --- a/test/io/gridmanager/test_gmshboundaryflag.cc +++ b/test/io/gridmanager/test_gmshboundaryflag.cc @@ -87,7 +87,6 @@ int main(int argc, char** argv) > >; auto boxFvGridGeometry = std::make_shared(leafGridView); - boxFvGridGeometry->update(); // run the test GmshBoundaryFlagTest::testGmshBoundaryFlag(leafGridView, boxFvGridGeometry, gridData); @@ -104,7 +103,6 @@ int main(int argc, char** argv) > >; auto ccTpfaFvGridGeometry = std::make_shared(leafGridView); - ccTpfaFvGridGeometry->update(); // run the test GmshBoundaryFlagTest::testGmshBoundaryFlag(leafGridView, ccTpfaFvGridGeometry, gridData); diff --git a/test/io/gridmanager/test_pnm_subgriddata.cc b/test/io/gridmanager/test_pnm_subgriddata.cc index ff48ab79ab10ca5c3ab6d917842be3b15bb19c95..40b6e5936a76e5c7ad116f0a4066c182109063de 100644 --- a/test/io/gridmanager/test_pnm_subgriddata.cc +++ b/test/io/gridmanager/test_pnm_subgriddata.cc @@ -63,8 +63,7 @@ int main(int argc, char** argv) using SubGridData = PoreNetwork::SubGridData; auto gridData = std::make_shared(subGridManager.grid(), hostGridData); - PoreNetwork::GridGeometry gridGeometry(subGridManager.grid().leafGridView()); - gridGeometry.update(*gridData); + PoreNetwork::GridGeometry gridGeometry(subGridManager.grid().leafGridView(), *gridData); const auto& params = gridData->parameters(*(elements(subGridManager.grid().leafGridView()).begin())); for (const auto& p : params) diff --git a/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc b/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc index 0f35516cfc64a562ec946c1678de4a0e6d68d9b1..2e9cfc15f3870eb0f1bd4f01eed95b42defcad4e 100644 --- a/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc +++ b/test/io/vtk/test_vtk_staggeredfreeflowpvnames.cc @@ -328,7 +328,6 @@ int main(int argc, char** argv) const auto grid = Dune::StructuredGridFactory::createCubeGrid(lowerLeft, upperRight, cells); const auto gridView = grid->leafGridView(); auto gridGeometry = std::make_shared(gridView); - gridGeometry->update(); using FluidSystem = GetPropType; FluidSystem::init(); diff --git a/test/multidomain/boundary/darcydarcy/1p_1p/main.cc b/test/multidomain/boundary/darcydarcy/1p_1p/main.cc index 8afc1660b005942d8988ef5fd37869be0ce304f9..c9b8cc5ca5ff9f05bdedffd1078458f5c6e826ef 100644 --- a/test/multidomain/boundary/darcydarcy/1p_1p/main.cc +++ b/test/multidomain/boundary/darcydarcy/1p_1p/main.cc @@ -122,8 +122,6 @@ int main(int argc, char** argv) using GridGeometry = GetPropType; auto fvGridGeometry0 = std::make_shared(gridView0); auto fvGridGeometry1 = std::make_shared(gridView1); - fvGridGeometry0->update(); - fvGridGeometry1->update(); // the mixed dimension type traits using Traits = MultiDomainTraits; diff --git a/test/multidomain/boundary/darcydarcy/1p_2p/main.cc b/test/multidomain/boundary/darcydarcy/1p_2p/main.cc index 372b400335b512a0b97132a8b849764b720d2aa8..385d63c44812ee55f494ce3cc7fd6b730f902860 100644 --- a/test/multidomain/boundary/darcydarcy/1p_2p/main.cc +++ b/test/multidomain/boundary/darcydarcy/1p_2p/main.cc @@ -107,8 +107,6 @@ int main(int argc, char** argv) using GridGeometry = GetPropType; auto fvGridGeometry0 = std::make_shared(gridView0); auto fvGridGeometry1 = std::make_shared(gridView1); - fvGridGeometry0->update(); - fvGridGeometry1->update(); // the mixed dimension type traits using Traits = MultiDomainTraits; diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/main.cc b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/main.cc index 442fddcaf9e08246ed7ddd66a46bf90d0770bad2..9e6bc2159a13acf80ce22d27f136a7c2b77f06ca 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/main.cc @@ -83,10 +83,8 @@ int main(int argc, char** argv) // create the finite volume grid geometry using StokesFVGridGeometry = GetPropType; auto stokesFvGridGeometry = std::make_shared(stokesGridView); - stokesFvGridGeometry->update(); using DarcyFVGridGeometry = GetPropType; auto darcyFvGridGeometry = std::make_shared(darcyGridView); - darcyFvGridGeometry->update(); using Traits = StaggeredMultiDomainTraits; diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/main.cc b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/main.cc index bd62179d14ff3a928bfbbf72a9c92d2314fe7ead..4c2ac5bfa201558e6a8a7e2d354032460e25e20c 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/main.cc @@ -82,10 +82,8 @@ int main(int argc, char** argv) // create the finite volume grid geometry using StokesFVGridGeometry = GetPropType; auto stokesFvGridGeometry = std::make_shared(stokesGridView); - stokesFvGridGeometry->update(); using DarcyFVGridGeometry = GetPropType; auto darcyFvGridGeometry = std::make_shared(darcyGridView); - darcyFvGridGeometry->update(); using Traits = StaggeredMultiDomainTraits; diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc b/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc index 5787d767afefc80de60c8766f21b27ebaca1d13c..eed0b9f2940823adf019fcd0b4f819454a21a41b 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc @@ -84,10 +84,8 @@ int main(int argc, char** argv) // create the finite volume grid geometry using StokesFVGridGeometry = GetPropType; auto stokesFvGridGeometry = std::make_shared(stokesGridView); - stokesFvGridGeometry->update(); using DarcyFVGridGeometry = GetPropType; auto darcyFvGridGeometry = std::make_shared(darcyGridView); - darcyFvGridGeometry->update(); using Traits = StaggeredMultiDomainTraits; diff --git a/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/main.cc b/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/main.cc index 66fc70abdeb84bb50c7a488d1fac5e777e33cd04..ed7fdbf2491cd25e252e2f230b2e4e7895b69b6e 100644 --- a/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/main.cc @@ -82,10 +82,8 @@ int main(int argc, char** argv) // create the finite volume grid geometry using StokesFVGridGeometry = GetPropType; auto stokesFvGridGeometry = std::make_shared(stokesGridView); - stokesFvGridGeometry->update(); using DarcyFVGridGeometry = GetPropType; auto darcyFvGridGeometry = std::make_shared(darcyGridView); - darcyFvGridGeometry->update(); using Traits = StaggeredMultiDomainTraits; diff --git a/test/multidomain/boundary/stokesdarcy/1p_1p/convergencetest/main.cc b/test/multidomain/boundary/stokesdarcy/1p_1p/convergencetest/main.cc index 9176d17e5739c4a1868201e3301be01c7fcb8a04..a77c039eedc92e918a090f56cc1c2f0f51aac813 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_1p/convergencetest/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p_1p/convergencetest/main.cc @@ -246,10 +246,8 @@ int main(int argc, char** argv) // create the finite volume grid geometry using FreeFlowGridGeometry = GetPropType; auto freeFlowGridGeometry = std::make_shared(freeFlowGridView); - freeFlowGridGeometry->update(); using DarcyGridGeometry = GetPropType; auto darcyGridGeometry = std::make_shared(darcyGridView); - darcyGridGeometry->update(); using Traits = StaggeredMultiDomainTraits; diff --git a/test/multidomain/boundary/stokesdarcy/1p_1p/main.cc b/test/multidomain/boundary/stokesdarcy/1p_1p/main.cc index 3d97cb2e03918946adae99034aa0c476f57aa838..b4c3684eabe05da1a62f348f88b42355549ab3f0 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_1p/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p_1p/main.cc @@ -84,10 +84,8 @@ int main(int argc, char** argv) // create the finite volume grid geometry using StokesFVGridGeometry = GetPropType; auto stokesFvGridGeometry = std::make_shared(stokesGridView); - stokesFvGridGeometry->update(); using DarcyFVGridGeometry = GetPropType; auto darcyFvGridGeometry = std::make_shared(darcyGridView); - darcyFvGridGeometry->update(); using Traits = StaggeredMultiDomainTraits; diff --git a/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc b/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc index 784fc4a29d4f7200c5510dd96d7028f5003aa3df..946fedec05185cb46c9c1a58b001e30c4f3eac85 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc @@ -81,10 +81,8 @@ int main(int argc, char** argv) // create the finite volume grid geometry using StokesFVGridGeometry = GetPropType; auto stokesFvGridGeometry = std::make_shared(stokesGridView); - stokesFvGridGeometry->update(); using DarcyFVGridGeometry = GetPropType; auto darcyFvGridGeometry = std::make_shared(darcyGridView); - darcyFvGridGeometry->update(); using Traits = StaggeredMultiDomainTraits; diff --git a/test/multidomain/embedded/1d3d/1p2c_richards2c/main.cc b/test/multidomain/embedded/1d3d/1p2c_richards2c/main.cc index 39f5383ff8de68d0dcdfb924f43594621323945d..8e2b987a2d0bfc2ea5a03f93987629da28ee0e38 100644 --- a/test/multidomain/embedded/1d3d/1p2c_richards2c/main.cc +++ b/test/multidomain/embedded/1d3d/1p2c_richards2c/main.cc @@ -183,10 +183,8 @@ int main(int argc, char** argv) // create the finite volume grid geometry using BulkFVGridGeometry = GetPropType; auto bulkFvGridGeometry = std::make_shared(bulkGridView); - bulkFvGridGeometry->update(); using LowDimFVGridGeometry = GetPropType; auto lowDimFvGridGeometry = std::make_shared(lowDimGridView); - lowDimFvGridGeometry->update(); // the mixed dimension type traits using Traits = MultiDomainTraits; @@ -269,14 +267,10 @@ int main(int argc, char** argv) soilGrid.postAdapt(); } - // update the bounding box tree - bulkFvGridGeometry->update(); + // update the grid geometry (including the bounding box tree) + bulkFvGridGeometry->update(bulkGridView); } - // update geometry after refinement - bulkFvGridGeometry->update(); - lowDimFvGridGeometry->update(); - // output min max h double bulkHMin = 1.0; double bulkHMax = 0.0; for (const auto& element : elements(bulkGridView)) diff --git a/test/multidomain/embedded/1d3d/1p_1p/main.cc b/test/multidomain/embedded/1d3d/1p_1p/main.cc index f6ce4a1deaed15eac8c125f66c87c49a01cd3a44..05c21c553786f49bc31bd2160b86069576c57fc4 100644 --- a/test/multidomain/embedded/1d3d/1p_1p/main.cc +++ b/test/multidomain/embedded/1d3d/1p_1p/main.cc @@ -86,10 +86,8 @@ int main(int argc, char** argv) // create the finite volume grid geometry using BulkFVGridGeometry = GetPropType; auto bulkFvGridGeometry = std::make_shared(bulkGridView); - bulkFvGridGeometry->update(); using LowDimFVGridGeometry = GetPropType; auto lowDimFvGridGeometry = std::make_shared(lowDimGridView); - lowDimFvGridGeometry->update(); // the mixed dimension type traits using Traits = MultiDomainTraits; diff --git a/test/multidomain/embedded/1d3d/1p_richards/main.cc b/test/multidomain/embedded/1d3d/1p_richards/main.cc index 6b049d59bba912207a7c0116b9e2ca19f14dcc8f..0790f9c809d7c1c77905c0e2b69f0ddfc3c4ee22 100644 --- a/test/multidomain/embedded/1d3d/1p_richards/main.cc +++ b/test/multidomain/embedded/1d3d/1p_richards/main.cc @@ -85,10 +85,8 @@ int main(int argc, char** argv) // create the finite volume grid geometry using BulkFVGridGeometry = GetPropType; auto bulkFvGridGeometry = std::make_shared(bulkGridView); - bulkFvGridGeometry->update(); using LowDimFVGridGeometry = GetPropType; auto lowDimFvGridGeometry = std::make_shared(lowDimGridView); - lowDimFvGridGeometry->update(); // the mixed dimension type traits using Traits = MultiDomainTraits; diff --git a/test/multidomain/embedded/2d3d/1p_1p/main.cc b/test/multidomain/embedded/2d3d/1p_1p/main.cc index d22958f2fd862dac79074979900bd0208b630a64..9ed63755aa547cf809ac14258442ca729003c6d7 100644 --- a/test/multidomain/embedded/2d3d/1p_1p/main.cc +++ b/test/multidomain/embedded/2d3d/1p_1p/main.cc @@ -142,10 +142,8 @@ int main(int argc, char** argv) // create the finite volume grid geometry using BulkFVGridGeometry = GetPropType; auto bulkFvGridGeometry = std::make_shared(bulkGridView); - bulkFvGridGeometry->update(); using LowDimFVGridGeometry = GetPropType; auto lowDimFvGridGeometry = std::make_shared(lowDimGridView); - lowDimFvGridGeometry->update(); // the mixed dimension type traits using Traits = MultiDomainTraits; diff --git a/test/multidomain/facet/1p_1p/analytical/main.cc b/test/multidomain/facet/1p_1p/analytical/main.cc index 99a958919f7ce0ddf6e6be37e64406c5ee6a406c..469735bbafe1a2c279e71c4e127d6080fbefb85f 100644 --- a/test/multidomain/facet/1p_1p/analytical/main.cc +++ b/test/multidomain/facet/1p_1p/analytical/main.cc @@ -117,38 +117,32 @@ computeL2Norm(const GridView& gridView, } /*! - * \brief Updates the finite volume grid geometry for the box scheme. - * - * This is necessary as the finite volume grid geometry for the box scheme with - * facet coupling requires additional data for the update. The reason is that - * we have to create additional faces on interior boundaries, which wouldn't be - * created in the standard scheme. + * \brief Constructs the finite volume grid geometry. */ -template< class GridGeometry, +template< class BulkGridGeometry, class GridManager, - class LowDimGridView, - std::enable_if_t = 0 > -void updateBulkFVGridGeometry(GridGeometry& gridGeometry, - const GridManager& gridManager, - const LowDimGridView& lowDimGridView) + class BulkGridView, + class LowDimGridView > +auto makeBulkFVGridGeometry(const GridManager& gridManager, + const BulkGridView& bulkGridView, + const LowDimGridView& lowDimGridView) { - using BulkFacetGridAdapter = Dumux::CodimOneGridAdapter; - BulkFacetGridAdapter facetGridAdapter(gridManager.getEmbeddings()); - gridGeometry.update(lowDimGridView, facetGridAdapter); -} - -/*! - * \brief Updates the finite volume grid geometry for the cell-centered schemes. - */ -template< class GridGeometry, - class GridManager, - class LowDimGridView, - std::enable_if_t = 0 > -void updateBulkFVGridGeometry(GridGeometry& gridGeometry, - const GridManager& gridManager, - const LowDimGridView& lowDimGridView) -{ - gridGeometry.update(); + /*! + * The finite volume grid geometry for the box scheme with facet coupling + * requires additional data for the constructor. The reason is that + * we have to create additional faces on interior boundaries, which are not + * created in the standard scheme. + */ + if constexpr (BulkGridGeometry::discMethod == Dumux::DiscretizationMethod::box) + { + using BulkFacetGridAdapter = Dumux::CodimOneGridAdapter; + BulkFacetGridAdapter facetGridAdapter(gridManager.getEmbeddings()); + return std::make_shared(bulkGridView, lowDimGridView, facetGridAdapter); + } + else + { + return std::make_shared(bulkGridView); + } } } // end namespace Dumux @@ -195,10 +189,8 @@ int main(int argc, char** argv) // create the finite volume grid geometries using BulkFVGridGeometry = GetPropType; using LowDimFVGridGeometry = GetPropType; - auto bulkFvGridGeometry = std::make_shared(bulkGridView); auto lowDimFvGridGeometry = std::make_shared(lowDimGridView); - updateBulkFVGridGeometry(*bulkFvGridGeometry, gridManager, lowDimGridView); - lowDimFvGridGeometry->update(); + auto bulkFvGridGeometry = makeBulkFVGridGeometry(gridManager, bulkGridView, lowDimGridView); // the coupling manager using TestTraits = Properties::TestTraits; diff --git a/test/multidomain/facet/1p_1p/gravity/main.cc b/test/multidomain/facet/1p_1p/gravity/main.cc index 17e8981a3ad387f54c8ccb03d717db6a7da61380..eae2efaf32feae92513d0a0cb1ded259f024a829 100644 --- a/test/multidomain/facet/1p_1p/gravity/main.cc +++ b/test/multidomain/facet/1p_1p/gravity/main.cc @@ -88,8 +88,6 @@ int main(int argc, char** argv) using LowDimFVGridGeometry = GetPropType; auto bulkFvGridGeometry = std::make_shared(bulkGridView); auto lowDimFvGridGeometry = std::make_shared(lowDimGridView); - bulkFvGridGeometry->update(); - lowDimFvGridGeometry->update(); // the coupling mapper using TestTraits = Properties::TestTraits; diff --git a/test/multidomain/facet/1p_1p/linearprofile/main.cc b/test/multidomain/facet/1p_1p/linearprofile/main.cc index c4855bdd8bf3ad3301c67befd3b10230ef86ad6c..938953174d2e1c134b8cf6af6f001b221790c95f 100644 --- a/test/multidomain/facet/1p_1p/linearprofile/main.cc +++ b/test/multidomain/facet/1p_1p/linearprofile/main.cc @@ -89,8 +89,6 @@ int main(int argc, char** argv) using LowDimFVGridGeometry = GetPropType; auto bulkFvGridGeometry = std::make_shared(bulkGridView); auto lowDimFvGridGeometry = std::make_shared(lowDimGridView); - bulkFvGridGeometry->update(); - lowDimFvGridGeometry->update(); // the coupling mapper using TestTraits = Properties::TestTraits; diff --git a/test/multidomain/facet/1pnc_1pnc/main.cc b/test/multidomain/facet/1pnc_1pnc/main.cc index c0894e28e5391865b032de8f60c2d75e5e2a9319..ef93d5c5603520881e93524e9e75e7ad57b4b626 100644 --- a/test/multidomain/facet/1pnc_1pnc/main.cc +++ b/test/multidomain/facet/1pnc_1pnc/main.cc @@ -47,38 +47,32 @@ namespace Dumux { /*! - * \brief Updates the finite volume grid geometry for the box scheme. - * - * This is necessary as the finite volume grid geometry for the box scheme with - * facet coupling requires additional data for the update. The reason is that - * we have to create additional faces on interior boundaries, which wouldn't be - * created in the standard scheme. + * \brief Constructs the finite volume grid geometry. */ -template< class GridGeometry, +template< class BulkGridGeometry, class GridManager, - class FacetGridView, - std::enable_if_t = 0 > -void updateBulkFVGridGeometry(GridGeometry& gridGeometry, - const GridManager& gridManager, - const FacetGridView& facetGridView) + class BulkGridView, + class LowDimGridView > +auto makeBulkFVGridGeometry(const GridManager& gridManager, + const BulkGridView& bulkGridView, + const LowDimGridView& lowDimGridView) { - using BulkFacetGridAdapter = Dumux::CodimOneGridAdapter; - BulkFacetGridAdapter facetGridAdapter(gridManager.getEmbeddings()); - gridGeometry.update(facetGridView, facetGridAdapter); -} - -/*! - * \brief Updates the finite volume grid geometry for the cell-centered schemes. - */ -template< class GridGeometry, - class GridManager, - class LowDimGridView, - std::enable_if_t = 0 > -void updateBulkFVGridGeometry(GridGeometry& gridGeometry, - const GridManager& gridManager, - const LowDimGridView& lowDimGridView) -{ - gridGeometry.update(); + /*! + * The finite volume grid geometry for the box scheme with facet coupling + * requires additional data for the constructor. The reason is that + * we have to create additional faces on interior boundaries, which are not + * created in the standard scheme. + */ + if constexpr (BulkGridGeometry::discMethod == Dumux::DiscretizationMethod::box) + { + using BulkFacetGridAdapter = Dumux::CodimOneGridAdapter; + BulkFacetGridAdapter facetGridAdapter(gridManager.getEmbeddings()); + return std::make_shared(bulkGridView, lowDimGridView, facetGridAdapter); + } + else + { + return std::make_shared(bulkGridView); + } } } // end namespace Dumux @@ -116,10 +110,8 @@ int main(int argc, char** argv) // create the finite volume grid geometries using BulkFVGridGeometry = GetPropType; using FacetFVGridGeometry = GetPropType; - auto bulkFvGridGeometry = std::make_shared(bulkGridView); auto facetFvGridGeometry = std::make_shared(facetGridView); - updateBulkFVGridGeometry(*bulkFvGridGeometry, gridManager, facetGridView); - facetFvGridGeometry->update(); + auto bulkFvGridGeometry = makeBulkFVGridGeometry(gridManager, bulkGridView, facetGridView); // the coupling mapper using TestTraits = Properties::TestTraits; diff --git a/test/multidomain/facet/test_facetcouplingmapper.cc b/test/multidomain/facet/test_facetcouplingmapper.cc index 98b3a7e68ed5ad49be284b178a455581d37f213c..d4cccd887e34a98775f78785d717aca9b5885621 100644 --- a/test/multidomain/facet/test_facetcouplingmapper.cc +++ b/test/multidomain/facet/test_facetcouplingmapper.cc @@ -96,21 +96,33 @@ void checkScvfEmbedment(const Scvf& scvf, const LowDimGeom& lowDimGeom) DUNE_THROW(Dune::InvalidStateException, "Scvf does not coincide with low dim element"); } -//! Updates a tpfa finite volume grid geometry. -template< class BulkFVG, class FacetFVG, class GridManager, - std::enable_if_t = 0 > -void updateBulkFvGeometry(BulkFVG& bulkFVG, const FacetFVG& facetFVG, const GridManager& gm) -{ - bulkFVG.update(); -} - -//! Updates a box finite volume grid geometry. -template< class BulkFVG, class FacetFVG, class GridManager, - std::enable_if_t = 0 > -void updateBulkFvGeometry(BulkFVG& bulkFVG, const FacetFVG& facetFVG, const GridManager& gm) +/*! + * \brief Constructs the finite volume grid geometry. + */ +template< class BulkGridGeometry, + class GridManager, + class BulkGridView, + class LowDimGridView > +auto makeBulkFVGridGeometry(const GridManager& gridManager, + const BulkGridView& bulkGridView, + const LowDimGridView& lowDimGridView) { - using FacetGridAdapter = Dumux::CodimOneGridAdapter; - bulkFVG.update(facetFVG.gridView(), FacetGridAdapter(gm.getEmbeddings()), true); + /*! + * The finite volume grid geometry for the box scheme with facet coupling + * requires additional data for the constructor. The reason is that + * we have to create additional faces on interior boundaries, which are not + * created in the standard scheme. + */ + if constexpr (BulkGridGeometry::discMethod == Dumux::DiscretizationMethod::box) + { + using BulkFacetGridAdapter = Dumux::CodimOneGridAdapter; + BulkFacetGridAdapter facetGridAdapter(gridManager.getEmbeddings()); + return BulkGridGeometry(bulkGridView, lowDimGridView, facetGridAdapter, true); + } + else + { + return BulkGridGeometry(bulkGridView); + } } // main program @@ -142,21 +154,18 @@ int main (int argc, char *argv[]) typename std::conditional::type >::type; - BulkFVGridGeometry bulkFvGeometry( gridManager.grid<0>().leafGridView() ); - using FacetGridView = typename FacetGrid::LeafGridView; using FacetFVGridGeometry = Dumux::CCTpfaFVGridGeometry; FacetFVGridGeometry facetFvGeometry( gridManager.grid<1>().leafGridView() ); - facetFvGeometry.update(); using EdgeGridView = typename EdgeGrid::LeafGridView; using EdgeFVGridGeometry = Dumux::CCTpfaFVGridGeometry; EdgeFVGridGeometry edgeFvGeometry( gridManager.grid<2>().leafGridView() ); - // update grid geometries - edgeFvGeometry.update(); - facetFvGeometry.update(); - updateBulkFvGeometry(bulkFvGeometry, facetFvGeometry, gridManager); + // construct bulk grid geometry + BulkFVGridGeometry bulkFvGeometry( makeBulkFVGridGeometry(gridManager, + gridManager.grid<0>().leafGridView(), + facetFvGeometry.gridView())); // instantiate and update mappers for all domain combinations Dumux::FacetCouplingMapper bulkFacetMapper; diff --git a/test/multidomain/facet/test_facetcouplingmapper_boundary.cc b/test/multidomain/facet/test_facetcouplingmapper_boundary.cc index d6faa414153e506ef1ff17edf9afc5f5e36a66bb..5d0bf9ac4535993d79875c2b210fb8a4912c8f69 100644 --- a/test/multidomain/facet/test_facetcouplingmapper_boundary.cc +++ b/test/multidomain/facet/test_facetcouplingmapper_boundary.cc @@ -69,12 +69,10 @@ int main (int argc, char *argv[]) using BulkGridView = typename BulkGrid::LeafGridView; using BulkFVGridGeometry = Dumux::CCTpfaFVGridGeometry; BulkFVGridGeometry bulkFvGeometry( gridManager.grid<0>().leafGridView() ); - bulkFvGeometry.update(); using FacetGridView = typename FacetGrid::LeafGridView; using FacetFVGridGeometry = Dumux::CCTpfaFVGridGeometry; FacetFVGridGeometry facetFvGeometry( gridManager.grid<1>().leafGridView() ); - facetFvGeometry.update(); // instantiate and update mapper for all domain combinations Dumux::FacetCouplingMapper mapper; diff --git a/test/multidomain/facet/tracer_tracer/main.cc b/test/multidomain/facet/tracer_tracer/main.cc index 45f1fbb3206f4a57c39562fb5b8d919655d99687..582191d825bd2f3466c7527f4e41364bcb3b7b3a 100644 --- a/test/multidomain/facet/tracer_tracer/main.cc +++ b/test/multidomain/facet/tracer_tracer/main.cc @@ -52,38 +52,32 @@ namespace Dumux { /*! - * \brief Updates the finite volume grid geometry for the box scheme. - * - * This is necessary as the finite volume grid geometry for the box scheme with - * facet coupling requires additional data for the update. The reason is that we - * have to create additional faces on interior boundaries, which wouldn't be - * created in the standard scheme. + * \brief Constructs the finite volume grid geometry. */ -template< class GridGeometry, +template< class BulkGridGeometry, class GridManager, - class LowDimGridView, - std::enable_if_t = 0 > -void updateBulkFVGridGeometry(GridGeometry& gridGeometry, - const GridManager& gridManager, - const LowDimGridView& lowDimGridView) + class BulkGridView, + class LowDimGridView > +auto makeBulkFVGridGeometry(const GridManager& gridManager, + const BulkGridView& bulkGridView, + const LowDimGridView& lowDimGridView) { - using BulkFacetGridAdapter = Dumux::CodimOneGridAdapter; - BulkFacetGridAdapter facetGridAdapter(gridManager.getEmbeddings()); - gridGeometry.update(lowDimGridView, facetGridAdapter); -} - -/*! - * \brief Updates the finite volume grid geometry for the cell centered schemes. - */ - template< class GridGeometry, - class GridManager, - class LowDimGridView, - std::enable_if_t = 0 > -void updateBulkFVGridGeometry(GridGeometry& gridGeometry, - const GridManager& gridManager, - const LowDimGridView& lowDimGridView) -{ - gridGeometry.update(); + /*! + * The finite volume grid geometry for the box scheme with facet coupling + * requires additional data for the constructor. The reason is that + * we have to create additional faces on interior boundaries, which are not + * created in the standard scheme. + */ + if constexpr (BulkGridGeometry::discMethod == Dumux::DiscretizationMethod::box) + { + using BulkFacetGridAdapter = Dumux::CodimOneGridAdapter; + BulkFacetGridAdapter facetGridAdapter(gridManager.getEmbeddings()); + return std::make_shared(bulkGridView, lowDimGridView, facetGridAdapter); + } + else + { + return std::make_shared(bulkGridView); + } } //! Computes the volume fluxes on all scvfs for a sub-domain. @@ -195,10 +189,8 @@ int main(int argc, char** argv) // create the finite volume grid geometries using BulkFVGridGeometry = GetPropType; using LowDimFVGridGeometry = GetPropType; - auto bulkFvGridGeometry = std::make_shared(bulkGridView); auto lowDimFvGridGeometry = std::make_shared(lowDimGridView); - updateBulkFVGridGeometry(*bulkFvGridGeometry, gridManager, lowDimGridView); - lowDimFvGridGeometry->update(); + auto bulkFvGridGeometry = makeBulkFVGridGeometry(gridManager, bulkGridView, lowDimGridView); // the coupling mapper using OnePTestTraits = Properties::TestTraits; diff --git a/test/multidomain/poromechanics/el1p/main.cc b/test/multidomain/poromechanics/el1p/main.cc index 66a688b4cd75408acd5792dfa003273f6fee8d20..0c8fd89651163aaf39571f2bc30aad422acc0940 100644 --- a/test/multidomain/poromechanics/el1p/main.cc +++ b/test/multidomain/poromechanics/el1p/main.cc @@ -81,8 +81,6 @@ int main(int argc, char** argv) using PoroMechFVGridGeometry = GetPropType; auto onePFvGridGeometry = std::make_shared(leafGridView); auto poroMechFvGridGeometry = std::make_shared(leafGridView); - onePFvGridGeometry->update(); - poroMechFvGridGeometry->update(); // the coupling manager using Traits = MultiDomainTraits; diff --git a/test/multidomain/poromechanics/el2p/main.cc b/test/multidomain/poromechanics/el2p/main.cc index 681330ffcd141ef1ade662eb9b00dff07b1ae1ab..d43c3f1c681ff647c02c4decf99e625117b2b48f 100644 --- a/test/multidomain/poromechanics/el2p/main.cc +++ b/test/multidomain/poromechanics/el2p/main.cc @@ -82,8 +82,6 @@ int main(int argc, char** argv) using PoroMechFVGridGeometry = GetPropType; auto twoPFvGridGeometry = std::make_shared(leafGridView); auto poroMechFvGridGeometry = std::make_shared(leafGridView); - twoPFvGridGeometry->update(); - poroMechFvGridGeometry->update(); // the coupling manager using Traits = MultiDomainTraits; diff --git a/test/porenetwork/1p/main.cc b/test/porenetwork/1p/main.cc index 060a706449b37548e11c4a0caacf5200fe422437..c0004b776b3e13bd6c75f9800855f0a432971534 100644 --- a/test/porenetwork/1p/main.cc +++ b/test/porenetwork/1p/main.cc @@ -76,8 +76,7 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; - auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(*gridData); + auto gridGeometry = std::make_shared(leafGridView, *gridData); // the spatial parameters using SpatialParams = GetPropType; diff --git a/test/porenetwork/1p/noncreepingflow/main.cc b/test/porenetwork/1p/noncreepingflow/main.cc index 1d273bed3c8c312de2f9e04d83ff79f37846981a..72c47c04d4e384a4d2f5741a9090da1007a3910a 100644 --- a/test/porenetwork/1p/noncreepingflow/main.cc +++ b/test/porenetwork/1p/noncreepingflow/main.cc @@ -74,8 +74,7 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; - auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(*gridData); + auto gridGeometry = std::make_shared(leafGridView, *gridData); // the spatial parameters using SpatialParams = GetPropType; diff --git a/test/porenetwork/1p/noncreepingflow/nonisothermal/main.cc b/test/porenetwork/1p/noncreepingflow/nonisothermal/main.cc index 5e8762f26c7a91cd21a2857116a04e0ce56b18bb..b8b60a76fd9d1bada8c0bd08f28f1d5b88a9f427 100644 --- a/test/porenetwork/1p/noncreepingflow/nonisothermal/main.cc +++ b/test/porenetwork/1p/noncreepingflow/nonisothermal/main.cc @@ -78,8 +78,7 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; - auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(*gridData); + auto gridGeometry = std::make_shared(leafGridView, *gridData); // the spatial parameters using SpatialParams = GetPropType; diff --git a/test/porenetwork/1p/nonisothermal/main.cc b/test/porenetwork/1p/nonisothermal/main.cc index f1aa8092b0e0efe1c4e91eaa304fbd005a343982..9069b7d0323849e3906478a857c5e35b017dd816 100644 --- a/test/porenetwork/1p/nonisothermal/main.cc +++ b/test/porenetwork/1p/nonisothermal/main.cc @@ -77,8 +77,7 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; - auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(*gridData); + auto gridGeometry = std::make_shared(leafGridView, *gridData); // the spatial parameters using SpatialParams = GetPropType; diff --git a/test/porenetwork/1pnc/main.cc b/test/porenetwork/1pnc/main.cc index 93b077b0340a711a440a65661074a0d601dee01a..1f8fb3dd6817e341d1a2ddd5300f904c1465fb28 100644 --- a/test/porenetwork/1pnc/main.cc +++ b/test/porenetwork/1pnc/main.cc @@ -76,8 +76,7 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; - auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(*gridData); + auto gridGeometry = std::make_shared(leafGridView, *gridData); // the spatial parameters using SpatialParams = GetPropType; diff --git a/test/porenetwork/2p/main.cc b/test/porenetwork/2p/main.cc index 18cc23e4e1fce152169d835270b36554003efc90..d01b7059b91ddbeac521c710d18be3db1165e367 100644 --- a/test/porenetwork/2p/main.cc +++ b/test/porenetwork/2p/main.cc @@ -76,8 +76,7 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; - auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(*gridData); + auto gridGeometry = std::make_shared(leafGridView, *gridData); // the spatial parameters using SpatialParams = GetPropType; diff --git a/test/porenetwork/2p/static/main.cc b/test/porenetwork/2p/static/main.cc index 208d7c618f8cdd2025d225e7428e2b85cc056027..5d906ba173c61288fd173ff76962080815ec6876 100644 --- a/test/porenetwork/2p/static/main.cc +++ b/test/porenetwork/2p/static/main.cc @@ -106,8 +106,7 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; - auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(*gridData); + auto gridGeometry = std::make_shared(leafGridView, *gridData); // get some network properties using Scalar = GetPropType; diff --git a/test/porousmediumflow/1p/compressible/instationary/main.cc b/test/porousmediumflow/1p/compressible/instationary/main.cc index d9b60a4b39a2116e1bda7513c93700045a78bf59..3ca1bf4761fc6667ea2d165a0fa7e0fceb983e65 100644 --- a/test/porousmediumflow/1p/compressible/instationary/main.cc +++ b/test/porousmediumflow/1p/compressible/instationary/main.cc @@ -84,7 +84,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/compressible/instationary/main_experimental.cc b/test/porousmediumflow/1p/compressible/instationary/main_experimental.cc index 06f71a35b3843603232e669bc97b7fe431a77a96..14c403ded6a3776f45d0b28da9cdc9df3e9097ce 100644 --- a/test/porousmediumflow/1p/compressible/instationary/main_experimental.cc +++ b/test/porousmediumflow/1p/compressible/instationary/main_experimental.cc @@ -84,7 +84,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/compressible/stationary/main.cc b/test/porousmediumflow/1p/compressible/stationary/main.cc index 947fa53ad38073b0f6fc8b630b8fe8bcdfea5150..9141d2337452f843622e404e5e2d1116f0700e6d 100644 --- a/test/porousmediumflow/1p/compressible/stationary/main.cc +++ b/test/porousmediumflow/1p/compressible/stationary/main.cc @@ -83,7 +83,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/convergence/analyticsolution/main.cc b/test/porousmediumflow/1p/convergence/analyticsolution/main.cc index 2c15f35aae685e6bea56429fa7b70e7c983696a6..d5a5f0e7054362c7de05cdee2958179fd00fd14e 100644 --- a/test/porousmediumflow/1p/convergence/analyticsolution/main.cc +++ b/test/porousmediumflow/1p/convergence/analyticsolution/main.cc @@ -112,7 +112,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/convergence/discretesolution/solver.hh b/test/porousmediumflow/1p/convergence/discretesolution/solver.hh index 51ce8280a27a91f759482a8c20823f353c16182e..066f9ba365b16f824b09bceb684e5422422c800f 100644 --- a/test/porousmediumflow/1p/convergence/discretesolution/solver.hh +++ b/test/porousmediumflow/1p/convergence/discretesolution/solver.hh @@ -89,7 +89,6 @@ SolutionStorage solveRefinementLevel(int numCells) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/fracture2d3d/main.cc b/test/porousmediumflow/1p/fracture2d3d/main.cc index afed760585d4f8903985cc55dbcb2ceb13bef7b9..93a52887efa075922da14431f4f53b250d4e8b1d 100644 --- a/test/porousmediumflow/1p/fracture2d3d/main.cc +++ b/test/porousmediumflow/1p/fracture2d3d/main.cc @@ -106,7 +106,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/incompressible/main.cc b/test/porousmediumflow/1p/incompressible/main.cc index f0d7a5e666cc11a9814ac82f9a44567c8971127c..0ce2c66ad1b1129fabcf899c7c0f4833b41bbaf7 100644 --- a/test/porousmediumflow/1p/incompressible/main.cc +++ b/test/porousmediumflow/1p/incompressible/main.cc @@ -112,7 +112,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/isothermal/main.cc b/test/porousmediumflow/1p/isothermal/main.cc index 70f8f1c5e69f00d13b3a5602edc8ce8e7a7566de..f432f51268556d81012454f406753c2d4dc9cb7c 100644 --- a/test/porousmediumflow/1p/isothermal/main.cc +++ b/test/porousmediumflow/1p/isothermal/main.cc @@ -112,7 +112,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/network1d3d/main.cc b/test/porousmediumflow/1p/network1d3d/main.cc index f0f9d5a25c53a2d9fd4dcbd00b937abaef1067b9..efa270bfc33532e2493970f0ff90b4effcce52d0 100644 --- a/test/porousmediumflow/1p/network1d3d/main.cc +++ b/test/porousmediumflow/1p/network1d3d/main.cc @@ -106,7 +106,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/nonisothermal/main.cc b/test/porousmediumflow/1p/nonisothermal/main.cc index a60a35b3ac4048447bcc4958fe3dcbd2bd206e75..74b658e8b880e210a1a5fe0bb9ff7d3cad759f04 100644 --- a/test/porousmediumflow/1p/nonisothermal/main.cc +++ b/test/porousmediumflow/1p/nonisothermal/main.cc @@ -109,7 +109,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/periodicbc/main.cc b/test/porousmediumflow/1p/periodicbc/main.cc index 5eff6fc9bfa33b51b59f8cd1e1c1f9077cf8b440..cad884638e17005c6f2aaee8933218af82da35be 100644 --- a/test/porousmediumflow/1p/periodicbc/main.cc +++ b/test/porousmediumflow/1p/periodicbc/main.cc @@ -78,7 +78,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry (and make it periodic) using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); bool periodic = gridGeometry->isPeriodic(); periodic = gridGeometry->gridView().comm().max(periodic); diff --git a/test/porousmediumflow/1p/pointsources/timedependent/main.cc b/test/porousmediumflow/1p/pointsources/timedependent/main.cc index 3426e6fb001b96e8fab978974f2eff77c6e78a12..f2705249998bdae50ffc716eb6be183c2a238f2f 100644 --- a/test/porousmediumflow/1p/pointsources/timedependent/main.cc +++ b/test/porousmediumflow/1p/pointsources/timedependent/main.cc @@ -81,7 +81,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/pointsources/timeindependent/main.cc b/test/porousmediumflow/1p/pointsources/timeindependent/main.cc index 6f4e0b8acac5ca30fa2eb0079c7a11f474a1b16d..a9c7a570c418979d301c19a36303c4cfd3ce0739 100644 --- a/test/porousmediumflow/1p/pointsources/timeindependent/main.cc +++ b/test/porousmediumflow/1p/pointsources/timeindependent/main.cc @@ -81,7 +81,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1p/rootbenchmark/main.cc b/test/porousmediumflow/1p/rootbenchmark/main.cc index 8ac8a5dd028ef4689b94e6725315537172d7753a..5a7b7c7d7549c18fb199356d19fae89e0b653480 100644 --- a/test/porousmediumflow/1p/rootbenchmark/main.cc +++ b/test/porousmediumflow/1p/rootbenchmark/main.cc @@ -66,7 +66,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1pnc/1p2c/isothermal/main.cc b/test/porousmediumflow/1pnc/1p2c/isothermal/main.cc index d0d2e2eacce1914fbd8ad61cff084e3b703bba70..34223ee0bdf3ca660543569fe670c9120ce6a9b7 100644 --- a/test/porousmediumflow/1pnc/1p2c/isothermal/main.cc +++ b/test/porousmediumflow/1pnc/1p2c/isothermal/main.cc @@ -85,7 +85,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1pnc/1p2c/isothermal/saltwaterintrusion/main.cc b/test/porousmediumflow/1pnc/1p2c/isothermal/saltwaterintrusion/main.cc index 129236b0fc4d248c361026365ae1c11ccbd996c5..f6af56eb1f302a22b62191250e9cbc96c4ca7a51 100644 --- a/test/porousmediumflow/1pnc/1p2c/isothermal/saltwaterintrusion/main.cc +++ b/test/porousmediumflow/1pnc/1p2c/isothermal/saltwaterintrusion/main.cc @@ -80,7 +80,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/main.cc b/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/main.cc index 80b4ee6a8aa5f7562a86cdd3d80666014af39009..fba087eefb616b74f817c520552218f7440919f7 100644 --- a/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/main.cc +++ b/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/main.cc @@ -85,7 +85,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/main.cc b/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/main.cc index 7bccd573abbc8d6e07f9a5628e02f9d29bc645fd..763261a94778e6f306e6f0a6aadcfcc42cc93edc 100644 --- a/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/main.cc +++ b/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/main.cc @@ -85,7 +85,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1pnc/1p2c/nonisothermal/transientbc/main.cc b/test/porousmediumflow/1pnc/1p2c/nonisothermal/transientbc/main.cc index c0f3ffd83377ff0f8fed1f80812663bf35097a49..ee07edeb2d781acba886b9894d8cba752ab1174f 100644 --- a/test/porousmediumflow/1pnc/1p2c/nonisothermal/transientbc/main.cc +++ b/test/porousmediumflow/1pnc/1p2c/nonisothermal/transientbc/main.cc @@ -85,7 +85,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1pnc/1p3c/main.cc b/test/porousmediumflow/1pnc/1p3c/main.cc index cceb35b987f7130d6b747125d480d227da9aa931..96bb10e48760abf1dae0547626ec168f047fa947 100644 --- a/test/porousmediumflow/1pnc/1p3c/main.cc +++ b/test/porousmediumflow/1pnc/1p3c/main.cc @@ -86,7 +86,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1pnc/nonequilibrium/main.cc b/test/porousmediumflow/1pnc/nonequilibrium/main.cc index 446b51752859c79d002a526f85336e6314b35252..293d4329ce68443db21522c7ae979719b2434989 100644 --- a/test/porousmediumflow/1pnc/nonequilibrium/main.cc +++ b/test/porousmediumflow/1pnc/nonequilibrium/main.cc @@ -85,7 +85,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/1pncmin/nonisothermal/main.cc b/test/porousmediumflow/1pncmin/nonisothermal/main.cc index 4ebab6144b91f3eb4a6064d6bf5e087ec6318ff2..d68144baac03142ca3fda1c8cd64edbf189c57d7 100644 --- a/test/porousmediumflow/1pncmin/nonisothermal/main.cc +++ b/test/porousmediumflow/1pncmin/nonisothermal/main.cc @@ -112,7 +112,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p/adaptive/main.cc b/test/porousmediumflow/2p/adaptive/main.cc index ff4cc3a4eeaa6cbf7c524f192709fd94185f0f15..e207f80eda52c865ce1b3297795b298dd369927d 100644 --- a/test/porousmediumflow/2p/adaptive/main.cc +++ b/test/porousmediumflow/2p/adaptive/main.cc @@ -92,7 +92,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p/boxdfm/main.cc b/test/porousmediumflow/2p/boxdfm/main.cc index 74670c52a076a6eb62746c564c3da60fe58ebfe0..2e1d923b3ec1ee550da435cb9919cddc32daf810 100644 --- a/test/porousmediumflow/2p/boxdfm/main.cc +++ b/test/porousmediumflow/2p/boxdfm/main.cc @@ -85,8 +85,7 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; - auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(fractureGridAdapter); + auto gridGeometry = std::make_shared(leafGridView, fractureGridAdapter); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p/cornerpoint/main.cc b/test/porousmediumflow/2p/cornerpoint/main.cc index 53f526a8b4c8867a2124e54e86911346a4cb612a..c9489e2ea6a893f13db07e9875790ebfecc5a6b5 100644 --- a/test/porousmediumflow/2p/cornerpoint/main.cc +++ b/test/porousmediumflow/2p/cornerpoint/main.cc @@ -81,7 +81,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p/fracture/main.cc b/test/porousmediumflow/2p/fracture/main.cc index b2a06cbb52e74a96c6e5f92e0dd22f5bd6a8df5e..7f4cc22c75999a864ad53fe2a0759c076e1443c4 100644 --- a/test/porousmediumflow/2p/fracture/main.cc +++ b/test/porousmediumflow/2p/fracture/main.cc @@ -78,7 +78,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p/incompressible/main.cc b/test/porousmediumflow/2p/incompressible/main.cc index 19e46cf60ac3ffabe469f7c21e8c6471df5f0312..95157002b249b4c7228d1062925182811cba1328 100644 --- a/test/porousmediumflow/2p/incompressible/main.cc +++ b/test/porousmediumflow/2p/incompressible/main.cc @@ -80,7 +80,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p/nonisothermal/main.cc b/test/porousmediumflow/2p/nonisothermal/main.cc index 16f49b8bb5744be9dd105a370910a22ca0386619..a39f81784eb3e2784f0c3bc7a8d8e9111e31305b 100644 --- a/test/porousmediumflow/2p/nonisothermal/main.cc +++ b/test/porousmediumflow/2p/nonisothermal/main.cc @@ -76,7 +76,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p/rotationsymmetry/main.cc b/test/porousmediumflow/2p/rotationsymmetry/main.cc index 9b56ad1e0d3b2291cb774a00513ff7062e043424..23ba36e42ef4c2568712b1bbd8ecbcfb3cd7682c 100644 --- a/test/porousmediumflow/2p/rotationsymmetry/main.cc +++ b/test/porousmediumflow/2p/rotationsymmetry/main.cc @@ -58,7 +58,6 @@ int main(int argc, char** argv) // create the grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p1c/main.cc b/test/porousmediumflow/2p1c/main.cc index 04fc295fd9e3a165c716ad5b8c0c3bfb12f64486..885a6bc2670ac5476c79a68ff6e1455a0364a70e 100644 --- a/test/porousmediumflow/2p1c/main.cc +++ b/test/porousmediumflow/2p1c/main.cc @@ -80,7 +80,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p2c/chemicalnonequilibrium/main.cc b/test/porousmediumflow/2p2c/chemicalnonequilibrium/main.cc index 6f772d097f8b8b47c0e1920703893c1acaff141b..d85d1f19c46b635e02c08b6159e87e6c0f415a00 100644 --- a/test/porousmediumflow/2p2c/chemicalnonequilibrium/main.cc +++ b/test/porousmediumflow/2p2c/chemicalnonequilibrium/main.cc @@ -77,7 +77,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p2c/injection/main.cc b/test/porousmediumflow/2p2c/injection/main.cc index 61e21d6621e472276466589fefd8ee1da9d823b6..8ba188a6a90ecff1351630a2928142fd5eec8cd2 100644 --- a/test/porousmediumflow/2p2c/injection/main.cc +++ b/test/porousmediumflow/2p2c/injection/main.cc @@ -75,7 +75,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p2c/mpnccomparison/main.cc b/test/porousmediumflow/2p2c/mpnccomparison/main.cc index 46823d84145f831342b3edbb07658a7e15c5b85f..d04a955bf720522e38386813babf748cb23bcdf3 100644 --- a/test/porousmediumflow/2p2c/mpnccomparison/main.cc +++ b/test/porousmediumflow/2p2c/mpnccomparison/main.cc @@ -77,7 +77,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2p2c/waterair/main.cc b/test/porousmediumflow/2p2c/waterair/main.cc index dc65e4f6f70a059a3d25a9182e2ce983c3beca7c..6faa54953919a964824601f7b22144e876715046 100644 --- a/test/porousmediumflow/2p2c/waterair/main.cc +++ b/test/porousmediumflow/2p2c/waterair/main.cc @@ -70,7 +70,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); //////////////////////////////////////////////////////////// // run instationary non-linear problem on this grid diff --git a/test/porousmediumflow/2pnc/diffusion/main.cc b/test/porousmediumflow/2pnc/diffusion/main.cc index c5b5181def04df5cda79f2f316e1e14cbc3837f2..ec3f1cfff3ce97e125cef4e4856f6e0add7a46b5 100644 --- a/test/porousmediumflow/2pnc/diffusion/main.cc +++ b/test/porousmediumflow/2pnc/diffusion/main.cc @@ -74,7 +74,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2pnc/fuelcell/main.cc b/test/porousmediumflow/2pnc/fuelcell/main.cc index 72dbd873dc88251e9d51fc806658ce0541238e53..1f4ebd28d5dc154f8fa72dd29f388e35ec150184 100644 --- a/test/porousmediumflow/2pnc/fuelcell/main.cc +++ b/test/porousmediumflow/2pnc/fuelcell/main.cc @@ -74,7 +74,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2pncmin/isothermal/main.cc b/test/porousmediumflow/2pncmin/isothermal/main.cc index c616678107d9f2865e85e6594b3bbd686ede755b..3909bf55d8ddc8d6c877b99433ae4fe6677bea3d 100644 --- a/test/porousmediumflow/2pncmin/isothermal/main.cc +++ b/test/porousmediumflow/2pncmin/isothermal/main.cc @@ -75,7 +75,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/2pncmin/nonisothermal/main.cc b/test/porousmediumflow/2pncmin/nonisothermal/main.cc index a34c7ff000e64ef4788d66c58961df18920e933c..5f23efa88ce05eb60b575a18d0fe0b6414a44948 100644 --- a/test/porousmediumflow/2pncmin/nonisothermal/main.cc +++ b/test/porousmediumflow/2pncmin/nonisothermal/main.cc @@ -75,7 +75,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/3p/conduction/main.cc b/test/porousmediumflow/3p/conduction/main.cc index 5947a520a535c6290fde6716d298ffa995399f1c..e717f6cc816443fc0eae1e48ecf54263e5e9f1ca 100644 --- a/test/porousmediumflow/3p/conduction/main.cc +++ b/test/porousmediumflow/3p/conduction/main.cc @@ -77,7 +77,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/3p/convection/main.cc b/test/porousmediumflow/3p/convection/main.cc index bf5a3d2b62a6a27d9405a6a205c42bd9e3314f3e..fe31fa06b9c9b7518dc17e5f68b03e55c131b7ec 100644 --- a/test/porousmediumflow/3p/convection/main.cc +++ b/test/porousmediumflow/3p/convection/main.cc @@ -76,7 +76,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/3p/infiltration/main.cc b/test/porousmediumflow/3p/infiltration/main.cc index cd5072b29974737461e934db0d53daafe46d0db2..65023af8e140ad4d6be25f926f1951103f1145f6 100644 --- a/test/porousmediumflow/3p/infiltration/main.cc +++ b/test/porousmediumflow/3p/infiltration/main.cc @@ -110,7 +110,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/3p3c/columnxylol/main.cc b/test/porousmediumflow/3p3c/columnxylol/main.cc index bebc4a11a3f543bcc163a1f5521340d67ec9141c..eaebb40520b0a1964ffc92c2ad57cf3b24f3c81f 100644 --- a/test/porousmediumflow/3p3c/columnxylol/main.cc +++ b/test/porousmediumflow/3p3c/columnxylol/main.cc @@ -77,7 +77,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/3p3c/infiltration/main.cc b/test/porousmediumflow/3p3c/infiltration/main.cc index 6fd11e24ef6965d1412341477a3b5a5ec38c669d..6580f1b414dd338aaad9134b21558c510597239a 100644 --- a/test/porousmediumflow/3p3c/infiltration/main.cc +++ b/test/porousmediumflow/3p3c/infiltration/main.cc @@ -79,7 +79,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/3p3c/kuevette/main.cc b/test/porousmediumflow/3p3c/kuevette/main.cc index 9ca8b8fc6f1ad5936b6750fbd2f33b5a7687cb28..18e7d5ea49e0a63bf93e9e656a4306ea2766db94 100644 --- a/test/porousmediumflow/3p3c/kuevette/main.cc +++ b/test/porousmediumflow/3p3c/kuevette/main.cc @@ -78,7 +78,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/3pwateroil/main.cc b/test/porousmediumflow/3pwateroil/main.cc index 8e59b9b3a4da580d8479f62b5bad0ab3d2db35d1..19809cef28695982c95c9bb8acf5c7607b643111 100644 --- a/test/porousmediumflow/3pwateroil/main.cc +++ b/test/porousmediumflow/3pwateroil/main.cc @@ -79,7 +79,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/co2/main.cc b/test/porousmediumflow/co2/main.cc index 7f46a0fbff6170384fa01c77ef2220abe70cc76c..a00e5ab3307aa23b6dd14684ba3f7cb680936095 100644 --- a/test/porousmediumflow/co2/main.cc +++ b/test/porousmediumflow/co2/main.cc @@ -74,7 +74,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the spatial parameters using SpatialParams = GetPropType; diff --git a/test/porousmediumflow/mpnc/2p2ccomparison/main.cc b/test/porousmediumflow/mpnc/2p2ccomparison/main.cc index 7e79c232752dc50925a8d00cceafd75405a23917..179542714972bb0f080f35a20e2e07a76c3103f7 100644 --- a/test/porousmediumflow/mpnc/2p2ccomparison/main.cc +++ b/test/porousmediumflow/mpnc/2p2ccomparison/main.cc @@ -77,7 +77,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/mpnc/kinetic/main.cc b/test/porousmediumflow/mpnc/kinetic/main.cc index 37f9febf0260a496f19ff5f71d4940d9e71af487..b65bc1c5deb1f497e30289a19daf63b960b2dc94 100644 --- a/test/porousmediumflow/mpnc/kinetic/main.cc +++ b/test/porousmediumflow/mpnc/kinetic/main.cc @@ -81,7 +81,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/mpnc/obstacle/main.cc b/test/porousmediumflow/mpnc/obstacle/main.cc index 7e79c232752dc50925a8d00cceafd75405a23917..179542714972bb0f080f35a20e2e07a76c3103f7 100644 --- a/test/porousmediumflow/mpnc/obstacle/main.cc +++ b/test/porousmediumflow/mpnc/obstacle/main.cc @@ -77,7 +77,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/mpnc/thermalnonequilibrium/main.cc b/test/porousmediumflow/mpnc/thermalnonequilibrium/main.cc index 11b3036c8a9c3fea38a76aa4226dc0e5291f6a7c..9e5f16721823019c8f6a88c8128f391d6fa738d3 100644 --- a/test/porousmediumflow/mpnc/thermalnonequilibrium/main.cc +++ b/test/porousmediumflow/mpnc/thermalnonequilibrium/main.cc @@ -81,7 +81,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/richards/analytical/main.cc b/test/porousmediumflow/richards/analytical/main.cc index 7a0cf3e5fe5d055a5cb06977f837451c41dc2974..a8174f4daffee2a25e86b88954ec6dde9093b4f9 100644 --- a/test/porousmediumflow/richards/analytical/main.cc +++ b/test/porousmediumflow/richards/analytical/main.cc @@ -77,7 +77,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/richards/benchmarks/main.cc b/test/porousmediumflow/richards/benchmarks/main.cc index aeb226cd0dbcd1e62a28850d5414807d7a5363c9..0cfd475e876a536b8da179077b0a46e746e32d4b 100644 --- a/test/porousmediumflow/richards/benchmarks/main.cc +++ b/test/porousmediumflow/richards/benchmarks/main.cc @@ -74,7 +74,6 @@ int main(int argc, char** argv) using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/richards/lens/main.cc b/test/porousmediumflow/richards/lens/main.cc index 43dcc8e09f156814b2319d85a3b9d7d0ae3c5ab4..0c0f3aafd7054a12bd51f8c65bfc25c077c9bcbf 100644 --- a/test/porousmediumflow/richards/lens/main.cc +++ b/test/porousmediumflow/richards/lens/main.cc @@ -92,7 +92,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/richards/nonisothermal/conduction/main.cc b/test/porousmediumflow/richards/nonisothermal/conduction/main.cc index 12489bae7b0d929537ff3165978aa470744845d2..49c9927efa14854a1e748f191be648fd477892a7 100644 --- a/test/porousmediumflow/richards/nonisothermal/conduction/main.cc +++ b/test/porousmediumflow/richards/nonisothermal/conduction/main.cc @@ -77,7 +77,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/richards/nonisothermal/convection/main.cc b/test/porousmediumflow/richards/nonisothermal/convection/main.cc index 12489bae7b0d929537ff3165978aa470744845d2..49c9927efa14854a1e748f191be648fd477892a7 100644 --- a/test/porousmediumflow/richards/nonisothermal/convection/main.cc +++ b/test/porousmediumflow/richards/nonisothermal/convection/main.cc @@ -77,7 +77,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/richards/nonisothermal/evaporation/main.cc b/test/porousmediumflow/richards/nonisothermal/evaporation/main.cc index 6c936ecd2bcabef2eaf80738b9a62a3a37a3428f..3af49f0a636c1d917734a62a2330fdd9687f59b7 100644 --- a/test/porousmediumflow/richards/nonisothermal/evaporation/main.cc +++ b/test/porousmediumflow/richards/nonisothermal/evaporation/main.cc @@ -80,7 +80,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/richardsnc/main.cc b/test/porousmediumflow/richardsnc/main.cc index 1dd7d5d7994c77f54387cda3e17e7e10099e58c3..2610981afff4208d7214a5421c361ee3f218dd56 100644 --- a/test/porousmediumflow/richardsnc/main.cc +++ b/test/porousmediumflow/richardsnc/main.cc @@ -77,7 +77,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/solidenergy/main.cc b/test/porousmediumflow/solidenergy/main.cc index 7d9365d05c9eac2dab511281543b2597fb5e3796..f809e8e70aa83228b67a506cee01386eba2b1d9c 100644 --- a/test/porousmediumflow/solidenergy/main.cc +++ b/test/porousmediumflow/solidenergy/main.cc @@ -75,7 +75,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/tracer/2ptracer/main.cc b/test/porousmediumflow/tracer/2ptracer/main.cc index 0c4622626593b36661d26e058c5c9497bab72436..f39d6851c7b518058266a26c9f1c360421fe30ab 100644 --- a/test/porousmediumflow/tracer/2ptracer/main.cc +++ b/test/porousmediumflow/tracer/2ptracer/main.cc @@ -93,7 +93,6 @@ int main(int argc, char** argv) // create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); // the problem (initial and boundary conditions) using TwoPProblem = GetPropType; diff --git a/test/porousmediumflow/tracer/constvel/main.cc b/test/porousmediumflow/tracer/constvel/main.cc index 39f605be34b5dacca1535a894b5566eded3a4501..aff94accde573582c05528659cb05d537e776676 100644 --- a/test/porousmediumflow/tracer/constvel/main.cc +++ b/test/porousmediumflow/tracer/constvel/main.cc @@ -78,7 +78,6 @@ int main(int argc, char** argv) //! create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); //! the problem (initial and boundary conditions) using Problem = GetPropType; diff --git a/test/porousmediumflow/tracer/multiphase/main.cc b/test/porousmediumflow/tracer/multiphase/main.cc index 41afd566457a2588c5fbec13d690770a1a0f494e..4f491977f0e5145d0cb49382922d263ad907574a 100644 --- a/test/porousmediumflow/tracer/multiphase/main.cc +++ b/test/porousmediumflow/tracer/multiphase/main.cc @@ -75,7 +75,6 @@ int main(int argc, char** argv) //! create the finite volume grid geometry using GridGeometry = GetPropType; auto gridGeometry = std::make_shared(leafGridView); - gridGeometry->update(); //! the problem (initial and boundary conditions) using Problem = GetPropType;