CpGrid.hpp
Go to the documentation of this file.
421 typename Traits::template Codim<codim>::template Partition<PiType>::LevelIterator lbegin (int level) const;
424 typename Traits::template Codim<codim>::template Partition<PiType>::LevelIterator lend (int level) const;
435 typename Traits::template Codim<codim>::template Partition<PiType>::LeafIterator leafbegin() const;
438 typename Traits::template Codim<codim>::template Partition<PiType>::LeafIterator leafend() const;
523 // @brief Return parent (coarse) intersection (face) of a refined face on the leaf grid view, whose neighboring cells
527 Dune::cpgrid::Intersection getParentIntersectionFromLgrBoundaryFace(const Dune::cpgrid::Intersection& intersection) const;
587 void updateCornerHistoryLevels(const std::vector<std::vector<std::array<int,2>>>& cornerInMarkedElemWithEquivRefinedCorner,
588 const std::map<std::array<int,2>,std::array<int,2>>& elemLgrAndElemLgrCorner_to_refinedLevelAndRefinedCorner,
627 void computeGlobalCellLgr(const int& level, const std::array<int,3>& startIJK, std::vector<int>& global_cell_lgr);
678 std::vector<std::unordered_map<std::size_t, std::size_t>> mapLocalCartesianIndexSetsToLeafIndexSet() const;
804 return scatterGrid(defaultTransEdgeWgt, /* ownersFirst = */ false, wells, possibleFutureConnections,
854 return scatterGrid(method, ownersFirst, wells, possibleFutureConnections, /* serialPartitioning = */ false,
895 auto ret = loadBalance(wells, possibleFutureConnections, transmissibilities, overlapLayers, partitionMethod, level);
945 bool addCornerCells=false, int overlapLayers=1, int partitionMethod = Dune::PartitionMethod::zoltanGoG,
949 auto ret = scatterGrid(method, ownersFirst, wells, possibleFutureConnections, serialPartitioning, transmissibilities,
1017 decltype(data.fixedSize(0,0)) overlapLayers=1, int partitionMethod = Dune::PartitionMethod::zoltan)
1105 void communicate (DataHandle& data, InterfaceType iftype, CommunicationDirection dir, int /*level*/) const
1221 const Vector faceCenterEcl(int cell_index, int face, const Dune::cpgrid::Intersection& intersection) const;
1556 void CpGrid::communicate (DataHandle& data, InterfaceType iftype, CommunicationDirection dir) const
An iterator over the centroids of the geometry of the entities. Definition: CpGrid.hpp:1260 CentroidIterator(GeometryIterator iter) Constructs a new iterator from an iterator over the geometries. Definition: CpGrid.hpp:1267 const FieldVector< double, 3 > & dereference() const Definition: CpGrid.hpp:1271 int distanceTo(const CentroidIterator &o) Definition: CpGrid.hpp:1290 std::vector< cpgrid::Geometry< 3-codim, 3 > >::const_iterator GeometryIterator The type of the iterator over the codim geometries. Definition: CpGrid.hpp:1264 bool equals(const CentroidIterator &o) const Definition: CpGrid.hpp:1294 const FieldVector< double, 3 > & elementAt(int n) Definition: CpGrid.hpp:1279 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:986 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:218 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:1578 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 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) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:940 cpgrid::CpGridDataTraits::ParallelIndexSet ParallelIndexSet The type of the parallel index set. Definition: CpGrid.hpp:1399 int faceTag(const Cell2FacesRowIterator &cell_face) const Get the cartesian tag associated with a face tag. Definition: CpGrid.hpp:1592 const std::vector< double > & zcornData() const ParallelIndexSet & getCellIndexSet() void setUniqueBoundaryIds(bool uids) 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:846 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:1354 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:889 Traits::template Codim< codim >::LevelIterator lend(int level) const one past the end on this level 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:745 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:712 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'. 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. cpgrid::CpGridDataTraits::RemoteIndices RemoteIndices The type of the remote indices information. Definition: CpGrid.hpp:1401 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 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. 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) Create a grid out of a coarse one and (at most) 2 refinements(LGRs) of selected block-shaped disjoint... 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) 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. bool mark(int refCount, const cpgrid::Entity< 0 > &element) Mark entity for refinement (or coarsening). 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:1016 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:798 friend cpgrid::Entity< dim > createEntity(const CpGrid &, int, bool) 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:1066 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 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:1040 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 globalRefine(int refCount) Refine the grid refCount times using the default refinement rule. This behaves like marking all eleme... bool adapt(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. void communicate(DataHandle &data, InterfaceType iftype, CommunicationDirection dir, int) const communicate objects for all codims on a given level Definition: CpGrid.hpp:1105 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:1404 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:1563 Struct that hods all the data needed to represent a Cpgrid. Definition: CpGridData.hpp:118 void communicate(DataHandle &data, InterfaceType iftype, CommunicationDirection dir) communicate objects for all codims on a given level Definition: CpGridData.hpp:961 Represents an entity of a given codim, with positive or negative orientation. Definition: EntityRep.hpp:99 Definition: Geometry.hpp:76 Only needs to provide interface for doing nothing. Definition: Iterators.hpp:118 Definition: Indexsets.hpp:56 Definition: Intersection.hpp:279 Definition: Intersection.hpp:66 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. Definition: CpGrid.hpp:190 Traits associated with a specific grid partition type. Definition: CpGrid.hpp:144 cpgrid::Iterator< cd, pitype > LevelIterator The type of the iterator over the level entities of this codim on this partition. Definition: CpGrid.hpp:146 cpgrid::Iterator< cd, pitype > LeafIterator The type of the iterator over the leaf entities of this codim on this partition. Definition: CpGrid.hpp:148 cpgrid::Entity< cd > Entity The type of the entity. Definition: CpGrid.hpp:129 cpgrid::Geometry< 3-cd, 3 > Geometry The type of the geometry associated with the entity. IMPORTANT: Codim<codim>::Geometry == Geometry<di... Definition: CpGrid.hpp:123 cpgrid::Geometry< 3-cd, 3 > LocalGeometry The type of the local geometry associated with the entity. Definition: CpGrid.hpp:126 cpgrid::Iterator< cd, All_Partition > LeafIterator The type of the iterator over all leaf entities of this codim. Definition: CpGrid.hpp:135 cpgrid::Iterator< cd, All_Partition > LevelIterator The type of the iterator over all level entities of this codim. Definition: CpGrid.hpp:132 cpgrid::Entity< cd > EntitySeed The type of the entity pointer for entities of this codim. Definition: CpGrid.hpp:138 Traits associated with a specific grid partition type. Definition: CpGrid.hpp:156 Dune::GridView< DefaultLeafGridViewTraits< CpGrid > > LeafGridView The type of the leaf grid view associated with this partition type. Definition: CpGrid.hpp:160 Dune::GridView< DefaultLevelGridViewTraits< CpGrid > > LevelGridView The type of the level grid view associated with this partition type. Definition: CpGrid.hpp:158 Definition: CpGrid.hpp:100 cpgrid::IndexSet LevelIndexSet The type of the level index set. Definition: CpGrid.hpp:170 cpgrid::IntersectionIterator LeafIntersectionIterator The type of the intersection iterator at the leafs of the grid. Definition: CpGrid.hpp:109 Dune::GridView< DefaultLeafGridViewTraits< CpGrid > > LeafGridView The type of the leaf grid view associated with this partition type. Definition: CpGrid.hpp:167 Dune::GridView< DefaultLevelGridViewTraits< CpGrid > > LevelGridView The type of the level grid view associated with this partition type. Definition: CpGrid.hpp:165 cpgrid::GlobalIdSet GlobalIdSet The type of the global id set. Definition: CpGrid.hpp:174 cpgrid::IntersectionIterator LevelIntersectionIterator The type of the intersection iterator at the levels of the grid. Definition: CpGrid.hpp:111 cpgrid::IndexSet LeafIndexSet The type of the leaf index set. Definition: CpGrid.hpp:172 cpgrid::CpGridDataTraits::CollectiveCommunication CollectiveCommunication Definition: CpGrid.hpp:180 GlobalIdSet LocalIdSet The type of the local id set. Definition: CpGrid.hpp:176 cpgrid::CpGridDataTraits::Communication Communication The type of the collective communication. Definition: CpGrid.hpp:179 cpgrid::HierarchicIterator HierarchicIterator The type of the hierarchic iterator. Definition: CpGrid.hpp:114 cpgrid::Intersection LevelIntersection The type of the intersection at the levels of the grid. Definition: CpGrid.hpp:107 cpgrid::Intersection LeafIntersection The type of the intersection at the leafs of the grid. Definition: CpGrid.hpp:105 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 |