My Project
Loading...
Searching...
No Matches
Opm::PolyhedralGridVanguard< TypeTag > Class Template Reference

Helper class for grid instantiation of ECL file-format using problems. More...

#include <PolyhedralGridVanguard.hpp>

Inheritance diagram for Opm::PolyhedralGridVanguard< TypeTag >:
Opm::FlowBaseVanguard< TypeTag > Opm::BaseVanguard< TypeTag > Opm::FlowGenericVanguard

Public Types

using Grid = GetPropType< TypeTag, Properties::Grid >
 
using EquilGrid = GetPropType< TypeTag, Properties::EquilGrid >
 
using GridView = GetPropType< TypeTag, Properties::GridView >
 
using CartesianIndexMapper = Dune::CartesianIndexMapper< Grid >
 
using LevelCartesianIndexMapper = Opm::LevelCartesianIndexMapper< Grid >
 
using EquilCartesianIndexMapper = Dune::CartesianIndexMapper< EquilGrid >
 
using TransmissibilityType = Transmissibility< Grid, GridView, ElementMapper, CartesianIndexMapper, Scalar >
 
- Public Types inherited from Opm::FlowBaseVanguard< TypeTag >
using Grid = GetPropType< TypeTag, Properties::Grid >
 
using GridView = GetPropType< TypeTag, Properties::GridView >
 
- Public Types inherited from Opm::FlowGenericVanguard
using ParallelWellStruct = std::vector< std::pair< std::string, bool > >
 

Public Member Functions

 PolyhedralGridVanguard (Simulator &simulator)
 
Grid & grid ()
 Return a reference to the simulation grid.
 
const Grid & grid () const
 Return a reference to the simulation grid.
 
const EquilGrid & 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.
 
void loadBalance ()
 Distribute the simulation grid over multiple processes.
 
void addLgrs ()
 
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.
 
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 CartesianIndexMapperequilCartesianIndexMapper () const
 Returns mapper from compressed to cartesian indices for the EQUIL grid.
 
const std::vector< int > & globalCell ()
 
unsigned int gridEquilIdxToGridIdx (unsigned int elemIndex) const
 
unsigned int gridIdxToEquilGridIdx (unsigned int elemIndex) const
 
void releaseGlobalTransmissibilities ()
 Free the memory occupied by the global transmissibility object.
 
std::unordered_set< std::string > defunctWellNames () const
 
const TransmissibilityTypeglobalTransmissibility () const
 
std::function< std::array< double, FlowBaseVanguard< TypeTag >::dimensionworld >(int)> cellCentroids () const
 Get function to query cell centroids for a distributed grid.
 
std::vector< intcellPartition () const
 
- Public Member Functions inherited from Opm::FlowBaseVanguard< TypeTag >
 FlowBaseVanguard (Simulator &simulator)
 Create the grid for problem data files which use the ECL file format.
 
const CartesianIndexMappercartesianMapper () const
 
const std::array< int, dimension > & cartesianDimensions () const
 Returns the number of logically Cartesian cells in each direction.
 
int cartesianSize () const
 Returns the overall number of cells of the logically Cartesian grid.
 
int equilCartesianSize () const
 Returns the overall number of cells of the logically EquilCartesian grid.
 
unsigned cartesianIndex (unsigned compressedCellIdx) const
 Returns the Cartesian cell id for identifaction with ECL data.
 
unsigned cartesianIndex (const std::array< int, dimension > &coords) const
 Return the index of the cells in the logical Cartesian grid.
 
int compressedIndex (int cartesianCellIdx) const
 Return compressed index from cartesian index.
 
int compressedIndexForInterior (int cartesianCellIdx) const
 Return compressed index from cartesian index only in interior.
 
void cartesianCoordinate (unsigned cellIdx, std::array< int, 3 > &ijk) const
 Extract Cartesian index triplet (i,j,k) of an active cell.
 
unsigned equilCartesianIndex (unsigned compressedEquilCellIdx) const
 Returns the Cartesian cell id given an element index for the grid used for equilibration.
 
void equilCartesianCoordinate (unsigned cellIdx, std::array< int, 3 > &ijk) const
 Extract Cartesian index triplet (i,j,k) of an active cell of the grid used for EQUIL.
 
Scalar cellCenterDepth (unsigned globalSpaceIdx) const
 Returns the depth of a degree of freedom [m].
 
const std::vector< Scalar > & cellCenterDepths () const
 
Scalar cellThickness (unsigned globalSpaceIdx) const
 Returns the thickness of a degree of freedom [m].
 
std::size_t globalNumCells () const
 Get the number of cells in the global leaf grid view.
 
