55 using TracerMatrix = Dune::BCRSMatrix<Opm::MatrixBlock<Scalar, 1, 1>>;
56 using TracerVector = Dune::BlockVector<Dune::FieldVector<Scalar,1>>;
58 static constexpr int dimWorld = Grid::dimensionworld;
67 const std::string&
name(
int tracerIdx)
const;
68 std::string fname(
int tracerIdx)
const;
75 void setTracerConcentration(
int tracerIdx,
int globalDofIdx, Scalar value);
80 const std::map<std::pair<std::string, std::string>,
double>&
83 template<
class Serializer>
84 void serializeOp(Serializer& serializer)
86 serializer(tracerConcentration_);
87 serializer(wellTracerRate_);
91 GenericTracerModel(
const GridView& gridView,
92 const EclipseState& eclState,
93 const CartesianIndexMapper& cartMapper,
94 const DofMapper& dofMapper,
95 const std::function<std::array<double,dimWorld>(
int)> centroids);
101 std::size_t numGridDof,
102 std::size_t gasPhaseIdx,
103 std::size_t oilPhaseIdx,
104 std::size_t waterPhaseIdx);
106 bool linearSolve_(
const TracerMatrix& M, TracerVector& x, TracerVector& b);
108 bool linearSolveBatchwise_(
const TracerMatrix& M, std::vector<TracerVector>& x, std::vector<TracerVector>& b);
110 double currentConcentration_(
const Well& eclWell,
const std::string&
name)
const;
112 const GridView& gridView_;
113 const EclipseState& eclState_;
114 const CartesianIndexMapper& cartMapper_;
115 const DofMapper& dofMapper_;
117 std::vector<int> tracerPhaseIdx_;
118 std::vector<Dune::BlockVector<Dune::FieldVector<Scalar, 1>>> tracerConcentration_;
119 std::unique_ptr<TracerMatrix> tracerMatrix_;
120 std::vector<Dune::BlockVector<Dune::FieldVector<Scalar, 1>>> storageOfTimeIndex1_;
123 std::map<std::pair<std::string, std::string>,
double> wellTracerRate_;
const std::map< std::pair< std::string, std::string >, double > & getWellTracerRates() const
Return well tracer rates.
Definition GenericTracerModel.hpp:81
Scalar tracerConcentration(int tracerIdx, int globalDofIdx) const
Return the tracer concentration for tracer index and global DofIdx.
Definition GenericTracerModel_impl.hpp:117
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.
Definition GenericTracerModel_impl.hpp:162
std::function< std::array< double, dimWorld >(int)> centroids_
Function returning the cell centers.
Definition GenericTracerModel.hpp:125