opm-simulators
Loading...
Searching...
No Matches
Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar > Class Template Referenceabstract

Public Member Functions

Dune::CpGrid & grid ()
 Return a reference to the simulation grid.
const Dune::CpGrid & grid () const
 Return a reference to the simulation grid.
const Dune::CpGrid & equilGrid () const
 Returns a refefence to the grid which should be used by the EQUIL initialization code.
void releaseEquilGrid ()
 Indicates that the initial condition has been computed and the memory used by the EQUIL grid can be released.
const CartesianIndexMapper & cartesianIndexMapper () const
 Returns the object which maps a global element index of the simulation grid to the corresponding element index of the logically Cartesian index.
const LevelCartesianIndexMapper levelCartesianIndexMapper () const
 Returns the object which maps a global element index of the simulation grid to the corresponding element index of the level logically Cartesian index.
const CartesianIndexMapper & equilCartesianIndexMapper () const
 Returns mapper from compressed to cartesian indices for the EQUIL grid.
const std::vector< int > & cellPartition () const

Static Public Member Functions

static void setExternalLoadBalancer (const std::function< std::vector< int >(const Dune::CpGrid &)> &loadBalancer)
 Sets a function that returns external load balancing information when passed the grid.

Protected Types

using CartesianIndexMapper = Dune::CartesianIndexMapper<Dune::CpGrid>
using LevelCartesianIndexMapper = Opm::LevelCartesianIndexMapper<Dune::CpGrid>
using Element = typename GridView::template Codim<0>::Entity

Protected Member Functions

void allocCartMapper ()
 Distribute the simulation grid over multiple processes.
void doCreateGrids_ (bool edge_conformal, EclipseState &eclState)
void addLgrsUpdateLeafView (const LgrCollection &lgrCollection, const int lgrsSize, Dune::CpGrid &grid)
virtual void allocTrans ()=0
virtual double getTransmissibility (unsigned I, unsigned J) const =0
void doFilterConnections_ (Schedule &schedule)
Scalar computeCellThickness (const Element &element) const

Protected Attributes

std::unique_ptr< Dune::CpGrid > grid_
std::unique_ptr< Dune::CpGrid > equilGrid_
std::unique_ptr< CartesianIndexMapper > cartesianIndexMapper_
std::unique_ptr< CartesianIndexMapper > equilCartesianIndexMapper_
std::unique_ptr< LevelCartesianIndexMapper > levelCartesianIndexMapper_
int mpiRank
std::vector< int > cell_part_ {}

Member Function Documentation

◆ allocCartMapper()

template<class ElementMapper, class GridView, class Scalar>
void Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::allocCartMapper ( )
protected

Distribute the simulation grid over multiple processes.

(For parallel simulation runs.)

◆ equilGrid()

template<class ElementMapper, class GridView, class Scalar>
const Dune::CpGrid & Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::equilGrid ( ) const

Returns a refefence to the grid which should be used by the EQUIL initialization code.

The EQUIL keyword is used to specify the initial condition of the reservoir in hydrostatic equilibrium. Since the code which does this is not accepting arbitrary DUNE grids (the code is part of the opm-core module), this is not necessarily the same as the grid which is used for the actual simulation.

◆ releaseEquilGrid()

template<class ElementMapper, class GridView, class Scalar>
void Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::releaseEquilGrid ( )

Indicates that the initial condition has been computed and the memory used by the EQUIL grid can be released.

Depending on the implementation, subsequent accesses to the EQUIL grid lead to crashes.

◆ setExternalLoadBalancer()

template<class ElementMapper, class GridView, class Scalar>
void Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::setExternalLoadBalancer ( const std::function< std::vector< int >(const Dune::CpGrid &)> & loadBalancer)
inlinestatic

Sets a function that returns external load balancing information when passed the grid.

The information is a vector of integers indication the partition index for each cell id.


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