48#ifndef OPM_CPGRIDDATA_HEADER
49#define OPM_CPGRIDDATA_HEADER
52#include <dune/common/parallel/mpihelper.hh>
54#include <dune/istl/owneroverlapcopy.hh>
57#include <dune/common/parallel/communication.hh>
58#include <dune/common/parallel/variablesizecommunicator.hh>
59#include <dune/grid/common/gridenums.hh>
62#include <opm/input/eclipse/EclipseState/Grid/EclipseGrid.hpp>
63#include <opm/input/eclipse/EclipseState/Grid/NNC.hpp>
68#include "Entity2IndexDataHandle.hpp"
69#include "CpGridDataTraits.hpp"
72#include "Geometry.hpp"
75#include <initializer_list>
92class LevelGlobalIdSet;
93class PartitionTypeIndicator;
94template<
int,
int>
class Geometry;
95template<
int>
class Entity;
96template<
int>
class EntityRep;
101 const std::array<int, 3>&,
110template<
class T,
int i>
struct Mover;
128 const std::array<int, 3>&,
136#ifndef MAX_DATA_COMMUNICATED_PER_ENTITY
159 explicit CpGridData(MPIHelper::MPICommunicator comm, std::vector<std::shared_ptr<CpGridData>>& data);
164 explicit CpGridData(std::vector<std::shared_ptr<CpGridData>>& data);
172 int size(
int codim)
const;
175 int size (GeometryType type)
const
178 return size(3 - type.dim());
200 bool periodic_extension,
201 bool turn_normals =
false,
202 bool edge_conformal =
false);
227 bool periodic_extension,
228 bool turn_normals =
false,
230 const std::vector<double>& poreVolume = std::vector<double>{},
231 bool edge_conformal =
false);
267 std::vector<std::size_t>
269 Opm::EclipseState* ecl_state,
270 bool periodic_extension,
271 bool turn_normals =
false,
273 bool pinchActive =
true,
274 bool edge_conformal =
false);
305 Opm::EclipseState* ecl_state,
307 std::array<std::set<std::pair<int, int>>, 2>& nnc,
308 bool remove_ij_boundary,
311 double tolerance_unique_points,
312 bool edge_conformal);
321 void getIJK(
int c, std::array<int,3>& ijk)
const;
323 int cellFace(
int cell,
int local_index)
const
328 auto cellToFace(
int cellIdx)
const
333 const auto& cellToPoint()
const
335 return cell_to_point_;
338 const auto& cellToPoint(
int cellIdx)
const
340 return cell_to_point_[cellIdx];
343 int faceToCellSize(
int face)
const {
345 return face_to_cell_[faceRep].
size();
348 auto faceTag(
int faceIdx)
const
351 return face_tag_[faceRep];
354 auto faceNormals(
int faceIdx)
const
357 return face_normals_[faceRep];
360 auto faceToPoint(
int faceIdx)
const
362 return face_to_point_[faceIdx];
367 return face_to_cell_.
size();
370 auto cornerHistorySize()
const
372 return corner_history_.size();
375 const auto& getCornerHistory(
int cornerIdx)
const
377 if(cornerHistorySize()) {
378 return corner_history_[cornerIdx];
381 OPM_THROW(std::logic_error,
"Vertex has no history record.\n");
398 bool hasNNCs(
const std::vector<int>& cellIndices)
const;
437 std::array<Dune::FieldVector<double,3>,8> getReferenceRefinedCorners(
int idx_in_parent_cell,
const std::array<int,3>& cells_per_dim)
const;
449 if ((level_data_ptr_ ->
size() >1) && (level_ == 0) && (!child_to_parent_cells_.empty())) {
450 return level_data_ptr_->size() -1;
455 const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>&
levelData()
const
457 if (level_data_ptr_->empty()) {
458 OPM_THROW(std::logic_error,
"Level data has not been initialized\n");
460 return *level_data_ptr_;
471 return parent_to_children_cells_[elemIdx];
474 const std::vector<std::tuple<int,std::vector<int>>>& getParentToChildren()
const {
475 return parent_to_children_cells_;
483 int getLeafIdxFromLevelIdx(
int level_cell_idx)
const
485 if (level_to_leaf_cells_.empty()) {
486 OPM_THROW(std::logic_error,
"Grid has no LGRs. No mapping to the leaf.\n");
488 return level_to_leaf_cells_[level_cell_idx];
512 std::tuple< const std::shared_ptr<CpGridData>,
513 const std::vector<std::array<int,2>>,
514 const std::vector<std::tuple<int,std::vector<int>>>,
515 const std::tuple<int, std::vector<int>>,
516 const std::vector<std::array<int,2>>,
517 const std::vector<std::array<int,2>>>
518 refineSingleCell(
const std::array<int,3>& cells_per_dim,
const int& parent_idx)
const;
526 std::array<double,3> computeEclCentroid(
const int idx)
const;
534 std::array<double,3> computeEclCentroid(
const Entity<0>& elem)
const;
537 void computeUniqueBoundaryIds();
544 return use_unique_boundary_ids_;
551 use_unique_boundary_ids_ = uids;
552 if (use_unique_boundary_ids_ && unique_boundary_ids_.empty()) {
553 computeUniqueBoundaryIds();
575 return *local_id_set_;
581 return *global_id_set_;
589 return logical_cartesian_size_;
597 const std::vector<int>& cell_part);
604 template<
class DataHandle>
605 void communicate(DataHandle& data, InterfaceType iftype, CommunicationDirection dir);
607 void computeCellPartitionType();
609 void computePointPartitionType();
611 void computeCommunicationInterfaces(
int noexistingPoints);
617 using CollectiveCommunication = CpGridDataTraits::CollectiveCommunication;
623 using Communicator = CpGridDataTraits::Communicator;
626 using InterfaceMap = CpGridDataTraits::InterfaceMap;
629 using CommunicationType = CpGridDataTraits::CommunicationType;
632 using ParallelIndexSet = CpGridDataTraits::ParallelIndexSet;
635 using RemoteIndices = CpGridDataTraits::RemoteIndices;
640 CommunicationType& cellCommunication()
648 const CommunicationType& cellCommunication()
const
653 ParallelIndexSet& cellIndexSet()
655 return cellCommunication().indexSet();
658 const ParallelIndexSet& cellIndexSet()
const
660 return cellCommunication().indexSet();
663 RemoteIndices& cellRemoteIndices()
665 return cellCommunication().remoteIndices();
668 const RemoteIndices& cellRemoteIndices()
const
670 return cellCommunication().remoteIndices();
677 return aquifer_cells_;
683 void populateGlobalCellIndexSet();
692 template<
class DataHandle>
693 void gatherData(DataHandle& data,
CpGridData* global_view,
703 template<
int codim,
class DataHandle>
704 void gatherCodimData(DataHandle& data,
CpGridData* global_data,
713 template<
class DataHandle>
714 void scatterData(DataHandle& data,
const CpGridData* global_data,
715 const CpGridData* distributed_data,
const InterfaceMap& cell_inf,
716 const InterfaceMap& point_inf);
725 template<
int codim,
class DataHandle>
726 void scatterCodimData(DataHandle& data,
CpGridData* global_data,
737 template<
int codim,
class DataHandle>
739 const Interface& interface);
749 template<
int codim,
class DataHandle>
751 const InterfaceMap& interface);
755 void computeGeometry(
const CpGrid& grid,
757 const std::vector<int>& globalAquiferCells,
760 std::vector<int>& aquiferCells,
762 const std::vector< std::array<int,8> >& cell2Points);
778 std::vector< std::array<int,8> > cell_to_point_;
785 std::array<int, 3> logical_cartesian_size_{};
792 std::vector<int> global_cell_;
798 typedef FieldVector<double, 3> PointType;
804 std::unique_ptr<cpgrid::IndexSet> index_set_;
806 std::shared_ptr<const cpgrid::IdSet> local_id_set_;
808 std::shared_ptr<LevelGlobalIdSet> global_id_set_;
810 std::shared_ptr<PartitionTypeIndicator> partition_type_indicator_;
812 std::vector<int> mark_;
816 std::vector<std::shared_ptr<CpGridData>>* level_data_ptr_;
819 std::vector<int> level_to_leaf_cells_;
// {level LGR, {child0, child1, ...}}
821 std::vector<std::tuple<int,std::vector<int>>> parent_to_children_cells_;
823 std::array<int,3> cells_per_dim_;
// {level, cell index in that level}
826 std::vector<std::array<int,2>> leaf_to_level_cells_;
828 std::vector<std::array<int,2>> corner_history_;
// {level parent cell, parent cell index}
831 std::vector<std::array<int,2>> child_to_parent_cells_;
834 std::vector<int> cell_to_idxInParentCell_;
836 int refinement_max_level_{0};
842 bool use_unique_boundary_ids_;
849 std::vector<double> zcorn;
852 std::vector<int> aquifer_cells_;
857 CommunicationType cell_comm_;
860 std::tuple<Interface,Interface,Interface,Interface,Interface> cell_interfaces_;
865 std::tuple<InterfaceMap,InterfaceMap,InterfaceMap,InterfaceMap,InterfaceMap>
869 std::tuple<InterfaceMap,InterfaceMap,InterfaceMap,InterfaceMap,InterfaceMap>
876 const EntityVariable<Geometry<3 - codim, 3>, codim>& geomVector()
const
882 template<
int>
friend class Entity;
883 template<
int>
friend class EntityRep;
884 friend class Intersection;
885 friend class PartitionTypeIndicator;
899T& getInterface(InterfaceType iftype,
900 std::tuple<T,T,T,T,T>& interfaces)
905 return std::get<0>(interfaces);
907 return std::get<1>(interfaces);
909 return std::get<2>(interfaces);
911 return std::get<3>(interfaces);
913 return std::get<4>(interfaces);
915 OPM_THROW(std::runtime_error,
"Invalid Interface type was used during communication");
920template<
int codim,
class DataHandle>
921void CpGridData::communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data, CommunicationDirection dir,
922 const Interface& interface)
924 this->
template communicateCodim<codim>(data, dir, interface.interfaces());
927template<
int codim,
class DataHandle>
928void CpGridData::communicateCodim(Entity2IndexDataHandle<DataHandle, codim>& data_wrapper, CommunicationDirection dir,
929 const InterfaceMap& interface)
931 Communicator comm(ccobj_, interface);
933 if(dir==ForwardCommunication)
934 comm.forward(data_wrapper);
936 comm.backward(data_wrapper);
940template<
class DataHandle>
942 CommunicationDirection dir)
945 if(data.contains(3,0))
948 communicateCodim<0>(data_wrapper, dir, getInterface(iftype, cell_interfaces_));
950 if(data.contains(3,3))
953 communicateCodim<3>(data_wrapper, dir, getInterface(iftype, point_interfaces_));
965#include <opm/grid/cpgrid/Entity.hpp>
966#include <opm/grid/cpgrid/Indexsets.hpp>
980 data=buffer_[index_++];
982 void write(
const T& data)
984 buffer_[index_++]=data;
990 void resize(std::size_t size)
992 buffer_.resize(size);
996 std::vector<T> buffer_;
997 typename std::vector<T>::size_type index_;
999template<
class DataHandle,
int codim>
1004template<
class DataHandle>
1007 explicit BaseMover(DataHandle& data)
1011 void moveData(
const E& from,
const E& to)
1013 std::size_t size=data_.size(from);
1014 buffer.resize(size);
1015 data_.gather(buffer, from);
1017 data_.scatter(buffer, to, size);
1020 MoveBuffer<typename DataHandle::DataType> buffer;
1024template<
class DataHandle>
1025struct Mover<DataHandle,0> :
public BaseMover<DataHandle>
1027 Mover(DataHandle& data, CpGridData* gatherView,
1028 CpGridData* scatterView)
1029 : BaseMover<DataHandle>(data), gatherView_(gatherView), scatterView_(scatterView)
1032 void operator()(std::size_t from_cell_index,std::size_t to_cell_index)
1034 Entity<0> from_entity=Entity<0>(*gatherView_, from_cell_index,
true);
1035 Entity<0> to_entity=Entity<0>(*scatterView_, to_cell_index,
true);
1036 this->moveData(from_entity, to_entity);
1038 CpGridData* gatherView_;
1039 CpGridData* scatterView_;
1042template<
class DataHandle>
1043struct Mover<DataHandle,1> :
public BaseMover<DataHandle>
1045 Mover(DataHandle& data, CpGridData* gatherView,
1046 CpGridData* scatterView)
1047 : BaseMover<DataHandle>(data), gatherView_(gatherView), scatterView_(scatterView)
1050 void operator()(std::size_t from_cell_index,std::size_t to_cell_index)
1052 typedef typename OrientedEntityTable<0,1>::row_type row_type;
1053 EntityRep<0> from_cell=EntityRep<0>(from_cell_index,
true);
1054 EntityRep<0> to_cell=EntityRep<0>(to_cell_index,
true);
1055 const OrientedEntityTable<0,1>& table = gatherView_->cell_to_face_;
1056 row_type from_faces=table.operator[](from_cell);
1057 row_type to_faces=scatterView_->cell_to_face_[to_cell];
1059 for(
int i=0; i<from_faces.size(); ++i)
1060 this->moveData(from_faces[i], to_faces[i]);
1062 CpGridData *gatherView_;
1063 CpGridData *scatterView_;
1066template<
class DataHandle>
1067struct Mover<DataHandle,3> :
public BaseMover<DataHandle>
1069 Mover(DataHandle& data, CpGridData* gatherView,
1070 CpGridData* scatterView)
1071 : BaseMover<DataHandle>(data), gatherView_(gatherView), scatterView_(scatterView)
1073 void operator()(std::size_t from_cell_index,std::size_t to_cell_index)
1075 const std::array<int,8>& from_cell_points=
1076 gatherView_->cell_to_point_[from_cell_index];
1077 const std::array<int,8>& to_cell_points=
1078 scatterView_->cell_to_point_[to_cell_index];
1079 for(std::size_t i=0; i<8; ++i)
1081 this->moveData(Entity<3>(*gatherView_, from_cell_points[i],
true),
1082 Entity<3>(*scatterView_, to_cell_points[i],
true));
1085 CpGridData* gatherView_;
1086 CpGridData* scatterView_;
1091template<
class DataHandle>
1092void CpGridData::scatterData(DataHandle& data,
const CpGridData* global_data,
1093 const CpGridData* distributed_data,
const InterfaceMap& cell_inf,
1094 const InterfaceMap& point_inf)
1097 if(data.contains(3,0))
1099 Entity2IndexDataHandle<DataHandle, 0> data_wrapper(*global_data, *distributed_data, data);
1100 communicateCodim<0>(data_wrapper, ForwardCommunication, cell_inf);
1102 if(data.contains(3,3))
1104 Entity2IndexDataHandle<DataHandle, 3> data_wrapper(*global_data, *distributed_data, data);
1105 communicateCodim<3>(data_wrapper, ForwardCommunication, point_inf);
1110template<
int codim,
class DataHandle>
1111void CpGridData::scatterCodimData(DataHandle& data, CpGridData* global_data,
1112 CpGridData* distributed_data)
1114 CpGridData *gather_view, *scatter_view;
1115 gather_view=global_data;
1116 scatter_view=distributed_data;
1118 mover::Mover<DataHandle,codim> mover(data, gather_view, scatter_view);
1121 for(
auto index=distributed_data->cellIndexSet().begin(),
1122 end = distributed_data->cellIndexSet().end();
1123 index!=end; ++index)
1125 std::size_t from=index->global();
1126 std::size_t to=index->local();
1134template<
int codim,
class T,
class F>
1135void visitInterior(CpGridData& distributed_data, T begin, T endit, F& func)
1137 for(T it=begin; it!=endit; ++it)
1139 Entity<codim> entity(distributed_data, it-begin,
true);
1140 PartitionType pt = entity.partitionType();
1141 if(pt==Dune::InteriorEntity)
1148template<
class DataHandle>
1149struct GlobalIndexSizeGatherer
1151 GlobalIndexSizeGatherer(DataHandle& data_,
1152 std::vector<int>& ownedGlobalIndices_,
1153 std::vector<int>& ownedSizes_)
1154 : data(data_), ownedGlobalIndices(ownedGlobalIndices_), ownedSizes(ownedSizes_)
1157 template<
class T,
class E>
1158 void operator()(T& i, E& entity)
1160 ownedGlobalIndices.push_back(i);
1161 ownedSizes.push_back(data.size(entity));
1164 std::vector<int>& ownedGlobalIndices;
1165 std::vector<int>& ownedSizes;
1168template<
class DataHandle>
1171 DataGatherer(mover::MoveBuffer<typename DataHandle::DataType>& buffer_,
1173 : buffer(buffer_), data(data_)
1176 template<
class T,
class E>
1177 void operator()(T& , E& entity)
1179 data.gather(buffer, entity);
1181 mover::MoveBuffer<typename DataHandle::DataType>& buffer;
1187template<
class DataHandle>
1188void CpGridData::gatherData(DataHandle& data, CpGridData* global_data,
1189 CpGridData* distributed_data)
1192 if(data.contains(3,0))
1193 gatherCodimData<0>(data, global_data, distributed_data);
1194 if(data.contains(3,3))
1195 gatherCodimData<3>(data, global_data, distributed_data);
1199template<
int codim,
class DataHandle>
1200void CpGridData::gatherCodimData(DataHandle& data, CpGridData* global_data,
1201 CpGridData* distributed_data)
1205 const std::vector<int>& mapping =
1206 distributed_data->global_id_set_->getMapping<codim>();
1210 std::vector<int> owned_global_indices;
1211 std::vector<int> owned_sizes;
1212 owned_global_indices.reserve(mapping.size());
1213 owned_sizes.reserve(mapping.size());
1215 GlobalIndexSizeGatherer<DataHandle> gisg(data, owned_global_indices, owned_sizes);
1216 visitInterior<codim>(*distributed_data, mapping.begin(), mapping.end(), gisg);
1219 int no_indices=owned_sizes.size();
1222 if ( owned_global_indices.empty() )
1223 owned_global_indices.resize(1);
1224 if ( owned_sizes.empty() )
1225 owned_sizes.resize(1);
1226 std::vector<int> no_indices_to_recv(distributed_data->ccobj_.size());
1227 distributed_data->ccobj_.allgather(&no_indices, 1, &(no_indices_to_recv[0]));
1231 std::vector<int> displ(distributed_data->ccobj_.size()+1, 0);
1232 std::transform(displ.begin(), displ.end()-1, no_indices_to_recv.begin(), displ.begin()+1,
1234 int global_size=displ[displ.size()-1];
1235 std::vector<int> global_indices(global_size);
1236 std::vector<int> global_sizes(global_size);
1237 MPI_Allgatherv(&(owned_global_indices[0]), no_indices, MPITraits<int>::getType(),
1238 &(global_indices[0]), &(no_indices_to_recv[0]), &(displ[0]),
1239 MPITraits<int>::getType(),
1240 distributed_data->ccobj_);
1241 MPI_Allgatherv(&(owned_sizes[0]), no_indices, MPITraits<int>::getType(),
1242 &(global_sizes[0]), &(no_indices_to_recv[0]), &(displ[0]),
1243 MPITraits<int>::getType(),
1244 distributed_data->ccobj_);
1245 std::vector<int>().swap(owned_global_indices);
1247 std::vector<int> no_data_send(distributed_data->ccobj_.size());
1248 for(
typename std::vector<int>::iterator begin=no_data_send.begin(),
1249 i=begin, end=no_data_send.end(); i!=end; ++i)
1250 *i = std::accumulate(global_sizes.begin()+displ[i-begin],
1251 global_sizes.begin()+displ[i-begin+1], std::size_t());
1253 std::vector<int>().swap(owned_sizes);
1256 std::transform(displ.begin(), displ.end()-1, no_data_send.begin(), displ.begin()+1,
1257 std::plus<std::size_t>());
1259 int no_data_recv = displ[displ.size()-1];
1262 mover::MoveBuffer<typename DataHandle::DataType> local_data_buffer, global_data_buffer;
1263 if ( no_data_send[distributed_data->ccobj_.rank()] )
1265 local_data_buffer.resize(no_data_send[distributed_data->ccobj_.rank()]);
1269 local_data_buffer.resize(1);
1271 global_data_buffer.resize(no_data_recv);
1273 DataGatherer<DataHandle> gatherer(local_data_buffer, data);
1274 visitInterior<codim>(*distributed_data, mapping.begin(), mapping.end(), gatherer);
1275 MPI_Allgatherv(&(local_data_buffer.buffer_[0]), no_data_send[distributed_data->ccobj_.rank()],
1276 MPITraits<typename DataHandle::DataType>::getType(),
1277 &(global_data_buffer.buffer_[0]), &(no_data_send[0]), &(displ[0]),
1278 MPITraits<typename DataHandle::DataType>::getType(),
1279 distributed_data->ccobj_);
1280 Entity2IndexDataHandle<DataHandle, codim> edata(*global_data, data);
1282 for(
int i=0; i< codim; ++i)
1283 offset+=global_data->size(i);
1285 typename std::vector<int>::const_iterator s=global_sizes.begin();
1286 for(
typename std::vector<int>::const_iterator i=global_indices.begin(),
1287 end=global_indices.end();
1290 edata.scatter(global_data_buffer, *i-offset, *s);
[ provides Dune::Grid ]
Definition CpGrid.hpp:203
Struct that hods all the data needed to represent a Cpgrid.
Definition CpGridData.hpp:118
void postAdapt()
Clean up refinement/coarsening markers - set every element to the mark 0 which represents 'doing noth...
Definition CpGridData.cpp:1950
const cpgrid::LevelGlobalIdSet & globalIdSet() const
Get the global index set.
Definition CpGridData.hpp:579
@ MAX_DATA_PER_CELL
The maximum data items allowed per cell (DUNE < 2.5.2)
Definition CpGridData.hpp:143
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
The logical cartesian size of the grid.
Definition CpGridData.hpp:587
void communicate(DataHandle &data, InterfaceType iftype, CommunicationDirection dir)
communicate objects for all codims on a given level
Definition CpGridData.hpp:941
bool uniqueBoundaryIds() const
Is the grid currently using unique boundary ids?
Definition CpGridData.hpp:542
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:470
int size(int codim) const
number of leaf entities per codim in this process
Definition CpGridData.cpp:149
void readEclipseFormat(const std::string &filename, bool periodic_extension, bool turn_normals=false, bool edge_conformal=false)
Read the Eclipse grid format ('grdecl').
const std::vector< int > & globalCell() const
Return global_cell_ of any level grid, or the leaf grid view (in presence of refinement).
Definition CpGridData.hpp:391
CpGridDataTraits::Communication Communication
The type of the collective communication.
Definition CpGridData.hpp:616
~CpGridData()
Destructor.
Definition CpGridData.cpp:102
void getIJK(int c, std::array< int, 3 > &ijk) const
Extract Cartesian index triplet (i,j,k) of an active cell.
Definition CpGridData.cpp:1713
const IndexSet & indexSet() const
Get the index set.
Definition CpGridData.hpp:567
int getMark(const cpgrid::Entity< 0 > &element) const
Return refinement mark for entity.
Definition CpGridData.cpp:1901
CpGridDataTraits::MPICommunicator MPICommunicator
The type of the mpi communicator.
Definition CpGridData.hpp:614
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.
Definition CpGridData.cpp:1763
void distributeGlobalGrid(CpGrid &grid, const CpGridData &view_data, const std::vector< int > &cell_part)
Redistribute a global grid.
Definition CpGridData.cpp:1489
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:455
const std::vector< double > & zcornData() const
Return the internalized zcorn copy from the grid processing, if no cells were adjusted during the min...
Definition CpGridData.hpp:560
void setUniqueBoundaryIds(bool uids)
Set whether we want to have unique boundary ids.
Definition CpGridData.hpp:549
bool preAdapt()
Set mightVanish flags for elements that will be refined in the next adapt() call Need to be called af...
Definition CpGridData.cpp:1906
int getGridIdx() const
Add doc/or remove method and replace it with better approach.
Definition CpGridData.hpp:441
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)
Read the Eclipse grid format ('grdecl').
Definition processEclipseFormat.cpp:438
bool hasNNCs(const std::vector< int > &cellIndices) const
Check all cells selected for refinement have no NNCs (no neighbor connections).
Definition CpGridData.cpp:1733
bool mark(int refCount, const cpgrid::Entity< 0 > &element)
Mark entity for refinement or coarsening.
Definition CpGridData.cpp:1884
const cpgrid::IdSet & localIdSet() const
Get the local index set.
Definition CpGridData.hpp:573
bool adapt()
TO DO: Documentation. Triggers the grid refinement process - Currently, returns preAdapt()
Definition CpGridData.cpp:1945
const std::vector< int > & sortedNumAquiferCells() const
Get sorted active cell indices of numerical aquifer.
Definition CpGridData.hpp:675
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
A class design to hold a variable with a value for each entity of the given codimension,...
Definition EntityRep.hpp:272
This class encapsulates geometry for vertices, intersections, and cells.
Definition Geometry.hpp:76
The global id set for Dune.
Definition Indexsets.hpp:487
Only needs to provide interface for doing nothing.
Definition Iterators.hpp:118
Definition Indexsets.hpp:201
Definition Indexsets.hpp:56
Definition Indexsets.hpp:371
Represents the topological relationships between sets of entities, for example cells and faces.
Definition OrientedEntityTable.hpp:139
int size() const
Returns the number of rows in the table.
Definition SparseTable.hpp:121
A class design to hold a variable with a value for each entity of the given codimension,...
Definition EntityRep.hpp:307
A SparseTable stores a table with rows of varying size as efficiently as possible.
Definition SparseTable.hpp:55
The namespace Dune is the main namespace for all Dune code.
Definition CartesianIndexMapper.hpp:10
Holds the implementation of the CpGrid as a pimple.
Definition CellQuadrature.cpp:68
Low-level corner-point processing routines and supporting data structures.
MPIHelper::MPICommunicator MPICommunicator
The type of the collective communication.
Definition CpGridDataTraits.hpp:56
AttributeSet
The type of the set of the attributes.
Definition CpGridDataTraits.hpp:66
Definition CpGridData.hpp:110
Raw corner-point specification of a particular geological model.
Definition preprocess.h:56