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

#include <GenericTracerModel.hpp>

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

Public Types

using TracerVectorSingle = Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >
 
using TracerMatrix = Dune::BCRSMatrix< Opm::MatrixBlock< Scalar, 2, 2 > >
 
using TracerVector = Dune::BlockVector< Dune::FieldVector< Scalar, 2 > >
 
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
 
std::string sname (int tracerIdx) const
 
std::string wellfname (int tracerIdx) const
 
std::string wellsname (int tracerIdx) const
 
Phase phase (int tracerIdx) const
 
const std::vector< bool > & enableSolTracers () const
 
Scalar freeTracerConcentration (int tracerIdx, int globalDofIdx) const
 Return the tracer concentration for tracer index and global DofIdx. More...
 
Scalar solTracerConcentration (int tracerIdx, int globalDofIdx) const
 
void setFreeTracerConcentration (int tracerIdx, int globalDofIdx, Scalar value)
 
void setSolTracerConcentration (int tracerIdx, int globalDofIdx, Scalar value)
 
void setEnableSolTracers (int tracerIdx, bool enableSolTracer)
 
const std::map< std::pair< std::string, std::string >, Scalar > & getWellTracerRates () const
 Return well tracer rates. More...
 
const std::map< std::pair< std::string, std::string >, Scalar > & getWellFreeTracerRates () const
 
const std::map< std::pair< std::string, std::string >, Scalar > & getWellSolTracerRates () const
 
const std::map< std::tuple< std::string, std::string, std::size_t >, Scalar > & getMswTracerRates () const
 
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)
 
Scalar 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< bool > enableSolTracers_
 
std::vector< TracerVectortracerConcentration_
 
std::unique_ptr< TracerMatrixtracerMatrix_
 
std::vector< TracerVectorSinglefreeTracerConcentration_
 
std::vector< TracerVectorSinglesolTracerConcentration_
 
std::map< std::pair< std::string, std::string >, Scalar > wellTracerRate_
 
std::map< std::pair< std::string, std::string >, Scalar > wellFreeTracerRate_
 
std::map< std::pair< std::string, std::string >, Scalar > wellSolTracerRate_
 
std::map< std::tuple< std::string, std::string, std::size_t >, Scalar > mSwTracerRate_
 
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 FluidSystem , class Scalar >
using Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::CartesianIndexMapper = Dune::CartesianIndexMapper<Grid>

◆ TracerMatrix

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

◆ TracerVector

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

◆ TracerVectorSingle

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

Constructor & Destructor Documentation

◆ GenericTracerModel()

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, 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 FluidSystem , class Scalar >
Scalar Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::currentConcentration_ ( const Well &  eclWell,
const std::string &  name 
) const
protected

◆ doInit()

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
void Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, 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.

◆ enableSolTracers()

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
const std::vector< bool > & Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::enableSolTracers

◆ fname()

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

◆ freeTracerConcentration()

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

Return the tracer concentration for tracer index and global DofIdx.

◆ getMswTracerRates()

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
const std::map< std::tuple< std::string, std::string, std::size_t >, Scalar > & Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::getMswTracerRates ( ) const
inline

◆ getWellFreeTracerRates()

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

◆ getWellSolTracerRates()

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

◆ getWellTracerRates()

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

◆ linearSolve_()

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

◆ linearSolveBatchwise_()

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
bool Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, 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 FluidSystem , class Scalar >
const std::string & Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::name ( int  tracerIdx) const

Return the tracer name.

◆ numTracers()

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

Return the number of tracers considered by the tracerModel.

◆ phase()

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
Phase Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::phase ( int  tracerIdx) const

◆ serializeOp()

◆ setEnableSolTracers()

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
void Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::setEnableSolTracers ( int  tracerIdx,
bool  enableSolTracer 
)

◆ setFreeTracerConcentration()

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

◆ setSolTracerConcentration()

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

◆ sname()

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

◆ solTracerConcentration()

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

◆ wellfname()

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

◆ wellsname()

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

Member Data Documentation

◆ cartMapper_

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

◆ centroids_

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

Function returning the cell centers.

◆ dimWorld

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

◆ dofMapper_

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

◆ eclState_

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

◆ enableSolTracers_

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
std::vector<bool> Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::enableSolTracers_
protected

◆ freeTracerConcentration_

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
std::vector<TracerVectorSingle> Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::freeTracerConcentration_
protected

◆ gridView_

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

◆ mSwTracerRate_

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
std::map<std::tuple<std::string, std::string, std::size_t>, Scalar> Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::mSwTracerRate_
protected

◆ solTracerConcentration_

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
std::vector<TracerVectorSingle> Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::solTracerConcentration_
protected

◆ tracerConcentration_

template<class Grid , class GridView , class DofMapper , class Stencil , class FluidSystem , class Scalar >
std::vector<TracerVector> Opm::GenericTracerModel< Grid, GridView, DofMapper, Stencil, FluidSystem, Scalar >::tracerConcentration_
protected

◆ tracerMatrix_

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

◆ tracerPhaseIdx_

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

◆ wellFreeTracerRate_

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

◆ wellSolTracerRate_

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

◆ wellTracerRate_

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

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