Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar > Class Template Reference

#include <GenericTracerModel.hpp>

Inheritance diagram for Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >:
Inheritance graph

Public Types

using TracerMatrix = Dune::BCRSMatrix< Opm::MatrixBlock< Scalar, 1, 1 > >
 
using TracerVector = Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >
 
using CartesianIndexMapper = Dune::CartesianIndexMapper< Grid >
 

Public Member Functions

int numTracers () const
 Return the number of tracers considered by the tracerModel. More...
 
const std::string & name (int tracerIdx) const
 Return the tracer name. More...
 
std::string fname (int tracerIdx) const
 
Scalar tracerConcentration (int tracerIdx, int globalDofIdx) const
 Return the tracer concentration for tracer index and global DofIdx. More...
 
void setTracerConcentration (int tracerIdx, int globalDofIdx, Scalar value)
 
const std::map< std::pair< std::string, std::string >, double > & getWellTracerRates () const
 Return well tracer rates. More...
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 

Static Public Attributes

static constexpr int dimWorld = Grid::dimensionworld
 

Protected Member Functions

 GenericTracerModel (const GridView &gridView, const EclipseState &eclState, const CartesianIndexMapper &cartMapper, const DofMapper &dofMapper, const std::function< std::array< double, dimWorld >(int)> centroids)
 
void doInit (bool rst, std::size_t numGridDof, std::size_t gasPhaseIdx, std::size_t oilPhaseIdx, std::size_t waterPhaseIdx)
 Initialize all internal data structures needed by the tracer module. More...
 
bool linearSolve_ (const TracerMatrix &M, TracerVector &x, TracerVector &b)
 
bool linearSolveBatchwise_ (const TracerMatrix &M, std::vector< TracerVector > &x, std::vector< TracerVector > &b)
 
double currentConcentration_ (const Well &eclWell, const std::string &name) const
 

Protected Attributes

const GridView & gridView_
 
const EclipseState & eclState_
 
const CartesianIndexMappercartMapper_
 
const DofMapper & dofMapper_
 
std::vector< int > tracerPhaseIdx_
 
std::vector< Dune::BlockVector< Dune::FieldVector< Scalar, 1 > > > tracerConcentration_
 
std::unique_ptr< TracerMatrixtracerMatrix_
 
std::vector< Dune::BlockVector< Dune::FieldVector< Scalar, 1 > > > storageOfTimeIndex1_
 
std::map< std::pair< std::string, std::string >, double > wellTracerRate_
 
std::function< std::array< double, dimWorld >(int)> centroids_
 Function returning the cell centers. More...
 

Member Typedef Documentation

◆ CartesianIndexMapper

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
using Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::CartesianIndexMapper = Dune::CartesianIndexMapper<Grid>

◆ TracerMatrix

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
using Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::TracerMatrix = Dune::BCRSMatrix<Opm::MatrixBlock<Scalar, 1, 1> >

◆ TracerVector

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
using Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::TracerVector = Dune::BlockVector<Dune::FieldVector<Scalar,1> >

Constructor & Destructor Documentation

◆ GenericTracerModel()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::GenericTracerModel ( const GridView &  gridView,
const EclipseState &  eclState,
const CartesianIndexMapper cartMapper,
const DofMapper &  dofMapper,
const std::function< std::array< double, dimWorld >(int)>  centroids 
)
protected

Member Function Documentation

◆ currentConcentration_()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
double Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::currentConcentration_ ( const Well &  eclWell,
const std::string &  name 
) const
protected

◆ doInit()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
void Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::doInit ( bool  rst,
std::size_t  numGridDof,
std::size_t  gasPhaseIdx,
std::size_t  oilPhaseIdx,
std::size_t  waterPhaseIdx 
)
protected

Initialize all internal data structures needed by the tracer module.

◆ fname()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
std::string Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::fname ( int  tracerIdx) const

◆ getWellTracerRates()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
const std::map< std::pair< std::string, std::string >, double > & Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::getWellTracerRates ( ) const
inline

◆ linearSolve_()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
bool Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::linearSolve_ ( const TracerMatrix M,
TracerVector x,
TracerVector b 
)
protected

◆ linearSolveBatchwise_()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
bool Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::linearSolveBatchwise_ ( const TracerMatrix M,
std::vector< TracerVector > &  x,
std::vector< TracerVector > &  b 
)
protected

◆ name()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
const std::string & Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::name ( int  tracerIdx) const

Return the tracer name.

◆ numTracers()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
int Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::numTracers

Return the number of tracers considered by the tracerModel.

◆ serializeOp()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
template<class Serializer >
void Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::serializeOp ( Serializer &  serializer)
inline

◆ setTracerConcentration()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
void Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::setTracerConcentration ( int  tracerIdx,
int  globalDofIdx,
Scalar  value 
)

◆ tracerConcentration()

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
Scalar Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::tracerConcentration ( int  tracerIdx,
int  globalDofIdx 
) const

Return the tracer concentration for tracer index and global DofIdx.

Member Data Documentation

◆ cartMapper_

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
const CartesianIndexMapper& Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::cartMapper_
protected

◆ centroids_

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
std::function<std::array<double,dimWorld>(int)> Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::centroids_
protected

Function returning the cell centers.

◆ dimWorld

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
constexpr int Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::dimWorld = Grid::dimensionworld
staticconstexpr

◆ dofMapper_

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
const DofMapper& Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::dofMapper_
protected

◆ eclState_

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
const EclipseState& Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::eclState_
protected

◆ gridView_

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
const GridView& Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::gridView_
protected

◆ storageOfTimeIndex1_

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
std::vector<Dune::BlockVector<Dune::FieldVector<Scalar, 1> > > Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::storageOfTimeIndex1_
protected

◆ tracerConcentration_

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
std::vector<Dune::BlockVector<Dune::FieldVector<Scalar, 1> > > Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::tracerConcentration_
protected

◆ tracerMatrix_

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
std::unique_ptr<TracerMatrix> Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::tracerMatrix_
protected

◆ tracerPhaseIdx_

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
std::vector<int> Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::tracerPhaseIdx_
protected

◆ wellTracerRate_

template<class Grid , class GridView , class DofMapper , class Stencil , class Scalar >
std::map<std::pair<std::string, std::string>, double> Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, Scalar >::wellTracerRate_
protected

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