OGS
v6.4.0
|
Interface for a first-order implicit quasi-linear ODE.
ODEs using this interface also provide a Jacobian in addition to the functionality of the Picard-related interface.
Definition at line 81 of file ODESystem.h.
#include <ODESystem.h>
Public Member Functions | |
void | preAssemble (const double t, double const dt, GlobalVector const &x) override=0 |
Calls process' pre-assembly with the provided state (t , dt , x ). More... | |
virtual void | assembleWithJacobian (const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &xdot, const double dxdot_dx, const double dx_dx, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b, GlobalMatrix &Jac)=0 |
Public Member Functions inherited from NumLib::ODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Picard > | |
virtual void | assemble (const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &xdot, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b)=0 |
Assemble M , K and b at the provided state (t , x ). More... | |
virtual std::vector< NumLib::IndexValueVector< Index > > const * | getKnownSolutions (double const, GlobalVector const &, int const) const |
virtual void | updateConstraints (GlobalVector &, GlobalVector &, int const) |
Public Member Functions inherited from NumLib::EquationSystem | |
virtual bool | isLinear () const =0 |
virtual void | preIteration (const unsigned iter, GlobalVector const &x) |
virtual IterationResult | postIteration (GlobalVector const &x) |
Public Member Functions inherited from NumLib::MatrixSpecificationsProvider | |
virtual MathLib::MatrixSpecifications | getMatrixSpecifications (const int process_id) const =0 |
virtual | ~MatrixSpecificationsProvider ()=default |
Additional Inherited Members | |
Public Types inherited from NumLib::ODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Picard > | |
using | Index = MathLib::MatrixVectorTraits< GlobalMatrix >::Index |
Static Public Attributes inherited from NumLib::ODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Picard > | |
static const ODESystemTag | ODETag |
A tag indicating the type of ODE. More... | |
|
pure virtual |
Assemble M
, K
, b
and the Jacobian \( \mathtt{Jac} := \partial r/\partial x_N \) at the provided state (t
, x
).
For the meaning of the other parameters refer to the the introductory remarks on time discretization.
The Jacobian will be generally of the following form:
\[ \mathtt{Jac} := \frac{\partial r(x_C, t_C)}{\partial x_N} = M \cdot \frac{\partial \hat x}{\partial x_N} + \frac{\partial M}{\partial x_N} \cdot \hat x + K \cdot \frac{\partial x_C}{\partial x_N} + \frac{\partial K}{\partial x_N} \cdot x_N + \frac{\partial b}{\partial x_N}, \]
where \( M \), \( K \) and \( b \) are matrix-valued (vector-valued, respectively) functions that depend on \( x_C \) and \( t_C \).
Due to the arguments provided to this method its implementation only has to compute the derivatives \( \frac{\partial M}{\partial x_N} \cdot \hat x \), \( \frac{\partial K}{\partial x_N} \cdot x_N \) and \( \frac{\partial b}{\partial x_N} \). The other terms can be readily taken from the method parameters.
In particular for the ForwardEuler time discretization scheme the equation will collapse to \( \mathtt{Jac} = M \cdot \frac{\partial \hat x}{\partial x_N} \) since in that scheme \( x_N \neq x_C \).
Of course, the implementation of this method is allowed to compute the Jacobian in a different way, as long as that is consistent with the definition of \( \mathtt{Jac} \).
|
overridepure virtual |
Calls process' pre-assembly with the provided state (t
, dt
, x
).
Implements NumLib::ODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Picard >.