31 template <ODESystemTag ODETag>
44 virtual void computeA(GlobalMatrix
const& M, GlobalMatrix
const& K,
45 GlobalMatrix& A)
const = 0;
48 virtual void computeRhs(
const GlobalMatrix& M,
const GlobalMatrix& K,
49 const GlobalVector& b,
const GlobalVector& x_prev,
50 GlobalVector& rhs)
const = 0;
57 GlobalVector
const& b,
58 GlobalVector
const& x_curr,
59 GlobalVector
const& xdot,
60 GlobalVector& res)
const = 0;
64 GlobalMatrix& Jac_out)
const = 0;
74 template <ODESystemTag ODETag>
95 : _time_disc(timeDisc)
100 void computeA(GlobalMatrix
const& M, GlobalMatrix
const& K,
101 GlobalMatrix& A)
const override;
104 void computeRhs(
const GlobalMatrix& M,
const GlobalMatrix& ,
105 const GlobalVector& b,
const GlobalVector& x_prev,
106 GlobalVector& rhs)
const override;
109 void computeResidual(GlobalMatrix
const& M, GlobalMatrix
const& K,
110 GlobalVector
const& b,
111 GlobalVector
const& x_curr,
112 GlobalVector
const& xdot,
113 GlobalVector& res)
const override;
117 void computeJacobian(GlobalMatrix
const& Jac_in,
118 GlobalMatrix& Jac_out)
const override;
125 mutable std::size_t _tmp_id = 0u;
130 template <ODESystemTag ODETag>
134 return std::unique_ptr<MatrixTranslator<ODETag>>(
MatrixTranslatorGeneral(TimeDiscretization const &timeDisc)
TimeDiscretization const & _time_disc
the time discretization used.
virtual void computeJacobian(GlobalMatrix const &Jac_in, GlobalMatrix &Jac_out) const =0
Computes the Jacobian of the residual and writes it to Jac_out.
virtual void computeA(GlobalMatrix const &M, GlobalMatrix const &K, GlobalMatrix &A) const =0
Computes A from M and K.
virtual void computeResidual(GlobalMatrix const &M, GlobalMatrix const &K, GlobalVector const &b, GlobalVector const &x_curr, GlobalVector const &xdot, GlobalVector &res) const =0
virtual void computeRhs(const GlobalMatrix &M, const GlobalMatrix &K, const GlobalVector &b, const GlobalVector &x_prev, GlobalVector &rhs) const =0
Computes rhs from M, K, b and x_prev.
virtual ~MatrixTranslator()=default
ODESystemTag
Tag used to specify the type of ODE.
std::unique_ptr< MatrixTranslator< ODETag > > createMatrixTranslator(TimeDiscretization const &timeDisc)
@ FirstOrderImplicitQuasilinear