CpGrid.hpp
Go to the documentation of this file.
43#include <opm/grid/utility/platform_dependent/disable_warnings.h> // Not really needed it seems, but alas.
49#include <opm/grid/utility/platform_dependent/reenable_warnings.h> // Not really needed it seems, but alas.
365 void processEclipseFormat(const grdecl& input_data, bool remove_ij_boundary, bool turn_normals = false);
445 typename Traits::template Codim<codim>::template Partition<PiType>::LevelIterator lbegin (int level) const;
448 typename Traits::template Codim<codim>::template Partition<PiType>::LevelIterator lend (int level) const;
459 typename Traits::template Codim<codim>::template Partition<PiType>::LeafIterator leafbegin() const;
462 typename Traits::template Codim<codim>::template Partition<PiType>::LeafIterator leafend() const;
510 void addLgrUpdateLeafView(const std::array<int,3>& cells_per_dim, const std::array<int,3>& startIJK,
553 // @brief Return parent (coarse) intersection (face) of a refined face on the leaf grid view, whose neighboring cells
556 Dune::cpgrid::Intersection getParentIntersectionFromLgrBoundaryFace(const Dune::cpgrid::Intersection& intersection) const;
632 return get<0>(scatterGrid(defaultTransEdgeWgt, false, nullptr, false, nullptr, true, overlapLayers, useZoltan ));
661 return scatterGrid(defaultTransEdgeWgt, false, wells, false, transmissibilities, false, overlapLayers, useZoltan);
695 return scatterGrid(method, ownersFirst, wells, false, transmissibilities, addCornerCells, overlapLayers, useZoltan);
907 void communicate (DataHandle& data, InterfaceType iftype, CommunicationDirection dir, int /*level*/) const
1004 const Vector faceCenterEcl(int cell_index, int face, const Dune::cpgrid::Intersection& intersection) const;
1329 void CpGrid::communicate (DataHandle& data, InterfaceType iftype, CommunicationDirection dir) const
1341 distributed_data_[0]->scatterData(handle, data_[0].get(), distributed_data_[0].get(), cellScatterGatherInterface(),
void refinePatch_and_check(Dune::CpGrid &, const std::vector< std::array< int, 3 > > &, const std::vector< std::array< int, 3 > > &, const std::vector< std::array< int, 3 > > &, const std::vector< std::string > &) void testCase(const std::string &, const Opm::NNC &, const std::vector< std::array< int, 3 > > &, const std::vector< std::array< int, 3 > > &, const std::vector< std::array< int, 3 > > &, const std::vector< std::string > &, bool) void check_global_refine(const Dune::CpGrid &, const Dune::CpGrid &) void noNNC_check(Dune::CpGrid &, const std::vector< std::array< int, 3 > > &, const std::vector< std::array< int, 3 > > &, const std::vector< std::array< int, 3 > > &, const std::vector< std::string > &) void disjointPatches_check(Dune::CpGrid &, const std::vector< std::array< int, 3 > > &, const std::vector< std::array< int, 3 > > &) void refine_and_check(const Dune::cpgrid::Geometry< 3, 3 > &, const std::array< int, 3 > &, bool) void lookup_check(const Dune::CpGrid &) An iterator over the centroids of the geometry of the entities. Definition: CpGrid.hpp:1043 CentroidIterator(GeometryIterator iter) Constructs a new iterator from an iterator over the geometries. Definition: CpGrid.hpp:1050 const FieldVector< double, 3 > & dereference() const Definition: CpGrid.hpp:1054 int distanceTo(const CentroidIterator &o) Definition: CpGrid.hpp:1073 std::vector< cpgrid::Geometry< 3-codim, 3 > >::const_iterator GeometryIterator The type of the iterator over the codim geometries. Definition: CpGrid.hpp:1047 bool equals(const CentroidIterator &o) const Definition: CpGrid.hpp:1077 const FieldVector< double, 3 > & elementAt(int n) Definition: CpGrid.hpp:1062 CentroidIterator< 0 > beginCellCentroids() const Get an iterator over the cell centroids positioned at the first one. std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(EdgeWeightMethod method, const std::vector< cpgrid::OpmWellType > *wells, const double *transmissibilities=nullptr, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1, bool useZoltan=true) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:690 const Vector faceCenterEcl(int cell_index, int face, const Dune::cpgrid::Intersection &intersection) const void readSintefLegacyFormat(const std::string &grid_prefix) int numFaceVertices(int face) const unsigned int numBoundarySegments() const returns the number of boundary segments within the macro grid void addLgrUpdateLeafView(const std::array< int, 3 > &cells_per_dim, const std::array< int, 3 > &startIJK, const std::array< int, 3 > &endIJK, const std::string &lgr_name) Create a grid out of a coarse one and a refinement(LGR) of a selected block-shaped patch of cells fro... CpGridFamily GridFamily Family typedef, why is this not defined by Grid<>? Definition: CpGrid.hpp:288 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:1350 CentroidIterator< 1 > beginFaceCentroids() const Get an iterator over the face centroids positioned at the first one. void setZoltanParams(const std::map< std::string, std::string > ¶ms) 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:1182 int faceTag(const Cell2FacesRowIterator &cell_face) const Get the cartesian tag associated with a face tag. Definition: CpGrid.hpp:1365 const std::vector< double > & zcornData() const ParallelIndexSet & getCellIndexSet() void setUniqueBoundaryIds(bool uids) std::array< double, 3 > getEclCentroid(const cpgrid::Entity< 0 > &elem) const 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 void processEclipseFormat(const grdecl &input_data, bool remove_ij_boundary, bool turn_normals=false) cpgrid::CpGridDataTraits::InterfaceMap InterfaceMap The type of the map describing communication interfaces. Definition: CpGrid.hpp:1137 Traits::template Codim< codim >::LevelIterator lend(int level) const one past the end on this level const std::vector< int > & globalCell() const std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(DataHandle &data, const std::vector< int > &parts, const std::vector< cpgrid::OpmWellType > *wells, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:799 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 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. bool loadBalance(int overlapLayers=1, bool useZoltan=true) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:629 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:1184 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. bool uniqueBoundaryIds() const std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(const std::vector< cpgrid::OpmWellType > *wells, const double *transmissibilities=nullptr, int overlapLayers=1, bool useZoltan=true) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:657 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 std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(DataHandle &data, EdgeWeightMethod method, const std::vector< cpgrid::OpmWellType > *wells, bool serialPartitioning, const double *transmissibilities=nullptr, bool ownersFirst=false, bool addCornerCells=false, int overlapLayers=1, bool useZoltan=true, double zoltanImbalanceTol=1.1, bool allowDistributedWells=false) Distributes this grid over the available nodes in a distributed machine. Definition: CpGrid.hpp:763 CpGrid(MPIHelper::MPICommunicator comm) std::vector< int > zoltanPartitionWithoutScatter(const std::vector< cpgrid::OpmWellType > *wells, const double *transmissibilities, const int numParts, const double zoltanImbalanceTol) const Partitions the grid using Zoltan without decomposing and distributing it among processes. const ParallelIndexSet & getCellIndexSet() const bool loadBalance(DataHandle &data, decltype(data.fixedSize(0, 0)) overlapLayers=1, bool useZoltan=true) Distributes this grid and data over the available nodes in a distributed machine. Definition: CpGrid.hpp:828 cpgrid::Entity< codim > entity(const cpgrid::Entity< codim > &seed) const given an EntitySeed (or EntityPointer) return an entity object int faceCell(int face, int local_index) const Get the index identifying a cell attached to a face. 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. unsigned int overlapSize(int, int) const Size of the overlap on a given level. void writeSintefLegacyFormat(const std::string &grid_prefix) const unsigned int ghostSize(int) const Size of the ghost cell layer on the leaf level. friend cpgrid::Entity< dim > createEntity(const CpGrid &, int, bool) const Vector & cellCentroid(int cell) const Get the coordinates of the center of a cell. std::pair< bool, std::vector< std::pair< std::string, bool > > > loadBalance(DataHandle &data, const std::vector< cpgrid::OpmWellType > *wells, const double *transmissibilities=nullptr, int overlapLayers=1, bool useZoltan=true) Distributes this grid and data over the available nodes in a distributed machine. Definition: CpGrid.hpp:719 const std::vector< std::shared_ptr< Dune::cpgrid::CpGridData > > & chooseData() const Returns either data_ or distributed_data_(if non empty). 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. const RemoteIndices & getCellRemoteIndices() const const Vector faceAreaNormalEcl(int face) const 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:877 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:852 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:907 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:1187 const InterfaceMap & pointScatterGatherInterface() const Get an interface for gathering/scattering data attached to points with communication. Traits::template Codim< codim >::template Partition< PiType >::LeafIterator leafend() const one past the end of the sequence of leaf entities 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:1336 Struct that hods all the data needed to represent a Cpgrid. Definition: CpGridData.hpp:131 void communicate(DataHandle &data, InterfaceType iftype, CommunicationDirection dir) communicate objects for all codims on a given level Definition: CpGridData.hpp:863 Represents an entity of a given codim, with positive or negative orientation. Definition: EntityRep.hpp:99 Only needs to provide interface for doing nothing. Definition: Iterators.hpp:108 Definition: Indexsets.hpp:55 Definition: Intersection.hpp:278 Definition: Intersection.hpp:66 Definition: Iterators.hpp:60 A class used as a row type for OrientedEntityTable. Definition: OrientedEntityTable.hpp:55 Definition: LookUpData.hh:173 Definition: LookUpData.hh:63 The namespace Dune is the main namespace for all Dune code. Definition: common/CartesianIndexMapper.hpp:10 cpgrid::Entity< dim > createEntity(const CpGrid &, int, bool) EdgeWeightMethod enum for choosing Methods for weighting graph-edges correspoding to cell interfaces in Zoltan's graph... Definition: GridEnums.hpp:34 @ defaultTransEdgeWgt Use the transmissibilities as edge weights. Definition: GridEnums.hpp:38 Definition: CpGrid.hpp:225 Traits associated with a specific grid partition type. Definition: CpGrid.hpp:179 cpgrid::Iterator< cd, pitype > LevelIterator The type of the iterator over the level entities of this codim on this partition. Definition: CpGrid.hpp:181 cpgrid::Iterator< cd, pitype > LeafIterator The type of the iterator over the leaf entities of this codim on this partition. Definition: CpGrid.hpp:183 cpgrid::Entity< cd > Entity The type of the entity. Definition: CpGrid.hpp:164 cpgrid::Geometry< 3-cd, 3 > Geometry The type of the geometry associated with the entity. IMPORTANT: Codim<codim>::Geometry == Geometry<di... Definition: CpGrid.hpp:158 cpgrid::Geometry< 3-cd, 3 > LocalGeometry The type of the local geometry associated with the entity. Definition: CpGrid.hpp:161 cpgrid::Iterator< cd, All_Partition > LeafIterator The type of the iterator over all leaf entities of this codim. Definition: CpGrid.hpp:170 cpgrid::Iterator< cd, All_Partition > LevelIterator The type of the iterator over all level entities of this codim. Definition: CpGrid.hpp:167 cpgrid::Entity< cd > EntitySeed The type of the entity pointer for entities of this codim. Definition: CpGrid.hpp:173 Traits associated with a specific grid partition type. Definition: CpGrid.hpp:191 Dune::GridView< DefaultLeafGridViewTraits< CpGrid > > LeafGridView The type of the leaf grid view associated with this partition type. Definition: CpGrid.hpp:195 Dune::GridView< DefaultLevelGridViewTraits< CpGrid > > LevelGridView The type of the level grid view associated with this partition type. Definition: CpGrid.hpp:193 Definition: CpGrid.hpp:135 cpgrid::IndexSet LevelIndexSet The type of the level index set. Definition: CpGrid.hpp:205 cpgrid::IntersectionIterator LeafIntersectionIterator The type of the intersection iterator at the leafs of the grid. Definition: CpGrid.hpp:144 Dune::GridView< DefaultLeafGridViewTraits< CpGrid > > LeafGridView The type of the leaf grid view associated with this partition type. Definition: CpGrid.hpp:202 Dune::GridView< DefaultLevelGridViewTraits< CpGrid > > LevelGridView The type of the level grid view associated with this partition type. Definition: CpGrid.hpp:200 cpgrid::GlobalIdSet GlobalIdSet The type of the global id set. Definition: CpGrid.hpp:209 cpgrid::IntersectionIterator LevelIntersectionIterator The type of the intersection iterator at the levels of the grid. Definition: CpGrid.hpp:146 cpgrid::IndexSet LeafIndexSet The type of the leaf index set. Definition: CpGrid.hpp:207 cpgrid::CpGridDataTraits::CollectiveCommunication CollectiveCommunication Definition: CpGrid.hpp:215 GlobalIdSet LocalIdSet The type of the local id set. Definition: CpGrid.hpp:211 cpgrid::CpGridDataTraits::Communication Communication The type of the collective communication. Definition: CpGrid.hpp:214 cpgrid::HierarchicIterator HierarchicIterator The type of the hierarchic iterator. Definition: CpGrid.hpp:149 cpgrid::Intersection LevelIntersection The type of the intersection at the levels of the grid. Definition: CpGrid.hpp:142 cpgrid::Intersection LeafIntersection The type of the intersection at the leafs of the grid. Definition: CpGrid.hpp:140 Dune::RemoteIndices< ParallelIndexSet > RemoteIndices The type of the remote indices information. Definition: CpGridDataTraits.hpp:82 typename CommunicationType::ParallelIndexSet ParallelIndexSet The type of the parallel index set. Definition: CpGridDataTraits.hpp:79 Dune::Communication< MPICommunicator > CollectiveCommunication Definition: CpGridDataTraits.hpp:58 Dune::OwnerOverlapCopyCommunication< int, int > CommunicationType type of OwnerOverlap communication for cells Definition: CpGridDataTraits.hpp:76 Dune::Communication< MPICommunicator > Communication Definition: CpGridDataTraits.hpp:57 Communicator::InterfaceMap InterfaceMap The type of the map describing communication interfaces. Definition: CpGridDataTraits.hpp:73 Definition: preprocess.h:56 |