![]() |
OGS
v6.4.0
|
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. More... | |
using | MatTrans = MatrixTranslator< ODETag > |
using | TimeDisc = TimeDiscretization |
A shortcut for a general time discretization scheme. More... | |
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 |
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 &minus_delta_x) const override |
void | updateConstraints (GlobalVector &lower, GlobalVector &upper, int const process_id) override |
bool | isLinear () 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. More... | |
MathLib::MatrixSpecifications | getMatrixSpecifications (const int process_id) const override |
Static Public Attributes | |
static const ODESystemTag | ODETag |
A tag indicating the type of ODE. More... | |
Private Types | |
using | Index = MathLib::MatrixVectorTraits< GlobalMatrix >::Index |
Private Attributes | |
ODE & | _ode |
ode the ODE being wrapped More... | |
TimeDisc & | _time_disc |
the time discretization to being used More... | |
std::unique_ptr< MatTrans > | _mat_trans |
the object used to compute the matrix/vector for the nonlinear solver More... | |
std::vector< NumLib::IndexValueVector< Index > > const * | _known_solutions |
stores precomputed values for known solutions More... | |
GlobalMatrix * | _Jac |
the Jacobian of the residual More... | |
GlobalMatrix * | _M |
Matrix \( M \). More... | |
GlobalMatrix * | _K |
Matrix \( K \). More... | |
GlobalVector * | _b |
Matrix \( b \). More... | |
std::size_t | _Jac_id = 0u |
ID of the _Jac matrix. More... | |
std::size_t | _M_id = 0u |
ID of the _M matrix. More... | |
std::size_t | _K_id = 0u |
ID of the _K matrix. More... | |
std::size_t | _b_id = 0u |
ID of the _b vector. More... | |
std::size_t | _xdot_id = 0u |
ID of the vector storing xdot in intermediate computations. More... | |
std::vector< std::size_t > | _xdot_ids |
|
private |
Definition at line 135 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 46 of file TimeDiscretizedODESystem.cpp.
References NumLib::MatrixProvider::getMatrix(), NumLib::VectorProvider::getVector(), NumLib::GlobalVectorProvider::provider, and NumLib::GlobalMatrixProvider::provider.
|
override |
Definition at line 65 of file TimeDiscretizedODESystem.cpp.
References NumLib::GlobalVectorProvider::provider, NumLib::GlobalMatrixProvider::provider, NumLib::MatrixProvider::releaseMatrix(), and NumLib::VectorProvider::releaseVector().
|
override |
Definition at line 160 of file TimeDiscretizedODESystem.cpp.
References detail::applyKnownSolutions().
|
override |
Definition at line 166 of file TimeDiscretizedODESystem.cpp.
References MathLib::applyKnownSolution(), and MathLib::LinAlg::copy().
|
override |
Definition at line 74 of file TimeDiscretizedODESystem.cpp.
References MathLib::LinAlg::finalizeAssembly(), NumLib::VectorProvider::getVector(), NumLib::GlobalVectorProvider::provider, NumLib::VectorProvider::releaseVector(), and MathLib::EigenVector::setZero().
|
override |
Definition at line 151 of file TimeDiscretizedODESystem.cpp.
|
override |
Definition at line 144 of file TimeDiscretizedODESystem.cpp.
|
inlineoverride |
Definition at line 122 of file TimeDiscretizedODESystem.h.
|
override |
Definition at line 127 of file TimeDiscretizedODESystem.cpp.
References NumLib::VectorProvider::getVector(), NumLib::GlobalVectorProvider::provider, and NumLib::VectorProvider::releaseVector().
|
inlineoverridevirtual |
Exposes the used time discretization scheme.
Implements NumLib::TimeDiscretizedODESystemBase< NonlinearSolverTag::Newton >.
Definition at line 121 of file TimeDiscretizedODESystem.h.
|
inlineoverride |
Definition at line 109 of file TimeDiscretizedODESystem.h.
|
inlineoverride |
Definition at line 116 of file TimeDiscretizedODESystem.h.
|
inlineoverride |
Definition at line 111 of file TimeDiscretizedODESystem.h.
|
inlineoverride |
Definition at line 103 of file TimeDiscretizedODESystem.h.
|
private |
Matrix \( b \).
Definition at line 142 of file TimeDiscretizedODESystem.h.
|
private |
ID of the _b
vector.
Definition at line 147 of file TimeDiscretizedODESystem.h.
|
private |
the Jacobian of the residual
Definition at line 139 of file TimeDiscretizedODESystem.h.
|
private |
ID of the _Jac
matrix.
Definition at line 144 of file TimeDiscretizedODESystem.h.
|
private |
Matrix \( K \).
Definition at line 141 of file TimeDiscretizedODESystem.h.
|
private |
ID of the _K
matrix.
Definition at line 146 of file TimeDiscretizedODESystem.h.
|
private |
stores precomputed values for known solutions
Definition at line 136 of file TimeDiscretizedODESystem.h.
|
private |
Matrix \( M \).
Definition at line 140 of file TimeDiscretizedODESystem.h.
|
private |
ID of the _M
matrix.
Definition at line 145 of file TimeDiscretizedODESystem.h.
|
private |
the object used to compute the matrix/vector for the nonlinear solver
Definition at line 133 of file TimeDiscretizedODESystem.h.
|
private |
ode the ODE being wrapped
Definition at line 129 of file TimeDiscretizedODESystem.h.
|
private |
the time discretization to being used
Definition at line 130 of file TimeDiscretizedODESystem.h.
|
mutableprivate |
ID of the vector storing xdot in intermediate computations.
Definition at line 150 of file TimeDiscretizedODESystem.h.
|
mutableprivate |
Definition at line 151 of file TimeDiscretizedODESystem.h.
|
static |
A tag indicating the type of ODE.
Definition at line 63 of file TimeDiscretizedODESystem.h.