58 using TracerVectorSingle = Dune::BlockVector<Dune::FieldVector<Scalar, 1>>;
59 using TracerMatrix = Dune::BCRSMatrix<Opm::MatrixBlock<Scalar, 2, 2>>;
60 using TracerVector = Dune::BlockVector<Dune::FieldVector<Scalar, 2>>;
62 static constexpr int dimWorld = Grid::dimensionworld;
74 std::string wellfname(
int tracerIdx)
const;
75 std::string wellsname(
int tracerIdx)
const;
78 const std::vector<bool>& enableSolTracers()
const;
84 Scalar solTracerConcentration(
int tracerIdx,
int globalDofIdx)
const;
85 void setFreeTracerConcentration(
int tracerIdx,
int globalDofIdx, Scalar value);
86 void setSolTracerConcentration(
int tracerIdx,
int globalDofIdx, Scalar value);
92 const std::unordered_map<int, std::vector<WellTracerRate<Scalar>>>&
94 {
return wellTracerRate_; }
96 const std::unordered_map<int, std::vector<WellTracerRate<Scalar>>>&
97 getWellFreeTracerRates()
const
98 {
return wellFreeTracerRate_; }
100 const std::unordered_map<int, std::vector<WellTracerRate<Scalar>>>&
101 getWellSolTracerRates()
const
102 {
return wellSolTracerRate_; }
104 const std::unordered_map<int, std::vector<MSWellTracerRate<Scalar>>>&
105 getMswTracerRates()
const {
return mSwTracerRate_;}
107 template<
class Serializer>
120 GenericTracerModel(
const GridView& gridView,
121 const EclipseState& eclState,
123 const DofMapper& dofMapper,
124 const std::function<std::array<double,dimWorld>(
int)>
centroids);
130 std::size_t numGridDof,
131 std::size_t gasPhaseIdx,
132 std::size_t oilPhaseIdx,
133 std::size_t waterPhaseIdx);
135 bool linearSolve_(
const TracerMatrix& M, TracerVector& x, TracerVector&
b);
137 bool linearSolveBatchwise_(
const TracerMatrix& M,
138 std::vector<TracerVector>& x,
139 std::vector<TracerVector>&
b);
141 Scalar currentConcentration_(
const Well&
eclWell,
const std::string&
name)
const;
149 const GridView& gridView_;
150 const EclipseState& eclState_;
151 const CartesianIndexMapper& cartMapper_;
152 const DofMapper& dofMapper_;
154 std::vector<int> tracerPhaseIdx_;
155 std::vector<bool> enableSolTracers_;
156 std::vector<TracerVector> tracerConcentration_;
157 std::unique_ptr<TracerMatrix> tracerMatrix_;
158 std::vector<TracerVectorSingle> freeTracerConcentration_;
159 std::vector<TracerVectorSingle> solTracerConcentration_;
162 std::unordered_map<int, std::vector<WellTracerRate<Scalar>>> wellTracerRate_;
163 std::unordered_map<int, std::vector<WellTracerRate<Scalar>>> wellFreeTracerRate_;
164 std::unordered_map<int, std::vector<WellTracerRate<Scalar>>> wellSolTracerRate_;
166 std::unordered_map<int, std::vector<MSWellTracerRate<Scalar>>> mSwTracerRate_;
const std::unordered_map< int, std::vector< WellTracerRate< Scalar > > > & getWellTracerRates() const
Return well tracer rates.
Definition GenericTracerModel.hpp:93
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:225
std::function< std::array< double, dimWorld >(int)> centroids_
Function returning the cell centers.
Definition GenericTracerModel.hpp:169
Scalar freeTracerConcentration(int tracerIdx, int globalDofIdx) const
Return the tracer concentration for tracer index and global DofIdx.
Definition GenericTracerModel_impl.hpp:117
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242