|
CpGridData.hpp
Go to the documentation of this file.
178 };
186 explicit CpGridData(MPIHelper::MPICommunicator comm, const std::vector<std::shared_ptr<CpGridData>>& data);
487 std::array<Dune::FieldVector<double,3>,8> getReferenceRefinedCorners(int idx_in_parent_cell, const std::array<int,3>& cells_per_dim) const;
492 // Not the nicest way of checking if "this" points at the leaf grid view of a mixed grid (with coarse and refined cells).
493 // 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.
494 // 2. Unfortunately, level_ is default initialized by 0. This implies, in particular, that if someone wants to check the value of
495 // "this->level_" when "this" points at the leaf grid view of a grid that has been refined, this value is - unfortunately - equal to 0.
496 // 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
497 // reason we check if child_to_parent_cells_.empty() [true for actual level 0 grid, false for the leaf grid view].
499 if ((levels_.level_data_ptr ->size() >1) && (levels_.level == 0) && (!levels_.child_to_parent_cells.empty())) {
563 const std::vector<std::array<int,2>>> // parent_to_refined_corners(~boundary_old_to_new_corners)
566 std::vector<std::vector<std::pair<int, std::vector<int>>>>& faceInMarkedElemAndRefinedFaces) const;
818 void communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data, CommunicationDirection dir,
830 void communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data, CommunicationDirection dir,
986void CpGridData::communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data, CommunicationDirection dir,
993void 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:144 auto faceToPoint(int faceIdx) const Definition: CpGridData.hpp:394 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:659 CpGridDataTraits::CommunicationType CommunicationType type of OwnerOverlap communication for cells Definition: CpGridData.hpp:709 @ MAX_DATA_PER_CELL The maximum data items allowed per cell (DUNE < 2.5.2) Definition: CpGridData.hpp:170 void appendNncFaces(const std::vector< std::pair< int, int > > &cell_pairs) void computePointPartitionType() CpGridDataTraits::ParallelIndexSet ParallelIndexSet The type of the parallel index set. Definition: CpGridData.hpp:712 int size(GeometryType type) const number of leaf entities per geometry type in this process Definition: CpGridData.hpp:202 const std::array< int, 3 > & logicalCartesianSize() const Definition: CpGridData.hpp:667 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:1006 std::size_t continuumCartOffset() const Definition: CpGridData.hpp:440 bool uniqueBoundaryIds() const Definition: CpGridData.hpp:590 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:520 std::array< double, 3 > computeEclCentroid(const Entity< 0 > &elem) const void appendDisjointGrid(const CpGridData &other) void computeCommunicationInterfaces(int noexistingPoints) int getLeafIdxFromLevelIdx(int level_cell_idx) const Definition: CpGridData.hpp:533 const auto & getCornerHistory(int cornerIdx) const Definition: CpGridData.hpp:409 RemoteIndices & cellRemoteIndices() Definition: CpGridData.hpp:743 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:697 const std::vector< int > & globalCell() const Definition: CpGridData.hpp:431 CpGridDataTraits::InterfaceMap InterfaceMap The type of the map describing communication interfaces. Definition: CpGridData.hpp:706 CpGridDataTraits::Communication Communication The type of the collective communication. Definition: CpGridData.hpp:696 const std::vector< std::tuple< int, std::vector< int > > > & getParentToChildren() const Definition: CpGridData.hpp:524 void computeUniqueBoundaryIds() CpGridData(const std::vector< std::shared_ptr< CpGridData > > &data) Constructor. 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:720 auto cellToFace(int cellIdx) const Definition: CpGridData.hpp:362 auto faceNormals(int faceIdx) const Definition: CpGridData.hpp:388 CpGridDataTraits::RemoteIndices RemoteIndices The type of the remote indices information. Definition: CpGridData.hpp:715 auto cornerHistorySize() const Definition: CpGridData.hpp:404 ParallelIndexSet & cellIndexSet() Definition: CpGridData.hpp:733 const auto & cellToPoint(int cellIdx) const Definition: CpGridData.hpp:372 int getMark(const cpgrid::Entity< 0 > &element) const Return refinement mark for entity. const ParallelIndexSet & cellIndexSet() const Definition: CpGridData.hpp:738 CpGridDataTraits::MPICommunicator MPICommunicator The type of the mpi communicator. Definition: CpGridData.hpp:694 bool mark(int refCount, const cpgrid::Entity< 0 > &element, bool throwOnFailure=false) Mark entity for refinement or coarsening. std::vector< std::int64_t > stableCellId() const See CpGrid::stableCellId(). 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:505 const std::vector< double > & zcornData() const Definition: CpGridData.hpp:608 void setUniqueBoundaryIds(bool uids) Definition: CpGridData.hpp:597 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, ContinuumSlice *continuum=nullptr) 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:491 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:728 int cellFace(int cell, int local_index) const Definition: CpGridData.hpp:357 const cpgrid::IdSet & localIdSet() const Get the local index set. Definition: CpGridData.hpp:653 const cpgrid::DefaultGeometryPolicy getGeometry() const Definition: CpGridData.hpp:528 bool adapt() TO DO: Documentation. Triggers the grid refinement process - Currently, returns preAdapt() int faceToCellSize(int face) const Definition: CpGridData.hpp:377 void computeCellPartitionType() CpGridDataTraits::Communicator Communicator The type of the Communicator. Definition: CpGridData.hpp:703 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 CpGridData(MPIHelper::MPICommunicator comm, const std::vector< std::shared_ptr< CpGridData > > &data) const std::vector< int > & sortedNumAquiferCells() const Get sorted active cell indices of numerical aquifer. Definition: CpGridData.hpp:755 const RemoteIndices & cellRemoteIndices() const Definition: CpGridData.hpp:748 Definition: DefaultGeometryPolicy.hpp:56 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:378 Definition: PartitionTypeIndicator.hpp:52 Definition: CpGridData.hpp:1040 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. Definition: CpGridData.hpp:117 int cartOffset Cartesian index, in the dual-continuum grid, of the first cell of this continuum. Definition: CpGridData.hpp:119 std::vector< Opm::NNCdata > pinchNnc Definition: CpGridData.hpp:128 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 const std::vector< std::shared_ptr< CpGridData > > * level_data_ptr Definition: LevelHierarchy.hpp:67 std::vector< std::array< int, 2 > > child_to_parent_cells Definition: LevelHierarchy.hpp:82 std::vector< int > level_to_leaf_cells Definition: LevelHierarchy.hpp:70 std::vector< std::tuple< int, std::vector< int > > > parent_to_children_cells Definition: LevelHierarchy.hpp:72 std::vector< std::array< int, 2 > > corner_history Definition: LevelHierarchy.hpp:79 Definition: CpGridData.hpp:1071 void moveData(const E &from, const E &to) Definition: CpGridData.hpp:1076 MoveBuffer< typename DataHandle::DataType > buffer Definition: CpGridData.hpp:1085 Definition: CpGridData.hpp:1091 void operator()(std::size_t from_cell_index, std::size_t to_cell_index) Definition: CpGridData.hpp:1097 CpGridData * scatterView_ Definition: CpGridData.hpp:1104 CpGridData * gatherView_ Definition: CpGridData.hpp:1103 Mover(DataHandle &data, CpGridData *gatherView, CpGridData *scatterView) Definition: CpGridData.hpp:1092 Definition: CpGridData.hpp:1109 Mover(DataHandle &data, CpGridData *gatherView, CpGridData *scatterView) Definition: CpGridData.hpp:1110 CpGridData * gatherView_ Definition: CpGridData.hpp:1127 CpGridData * scatterView_ Definition: CpGridData.hpp:1128 void operator()(std::size_t from_cell_index, std::size_t to_cell_index) Definition: CpGridData.hpp:1115 Definition: CpGridData.hpp:1133 CpGridData * scatterView_ Definition: CpGridData.hpp:1151 CpGridData * gatherView_ Definition: CpGridData.hpp:1150 Mover(DataHandle &data, CpGridData *gatherView, CpGridData *scatterView) Definition: CpGridData.hpp:1134 void operator()(std::size_t from_cell_index, std::size_t to_cell_index) Definition: CpGridData.hpp:1138 Definition: CpGridData.hpp:1066 Definition: GridStateWriter.hpp:44 Definition: RetainedCornerPointInput.hpp:36 Definition: preprocess.h:56 |