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>
101 const std::array<int, 3>&,
110template<
class T,
int i>
struct Mover;
120 friend class GlobalIdSet;
121 friend class HierarchicIterator;
128 const std::array<int, 3>&,
132 CpGridData(
const CpGridData& g);
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);
307 Opm::EclipseState* ecl_state,
309 std::array<std::set<std::pair<int, int>>, 2>& nnc,
310 bool remove_ij_boundary,
313 double tolerance_unique_points,
314 bool edge_conformal);
323 void getIJK(
int c, std::array<int,3>& ijk)
const;
325 int cellFace(
int cell,
int local_index)
const
330 auto cellToFace(
int cellIdx)
const
335 const auto& cellToPoint()
const
337 return cell_to_point_;
340 const auto& cellToPoint(
int cellIdx)
const
342 return cell_to_point_[cellIdx];
345 int faceToCellSize(
int face)
const {
346 Dune::cpgrid::EntityRep<1> faceRep(face,
true);
347 return face_to_cell_[faceRep].size();
350 auto faceTag(
int faceIdx)
const
352 Dune::cpgrid::EntityRep<1> faceRep(faceIdx,
true);
353 return face_tag_[faceRep];
356 auto faceNormals(
int faceIdx)
const
358 Dune::cpgrid::EntityRep<1> faceRep(faceIdx,
true);
359 return face_normals_[faceRep];
362 auto faceToPoint(
int faceIdx)
const
364 return face_to_point_[faceIdx];
369 return face_to_cell_.size();
372 auto cornerHistorySize()
const
374 return corner_history_.size();
377 const auto& getCornerHistory(
int cornerIdx)
const
379 if(cornerHistorySize()) {
380 return corner_history_[cornerIdx];
383 OPM_THROW(std::logic_error,
"Vertex has no history record.\n");
400 bool hasNNCs(
const std::vector<int>& cellIndices)
const;
440 std::array<Dune::FieldVector<double,3>,8> getReferenceRefinedCorners(
int idx_in_parent_cell,
const std::array<int,3>& cells_per_dim)
const;
452 if ((level_data_ptr_ ->
size() >1) && (level_ == 0) && (!child_to_parent_cells_.empty())) {
453 return level_data_ptr_->size() -1;
458 const std::vector<std::shared_ptr<Dune::cpgrid::CpGridData>>&
levelData()
const
460 if (level_data_ptr_->empty()) {
461 OPM_THROW(std::logic_error,
"Level data has not been initialized\n");
463 return *level_data_ptr_;
474 return parent_to_children_cells_[elemIdx];
477 const std::vector<std::tuple<int,std::vector<int>>>& getParentToChildren()
const {
478 return parent_to_children_cells_;
486 int getLeafIdxFromLevelIdx(
int level_cell_idx)
const
488 if (level_to_leaf_cells_.empty()) {
489 OPM_THROW(std::logic_error,
"Grid has no LGRs. No mapping to the leaf.\n");
491 return level_to_leaf_cells_[level_cell_idx];
515 std::tuple< const std::shared_ptr<CpGridData>,
516 const std::vector<std::array<int,2>>,
517 const std::vector<std::tuple<int,std::vector<int>>>,
518 const std::tuple<int, std::vector<int>>,
519 const std::vector<std::array<int,2>>,
520 const std::vector<std::array<int,2>>>
521 refineSingleCell(
const std::array<int,3>& cells_per_dim,
const int& parent_idx)
const;
529 std::array<double,3> computeEclCentroid(
const int idx)
const;
537 std::array<double,3> computeEclCentroid(
const Entity<0>& elem)
const;
540 void computeUniqueBoundaryIds();
547 return use_unique_boundary_ids_;
554 use_unique_boundary_ids_ = uids;
555 if (use_unique_boundary_ids_ && unique_boundary_ids_.empty()) {
556 computeUniqueBoundaryIds();
578 return *local_id_set_;
584 return *global_id_set_;
592 return logical_cartesian_size_;
600 const std::vector<int>& cell_part);
607 template<
class DataHandle>
608 void communicate(DataHandle& data, InterfaceType iftype, CommunicationDirection dir);
610 void computeCellPartitionType();
612 void computePointPartitionType();
614 void computeCommunicationInterfaces(
int noexistingPoints);
620 using CollectiveCommunication = CpGridDataTraits::CollectiveCommunication;
626 using Communicator = CpGridDataTraits::Communicator;
629 using InterfaceMap = CpGridDataTraits::InterfaceMap;
632 using CommunicationType = CpGridDataTraits::CommunicationType;
635 using ParallelIndexSet = CpGridDataTraits::ParallelIndexSet;
638 using RemoteIndices = CpGridDataTraits::RemoteIndices;
643 CommunicationType& cellCommunication()
651 const CommunicationType& cellCommunication()
const
656 ParallelIndexSet& cellIndexSet()
658 return cellCommunication().indexSet();
661 const ParallelIndexSet& cellIndexSet()
const
663 return cellCommunication().indexSet();
666 RemoteIndices& cellRemoteIndices()
668 return cellCommunication().remoteIndices();
671 const RemoteIndices& cellRemoteIndices()
const
673 return cellCommunication().remoteIndices();
680 return aquifer_cells_;
686 void populateGlobalCellIndexSet();
695 template<
class DataHandle>
696 void gatherData(DataHandle& data,
CpGridData* global_view,
706 template<
int codim,
class DataHandle>
707 void gatherCodimData(DataHandle& data,
CpGridData* global_data,
716 template<
class DataHandle>
717 void scatterData(DataHandle& data,
const CpGridData* global_data,
718 const CpGridData* distributed_data,
const InterfaceMap& cell_inf,
719 const InterfaceMap& point_inf);
728 template<
int codim,
class DataHandle>
729 void scatterCodimData(DataHandle& data,
CpGridData* global_data,
740 template<
int codim,
class DataHandle>
742 const Interface& interface);
752 template<
int codim,
class DataHandle>
754 const InterfaceMap& interface);
758 void computeGeometry(
const CpGrid& grid,
760 const std::vector<int>& globalAquiferCells,
763 std::vector<int>& aquiferCells,
765 const std::vector< std::array<int,8> >& cell2Points);
781 std::vector< std::array<int,8> > cell_to_point_;
788 std::array<int, 3> logical_cartesian_size_{};
795 std::vector<int> global_cell_;
801 typedef FieldVector<double, 3> PointType;
807 std::unique_ptr<cpgrid::IndexSet> index_set_;
809 std::shared_ptr<const cpgrid::IdSet> local_id_set_;
811 std::shared_ptr<LevelGlobalIdSet> global_id_set_;
813 std::shared_ptr<PartitionTypeIndicator> partition_type_indicator_;
815 std::vector<int> mark_;
819 std::vector<std::shared_ptr<CpGridData>>* level_data_ptr_;
822 std::vector<int> level_to_leaf_cells_;
824 std::vector<std::tuple<int,std::vector<int>>> parent_to_children_cells_;
826 std::array<int,3> cells_per_dim_;
829 std::vector<std::array<int,2>> leaf_to_level_cells_;
831 std::vector<std::array<int,2>> corner_history_;
834 std::vector<std::array<int,2>> child_to_parent_cells_;
837 std::vector<int> cell_to_idxInParentCell_;
839 int refinement_max_level_{0};
845 bool use_unique_boundary_ids_;
852 std::vector<double> zcorn;
855 std::vector<int> aquifer_cells_;
860 CommunicationType cell_comm_;
863 std::tuple<Interface,Interface,Interface,Interface,Interface> cell_interfaces_;
868 std::tuple<InterfaceMap,InterfaceMap,InterfaceMap,InterfaceMap,InterfaceMap>
872 std::tuple<InterfaceMap,InterfaceMap,InterfaceMap,InterfaceMap,InterfaceMap>
879 const EntityVariable<Geometry<3 - codim, 3>, codim>& geomVector()
const
881 return geometry_.geomVector<codim>();
884 friend class Dune::CpGrid;
885 template<
int>
friend class Entity;
886 template<
int>
friend class EntityRep;
887 friend class Intersection;
888 friend class PartitionTypeIndicator;
902T& getInterface(InterfaceType iftype,
903 std::tuple<T,T,T,T,T>& interfaces)
908 return std::get<0>(interfaces);
910 return std::get<1>(interfaces);
912 return std::get<2>(interfaces);
914 return std::get<3>(interfaces);
916 return std::get<4>(interfaces);
918 OPM_THROW(std::runtime_error,
"Invalid Interface type was used during communication");
923template<
int codim,
class DataHandle>
925 const Interface& interface)
927 this->
template communicateCodim<codim>(data, dir, interface.interfaces());
930template<
int codim,
class DataHandle>
932 const InterfaceMap& interface)
934 Communicator comm(ccobj_, interface);
936 if(dir==ForwardCommunication)
937 comm.forward(data_wrapper);
939 comm.backward(data_wrapper);
943template<
class DataHandle>
945 CommunicationDirection dir)
948 if(data.contains(3,0))
951 communicateCodim<0>(data_wrapper, dir, getInterface(iftype, cell_interfaces_));
953 if(data.contains(3,3))
956 communicateCodim<3>(data_wrapper, dir, getInterface(iftype, point_interfaces_));
968#include <opm/grid/cpgrid/Entity.hpp>
969#include <opm/grid/cpgrid/Indexsets.hpp>
983 data=buffer_[index_++];
985 void write(
const T& data)
987 buffer_[index_++]=data;
993 void resize(std::size_t size)
995 buffer_.resize(size);
999 std::vector<T> buffer_;
1000 typename std::vector<T>::size_type index_;
1002template<
class DataHandle,
int codim>
1007template<
class DataHandle>
1010 explicit BaseMover(DataHandle& data)
1014 void moveData(
const E& from,
const E& to)
1016 std::size_t size=data_.size(from);
1017 buffer.resize(size);
1018 data_.gather(buffer, from);
1020 data_.scatter(buffer, to, size);
1023 MoveBuffer<typename DataHandle::DataType> buffer;
1027template<
class DataHandle>
1028struct Mover<DataHandle,0> :
public BaseMover<DataHandle>
1030 Mover(DataHandle& data, CpGridData* gatherView,
1031 CpGridData* scatterView)
1032 : BaseMover<DataHandle>(data), gatherView_(gatherView), scatterView_(scatterView)
1035 void operator()(std::size_t from_cell_index,std::size_t to_cell_index)
1037 Entity<0> from_entity=Entity<0>(*gatherView_, from_cell_index,
true);
1038 Entity<0> to_entity=Entity<0>(*scatterView_, to_cell_index,
true);
1039 this->moveData(from_entity, to_entity);
1041 CpGridData* gatherView_;
1042 CpGridData* scatterView_;
1045template<
class DataHandle>
1046struct Mover<DataHandle,1> :
public BaseMover<DataHandle>
1048 Mover(DataHandle& data, CpGridData* gatherView,
1049 CpGridData* scatterView)
1050 : BaseMover<DataHandle>(data), gatherView_(gatherView), scatterView_(scatterView)
1053 void operator()(std::size_t from_cell_index,std::size_t to_cell_index)
1055 typedef typename OrientedEntityTable<0,1>::row_type row_type;
1056 EntityRep<0> from_cell=EntityRep<0>(from_cell_index,
true);
1057 EntityRep<0> to_cell=EntityRep<0>(to_cell_index,
true);
1058 const OrientedEntityTable<0,1>& table = gatherView_->cell_to_face_;
1059 row_type from_faces=table.operator[](from_cell);
1060 row_type to_faces=scatterView_->cell_to_face_[to_cell];
1062 for(
int i=0; i<from_faces.size(); ++i)
1063 this->moveData(from_faces[i], to_faces[i]);
1065 CpGridData *gatherView_;
1066 CpGridData *scatterView_;
1069template<
class DataHandle>
1070struct Mover<DataHandle,3> :
public BaseMover<DataHandle>
1072 Mover(DataHandle& data, CpGridData* gatherView,
1073 CpGridData* scatterView)
1074 : BaseMover<DataHandle>(data), gatherView_(gatherView), scatterView_(scatterView)
1076 void operator()(std::size_t from_cell_index,std::size_t to_cell_index)
1078 const std::array<int,8>& from_cell_points=
1079 gatherView_->cell_to_point_[from_cell_index];
1080 const std::array<int,8>& to_cell_points=
1081 scatterView_->cell_to_point_[to_cell_index];
1082 for(std::size_t i=0; i<8; ++i)
1084 this->moveData(Entity<3>(*gatherView_, from_cell_points[i],
true),
1085 Entity<3>(*scatterView_, to_cell_points[i],
true));
1088 CpGridData* gatherView_;
1089 CpGridData* scatterView_;
1094template<
class DataHandle>
1095void CpGridData::scatterData(DataHandle& data,
const CpGridData* global_data,
1096 const CpGridData* distributed_data,
const InterfaceMap& cell_inf,
1097 const InterfaceMap& point_inf)
1100 if(data.contains(3,0))
1102 Entity2IndexDataHandle<DataHandle, 0> data_wrapper(*global_data, *distributed_data, data);
1103 communicateCodim<0>(data_wrapper, ForwardCommunication, cell_inf);
1105 if(data.contains(3,3))
1107 Entity2IndexDataHandle<DataHandle, 3> data_wrapper(*global_data, *distributed_data, data);
1108 communicateCodim<3>(data_wrapper, ForwardCommunication, point_inf);
1113template<
int codim,
class DataHandle>
1114void CpGridData::scatterCodimData(DataHandle& data, CpGridData* global_data,
1115 CpGridData* distributed_data)
1117 CpGridData *gather_view, *scatter_view;
1118 gather_view=global_data;
1119 scatter_view=distributed_data;
1121 mover::Mover<DataHandle,codim> mover(data, gather_view, scatter_view);
1124 for(
auto index=distributed_data->cellIndexSet().begin(),
1125 end = distributed_data->cellIndexSet().end();
1126 index!=end; ++index)
1128 std::size_t from=index->global();
1129 std::size_t to=index->local();
1137template<
int codim,
class T,
class F>
1138void visitInterior(CpGridData& distributed_data, T begin, T endit, F& func)
1140 for(T it=begin; it!=endit; ++it)
1142 Entity<codim> entity(distributed_data, it-begin,
true);
1143 PartitionType pt = entity.partitionType();
1144 if(pt==Dune::InteriorEntity)
1151template<
class DataHandle>
1152struct GlobalIndexSizeGatherer
1154 GlobalIndexSizeGatherer(DataHandle& data_,
1155 std::vector<int>& ownedGlobalIndices_,
1156 std::vector<int>& ownedSizes_)
1157 : data(data_), ownedGlobalIndices(ownedGlobalIndices_), ownedSizes(ownedSizes_)
1160 template<
class T,
class E>
1161 void operator()(T& i, E& entity)
1163 ownedGlobalIndices.push_back(i);
1164 ownedSizes.push_back(data.size(entity));
1167 std::vector<int>& ownedGlobalIndices;
1168 std::vector<int>& ownedSizes;
1171template<
class DataHandle>
1174 DataGatherer(mover::MoveBuffer<typename DataHandle::DataType>& buffer_,
1176 : buffer(buffer_), data(data_)
1179 template<
class T,
class E>
1180 void operator()(T& , E& entity)
1182 data.gather(buffer, entity);
1184 mover::MoveBuffer<typename DataHandle::DataType>& buffer;
1190template<
class DataHandle>
1191void CpGridData::gatherData(DataHandle& data, CpGridData* global_data,
1192 CpGridData* distributed_data)
1195 if(data.contains(3,0))
1196 gatherCodimData<0>(data, global_data, distributed_data);
1197 if(data.contains(3,3))
1198 gatherCodimData<3>(data, global_data, distributed_data);
1202template<
int codim,
class DataHandle>
1203void CpGridData::gatherCodimData(DataHandle& data, CpGridData* global_data,
1204 CpGridData* distributed_data)
1208 const std::vector<int>& mapping =
1209 distributed_data->global_id_set_->getMapping<codim>();
1213 std::vector<int> owned_global_indices;
1214 std::vector<int> owned_sizes;
1215 owned_global_indices.reserve(mapping.size());
1216 owned_sizes.reserve(mapping.size());
1218 GlobalIndexSizeGatherer<DataHandle> gisg(data, owned_global_indices, owned_sizes);
1219 visitInterior<codim>(*distributed_data, mapping.begin(), mapping.end(), gisg);
1222 int no_indices=owned_sizes.size();
1225 if ( owned_global_indices.empty() )
1226 owned_global_indices.resize(1);
1227 if ( owned_sizes.empty() )
1228 owned_sizes.resize(1);
1229 std::vector<int> no_indices_to_recv(distributed_data->ccobj_.size());
1230 distributed_data->ccobj_.allgather(&no_indices, 1, &(no_indices_to_recv[0]));
1234 std::vector<int> displ(distributed_data->ccobj_.size()+1, 0);
1235 std::transform(displ.begin(), displ.end()-1, no_indices_to_recv.begin(), displ.begin()+1,
1237 int global_size=displ[displ.size()-1];
1238 std::vector<int> global_indices(global_size);
1239 std::vector<int> global_sizes(global_size);
1240 MPI_Allgatherv(&(owned_global_indices[0]), no_indices, MPITraits<int>::getType(),
1241 &(global_indices[0]), &(no_indices_to_recv[0]), &(displ[0]),
1242 MPITraits<int>::getType(),
1243 distributed_data->ccobj_);
1244 MPI_Allgatherv(&(owned_sizes[0]), no_indices, MPITraits<int>::getType(),
1245 &(global_sizes[0]), &(no_indices_to_recv[0]), &(displ[0]),
1246 MPITraits<int>::getType(),
1247 distributed_data->ccobj_);
1248 std::vector<int>().swap(owned_global_indices);
1250 std::vector<int> no_data_send(distributed_data->ccobj_.size());
1251 for(
typename std::vector<int>::iterator begin=no_data_send.begin(),
1252 i=begin, end=no_data_send.end(); i!=end; ++i)
1253 *i = std::accumulate(global_sizes.begin()+displ[i-begin],
1254 global_sizes.begin()+displ[i-begin+1], std::size_t());
1256 std::vector<int>().swap(owned_sizes);
1259 std::transform(displ.begin(), displ.end()-1, no_data_send.begin(), displ.begin()+1,
1260 std::plus<std::size_t>());
1262 int no_data_recv = displ[displ.size()-1];
1265 mover::MoveBuffer<typename DataHandle::DataType> local_data_buffer, global_data_buffer;
1266 if ( no_data_send[distributed_data->ccobj_.rank()] )
1268 local_data_buffer.resize(no_data_send[distributed_data->ccobj_.rank()]);
1272 local_data_buffer.resize(1);
1274 global_data_buffer.resize(no_data_recv);
1276 DataGatherer<DataHandle> gatherer(local_data_buffer, data);
1277 visitInterior<codim>(*distributed_data, mapping.begin(), mapping.end(), gatherer);
1278 MPI_Allgatherv(&(local_data_buffer.buffer_[0]), no_data_send[distributed_data->ccobj_.rank()],
1279 MPITraits<typename DataHandle::DataType>::getType(),
1280 &(global_data_buffer.buffer_[0]), &(no_data_send[0]), &(displ[0]),
1281 MPITraits<typename DataHandle::DataType>::getType(),
1282 distributed_data->ccobj_);
1283 Entity2IndexDataHandle<DataHandle, codim> edata(*global_data, data);
1285 for(
int i=0; i< codim; ++i)
1286 offset+=global_data->size(i);
1288 typename std::vector<int>::const_iterator s=global_sizes.begin();
1289 for(
typename std::vector<int>::const_iterator i=global_indices.begin(),
1290 end=global_indices.end();
1293 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:1981
const cpgrid::LevelGlobalIdSet & globalIdSet() const
Get the global index set.
Definition CpGridData.hpp:582
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:590
void communicate(DataHandle &data, InterfaceType iftype, CommunicationDirection dir)
communicate objects for all codims on a given level
Definition CpGridData.hpp:944
bool uniqueBoundaryIds() const
Is the grid currently using unique boundary ids?
Definition CpGridData.hpp:545
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:473
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:393
CpGridDataTraits::Communication Communication
The type of the collective communication.
Definition CpGridData.hpp:619
~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:1740
const IndexSet & indexSet() const
Get the index set.
Definition CpGridData.hpp:570
int getMark(const cpgrid::Entity< 0 > &element) const
Return refinement mark for entity.
Definition CpGridData.cpp:1932
CpGridDataTraits::MPICommunicator MPICommunicator
The type of the mpi communicator.
Definition CpGridData.hpp:617
bool mark(int refCount, const cpgrid::Entity< 0 > &element, bool throwOnFailure=false)
Mark entity for refinement or coarsening.
Definition CpGridData.cpp:1911
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:1790
void distributeGlobalGrid(CpGrid &grid, const CpGridData &view_data, const std::vector< int > &cell_part)
Redistribute a global grid.
Definition CpGridData.cpp:1499
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:458
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:563
void setUniqueBoundaryIds(bool uids)
Set whether we want to have unique boundary ids.
Definition CpGridData.hpp:552
bool preAdapt()
Set mightVanish flags for elements that will be refined in the next adapt() call Need to be called af...
Definition CpGridData.cpp:1937
@ MAX_DATA_PER_CELL
The maximum data items allowed per cell (DUNE < 2.5.2).
Definition CpGridData.hpp:143
int getGridIdx() const
Add doc/or remove method and replace it with better approach.
Definition CpGridData.hpp:444
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:1760
const cpgrid::IdSet & localIdSet() const
Get the local index set.
Definition CpGridData.hpp:576
bool adapt()
TO DO: Documentation. Triggers the grid refinement process - Currently, returns preAdapt().
Definition CpGridData.cpp:1976
CpGridDataTraits::AttributeSet AttributeSet
The type of the set of the attributes.
Definition CpGridData.hpp:623
const std::vector< int > & sortedNumAquiferCells() const
Get sorted active cell indices of numerical aquifer.
Definition CpGridData.hpp:678
Definition DefaultGeometryPolicy.hpp:53
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
A class design to hold a variable with a value for each entity of the given codimension,...
Definition EntityRep.hpp:271
Definition Entity.hpp:107
This class encapsulates geometry for vertices, intersections, and cells.
Definition Geometry.hpp:76
Definition Indexsets.hpp:199
Definition Indexsets.hpp:57
Definition Indexsets.hpp:367
Represents the topological relationships between sets of entities, for example cells and faces.
Definition OrientedEntityTable.hpp:139
Definition PartitionTypeIndicator.hpp:50
A class design to hold a variable with a value for each entity of the given codimension,...
Definition EntityRep.hpp:306
A SparseTable stores a table with rows of varying size as efficiently as possible.
Definition SparseTable.hpp:117
Copyright 2019 Equinor AS.
Definition GridPartitioning.cpp:673
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:71
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