![]() |
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 | setReleaseNodalForces (GlobalVector const *r_neq, 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 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 158 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 _b, _b_id, _Jac, _Jac_id, _mat_trans, _ode, _time_disc, NumLib::createMatrixTranslator(), NumLib::Newton, ODETag, NumLib::GlobalMatrixProvider::provider, and NumLib::GlobalVectorProvider::provider.
|
override |
Definition at line 64 of file TimeDiscretizedODESystem.cpp.
References ~TimeDiscretizedODESystem(), _b, _Jac, NumLib::Newton, NumLib::GlobalMatrixProvider::provider, and NumLib::GlobalVectorProvider::provider.
Referenced by ~TimeDiscretizedODESystem().
|
override |
Definition at line 126 of file TimeDiscretizedODESystem.cpp.
References _known_solutions, detail::applyKnownSolutions(), applyKnownSolutions(), and NumLib::Newton.
Referenced by applyKnownSolutions().
|
override |
Definition at line 132 of file TimeDiscretizedODESystem.cpp.
References _known_solutions, MathLib::applyKnownSolution(), MathLib::COMPLETE_MATRIX_UPDATE, and NumLib::Newton.
|
override |
Definition at line 170 of file TimeDiscretizedODESystem.cpp.
References _known_solutions, MathLib::applyKnownSolution(), MathLib::COMPLETE_MATRIX_UPDATE, and NumLib::Newton.
|
override |
Definition at line 71 of file TimeDiscretizedODESystem.cpp.
References _b, _Jac, _ode, _time_disc, MathLib::LinAlg::finalizeAssembly(), and NumLib::Newton.
|
override |
Definition at line 117 of file TimeDiscretizedODESystem.cpp.
References _known_solutions, _ode, _time_disc, computeKnownSolutions(), and NumLib::Newton.
Referenced by computeKnownSolutions().
|
inlineoverride |
Definition at line 92 of file TimeDiscretizedODESystem.h.
References _ode.
|
override |
Definition at line 110 of file TimeDiscretizedODESystem.cpp.
References _Jac, _mat_trans, getJacobian(), and NumLib::Newton.
Referenced by getJacobian().
|
inlineoverride |
Definition at line 145 of file TimeDiscretizedODESystem.h.
References _ode.
|
override |
Definition at line 99 of file TimeDiscretizedODESystem.cpp.
References _b, MathLib::LinAlg::copy(), NumLib::Newton, and MathLib::LinAlg::scale().
|
inlineoverridevirtual |
Exposes the used time discretization scheme.
Implements NumLib::TimeDiscretizedODESystemBase< NonlinearSolverTag::Newton >.
Definition at line 144 of file TimeDiscretizedODESystem.h.
References _time_disc.
|
inlineoverride |
|
inlineoverride |
Definition at line 139 of file TimeDiscretizedODESystem.h.
References _ode.
|
inlineoverride |
|
inlineoverride |
Definition at line 129 of file TimeDiscretizedODESystem.h.
References _ode.
|
inlineoverride |
Definition at line 97 of file TimeDiscretizedODESystem.h.
References _ode.
|
inlineoverride |
Definition at line 121 of file TimeDiscretizedODESystem.h.
References _ode.
|
private |
Matrix \( b \).
Definition at line 163 of file TimeDiscretizedODESystem.h.
Referenced by TimeDiscretizedODESystem(), ~TimeDiscretizedODESystem(), assemble(), and getResidual().
|
private |
ID of the _b vector.
Definition at line 166 of file TimeDiscretizedODESystem.h.
Referenced by TimeDiscretizedODESystem().
|
private |
the Jacobian of the residual
Definition at line 162 of file TimeDiscretizedODESystem.h.
Referenced by TimeDiscretizedODESystem(), ~TimeDiscretizedODESystem(), assemble(), and getJacobian().
|
private |
ID of the _Jac matrix.
Definition at line 165 of file TimeDiscretizedODESystem.h.
Referenced by TimeDiscretizedODESystem().
|
private |
stores precomputed values for known solutions
Definition at line 159 of file TimeDiscretizedODESystem.h.
Referenced by applyKnownSolutions(), applyKnownSolutionsNewton(), applyKnownSolutionsPETScSNES(), and computeKnownSolutions().
|
private |
the object used to compute the matrix/vector for the nonlinear solver
Definition at line 156 of file TimeDiscretizedODESystem.h.
Referenced by TimeDiscretizedODESystem(), and getJacobian().
|
private |
ode the ODE being wrapped
Definition at line 152 of file TimeDiscretizedODESystem.h.
Referenced by TimeDiscretizedODESystem(), assemble(), computeKnownSolutions(), getIndicesOfResiduumWithoutInitialCompensation(), getMatrixSpecifications(), isLinear(), postIteration(), preIteration(), requiresNormalization(), setReleaseNodalForces(), and updateConstraints().
|
private |
the time discretization to being used
Definition at line 153 of file TimeDiscretizedODESystem.h.
Referenced by TimeDiscretizedODESystem(), assemble(), computeKnownSolutions(), and getTimeDiscretization().
|
static |
A tag indicating the type of ODE.
Definition at line 63 of file TimeDiscretizedODESystem.h.
Referenced by TimeDiscretizedODESystem().