My Project
|
Struct that hods all the data needed to represent a Cpgrid. More...
#include <CpGridData.hpp>
Public Types | |
enum | { MAX_DATA_PER_CELL = 2 } |
enum | AttributeSet { owner , overlap , copy } |
The type of the set of the attributes. | |
Public Member Functions | |
CpGridData (CpGrid &grid) | |
Constructor. More... | |
CpGridData (MPIHelper::MPICommunicator comm) | |
Constructor for parallel grid data. More... | |
CpGridData () | |
Constructor. | |
~CpGridData () | |
Destructor. | |
int | size (int codim) const |
number of leaf entities per codim in this process | |
int | size (GeometryType type) const |
number of leaf entities per geometry type in this process | |
void | readSintefLegacyFormat (const std::string &grid_prefix) |
Read the Sintef legacy grid format ('topogeom'). More... | |
void | writeSintefLegacyFormat (const std::string &grid_prefix) const |
Write the Sintef legacy grid format ('topogeom'). More... | |
void | readEclipseFormat (const std::string &filename, bool periodic_extension, bool turn_normals=false) |
Read the Eclipse grid format ('grdecl'). More... | |
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) |
Read the Eclipse grid format ('grdecl'). More... | |
void | getIJK (int c, std::array< int, 3 > &ijk) const |
Extract Cartesian index triplet (i,j,k) of an active cell. More... | |
void | computeUniqueBoundaryIds () |
bool | uniqueBoundaryIds () const |
Is the grid currently using unique boundary ids? More... | |
void | setUniqueBoundaryIds (bool uids) |
Set whether we want to have unique boundary ids. More... | |
const std::vector< double > & | zcornData () const |
Return the internalized zcorn copy from the grid processing, if no cells were adjusted during the minpvprocessing this can be and empty vector. | |
const IndexSet & | indexSet () const |
Get the index set. More... | |
const std::array< int, 3 > & | logicalCartesianSize () const |
The logical cartesian size of the grid. More... | |
void | distributeGlobalGrid (CpGrid &grid, const CpGridData &view_data, const std::vector< int > &cell_part) |
Redistribute a global grid. More... | |
template<class DataHandle > | |
void | communicate (DataHandle &data, InterfaceType iftype, CommunicationDirection dir) |
communicate objects for all codims on a given level More... | |
Struct that hods all the data needed to represent a Cpgrid.
anonymous enum |
|
explicit |
Constructor.
grid | The grid that we are the data of. |
|
explicit |
Constructor for parallel grid data.
comm | The MPI communicator Default constructor. |
void Dune::cpgrid::CpGridData::communicate | ( | DataHandle & | data, |
InterfaceType | iftype, | ||
CommunicationDirection | dir | ||
) |
communicate objects for all codims on a given level
data | The data handle describing the data. Has to adhere to the Dune::DataHandleIF interface. |
iftype | The interface to use for the communication. |
dir | The direction of the communication along the interface (forward or backward). |
void Dune::cpgrid::CpGridData::distributeGlobalGrid | ( | CpGrid & | grid, |
const CpGridData & | view_data, | ||
const std::vector< int > & | cell_part | ||
) |
Redistribute a global grid.
The whole grid must be available on all processors.
|
inline |
Extract Cartesian index triplet (i,j,k) of an active cell.
[in] | c | Active cell index. |
[out] | ijk | Cartesian index triplet |
|
inline |
Get the index set.
This is the lead as well as th level index set.
|
inline |
The logical cartesian size of the grid.
This function is not part of the Dune grid interface, and should be used with caution.
void Dune::cpgrid::CpGridData::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 | ||
) |
Read the Eclipse grid format ('grdecl').
Read the Eclipse grid format ('.grdecl').
input_data | the data in grdecl format, declared in preprocess.h. |
ecl_state | the object from opm-parser provide information regarding to pore volume, NNC, aquifer information when ecl_state is available. NNC and aquifer connection information will also be updated during the function call when available and necessary. |
nnc | is the non-neighboring connections |
remove_ij_boundary | if true, will remove (i, j) boundaries. Used internally. |
pinchActive | If true, we will add faces between vertical cells that have only inactive cells or cells with zero volume between them. If false these cells will not be connected. |
void Dune::cpgrid::CpGridData::readEclipseFormat | ( | const std::string & | filename, |
bool | periodic_extension, | ||
bool | turn_normals = false |
||
) |
Read the Eclipse grid format ('grdecl').
filename | the name of the file to read. |
periodic_extension | if true, the grid will be (possibly) refined, so that intersections/faces along i and j boundaries will match those on the other side. That is, i- faces will match i+ faces etc. |
void Dune::cpgrid::CpGridData::readSintefLegacyFormat | ( | const std::string & | grid_prefix | ) |
Read the Sintef legacy grid format ('topogeom').
grid_prefix | the grid name, such that topology is found in <grid_prefix>-topo.dat etc. |
|
inline |
Set whether we want to have unique boundary ids.
uids | if true, each boundary intersection will have a unique boundary id. |
|
inline |
Is the grid currently using unique boundary ids?
void Dune::cpgrid::CpGridData::writeSintefLegacyFormat | ( | const std::string & | grid_prefix | ) | const |
Write the Sintef legacy grid format ('topogeom').
Read the Sintef legacy grid format ('topogeom').
grid_prefix | the grid name, such that topology will be found in <grid_prefix>-topo.dat etc. |