28 #ifndef OPM_GENERIC_TEMPERATURE_MODEL_HPP 29 #define OPM_GENERIC_TEMPERATURE_MODEL_HPP 31 #include <dune/istl/bcrsmatrix.hh> 33 #include <opm/grid/common/CartesianIndexMapper.hpp> 35 #include <opm/input/eclipse/EclipseState/Phase.hpp> 39 #include <opm/simulators/linalg/FlexibleSolver.hpp> 40 #include <opm/simulators/linalg/matrixblock.hh> 51 template<
class Gr
id,
class Gr
idView,
class DofMapper,
class Stencil,
class Flu
idSystem,
class Scalar>
57 using EnergyMatrix = Dune::BCRSMatrix<MatrixBlockTemp>;
58 using EnergyVector = Dune::BlockVector<Dune::FieldVector<Scalar, 1>>;
60 static constexpr
int dimWorld = Grid::dimensionworld;
67 const Scalar temperature(
size_t globalIdx)
const 69 return temperature_[globalIdx];
74 const EclipseState& eclState,
76 const DofMapper& dofMapper);
81 void doInit(std::size_t numGridDof);
83 void setupLinearSolver(
const EnergyMatrix& M);
84 bool linearSolve_(
const EnergyMatrix& M, EnergyVector& x, EnergyVector& b);
86 const GridView& gridView_;
87 const EclipseState& eclState_;
89 const DofMapper& dofMapper_;
91 EnergyVector energyVector_;
92 std::vector<Scalar> temperature_;
93 std::vector<Scalar> energy_rates_;
95 Scalar maxTempChange_{5.0};
97 using AbstractSolverType = Dune::InverseOperator<EnergyVector, EnergyVector>;
98 using AbstractOperatorType = Dune::AssembledLinearOperator<EnergyMatrix, EnergyVector, EnergyVector>;
101 std::unique_ptr<AbstractSolverType> linear_solver_;
102 std::unique_ptr<AbstractOperatorType> op_;
108 #endif // OPM_GENERIC_TEMPERATURE_MODEL_HPP Definition: GenericTemperatureModel.hpp:52
Definition: matrixblock.hh:228
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
A fully-implicit black-oil flow model.
Interface class adding the update() method to the preconditioner interface.
Definition: PreconditionerWithUpdate.hpp:33
Definition: CollectDataOnIORank.hpp:49
void doInit(std::size_t numGridDof)
Initialize all internal data structures needed by the temperature module.
Definition: GenericTemperatureModel_impl.hpp:115