OGS 6.2.0-97-g4a610c866
NumLib::ODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton > Class Template Referenceabstract

Detailed Description

template<>
class NumLib::ODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >

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 74 of file ODESystem.h.

#include <ODESystem.h>

Inheritance diagram for NumLib::ODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >:
Collaboration diagram for NumLib::ODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >:

Public Member Functions

void preAssemble (const double t, GlobalVector const &x) override=0
 Calls process' pre-assembly with the provided state (t, x). More...
 
virtual void assembleWithJacobian (const double t, GlobalVector const &x, GlobalVector const &xdot, const double dxdot_dx, const double dx_dx, 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, GlobalVector const &x, 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 t, GlobalVector const &x) 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...
 

Member Function Documentation

◆ assembleWithJacobian()

virtual void NumLib::ODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >::assembleWithJacobian ( const double  t,
GlobalVector const &  x,
GlobalVector const &  xdot,
const double  dxdot_dx,
const double  dx_dx,
GlobalMatrix &  M,
GlobalMatrix &  K,
GlobalVector &  b,
GlobalMatrix &  Jac 
)
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.

Remarks

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} $.

◆ preAssemble()

void NumLib::ODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >::preAssemble ( const double  t,
GlobalVector const &  x 
)
overridepure virtual

Calls process' pre-assembly with the provided state (t, x).

Implements NumLib::ODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Picard >.


The documentation for this class was generated from the following file: