OGS
|
General matrix translator for first order implicit quasi-linear ODEs, used with time discretization schemes that have no special needs.
Definition at line 90 of file MatrixTranslator.h.
#include <MatrixTranslator.h>
Public Member Functions | |
MatrixTranslatorGeneral (TimeDiscretization const &timeDisc) | |
void | computeA (GlobalMatrix const &M, GlobalMatrix const &K, GlobalMatrix &A) const override |
Computes \( A = M \cdot \alpha + K \). | |
void | computeRhs (const GlobalMatrix &M, const GlobalMatrix &, const GlobalVector &b, const GlobalVector &x_prev, GlobalVector &rhs) const override |
Computes \( \mathtt{rhs} = M \cdot x_O + b \). | |
void | normalizeAandRhs (GlobalMatrix &A, GlobalVector &b) const override |
void | computeResidual (GlobalMatrix const &M, GlobalMatrix const &K, GlobalVector const &b, double dt, GlobalVector const &x_curr, GlobalVector const &x_prev, GlobalVector &res) const override |
Computes \( r = M \cdot \hat x + K \cdot x_C - b \). | |
void | computeJacobian (GlobalMatrix const &Jac_in, GlobalMatrix &Jac_out) const override |
Public Member Functions inherited from NumLib::MatrixTranslator< ODESystemTag::FirstOrderImplicitQuasilinear > | |
virtual | ~MatrixTranslator ()=default |
Private Attributes | |
TimeDiscretization const & | _time_disc |
the time discretization used. | |
std::size_t | _tmp_id = 0u |
ID of the vector storing intermediate computations. | |
|
inlineexplicit |
Constructs a new instance.
timeDisc | the time discretization scheme to be used. |
Definition at line 98 of file MatrixTranslator.h.
|
overridevirtual |
Computes \( A = M \cdot \alpha + K \).
Implements NumLib::MatrixTranslator< ODESystemTag::FirstOrderImplicitQuasilinear >.
Definition at line 17 of file MatrixTranslator.cpp.
References MathLib::LinAlg::axpy(), and MathLib::LinAlg::copy().
|
overridevirtual |
Writes Jac_in
to Jac_out
.
Implements NumLib::MatrixTranslator< ODESystemTag::FirstOrderImplicitQuasilinear >.
Definition at line 83 of file MatrixTranslator.cpp.
References MathLib::LinAlg::copy().
|
overridevirtual |
Computes \( r = M \cdot \hat x + K \cdot x_C - b \).
Implements NumLib::MatrixTranslator< ODESystemTag::FirstOrderImplicitQuasilinear >.
Definition at line 65 of file MatrixTranslator.cpp.
References MathLib::LinAlg::axpy(), MathLib::LinAlg::copy(), MathLib::LinAlg::matMult(), MathLib::LinAlg::matMultAdd(), and MathLib::LinAlg::scale().
|
overridevirtual |
Computes \( \mathtt{rhs} = M \cdot x_O + b \).
Implements NumLib::MatrixTranslator< ODESystemTag::FirstOrderImplicitQuasilinear >.
Definition at line 30 of file MatrixTranslator.cpp.
References NumLib::VectorProvider::getVector(), MathLib::LinAlg::matMultAdd(), NumLib::GlobalVectorProvider::provider, and NumLib::VectorProvider::releaseVector().
|
overridevirtual |
Computes \( A = A^T \cdot A \), and also \( rhs = A^T \cdot rhs \).
Implements NumLib::MatrixTranslator< ODESystemTag::FirstOrderImplicitQuasilinear >.
Definition at line 46 of file MatrixTranslator.cpp.
References MathLib::LinAlg::copy(), and MathLib::LinAlg::linearSysNormalize().
|
private |
the time discretization used.
Definition at line 128 of file MatrixTranslator.h.
|
mutableprivate |
ID of the vector storing intermediate computations.
Definition at line 131 of file MatrixTranslator.h.