Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar > Class Template Referenceabstract

#include <GenericCpGridVanguard.hpp>

Inheritance diagram for Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >:
Inheritance graph

Public Member Functions

 GenericCpGridVanguard ()
 
virtual ~GenericCpGridVanguard ()=default
 
Dune::CpGrid & grid ()
 Return a reference to the simulation grid. More...
 
const Dune::CpGrid & grid () const
 Return a reference to the simulation grid. More...
 
const Dune::CpGrid & equilGrid () const
 Returns a refefence to the grid which should be used by the EQUIL initialization code. More...
 
void releaseEquilGrid ()
 Indicates that the initial condition has been computed and the memory used by the EQUIL grid can be released. More...
 
const CartesianIndexMappercartesianIndexMapper () const
 Returns the object which maps a global element index of the simulation grid to the corresponding element index of the logically Cartesian index. More...
 
const CartesianIndexMapperequilCartesianIndexMapper () const
 Returns mapper from compressed to cartesian indices for the EQUIL grid. More...
 
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. More...
 

Protected Types

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

Protected Member Functions

void doLoadBalance_ (const Dune::EdgeWeightMethod edgeWeightsMethod, const bool ownersFirst, const bool serialPartitioning, const bool enableDistributedWells, const double zoltanImbalanceTol, const GridView &gridView, const Schedule &schedule, EclipseState &eclState, FlowGenericVanguard::ParallelWellStruct &parallelWells, const int numJacobiBlocks)
 Distribute the simulation grid over multiple processes. More...
 
void distributeFieldProps_ (EclipseState &eclState)
 
virtual const std::string & zoltanParams () const =0
 
void allocCartMapper ()
 
void doCreateGrids_ (EclipseState &eclState)
 
void addLgrsUpdateLeafView (const LgrCollection &lgrCollection, const int lgrsSize)
 
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< CartesianIndexMappercartesianIndexMapper_
 
std::unique_ptr< CartesianIndexMapperequilCartesianIndexMapper_
 
int mpiRank
 
std::vector< int > cell_part_ {}
 

Member Typedef Documentation

◆ CartesianIndexMapper

template<class ElementMapper , class GridView , class Scalar >
using Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::CartesianIndexMapper = Dune::CartesianIndexMapper<Dune::CpGrid>
protected

◆ Element

template<class ElementMapper , class GridView , class Scalar >
using Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::Element = typename GridView::template Codim<0>::Entity
protected

Constructor & Destructor Documentation

◆ GenericCpGridVanguard()

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

◆ ~GenericCpGridVanguard()

template<class ElementMapper , class GridView , class Scalar >
virtual Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::~GenericCpGridVanguard ( )
virtualdefault

Member Function Documentation

◆ addLgrsUpdateLeafView()

template<class ElementMapper , class GridView , class Scalar >
void Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::addLgrsUpdateLeafView ( const LgrCollection &  lgrCollection,
const int  lgrsSize 
)
protected

◆ allocCartMapper()

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

◆ allocTrans()

template<class ElementMapper , class GridView , class Scalar >
virtual void Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::allocTrans ( )
protectedpure virtual

◆ cartesianIndexMapper()

template<class ElementMapper , class GridView , class Scalar >
const CartesianIndexMapper & Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::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.

◆ cellPartition()

template<class ElementMapper , class GridView , class Scalar >
const std::vector< int > & Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::cellPartition ( ) const
inline

◆ computeCellThickness()

template<class ElementMapper , class GridView , class Scalar >
Scalar Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::computeCellThickness ( const Element element) const
protected

◆ distributeFieldProps_()

template<class ElementMapper , class GridView , class Scalar >
void Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::distributeFieldProps_ ( EclipseState &  eclState)
protected

◆ doCreateGrids_()

template<class ElementMapper , class GridView , class Scalar >
void Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::doCreateGrids_ ( EclipseState &  eclState)
protected

◆ doFilterConnections_()

template<class ElementMapper , class GridView , class Scalar >
void Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::doFilterConnections_ ( Schedule &  schedule)
protected

◆ doLoadBalance_()

template<class ElementMapper , class GridView , class Scalar >
void Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::doLoadBalance_ ( const Dune::EdgeWeightMethod  edgeWeightsMethod,
const bool  ownersFirst,
const bool  serialPartitioning,
const bool  enableDistributedWells,
const double  zoltanImbalanceTol,
const GridView &  gridView,
const Schedule &  schedule,
EclipseState &  eclState,
FlowGenericVanguard::ParallelWellStruct parallelWells,
const int  numJacobiBlocks 
)
protected

Distribute the simulation grid over multiple processes.

(For parallel simulation runs.)

◆ equilCartesianIndexMapper()

template<class ElementMapper , class GridView , class Scalar >
const CartesianIndexMapper & Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::equilCartesianIndexMapper ( ) const

Returns mapper from compressed to cartesian indices for the EQUIL grid.

◆ 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.

◆ getTransmissibility()

template<class ElementMapper , class GridView , class Scalar >
virtual double Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::getTransmissibility ( unsigned  I,
unsigned  J 
) const
protectedpure virtual

◆ grid() [1/2]

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

Return a reference to the simulation grid.

References Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::grid_.

◆ grid() [2/2]

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

Return a reference to the simulation grid.

References Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::grid_.

◆ 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 >
static 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.

References Opm::externalLoadBalancer.

◆ zoltanParams()

template<class ElementMapper , class GridView , class Scalar >
virtual const std::string & Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::zoltanParams ( ) const
protectedpure virtual

Member Data Documentation

◆ cartesianIndexMapper_

template<class ElementMapper , class GridView , class Scalar >
std::unique_ptr<CartesianIndexMapper> Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::cartesianIndexMapper_
protected

◆ cell_part_

template<class ElementMapper , class GridView , class Scalar >
std::vector<int> Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::cell_part_ {}
protected

◆ equilCartesianIndexMapper_

template<class ElementMapper , class GridView , class Scalar >
std::unique_ptr<CartesianIndexMapper> Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::equilCartesianIndexMapper_
protected

◆ equilGrid_

template<class ElementMapper , class GridView , class Scalar >
std::unique_ptr<Dune::CpGrid> Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::equilGrid_
protected

◆ grid_

template<class ElementMapper , class GridView , class Scalar >
std::unique_ptr<Dune::CpGrid> Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::grid_
protected

◆ mpiRank

template<class ElementMapper , class GridView , class Scalar >
int Opm::GenericCpGridVanguard< ElementMapper, GridView, Scalar >::mpiRank
protected

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