CpGridData.hpp
Go to the documentation of this file.
151 };
159 explicit CpGridData(MPIHelper::MPICommunicator comm, std::vector<std::shared_ptr<CpGridData>>& data);
456 std::array<Dune::FieldVector<double,3>,8> getReferenceRefinedCorners(int idx_in_parent_cell, const std::array<int,3>& cells_per_dim) const;
461 // Not the nicest way of checking if "this" points at the leaf grid view of a mixed grid (with coarse and refined cells).
462 // 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.
463 // 2. Unfortunately, level_ is default initialized by 0. This implies, in particular, that if someone wants to check the value of
464 // "this->level_" when "this" points at the leaf grid view of a grid that has been refined, this value is - unfortunately - equal to 0.
465 // 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
466 // reason we check if child_to_parent_cells_.empty() [true for actual level 0 grid, false for the leaf grid view].
532 const std::vector<std::array<int,2>>, // parent_to_refined_corners(~boundary_old_to_new_corners)
533 const std::vector<std::tuple<int,std::vector<int>>>, // parent_to_children_faces (~boundary_old_to_new_faces)
757 void communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data, CommunicationDirection dir,
769 void communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data, CommunicationDirection dir,
838 std::vector<int> level_to_leaf_cells_; // In entry 'level cell index', we store 'leafview cell index' // {level LGR, {child0, child1, ...}}
840 std::vector<std::tuple<int,std::vector<int>>> parent_to_children_cells_; // {# children in x-direction, ... y-, ... z-}
941void CpGridData::communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data, CommunicationDirection dir,
948void 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:118 auto faceToPoint(int faceIdx) const Definition: CpGridData.hpp:360 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:598 CpGridDataTraits::CommunicationType CommunicationType type of OwnerOverlap communication for cells Definition: CpGridData.hpp:648 @ MAX_DATA_PER_CELL The maximum data items allowed per cell (DUNE < 2.5.2) Definition: CpGridData.hpp:143 void computePointPartitionType() CpGridDataTraits::ParallelIndexSet ParallelIndexSet The type of the parallel index set. Definition: CpGridData.hpp:651 int size(GeometryType type) const number of leaf entities per geometry type in this process Definition: CpGridData.hpp:175 const std::array< int, 3 > & logicalCartesianSize() const Definition: CpGridData.hpp:606 void communicate(DataHandle &data, InterfaceType iftype, CommunicationDirection dir) communicate objects for all codims on a given level Definition: CpGridData.hpp:961 bool uniqueBoundaryIds() const Definition: CpGridData.hpp:561 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:489 std::array< double, 3 > computeEclCentroid(const Entity< 0 > &elem) const void computeCommunicationInterfaces(int noexistingPoints) int getLeafIdxFromLevelIdx(int level_cell_idx) const Definition: CpGridData.hpp:502 const auto & getCornerHistory(int cornerIdx) const Definition: CpGridData.hpp:375 RemoteIndices & cellRemoteIndices() Definition: CpGridData.hpp:682 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:636 const std::vector< int > & globalCell() const Definition: CpGridData.hpp:391 CpGridDataTraits::InterfaceMap InterfaceMap The type of the map describing communication interfaces. Definition: CpGridData.hpp:645 CpGridDataTraits::Communication Communication The type of the collective communication. Definition: CpGridData.hpp:635 const std::vector< std::tuple< int, std::vector< int > > > & getParentToChildren() const Definition: CpGridData.hpp:493 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:659 auto cellToFace(int cellIdx) const Definition: CpGridData.hpp:328 auto faceNormals(int faceIdx) const Definition: CpGridData.hpp:354 CpGridDataTraits::RemoteIndices RemoteIndices The type of the remote indices information. Definition: CpGridData.hpp:654 auto cornerHistorySize() const Definition: CpGridData.hpp:370 ParallelIndexSet & cellIndexSet() Definition: CpGridData.hpp:672 const auto & cellToPoint(int cellIdx) const Definition: CpGridData.hpp:338 int getMark(const cpgrid::Entity< 0 > &element) const Return refinement mark for entity. const ParallelIndexSet & cellIndexSet() const Definition: CpGridData.hpp:677 CpGridDataTraits::MPICommunicator MPICommunicator The type of the mpi communicator. Definition: CpGridData.hpp:633 CpGridData(std::vector< std::shared_ptr< CpGridData > > &data) Constructor. std::tuple< const std::shared_ptr< CpGridData >, const std::vector< std::array< int, 2 > >, const std::vector< std::tuple< int, std::vector< int > > >, const std::tuple< int, std::vector< int > >, const std::vector< std::array< int, 2 > >, const std::vector< std::array< int, 2 > > > refineSingleCell(const std::array< int, 3 > &cells_per_dim, const int &parent_idx) const Refine a single cell and return a shared pointer of CpGridData type. 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:474 const std::vector< double > & zcornData() const Definition: CpGridData.hpp:579 void setUniqueBoundaryIds(bool uids) Definition: CpGridData.hpp:568 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:460 void processEclipseFormat(const grdecl &input_data, 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) bool hasNNCs(const std::vector< int > &cellIndices) const Check all cells selected for refinement have no NNCs (no neighbor connections). Assumption: all grid ... bool mark(int refCount, const cpgrid::Entity< 0 > &element) Mark entity for refinement or coarsening. const CommunicationType & cellCommunication() const Get the owner-overlap-copy communication for cells. Definition: CpGridData.hpp:667 int cellFace(int cell, int local_index) const Definition: CpGridData.hpp:323 const cpgrid::IdSet & localIdSet() const Get the local index set. Definition: CpGridData.hpp:592 const cpgrid::DefaultGeometryPolicy getGeometry() const Definition: CpGridData.hpp:497 bool adapt() TO DO: Documentation. Triggers the grid refinement process - Currently, returns preAdapt() int faceToCellSize(int face) const Definition: CpGridData.hpp:343 void computeCellPartitionType() CpGridDataTraits::Communicator Communicator The type of the Communicator. Definition: CpGridData.hpp:642 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:694 const RemoteIndices & cellRemoteIndices() const Definition: CpGridData.hpp:687 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:99 Only needs to provide interface for doing nothing. Definition: Iterators.hpp:118 Definition: Indexsets.hpp:201 Definition: Indexsets.hpp:56 Definition: Intersection.hpp:66 Definition: Indexsets.hpp:371 int size() const Returns the number of rows in the table. Definition: SparseTable.hpp:121 Definition: PartitionTypeIndicator.hpp:50 Definition: CpGridData.hpp:995 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:1026 void moveData(const E &from, const E &to) Definition: CpGridData.hpp:1031 MoveBuffer< typename DataHandle::DataType > buffer Definition: CpGridData.hpp:1040 Definition: CpGridData.hpp:1046 void operator()(std::size_t from_cell_index, std::size_t to_cell_index) Definition: CpGridData.hpp:1052 CpGridData * scatterView_ Definition: CpGridData.hpp:1059 CpGridData * gatherView_ Definition: CpGridData.hpp:1058 Mover(DataHandle &data, CpGridData *gatherView, CpGridData *scatterView) Definition: CpGridData.hpp:1047 Definition: CpGridData.hpp:1064 Mover(DataHandle &data, CpGridData *gatherView, CpGridData *scatterView) Definition: CpGridData.hpp:1065 CpGridData * gatherView_ Definition: CpGridData.hpp:1082 CpGridData * scatterView_ Definition: CpGridData.hpp:1083 void operator()(std::size_t from_cell_index, std::size_t to_cell_index) Definition: CpGridData.hpp:1070 Definition: CpGridData.hpp:1088 CpGridData * scatterView_ Definition: CpGridData.hpp:1106 CpGridData * gatherView_ Definition: CpGridData.hpp:1105 Mover(DataHandle &data, CpGridData *gatherView, CpGridData *scatterView) Definition: CpGridData.hpp:1089 void operator()(std::size_t from_cell_index, std::size_t to_cell_index) Definition: CpGridData.hpp:1093 Definition: CpGridData.hpp:1021 Definition: preprocess.h:56 |