32template <NonlinearSolverTag NLTag>
48template <ODESystemTag ODETag, NonlinearSolverTag NLTag>
85 void assemble(std::vector<GlobalVector*>
const& x_new_timestep,
86 std::vector<GlobalVector*>
const& x_prev,
87 int const process_id)
override;
91 std::vector<GlobalIndexType>
94 return _ode.getIndicesOfResiduumWithoutInitialCompensation();
98 int const process_id)
override
100 _ode.setReleaseNodalForces(r_neq, process_id);
110 int const process_id)
override;
112 void applyKnownSolutions(
GlobalVector& x)
const override;
122 int const process_id)
override
124 _ode.updateConstraints(lower, upper, process_id);
127 bool isLinear()
const override {
return _ode.isLinear(); }
131 return _ode.requiresNormalization();
136 _ode.preIteration(iter, x);
141 return _ode.postIteration(x);
146 const int process_id)
const override
148 return _ode.getMatrixSpecifications(process_id);
159 std::vector<NumLib::IndexValueVector<Index>>
const* _known_solutions =
165 std::size_t _Jac_id = 0u;
166 std::size_t _b_id = 0u;
199 void assemble(std::vector<GlobalVector*>
const& x_new_timestep,
200 std::vector<GlobalVector*>
const& x_prev,
201 int const process_id)
override;
205 std::vector<GlobalIndexType>
208 return _ode.getIndicesOfResiduumWithoutInitialCompensation();
212 int const process_id)
override
214 _ode.setReleaseNodalForces(r_neq, process_id);
219 _mat_trans->computeA(*_M, *_K, A);
224 _mat_trans->computeRhs(*_M, *_K, *_b, x_prev, rhs);
229 _mat_trans->normalizeAandRhs(A, rhs);
233 int const process_id)
override;
235 void applyKnownSolutions(
GlobalVector& x)
const override;
240 bool isLinear()
const override {
return _ode.isLinear(); }
244 return _ode.requiresNormalization();
249 _ode.preIteration(iter, x);
254 return _ode.postIteration(x);
259 const int process_id)
const override
261 return _ode.getMatrixSpecifications(process_id);
266 if (_ode.shouldLinearSolverComputeOnlyUponTimestepChange() &&
267 _time_disc.getCurrentTimeIncrement() !=
268 _time_disc.getPreviousTimeIncrement())
272 if (_ode.shouldLinearSolverComputeOnlyUponTimestepChange() &&
273 _time_disc.getCurrentTimeIncrement() ==
274 _time_disc.getPreviousTimeIncrement())
289 std::vector<NumLib::IndexValueVector<Index>>
const* _known_solutions =
296 std::size_t _M_id = 0u;
297 std::size_t _K_id = 0u;
298 std::size_t _b_id = 0u;
Global vector based on Eigen vector.
virtual TimeDiscretization & getTimeDiscretization()=0
Exposes the used time discretization scheme.
bool requiresNormalization() const override
GlobalMatrix * _Jac
the Jacobian of the residual
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
MathLib::MatrixSpecifications getMatrixSpecifications(const int process_id) const override
std::vector< GlobalIndexType > getIndicesOfResiduumWithoutInitialCompensation() const override
void updateConstraints(GlobalVector &lower, GlobalVector &upper, int const process_id) override
TimeDisc & _time_disc
the time discretization to being used
GlobalVector * _b
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
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
MathLib::MatrixVectorTraits< GlobalMatrix >::Index Index
std::vector< GlobalIndexType > getIndicesOfResiduumWithoutInitialCompensation() const override
MathLib::MatrixSpecifications getMatrixSpecifications(const int process_id) const override
IterationResult postIteration(GlobalVector const &x) override
GlobalVector * _b
Matrix .
void setReleaseNodalForces(GlobalVector const *r_neq, int const process_id) override
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
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