void setupCartesianToCompressed_ ()
 
- Public Member Functions inherited from Opm::BaseVanguard< TypeTag >
 BaseVanguard (Simulator &simulator)
 
 BaseVanguard (const BaseVanguard &)=delete
 
const GridView & gridView () const
 Returns a reference to the grid view to be used.
 
int gridSequenceNumber () const
 Returns the number of times the grid has been changed since its creation.
 
void loadBalance ()
 Distribute the grid (and attached data) over all processes.
 
void addLgrs ()
 Add LGRs to the grid, if any.
 
- Public Member Functions inherited from Opm::FlowGenericVanguard
 FlowGenericVanguard ()
 Constructor.
 
 FlowGenericVanguard (SimulationModelParams &&params)
 
 ~FlowGenericVanguard ()
 Destructor.
 
double setupTime ()
 Returns the wall time required to set up the simulator before it was born.
 
void defineSimulationModel (SimulationModelParams &&params)
 Set the simulation configuration objects.
 
const EclipseState & eclState () const
 Return a reference to the internalized ECL deck.
 
EclipseState & eclState ()
 
const Scheduleschedule () const
 Return a reference to the object that managages the ECL schedule.
 
Scheduleschedule ()
 
const SummaryConfigsummaryConfig () const
 Return a reference to the object that determines which quantities ought to be put into the ECL summary output.
 
SummaryStatesummaryState ()
 Returns the summary state.
 
const SummaryStatesummaryState () const
 
Action::State & actionState ()
 Returns the action state.
 
const Action::State & actionState () const
 
UDQStateudqState ()
 Returns the udq state.
 
const UDQStateudqState () const
 
std::unique_ptr< WellTestStatetransferWTestState ()
 
const std::string & caseName () const
 Returns the name of the case.
 
Dune::EdgeWeightMethod edgeWeightsMethod () const
 Parameter deciding the edge-weight strategy of the load balancer.
 
int numJacobiBlocks () const
 Number of blocks in the Block-Jacobi preconditioner.
 
bool ownersFirst () const
 Parameter that decide if cells owned by rank are ordered before ghost cells.
 
bool enableDistributedWells () const
 Whether perforations of a well might be distributed.
 
bool enableEclOutput () const
 Whether or not to emit result files that are compatible with a commercial reservoir simulator.
 
const ParallelWellStruct & parallelWells () const
 Retrieve collection (a vector of pairs) of well names and whether or not the corresponding well objects are perforated on the current rank.
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
bool operator== (const FlowGenericVanguard &rhs) const
 

Static Public Attributes

static constexpr int dimension = Grid::dimension
 
static constexpr int dimensionworld = Grid::dimensionworld
 
- Static Public Attributes inherited from Opm::FlowGenericVanguard
static SimulationModelParams modelParams_
 

Protected Member Functions

void createGrids_ ()
 
void filterConnections_ ()
 
- Protected Member Functions inherited from Opm::FlowBaseVanguard< TypeTag >
template<class CartMapper >
std::function< std::array< double, dimensionworld >(int)> cellCentroids_ (const CartMapper &cartMapper, const bool &isCpGrid) const
 Get function to query cell centroids for a distributed grid.
 
void callImplementationInit ()
 
void updateCartesianToCompressedMapping_ ()
 
void updateCellDepths_ ()
 
void updateCellThickness_ ()
 
- Protected Member Functions inherited from Opm::BaseVanguard< TypeTag >
void finalizeInit_ ()
 
void updateGridView_ ()
 
- Protected Member Functions inherited from Opm::FlowGenericVanguard
void updateOutputDir_ (std::string outputDir, bool enableEclCompatFile)
 
void updateNOSIM_ (std::string_view enableDryRun)
 
bool drsdtconEnabled () const
 
std::unordered_map< std::size_t, const NumericalAquiferCell * > allAquiferCells () const
 
void init ()
 

Protected Attributes

Simulator & simulator_
 
std::unique_ptr< Grid > grid_
 
std::unique_ptr< CartesianIndexMappercartesianIndexMapper_
 
std::unordered_set< std::string > defunctWellNames_
 
std::vector< intglobalcell_
 
- Protected Attributes inherited from Opm::FlowBaseVanguard< TypeTag >
std::unordered_map< int, intcartesianToCompressed_
 Mapping between cartesian and compressed cells.
 
std::vector< Scalar > cellCenterDepth_
 Cell center depths.
 
std::vector< Scalar > cellThickness_
 Cell thickness.
 
std::vector< intis_interior_
 Whether a cells is in the interior.
 
- Protected Attributes inherited from Opm::FlowGenericVanguard
double setupTime_
 
