52class GenericTemperatureModel
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];
73 GenericTemperatureModel(
const GridView& gridView,
74 const EclipseState& eclState,
75 const CartesianIndexMapper& cartMapper,
76 const DofMapper& dofMapper);
83 void setupLinearSolver(
const EnergyMatrix& M);
84 bool linearSolve_(
const EnergyMatrix& M, EnergyVector& x, EnergyVector& b);
86 const GridView& gridView_;
87 const EclipseState& eclState_;
88 const CartesianIndexMapper& cartMapper_;
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_;
103 AbstractPreconditionerType* pre_ =
nullptr;
void doInit(std::size_t numGridDof)
Initialize all internal data structures needed by the temperature module.
Definition GenericTemperatureModel_impl.hpp:115