![]() |
OGS
|
Time discretized first order implicit quasi-linear ODE; to be solved using the Newton-Raphson method for resolving nonlinearities.
Definition at line 57 of file TimeDiscretizedODESystem.h.
#include <TimeDiscretizedODESystem.h>
Public Types | |
using | ODE = ODESystem<ODETag, NonlinearSolverTag::Newton> |
The type of ODE. | |
using | MatTrans = MatrixTranslator<ODETag> |
using | TimeDisc = TimeDiscretization |
A shortcut for a general time discretization scheme. | |
Public Member Functions | |
TimeDiscretizedODESystem (const int process_id, ODE &ode, TimeDisc &time_discretization) | |
~TimeDiscretizedODESystem () override | |
void | assemble (std::vector< GlobalVector * > const &x_new_timestep, std::vector< GlobalVector * > const &x_prev, int const process_id) override |
std::vector< GlobalIndexType > | getIndicesOfResiduumWithoutInitialCompensation () const override |
void | getResidual (GlobalVector const &x_new_timestep, GlobalVector const &x_prev, GlobalVector &res) const override |
void | getJacobian (GlobalMatrix &Jac) const override |
void | computeKnownSolutions (GlobalVector const &x, int const process_id) override |
void | applyKnownSolutions (GlobalVector &x) const override |
void | applyKnownSolutionsNewton (GlobalMatrix &Jac, GlobalVector &res, GlobalVector const &x, GlobalVector &minus_delta_x) const override |
void | applyKnownSolutionsPETScSNES (GlobalMatrix &Jac, GlobalVector &res, GlobalVector &x) const override |
void | updateConstraints (GlobalVector &lower, GlobalVector &upper, int const process_id) override |
bool | isLinear () const override |
bool | requiresNormalization () const override |
void | preIteration (const unsigned iter, GlobalVector const &x) override |
IterationResult | postIteration (GlobalVector const &x) override |
TimeDisc & | getTimeDiscretization () override |
Exposes the used time discretization scheme. | |
MathLib::MatrixSpecifications | getMatrixSpecifications (const int process_id) const override |
![]() |
Static Public Attributes | |
static const ODESystemTag | ODETag |
A tag indicating the type of ODE. | |
Private Types | |
using | Index = MathLib::MatrixVectorTraits<GlobalMatrix>::Index |
Private Attributes | |
ODE & | _ode |
ode the ODE being wrapped | |
TimeDisc & | _time_disc |
the time discretization to being used | |
std::unique_ptr< MatTrans > | _mat_trans |
the object used to compute the matrix/vector for the nonlinear solver | |
std::vector< NumLib::IndexValueVector< Index > > const * | _known_solutions |
stores precomputed values for known solutions | |
GlobalMatrix * | _Jac |
the Jacobian of the residual | |
GlobalVector * | _b |
Matrix \( b \). | |
std::size_t | _Jac_id = 0u |
ID of the _Jac matrix. | |
std::size_t | _b_id = 0u |
ID of the _b vector. | |
|
private |
Definition at line 152 of file TimeDiscretizedODESystem.h.
using NumLib::TimeDiscretizedODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >::MatTrans = MatrixTranslator<ODETag> |
The auxiliary class that computes the matrix/vector used by the nonlinear solver.
Definition at line 70 of file TimeDiscretizedODESystem.h.
using NumLib::TimeDiscretizedODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >::ODE = ODESystem<ODETag, NonlinearSolverTag::Newton> |
The type of ODE.
Definition at line 67 of file TimeDiscretizedODESystem.h.
using NumLib::TimeDiscretizedODESystem< ODESystemTag::FirstOrderImplicitQuasilinear, NonlinearSolverTag::Newton >::TimeDisc = TimeDiscretization |
A shortcut for a general time discretization scheme.
Definition at line 72 of file TimeDiscretizedODESystem.h.
|
explicit |
Constructs a new instance.
process_id | ID of the ODE to be solved. |
ode | the ODE to be wrapped. |
time_discretization | the time discretization to be used. |
Definition at line 49 of file TimeDiscretizedODESystem.cpp.
References NumLib::MatrixProvider::getMatrix(), NumLib::VectorProvider::getVector(), NumLib::GlobalMatrixProvider::provider, and NumLib::GlobalVectorProvider::provider.
|
override |
Definition at line 64 of file TimeDiscretizedODESystem.cpp.
References NumLib::GlobalMatrixProvider::provider, NumLib::GlobalVectorProvider::provider, NumLib::MatrixProvider::releaseMatrix(), and NumLib::VectorProvider::releaseVector().
|
override |
Definition at line 126 of file TimeDiscretizedODESystem.cpp.
References detail::applyKnownSolutions().
|
override |
Definition at line 132 of file TimeDiscretizedODESystem.cpp.
References MathLib::applyKnownSolution().
|
override |
Definition at line 168 of file TimeDiscretizedODESystem.cpp.
References MathLib::applyKnownSolution().
|
override |
Definition at line 71 of file TimeDiscretizedODESystem.cpp.
References MathLib::LinAlg::finalizeAssembly().
|
override |
Definition at line 117 of file TimeDiscretizedODESystem.cpp.
|
inlineoverride |
Definition at line 92 of file TimeDiscretizedODESystem.h.
|
override |
Definition at line 110 of file TimeDiscretizedODESystem.cpp.
|
inlineoverride |
Definition at line 139 of file TimeDiscretizedODESystem.h.
|
override |
Definition at line 99 of file TimeDiscretizedODESystem.cpp.
References MathLib::LinAlg::copy(), and MathLib::LinAlg::scale().
|
inlineoverridevirtual |
Exposes the used time discretization scheme.
Implements NumLib::TimeDiscretizedODESystemBase< NonlinearSolverTag::Newton >.
Definition at line 138 of file TimeDiscretizedODESystem.h.
|
inlineoverride |
Definition at line 121 of file TimeDiscretizedODESystem.h.
|
inlineoverride |
Definition at line 133 of file TimeDiscretizedODESystem.h.
|
inlineoverride |
Definition at line 128 of file TimeDiscretizedODESystem.h.
|
inlineoverride |
Definition at line 123 of file TimeDiscretizedODESystem.h.
|
inlineoverride |
Definition at line 115 of file TimeDiscretizedODESystem.h.
|
private |
Matrix \( b \).
Definition at line 157 of file TimeDiscretizedODESystem.h.
|
private |
ID of the _b
vector.
Definition at line 160 of file TimeDiscretizedODESystem.h.
|
private |
the Jacobian of the residual
Definition at line 156 of file TimeDiscretizedODESystem.h.
|
private |
ID of the _Jac
matrix.
Definition at line 159 of file TimeDiscretizedODESystem.h.
|
private |
stores precomputed values for known solutions
Definition at line 153 of file TimeDiscretizedODESystem.h.
|
private |
the object used to compute the matrix/vector for the nonlinear solver
Definition at line 150 of file TimeDiscretizedODESystem.h.
|
private |
ode the ODE being wrapped
Definition at line 146 of file TimeDiscretizedODESystem.h.
|
private |
the time discretization to being used
Definition at line 147 of file TimeDiscretizedODESystem.h.
|
static |
A tag indicating the type of ODE.
Definition at line 63 of file TimeDiscretizedODESystem.h.