|
CpGridData.hpp
Go to the documentation of this file.
149 };
157 explicit CpGridData(MPIHelper::MPICommunicator comm, std::vector<std::shared_ptr<CpGridData>>& data);
435 std::array<Dune::FieldVector<double,3>,8> getReferenceRefinedCorners(int idx_in_parent_cell, const std::array<int,3>& cells_per_dim) const;
440 // Not the nicest way of checking if "this" points at the leaf grid view of a mixed grid (with coarse and refined cells).
441 // 1. When the grid has been refined at least onece, level_data_ptr_ ->size() >1. Therefore, there is a chance of "this" pointing at the leaf grid view.
442 // 2. Unfortunately, level_ is default initialized by 0. This implies, in particular, that if someone wants to check the value of
443 // "this->level_" when "this" points at the leaf grid view of a grid that has been refined, this value is - unfortunately - equal to 0.
444 // 3. Due to 2. we need an extra bool value to distinguish between the actual level 0 grid and such a leaf grid view (with incorrect level_ == 0). For this
445 // reason we check if child_to_parent_cells_.empty() [true for actual level 0 grid, false for the leaf grid view].
511 const std::vector<std::array<int,2>>> // parent_to_refined_corners(~boundary_old_to_new_corners)
514 std::vector<std::vector<std::pair<int, std::vector<int>>>>& faceInMarkedElemAndRefinedFaces) const;
734 void communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data, CommunicationDirection dir,
746 void communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data, CommunicationDirection dir,
815 std::vector<int> level_to_leaf_cells_; // In entry 'level cell index', we store 'leafview cell index' // {level LGR, {child0, child1, ...}}
817 std::vector<std::tuple<int,std::vector<int>>> parent_to_children_cells_; // {# children in x-direction, ... y-, ... z-}
917void CpGridData::communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data, CommunicationDirection dir,
924void CpGridData::communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data_wrapper, CommunicationDirection dir,
void refine_and_check(const Dune::cpgrid::Geometry< 3, 3 > &, const std::array< int, 3 > &, bool) Struct that hods all the data needed to represent a Cpgrid. Definition: CpGridData.hpp:116 auto faceToPoint(int faceIdx) const Definition: CpGridData.hpp:356 void processEclipseFormat(const grdecl &input_data, Opm::EclipseState *ecl_state, std::array< std::set< std::pair< int, int > >, 2 > &nnc, bool remove_ij_boundary, bool turn_normals, bool pinchActive, double tolerance_unique_points, bool edge_conformal) void postAdapt() Clean up refinement/coarsening markers - set every element to the mark 0 which represents 'doing noth... const cpgrid::LevelGlobalIdSet & globalIdSet() const Get the global index set. Definition: CpGridData.hpp:575 CpGridDataTraits::CommunicationType CommunicationType type of OwnerOverlap communication for cells Definition: CpGridData.hpp:625 @ MAX_DATA_PER_CELL The maximum data items allowed per cell (DUNE < 2.5.2) Definition: CpGridData.hpp:141 void computePointPartitionType() CpGridDataTraits::ParallelIndexSet ParallelIndexSet The type of the parallel index set. Definition: CpGridData.hpp:628 int size(GeometryType type) const number of leaf entities per geometry type in this process Definition: CpGridData.hpp:173 const std::array< int, 3 > & logicalCartesianSize() const Definition: CpGridData.hpp:583 void processEclipseFormat(const Opm::Deck &deck, bool periodic_extension, bool turn_normals=false, bool clip_z=false, const std::vector< double > &poreVolume=std::vector< double >{}, bool edge_conformal=false) void communicate(DataHandle &data, InterfaceType iftype, CommunicationDirection dir) communicate objects for all codims on a given level Definition: CpGridData.hpp:937 bool uniqueBoundaryIds() const Definition: CpGridData.hpp:538 const std::tuple< int, std::vector< int > > & getChildrenLevelAndIndexList(int elemIdx) const Retrieves the level and child indices of a given parent cell. Definition: CpGridData.hpp:468 std::array< double, 3 > computeEclCentroid(const Entity< 0 > &elem) const void computeCommunicationInterfaces(int noexistingPoints) int getLeafIdxFromLevelIdx(int level_cell_idx) const Definition: CpGridData.hpp:481 const auto & getCornerHistory(int cornerIdx) const Definition: CpGridData.hpp:371 RemoteIndices & cellRemoteIndices() Definition: CpGridData.hpp:659 int size(int codim) const number of leaf entities per codim in this process void readEclipseFormat(const std::string &filename, bool periodic_extension, bool turn_normals=false, bool edge_conformal=false) CpGridDataTraits::CollectiveCommunication CollectiveCommunication Definition: CpGridData.hpp:613 const std::vector< int > & globalCell() const Definition: CpGridData.hpp:388 CpGridDataTraits::InterfaceMap InterfaceMap The type of the map describing communication interfaces. Definition: CpGridData.hpp:622 CpGridDataTraits::Communication Communication The type of the collective communication. Definition: CpGridData.hpp:612 const std::vector< std::tuple< int, std::vector< int > > > & getParentToChildren() const Definition: CpGridData.hpp:472 void computeUniqueBoundaryIds() void getIJK(int c, std::array< int, 3 > &ijk) const Extract Cartesian index triplet (i,j,k) of an active cell. CpGridData()=delete CommunicationType & cellCommunication() Get the owner-overlap-copy communication for cells. Definition: CpGridData.hpp:636 auto cellToFace(int cellIdx) const Definition: CpGridData.hpp:324 auto faceNormals(int faceIdx) const Definition: CpGridData.hpp:350 CpGridDataTraits::RemoteIndices RemoteIndices The type of the remote indices information. Definition: CpGridData.hpp:631 auto cornerHistorySize() const Definition: CpGridData.hpp:366 ParallelIndexSet & cellIndexSet() Definition: CpGridData.hpp:649 const auto & cellToPoint(int cellIdx) const Definition: CpGridData.hpp:334 int getMark(const cpgrid::Entity< 0 > &element) const Return refinement mark for entity. const ParallelIndexSet & cellIndexSet() const Definition: CpGridData.hpp:654 CpGridDataTraits::MPICommunicator MPICommunicator The type of the mpi communicator. Definition: CpGridData.hpp:610 bool mark(int refCount, const cpgrid::Entity< 0 > &element, bool throwOnFailure=false) Mark entity for refinement or coarsening. CpGridData(std::vector< std::shared_ptr< CpGridData > > &data) Constructor. void distributeGlobalGrid(CpGrid &grid, const CpGridData &view_data, const std::vector< int > &cell_part) Redistribute a global grid. const std::vector< std::shared_ptr< Dune::cpgrid::CpGridData > > & levelData() const Add doc/or remove method and replace it with better approach. Definition: CpGridData.hpp:453 const std::vector< double > & zcornData() const Definition: CpGridData.hpp:556 void setUniqueBoundaryIds(bool uids) Definition: CpGridData.hpp:545 bool preAdapt() Set mightVanish flags for elements that will be refined in the next adapt() call Need to be called af... int getGridIdx() const Add doc/or remove method and replace it with better approach. Definition: CpGridData.hpp:439 bool hasNNCs(const std::vector< int > &cellIndices) const Check all cells selected for refinement have no NNCs (no neighbor connections). Assumption: all grid ... const CommunicationType & cellCommunication() const Get the owner-overlap-copy communication for cells. Definition: CpGridData.hpp:644 int cellFace(int cell, int local_index) const Definition: CpGridData.hpp:319 const cpgrid::IdSet & localIdSet() const Get the local index set. Definition: CpGridData.hpp:569 const cpgrid::DefaultGeometryPolicy getGeometry() const Definition: CpGridData.hpp:476 bool adapt() TO DO: Documentation. Triggers the grid refinement process - Currently, returns preAdapt() int faceToCellSize(int face) const Definition: CpGridData.hpp:339 void computeCellPartitionType() 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 pinchActive=true, bool edge_conformal=false) CpGridDataTraits::Communicator Communicator The type of the Communicator. Definition: CpGridData.hpp:619 std::tuple< const std::shared_ptr< CpGridData >, const std::vector< std::array< int, 2 > > > refineSingleCell(const std::array< int, 3 > &cells_per_dim, const int &parent_idx, std::vector< std::vector< std::pair< int, std::vector< int > > > > &faceInMarkedElemAndRefinedFaces) const Refine a single cell and return a shared pointer of CpGridData type. std::array< double, 3 > computeEclCentroid(const int idx) const const std::vector< int > & sortedNumAquiferCells() const Get sorted active cell indices of numerical aquifer. Definition: CpGridData.hpp:671 const RemoteIndices & cellRemoteIndices() const Definition: CpGridData.hpp:664 CpGridData(MPIHelper::MPICommunicator comm, std::vector< std::shared_ptr< CpGridData > > &data) Definition: DefaultGeometryPolicy.hpp:53 const EntityVariable< cpgrid::Geometry< 3 - codim, 3 >, codim > & geomVector() const Definition: DefaultGeometryPolicy.hpp:86 Wrapper that turns a data handle suitable for dune-grid into one based on integers instead of entitie... Definition: Entity2IndexDataHandle.hpp:56 Represents an entity of a given codim, with positive or negative orientation. Definition: EntityRep.hpp:98 Only needs to provide interface for doing nothing. Definition: Iterators.hpp:118 Definition: Indexsets.hpp:199 Definition: Indexsets.hpp:57 Definition: Intersection.hpp:63 Definition: Indexsets.hpp:367 Definition: PartitionTypeIndicator.hpp:50 Definition: CpGridData.hpp:971 The namespace Dune is the main namespace for all Dune code. Definition: common/CartesianIndexMapper.hpp:10 Dune::cpgrid::Cell2FacesContainer cell2Faces(const Dune::CpGrid &grid) Get the cell to faces mapping of a grid. MPIHelper::MPICommunicator MPICommunicator The type of the collective communication. Definition: CpGridDataTraits.hpp:56 Dune::VariableSizeCommunicator<> Communicator The type of the Communicator. Definition: CpGridDataTraits.hpp:71 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 AttributeSet The type of the set of the attributes. Definition: CpGridDataTraits.hpp:66 Communicator::InterfaceMap InterfaceMap The type of the map describing communication interfaces. Definition: CpGridDataTraits.hpp:74 Definition: CpGridData.hpp:1002 void moveData(const E &from, const E &to) Definition: CpGridData.hpp:1007 MoveBuffer< typename DataHandle::DataType > buffer Definition: CpGridData.hpp:1016 Definition: CpGridData.hpp:1022 void operator()(std::size_t from_cell_index, std::size_t to_cell_index) Definition: CpGridData.hpp:1028 CpGridData * scatterView_ Definition: CpGridData.hpp:1035 CpGridData * gatherView_ Definition: CpGridData.hpp:1034 Mover(DataHandle &data, CpGridData *gatherView, CpGridData *scatterView) Definition: CpGridData.hpp:1023 Definition: CpGridData.hpp:1040 Mover(DataHandle &data, CpGridData *gatherView, CpGridData *scatterView) Definition: CpGridData.hpp:1041 CpGridData * gatherView_ Definition: CpGridData.hpp:1058 CpGridData * scatterView_ Definition: CpGridData.hpp:1059 void operator()(std::size_t from_cell_index, std::size_t to_cell_index) Definition: CpGridData.hpp:1046 Definition: CpGridData.hpp:1064 CpGridData * scatterView_ Definition: CpGridData.hpp:1082 CpGridData * gatherView_ Definition: CpGridData.hpp:1081 Mover(DataHandle &data, CpGridData *gatherView, CpGridData *scatterView) Definition: CpGridData.hpp:1065 void operator()(std::size_t from_cell_index, std::size_t to_cell_index) Definition: CpGridData.hpp:1069 Definition: CpGridData.hpp:997 Definition: preprocess.h:56 |