std::string caseName_
 
std::string fileName_
 
Dune::EdgeWeightMethod edgeWeightsMethod_
 
bool ownersFirst_
 
bool enableDistributedWells_
 
bool enableEclOutput_
 
bool allow_splitting_inactive_wells_
 
std::string ignoredKeywords_
 
std::optional< intoutputInterval_
 
bool useMultisegmentWell_
 
bool enableExperiments_
 
std::unique_ptr< SummaryStatesummaryState_
 
std::unique_ptr< UDQStateudqState_
 
std::unique_ptr< Action::State > actionState_
 
std::unique_ptr< WellTestStatewtestState_
 
std::shared_ptr< Pythonpython
 
std::shared_ptr< EclipseState > eclState_
 
std::shared_ptr< ScheduleeclSchedule_
 
std::shared_ptr< SummaryConfigeclSummaryConfig_
 
ParallelWellStruct parallelWells_
 Information about wells in parallel.
 

Friends

class FlowBaseVanguard< TypeTag >
 

Additional Inherited Members

- Static Public Member Functions inherited from Opm::FlowBaseVanguard< TypeTag >
static void registerParameters ()
 Register the common run-time parameters for all ECL simulator vanguards.
 
- Static Public Member Functions inherited from Opm::FlowGenericVanguard
static SimulationModelParams serializationTestParams ()
 
static std::string canonicalDeckPath (const std::string &caseName)
 Returns the canonical path to a deck file.
 
static void readDeck (const std::string &filename)
 Read a deck.
 
static void setCommunication (std::unique_ptr< Opm::Parallel::Communication > comm)
 Set global communication.
 
static Parallel::Communication & comm ()
 Obtain global communicator.
 
- Protected Types inherited from Opm::FlowBaseVanguard< TypeTag >
using Element = typename GridView::template Codim< 0 >::Entity
 
using CartesianIndexMapper = Dune::CartesianIndexMapper< Grid >
 
- Static Protected Member Functions inherited from Opm::FlowGenericVanguard
template<class Scalar >
static void registerParameters_ ()
 
- Static Protected Attributes inherited from Opm::FlowBaseVanguard< TypeTag >
static const int dimension = Grid::dimension
 
static const int dimensionworld = Grid::dimensionworld
 
- Static Protected Attributes inherited from Opm::FlowGenericVanguard
static std::unique_ptr< Parallel::Communication > comm_
 

Detailed Description

template<class TypeTag>
class Opm::PolyhedralGridVanguard< TypeTag >

Helper class for grid instantiation of ECL file-format using problems.

This class uses Dune::PolyhedralGrid as the simulation grid.

Member Function Documentation

◆ cellCentroids()

template<class TypeTag >
std::function< std::array< double, FlowBaseVanguard< TypeTag >::dimensionworld >(int)> Opm::PolyhedralGridVanguard< TypeTag >::cellCentroids ( ) const
inline

Get function to query cell centroids for a distributed grid.

Currently this only non-empty for a loadbalanced CpGrid. It is a function return the centroid for the given element index.

◆ equilCartesianIndexMapper()

template<class TypeTag >
const CartesianIndexMapper & Opm::PolyhedralGridVanguard< TypeTag >::equilCartesianIndexMapper ( ) const
inline

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

Since PolyhedralGrid is not parallel, that's always the same as cartesianIndexMapper().

◆ equilGrid()

template<class TypeTag >
const EquilGrid & Opm::PolyhedralGridVanguard< TypeTag >::equilGrid ( ) const
inline

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.

◆ levelCartesianIndexMapper()

template<class TypeTag >
const LevelCartesianIndexMapper Opm::PolyhedralGridVanguard< TypeTag >::levelCartesianIndexMapper ( ) const
inline

Returns the object which maps a global element index of the simulation grid to the corresponding element index of the level logically Cartesian index.

No refinement is supported for AluGrid so it coincides with CartesianIndexMapper.

◆ loadBalance()

template<class TypeTag >
void Opm::PolyhedralGridVanguard< TypeTag >::loadBalance ( )
inline

Distribute the simulation grid over multiple processes.

(For parallel simulation runs.)

◆ releaseEquilGrid()

template<class TypeTag >
void Opm::PolyhedralGridVanguard< TypeTag >::releaseEquilGrid ( )
inline

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.

◆ releaseGlobalTransmissibilities()

template<class TypeTag >
void Opm::PolyhedralGridVanguard< TypeTag >::releaseGlobalTransmissibilities ( )
inline

Free the memory occupied by the global transmissibility object.

After writing the initial solution, this array should not be necessary anymore.


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