25template <NonlinearSolverTag NLTag>
41template <ODESystemTag ODETag, NonlinearSolverTag NLTag>
78 void assemble(std::vector<GlobalVector*>
const& x_new_timestep,
79 std::vector<GlobalVector*>
const& x_prev,
80 int const process_id)
override;
84 std::vector<GlobalIndexType>
87 return _ode.getIndicesOfResiduumWithoutInitialCompensation();
91 int const process_id)
override
93 _ode.setReleaseNodalForces(r_neq, process_id);
103 int const process_id)
override;
105 void applyKnownSolutions(
GlobalVector& x)
const override;
115 int const process_id)
override
117 _ode.updateConstraints(lower, upper, process_id);
124 return _ode.requiresNormalization();
129 _ode.preIteration(iter, x);
134 return _ode.postIteration(x);
139 const int process_id)
const override
141 return _ode.getMatrixSpecifications(process_id);
192 void assemble(std::vector<GlobalVector*>
const& x_new_timestep,
193 std::vector<GlobalVector*>
const& x_prev,
194 int const process_id)
override;
198 std::vector<GlobalIndexType>
201 return _ode.getIndicesOfResiduumWithoutInitialCompensation();
205 int const process_id)
override
207 _ode.setReleaseNodalForces(r_neq, process_id);
226 int const process_id)
override;
228 void applyKnownSolutions(
GlobalVector& x)
const override;
230 void applyKnownSolutionsPicard(
238 return _ode.requiresNormalization();
243 _ode.preIteration(iter, x);
248 return _ode.postIteration(x);
253 const int process_id)
const override
255 return _ode.getMatrixSpecifications(process_id);
260 if (
_ode.shouldLinearSolverComputeOnlyUponTimestepChange() &&
266 if (
_ode.shouldLinearSolverComputeOnlyUponTimestepChange() &&
MathLib::EigenMatrix GlobalMatrix
MathLib::EigenVector GlobalVector
virtual TimeDiscretization & getTimeDiscretization()=0
Exposes the used time discretization scheme.
MatrixTranslator< ODETag > MatTrans
bool requiresNormalization() const override
static const ODESystemTag ODETag
A tag indicating the type of ODE.
GlobalMatrix * _Jac
the Jacobian of the residual
std::size_t _b_id
ID of the _b vector.
std::unique_ptr< MatTrans > _mat_trans
the object used to compute the matrix/vector for the nonlinear solver
void preIteration(const unsigned iter, GlobalVector const &x) override
ODE & _ode
ode the ODE being wrapped
std::vector< NumLib::IndexValueVector< Index > > const * _known_solutions
stores precomputed values for known solutions
MathLib::MatrixSpecifications getMatrixSpecifications(const int process_id) const override
std::vector< GlobalIndexType > getIndicesOfResiduumWithoutInitialCompensation() const override
TimeDiscretizedODESystem(const int process_id, ODE &ode, TimeDisc &time_discretization)
void updateConstraints(GlobalVector &lower, GlobalVector &upper, int const process_id) override
TimeDiscretization TimeDisc
A shortcut for a general time discretization scheme.
TimeDisc & _time_disc
the time discretization to being used
void assemble(std::vector< GlobalVector * > const &x_new_timestep, std::vector< GlobalVector * > const &x_prev, int const process_id) override
GlobalVector * _b
Matrix .
std::size_t _Jac_id
ID of the _Jac matrix.
bool isLinear() const override
TimeDisc & getTimeDiscretization() override
Exposes the used time discretization scheme.
IterationResult postIteration(GlobalVector const &x) override
void setReleaseNodalForces(GlobalVector const *r_neq, int const process_id) override
MathLib::MatrixVectorTraits< GlobalMatrix >::Index Index
ODESystem< ODETag, NonlinearSolverTag::Newton > ODE
The type of ODE.
TimeDiscretization TimeDisc
A shortcut for a general time discretization scheme.
void getA(GlobalMatrix &A) const override
bool requiresNormalization() const override
GlobalMatrix * _K
Matrix .
void preIteration(const unsigned iter, GlobalVector const &x) override
GlobalMatrix * _M
Matrix .
bool isLinear() const override
MathLib::LinearSolverBehaviour linearSolverNeedsToCompute() const override
ODE & _ode
ode the ODE being wrapped
std::size_t _b_id
ID of the _b vector.
void assemble(std::vector< GlobalVector * > const &x_new_timestep, std::vector< GlobalVector * > const &x_prev, int const process_id) override
std::size_t _M_id
ID of the _M matrix.
ODESystem< ODETag, NonlinearSolverTag::Picard > ODE
The type of ODE.
MathLib::MatrixVectorTraits< GlobalMatrix >::Index Index
std::vector< GlobalIndexType > getIndicesOfResiduumWithoutInitialCompensation() const override
static const ODESystemTag ODETag
A tag indicating the type of ODE.
MatrixTranslator< ODETag > MatTrans
MathLib::MatrixSpecifications getMatrixSpecifications(const int process_id) const override
IterationResult postIteration(GlobalVector const &x) override
std::size_t _K_id
ID of the _K matrix.
GlobalVector * _b
Matrix .
void setReleaseNodalForces(GlobalVector const *r_neq, int const process_id) override
TimeDiscretizedODESystem(const int process_id, ODE &ode, TimeDisc &time_discretization)
Constructs a new instance.
TimeDisc & getTimeDiscretization() override
Exposes the used time discretization scheme.
TimeDisc & _time_disc
the time discretization to being used
void getRhs(GlobalVector const &x_prev, GlobalVector &rhs) const override
std::vector< NumLib::IndexValueVector< Index > > const * _known_solutions
stores precomputed values for known solutions
void getAandRhsNormalized(GlobalMatrix &A, GlobalVector &rhs) const override
std::unique_ptr< MatTrans > _mat_trans
the object used to compute the matrix/vector for the nonlinear solver
ODESystemTag
Tag used to specify the type of ODE.
IterationResult
Status flags telling the NonlinearSolver if an iteration succeeded.
@ FirstOrderImplicitQuasilinear
DirichletBCApplicationMode