|
CpGrid.hpp
Go to the documentation of this file.
426 typename Traits::template Codim<codim>::template Partition<PiType>::LevelIterator lbegin (int level) const;
429 typename Traits::template Codim<codim>::template Partition<PiType>::LevelIterator lend (int level) const;
440 typename Traits::template Codim<codim>::template Partition<PiType>::LeafIterator leafbegin() const;
443 typename Traits::template Codim<codim>::template Partition<PiType>::LeafIterator leafend() const;
557 Dune::cpgrid::Intersection getParentIntersectionFromLgrBoundaryFace(const Dune::cpgrid::Intersection& intersection) const;
624 void updateCornerHistoryLevels(const std::vector<std::vector<std::array<int,2>>>& cornerInMarkedElemWithEquivRefinedCorner,
625 const std::map<std::array<int,2>,std::array<int,2>>& elemLgrAndElemLgrCorner_to_refinedLevelAndRefinedCorner,
664 void computeGlobalCellLgr(const int& level, const std::array<int,3>& startIJK, std::vector<int>& global_cell_lgr);
705 std::vector<std::unordered_map<std::size_t, std::size_t>> mapLocalCartesianIndexSetsToLeafIndexSet() const;
831 return scatterGrid(defaultTransEdgeWgt, /* ownersFirst = */ false, wells, possibleFutureConnections,
881 return scatterGrid(method, ownersFirst, wells, possibleFutureConnections, /* serialPartitioning = */ false,
922 auto ret = loadBalance(wells, possibleFutureConnections, transmissibilities, overlapLayers, partitionMethod, level);
973 bool addCornerCells=false, int overlapLayers=1, int partitionMethod = Dune::PartitionMethod::zoltanGoG,
978 auto ret = scatterGrid(method, ownersFirst, wells, possibleFutureConnections, serialPartitioning, transmissibilities,
1047 decltype(data.fixedSize(0,0)) overlapLayers=1, int partitionMethod = Dune::PartitionMethod::zoltan)
1135 void communicate (DataHandle& data, InterfaceType iftype, CommunicationDirection dir, int /*level*/) const
1251 const Vector faceCenterEcl(int cell_index, int face, const Dune::cpgrid::Intersection& intersection) const;
1589 void CpGrid::communicate (DataHandle& data, InterfaceType iftype, CommunicationDirection dir) const
An iterator over the centroids of the geometry of the entities. Definition: CpGrid.hpp:1292 CentroidIterator(GeometryIterator iter) Constructs a new iterator from an iterator over the geometries. Definition: CpGrid.hpp:1299 const FieldVector< double, 3 > & dereference() const Definition: CpGrid.hpp:1303 int distanceTo(const CentroidIterator &o) Definition: CpGrid.hpp:1322 std::vector< cpgrid::Geometry< 3-codim, 3 > >::const_iterator GeometryIterator The type of the iterator over the codim geometries. Definition: CpGrid.hpp:1296 bool equals(const CentroidIterator &o) const Definition: CpGrid.hpp:1326 const FieldVector< double, 3 > & elementAt(int n) Definition: CpGrid.hpp:1311 std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(DataHandle &data, const std::vector< int > &parts, const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections={}, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:1016 std::vector< std::unordered_map< std::size_t, std::size_t > > mapLocalCartesianIndexSetsToLeafIndexSet() const Compute for each level grid, a map from the global_cell_[ cell index in level grid ] to the leaf inde... CentroidIterator< 0 > beginCellCentroids() const Get an iterator over the cell centroids positioned at the first one. const Vector faceCenterEcl(int cell_index, int face, const Dune::cpgrid::Intersection &intersection) const int numFaceVertices(int face) const unsigned int numBoundarySegments() const returns the number of boundary segments within the macro grid CpGridFamily GridFamily Family typedef, why is this not defined by Grid<>? Definition: CpGrid.hpp:219 Traits::template Codim< codim >::LevelIterator lbegin(int level) const Iterator to first entity of given codim on level. void gatherData(DataHandle &handle) const Moves data from the distributed view to the global (all data on process) view. Definition: CpGrid.hpp:1611 CentroidIterator< 1 > beginFaceCentroids() const Get an iterator over the face centroids positioned at the first one. std::vector< std::array< int, 2 > > mapLeafIndexSetToLocalCartesianIndexSets() const Reverse map: from leaf index cell to { level, local/level Cartesian index of the cell }. const std::vector< std::shared_ptr< Dune::cpgrid::CpGridData > > & currentData() const Returns either data_ or distributed_data_(if non empty). int size(GeometryType type) const number of leaf entities per geometry type in this process cpgrid::CpGridDataTraits::ParallelIndexSet ParallelIndexSet The type of the parallel index set. Definition: CpGrid.hpp:1431 int faceTag(const Cell2FacesRowIterator &cell_face) const Get the cartesian tag associated with a face tag. Definition: CpGrid.hpp:1625 const std::vector< double > & zcornData() const ParallelIndexSet & getCellIndexSet() void setUniqueBoundaryIds(bool uids) std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(DataHandle &data, EdgeWeightMethod method, const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections, bool serialPartitioning, const double *transmissibilities=nullptr, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltanGoG, double imbalanceTol=1.1, bool allowDistributedWells=false, bool useTransToFilterOverlap=true) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:968 std::array< double, 3 > getEclCentroid(const cpgrid::Entity< 0 > &elem) const std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(EdgeWeightMethod method, const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections={}, const double *transmissibilities=nullptr, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltanGoG, double imbalanceTol=1.1, int level=-1) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:873 void createCartesian(const std::array< int, 3 > &dims, const std::array< double, 3 > &cellsize, const std::array< int, 3 > &shift={0, 0, 0}) Traits::template Codim< codim >::LeafIterator leafend() const one past the end of the sequence of leaf entities cpgrid::CpGridDataTraits::InterfaceMap InterfaceMap The type of the map describing communication interfaces. Definition: CpGrid.hpp:1386 std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(DataHandle &data, const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections={}, const double *transmissibilities=nullptr, int overlapLayers=1, int partitionMethod=1, int level=-1) Distributes this grid and data over the available nodes in a distributed machine. Definition: CpGrid.hpp:916 Traits::template Codim< codim >::LevelIterator lend(int level) const one past the end on this level std::vector< std::size_t > processEclipseFormat(const Opm::EclipseGrid *ecl_grid, Opm::EclipseState *ecl_state, bool periodic_extension, bool turn_normals=false, bool clip_z=false, bool edge_conformal=false) const Dune::cpgrid::CpGridData & currentLeafData() const Returns current view data (the leaf grid) const std::vector< int > & globalCell() const bool loadBalanceSerial(int overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltan, int edgeWeightMethod=Dune::EdgeWeightMethod::defaultTransEdgeWgt, double imbalanceTol=1.1, int level=-1) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:772 bool loadBalance(int overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltan, double imbalanceTol=1.1, int level=-1) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:739 int maxLevel() const Return maximum level defined in this grid. Levels are 0 and 1, maxlevel = 1 (not counting leafview),... const CpGridTraits::Communication & comm() const Get the collective communication object. const std::vector< Dune::GeometryType > & geomTypes(const int) const void postAdapt() Clean up refinement markers - set every element to the mark 0 which represents 'doing nothing'. void addLgrsUpdateLeafView(std::vector< Opm::Refinement::BlockRefinement > requests) The same refinement given as block requests. Under the Conforming backend the requests may also be gr... const Vector & vertexPosition(int vertex) const Get the Position of a vertex. const std::array< int, 3 > & logicalCartesianSize() const int faceVertex(int face, int local_index) const Get the index identifying a vertex of a face. const Vector & faceCentroid(int face) const Get the coordinates of the center of a face. unsigned int ghostSize(int, int) const Size of the ghost cell layer on a given level. bool mark(int refCount, const cpgrid::Entity< 0 > &element, bool throwOnFailure=false) Mark entity for refinement (or coarsening). cpgrid::CpGridDataTraits::RemoteIndices RemoteIndices The type of the remote indices information. Definition: CpGrid.hpp:1433 void setRefinementBuilder(std::shared_ptr< Opm::Refinement::Builder > builder) The builder the Conforming backend refines with. const InterfaceMap & cellScatterGatherInterface() const Get an interface for gathering/scattering data attached to cells with communication. Dune::cpgrid::Intersection getParentIntersectionFromLgrBoundaryFace(const Dune::cpgrid::Intersection &intersection) const Returns the coarse-level-zero ("parent/origin") intersection of a refined intersection (face) in the ... void getIJK(const int c, std::array< int, 3 > &ijk) const Extract Cartesian index triplet (i,j,k) of an active cell. void processEclipseFormat(const grdecl &input_data, bool remove_ij_boundary, bool turn_normals=false, bool edge_conformal=false) void syncDistributedGlobalCellIds() Synchronizes cell global ids across processes after load balancing. bool uniqueBoundaryIds() const int faceCell(int face, int local_index, int level=-1) const Get the index identifying a cell attached to a face. Traits::template Codim< codim >::template Partition< PiType >::LevelIterator lend(int level) const one past the end on this level void setPartitioningParams(const std::map< std::string, std::string > ¶ms) void setLgrBackend(Opm::Refinement::Backend backend) Choose the refinement algorithm; only before the grid is refined. void globalRefine(int refCount, bool throwOnFailure=false) Refine the grid refCount times using the default refinement rule. This behaves like marking all eleme... CpGrid(MPIHelper::MPICommunicator comm) const ParallelIndexSet & getCellIndexSet() const cpgrid::Entity< codim > entity(const cpgrid::Entity< codim > &seed) const given an EntitySeed (or EntityPointer) return an entity object std::vector< std::shared_ptr< Dune::cpgrid::CpGridData > > & currentData() Returns either data_ or distributed_data_(if non empty). int boundaryId(int face) const Traits::template Codim< codim >::template Partition< PiType >::LeafIterator leafbegin() const Iterator to first leaf entity of given codim and PartitionIteratorType. void addLgrsUpdateLeafView(const std::vector< std::array< int, 3 > > &cells_per_dim_vec, const std::vector< std::array< int, 3 > > &startIJK_vec, const std::vector< std::array< int, 3 > > &endIJK_vec, const std::vector< std::string > &lgr_name_vec, const std::vector< std::string > &lgr_parent_grid_name_vec=std::vector< std::string >{}) Create a grid out of a coarse one and (at most) 2 refinements(LGRs) of selected block-shaped disjoint... bool loadBalance(DataHandle &data, decltype(data.fixedSize(0, 0)) overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltan) Distributes this grid and data over the available nodes in a distributed machine. Definition: CpGrid.hpp:1046 unsigned int overlapSize(int, int) const Size of the overlap on a given level. unsigned int ghostSize(int) const Size of the ghost cell layer on the leaf level. std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections={}, const double *transmissibilities=nullptr, int overlapLayers=1, int partitionMethod=Dune::PartitionMethod::zoltanGoG, int level=-1) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:825 friend cpgrid::Entity< dim > createEntity(const CpGrid &, int, bool) Dune::cpgrid::CpGridData & currentLeafData() Returns current view data (the leaf grid) const Vector & cellCentroid(int cell) const Get the coordinates of the center of a cell. Traits::template Codim< codim >::LeafIterator leafbegin() const Iterator to first leaf entity of given codim. Traits::template Codim< codim >::template Partition< PiType >::LevelIterator lbegin(int level) const Iterator to first entity of given codim on level and PartitionIteratorType. const std::map< std::string, int > & getLgrNameToLevel() const const std::vector< int > & sortedNumAquiferCells() const Get sorted active cell indices of numerical aquifer. bool adapt() Triggers the grid refinement process. Returns true if the grid has changed, false otherwise. const RemoteIndices & getCellRemoteIndices() const const Vector faceAreaNormalEcl(int face) const bool preAdapt() Set mightVanish flags for elements that will be refined in the next adapt() call Need to be called af... int getMark(const cpgrid::Entity< 0 > &element) const Return refinement mark for entity. bool loadBalance(DataHandle &data, const std::vector< int > &parts, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1) Distributes this grid and data over the available nodes in a distributed machine. Definition: CpGrid.hpp:1096 const Traits::LeafIndexSet & leafIndexSet() const Access to the LeafIndexSet. const cpgrid::OrientedEntityTable< 0, 1 >::row_type cellFaceRow(int cell) const Get a list of indices identifying all faces of a cell. bool refineAndUpdateGrid(bool throwOnFailure, const std::vector< std::array< int, 3 > > &cells_per_dim_vec, const std::vector< int > &assignRefinedLevel, const std::vector< std::string > &lgr_name_vec, const std::vector< std::array< int, 3 > > &startIJK_vec=std::vector< std::array< int, 3 > >{}, const std::vector< std::array< int, 3 > > &endIJK_vec=std::vector< std::array< int, 3 > >{}) Triggers the grid refinement process, allowing to select diffrent refined level grids. const Vector faceAreaNormalEcl(int face, int level) const As above, for a face of the given level's grid. bool loadBalance(const std::vector< int > &parts, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:1070 std::vector< int > zoltanPartitionWithoutScatter(const std::vector< cpgrid::OpmWellType > *wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections, const double *transmissibilities, const int numParts, const double imbalanceTol) const Partitions the grid using Zoltan without decomposing and distributing it among processes. int size(int level, GeometryType type) const number of entities per level and geometry type in this process std::array< double, 3 > getEclCentroid(const int &idx) const double cellCenterDepth(int cell_index) const Get vertical position of cell center ("zcorn" average). void communicate(DataHandle &data, InterfaceType iftype, CommunicationDirection dir, int) const communicate objects for all codims on a given level Definition: CpGrid.hpp:1135 const Traits::LevelIndexSet & levelIndexSet(int level) const Access to the LevelIndexSets. RemoteIndices & getCellRemoteIndices() cpgrid::CpGridDataTraits::CommunicationType CommunicationType The type of the owner-overlap-copy communication. Definition: CpGrid.hpp:1436 const InterfaceMap & pointScatterGatherInterface() const Get an interface for gathering/scattering data attached to points with communication. int cellFace(int cell, int local_index, int level=-1) const Get a specific face of a cell. Traits::template Codim< codim >::template Partition< PiType >::LeafIterator leafend() const one past the end of the sequence of leaf entities int numCellFaces(int cell, int level=-1) const Get the number of faces of a cell. void autoRefine(const std::array< int, 3 > &nxnynz) Global refine the grid with different refinement factors in each direction. const CommunicationType & cellCommunication() const Get the owner-overlap-copy communication for cells. void scatterData(DataHandle &handle) const Moves data from the global (all data on process) view to the distributed view. Definition: CpGrid.hpp:1596 std::vector< std::size_t > processEclipseFormat(const Opm::EclipseGrid *ecl_grid, Opm::EclipseState *ecl_state, bool periodic_extension, bool turn_normals, bool clip_z, bool pinchActive, bool edge_conformal) Struct that hods all the data needed to represent a Cpgrid. Definition: CpGridData.hpp:117 Represents an entity of a given codim, with positive or negative orientation. Definition: EntityRep.hpp:98 Definition: Geometry.hpp:76 Only needs to provide interface for doing nothing. Definition: Iterators.hpp:118 Definition: Indexsets.hpp:57 Definition: Intersection.hpp:278 Definition: Intersection.hpp:63 Definition: Iterators.hpp:60 A class used as a row type for OrientedEntityTable. Definition: OrientedEntityTable.hpp:55 The namespace Dune is the main namespace for all Dune code. Definition: common/CartesianIndexMapper.hpp:10 cpgrid::Entity< dim > createEntity(const CpGrid &, int, bool) @ simple Use simple approach based on rectangular partitioning the underlying cartesian grid. Definition: GridEnums.hpp:46 EdgeWeightMethod enum for choosing Methods for weighting graph-edges correspoding to cell interfaces in Zoltan's or Me... Definition: GridEnums.hpp:34 @ defaultTransEdgeWgt Use the transmissibilities as edge weights. Definition: GridEnums.hpp:38 void getFirstChildGlobalIds(const Dune::CpGrid &grid, std::vector< int > &parentToFirstChildGlobalIds) Retrieves the global ids of the first child for each parent cell in the grid. @ Trilinear Definition: CpGrid.hpp:191 Traits associated with a specific grid partition type. Definition: CpGrid.hpp:145 cpgrid::Iterator< cd, pitype > LevelIterator The type of the iterator over the level entities of this codim on this partition. Definition: CpGrid.hpp:147 cpgrid::Iterator< cd, pitype > LeafIterator The type of the iterator over the leaf entities of this codim on this partition. Definition: CpGrid.hpp:149 cpgrid::Entity< cd > Entity The type of the entity. Definition: CpGrid.hpp:130 cpgrid::Geometry< 3-cd, 3 > Geometry The type of the geometry associated with the entity. IMPORTANT: Codim<codim>::Geometry == Geometry<di... Definition: CpGrid.hpp:124 cpgrid::Geometry< 3-cd, 3 > LocalGeometry The type of the local geometry associated with the entity. Definition: CpGrid.hpp:127 cpgrid::Iterator< cd, All_Partition > LeafIterator The type of the iterator over all leaf entities of this codim. Definition: CpGrid.hpp:136 cpgrid::Iterator< cd, All_Partition > LevelIterator The type of the iterator over all level entities of this codim. Definition: CpGrid.hpp:133 cpgrid::Entity< cd > EntitySeed The type of the entity pointer for entities of this codim. Definition: CpGrid.hpp:139 Traits associated with a specific grid partition type. Definition: CpGrid.hpp:157 Dune::GridView< DefaultLeafGridViewTraits< CpGrid > > LeafGridView The type of the leaf grid view associated with this partition type. Definition: CpGrid.hpp:161 Dune::GridView< DefaultLevelGridViewTraits< CpGrid > > LevelGridView The type of the level grid view associated with this partition type. Definition: CpGrid.hpp:159 Definition: CpGrid.hpp:101 cpgrid::IndexSet LevelIndexSet The type of the level index set. Definition: CpGrid.hpp:171 cpgrid::IntersectionIterator LeafIntersectionIterator The type of the intersection iterator at the leafs of the grid. Definition: CpGrid.hpp:110 Dune::GridView< DefaultLeafGridViewTraits< CpGrid > > LeafGridView The type of the leaf grid view associated with this partition type. Definition: CpGrid.hpp:168 Dune::GridView< DefaultLevelGridViewTraits< CpGrid > > LevelGridView The type of the level grid view associated with this partition type. Definition: CpGrid.hpp:166 cpgrid::GlobalIdSet GlobalIdSet The type of the global id set. Definition: CpGrid.hpp:175 cpgrid::IntersectionIterator LevelIntersectionIterator The type of the intersection iterator at the levels of the grid. Definition: CpGrid.hpp:112 cpgrid::IndexSet LeafIndexSet The type of the leaf index set. Definition: CpGrid.hpp:173 cpgrid::CpGridDataTraits::CollectiveCommunication CollectiveCommunication Definition: CpGrid.hpp:181 GlobalIdSet LocalIdSet The type of the local id set. Definition: CpGrid.hpp:177 cpgrid::CpGridDataTraits::Communication Communication The type of the collective communication. Definition: CpGrid.hpp:180 cpgrid::HierarchicIterator HierarchicIterator The type of the hierarchic iterator. Definition: CpGrid.hpp:115 cpgrid::Intersection LevelIntersection The type of the intersection at the levels of the grid. Definition: CpGrid.hpp:108 cpgrid::Intersection LeafIntersection The type of the intersection at the leafs of the grid. Definition: CpGrid.hpp:106 Dune::RemoteIndices< ParallelIndexSet > RemoteIndices The type of the remote indices information. Definition: CpGridDataTraits.hpp:83 typename CommunicationType::ParallelIndexSet ParallelIndexSet The type of the parallel index set. Definition: CpGridDataTraits.hpp:80 Dune::Communication< MPICommunicator > CollectiveCommunication Definition: CpGridDataTraits.hpp:59 Dune::OwnerOverlapCopyCommunication< int, int > CommunicationType type of OwnerOverlap communication for cells Definition: CpGridDataTraits.hpp:77 Dune::Communication< MPICommunicator > Communication Definition: CpGridDataTraits.hpp:58 Communicator::InterfaceMap InterfaceMap The type of the map describing communication interfaces. Definition: CpGridDataTraits.hpp:74 Definition: preprocess.h:56 |