All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Dune::cpgrid::CpGridData Class Reference

Struct that hods all the data needed to represent a Cpgrid. More...

#include <CpGridData.hpp>

Public Member Functions

 CpGridData (CpGrid &grid)
 Constructor. 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, double z_tolerance, bool remove_ij_boundary, bool turn_normals=false)
 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. More...
 
const IndexSetindexSet () const
 Get the index set. More...
 
const std::array< int, 3 > & logicalCartesianSize () const
 The logical cartesian size of the grid. More...
 
void distributeGlobalGrid (const CpGrid &grid, const CpGridData &view_data, const std::vector< int > &cell_part, int overlap_layers)
 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...
 

Friends

template<class T , int i>
struct mover::Mover
 
class Dune::CpGrid
 
template<int >
class Entity
 
template<int >
class EntityRep
 
template<int >
class EntityPointer
 
class Intersection
 
class PartitionTypeIndicator
 

Detailed Description

Struct that hods all the data needed to represent a Cpgrid.

Constructor & Destructor Documentation

Dune::cpgrid::CpGridData::CpGridData ( CpGrid grid)
explicit

Constructor.

Parameters
gridThe grid that we are the data of.

Member Function Documentation

template<class DataHandle >
void Dune::cpgrid::CpGridData::communicate ( DataHandle &  data,
InterfaceType  iftype,
CommunicationDirection  dir 
)

communicate objects for all codims on a given level

Parameters
dataThe data handle describing the data. Has to adhere to the Dune::DataHandleIF interface.
iftypeThe interface to use for the communication.
dirThe direction of the communication along the interface (forward or backward).
void Dune::cpgrid::CpGridData::distributeGlobalGrid ( const CpGrid grid,
const CpGridData view_data,
const std::vector< int > &  cell_part,
int  overlap_layers 
)

Redistribute a global grid.

The whole grid must be available on all processors.

void Dune::cpgrid::CpGridData::getIJK ( int  c,
std::array< int, 3 > &  ijk 
) const
inline

Extract Cartesian index triplet (i,j,k) of an active cell.

Parameters
[in]cActive cell index.
[out]ijkCartesian index triplet
const IndexSet& Dune::cpgrid::CpGridData::indexSet ( ) const
inline

Get the index set.

This is the lead as well as th level index set.

Returns
The index set.
const std::array<int, 3>& Dune::cpgrid::CpGridData::logicalCartesianSize ( ) const
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,
double  z_tolerance,
bool  remove_ij_boundary,
bool  turn_normals = false 
)

Read the Eclipse grid format ('grdecl').

Read the Eclipse grid format ('.grdecl').

Parameters
input_datathe data in grdecl format, declared in preprocess.h.
z_tolerancepoints along a pillar that are closer together in z coordinate than this parameter, will be replaced by a single point.
remove_ij_boundaryif true, will remove (i, j) boundaries. Used internally.
void Dune::cpgrid::CpGridData::readEclipseFormat ( const std::string &  filename,
bool  periodic_extension,
bool  turn_normals = false 
)

Read the Eclipse grid format ('grdecl').

Parameters
filenamethe name of the file to read.
periodic_extensionif 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').

Parameters
grid_prefixthe grid name, such that topology is found in <grid_prefix>-topo.dat etc.
void Dune::cpgrid::CpGridData::setUniqueBoundaryIds ( bool  uids)
inline

Set whether we want to have unique boundary ids.

Parameters
uidsif true, each boundary intersection will have a unique boundary id.
bool Dune::cpgrid::CpGridData::uniqueBoundaryIds ( ) const
inline

Is the grid currently using unique boundary ids?

Returns
true if each boundary intersection has a unique id false if we use the (default) 1-6 ids for i- i+ j- j+ k- k+ boundaries.
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').

Parameters
grid_prefixthe grid name, such that topology will be found in <grid_prefix>-topo.dat etc.
const std::vector<double>& Dune::cpgrid::CpGridData::zcornData ( ) const
inline

Return the internalized zcorn copy from the grid processing, if no cells were adjusted during the minpvprocessing this can be and empty vector.


The documentation for this class was generated from the following files: