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();
104 int const process_id)
override;
106 void applyKnownSolutions(
GlobalVector& x)
const override;
116 int const process_id)
override
118 _ode.updateConstraints(lower, upper, process_id);
121 bool isLinear()
const override {
return _ode.isLinear(); }
125 return _ode.requiresNormalization();
130 _ode.preIteration(iter, x);
135 return _ode.postIteration(x);
140 const int process_id)
const override
142 return _ode.getMatrixSpecifications(process_id);
153 std::vector<NumLib::IndexValueVector<Index>>
const* _known_solutions =
159 std::size_t _Jac_id = 0u;
160 std::size_t _b_id = 0u;
193 void assemble(std::vector<GlobalVector*>
const& x_new_timestep,
194 std::vector<GlobalVector*>
const& x_prev,
195 int const process_id)
override;
199 std::vector<GlobalIndexType>
202 return _ode.getIndicesOfResiduumWithoutInitialCompensation();
207 _mat_trans->computeA(*_M, *_K, A);
212 _mat_trans->computeRhs(*_M, *_K, *_b, x_prev, rhs);
217 _mat_trans->normalizeAandRhs(A, rhs);
221 int const process_id)
override;
223 void applyKnownSolutions(
GlobalVector& x)
const override;
228 bool isLinear()
const override {
return _ode.isLinear(); }
232 return _ode.requiresNormalization();
237 _ode.preIteration(iter, x);
242 return _ode.postIteration(x);
247 const int process_id)
const override
249 return _ode.getMatrixSpecifications(process_id);
254 if (_ode.shouldLinearSolverComputeOnlyUponTimestepChange() &&
255 _time_disc.getCurrentTimeIncrement() !=
256 _time_disc.getPreviousTimeIncrement())
260 if (_ode.shouldLinearSolverComputeOnlyUponTimestepChange() &&
261 _time_disc.getCurrentTimeIncrement() ==
262 _time_disc.getPreviousTimeIncrement())
277 std::vector<NumLib::IndexValueVector<Index>>
const* _known_solutions =
284 std::size_t _M_id = 0u;
285 std::size_t _K_id = 0u;
286 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
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 .
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