32 template <NonlinearSolverTag NLTag>
48 template <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;
96 int const process_id)
override;
104 int const process_id)
override
106 _ode.updateConstraints(lower, upper, process_id);
109 bool isLinear()
const override {
return _ode.isLinear(); }
113 _ode.preIteration(iter, x);
118 return _ode.postIteration(x);
123 const int process_id)
const override
125 return _ode.getMatrixSpecifications(process_id);
136 std::vector<NumLib::IndexValueVector<Index>>
const* _known_solutions =
144 std::size_t _Jac_id = 0u;
145 std::size_t _M_id = 0u;
146 std::size_t _K_id = 0u;
147 std::size_t _b_id = 0u;
150 mutable std::size_t _xdot_id = 0u;
184 void assemble(std::vector<GlobalVector*>
const& x_new_timestep,
185 std::vector<GlobalVector*>
const& x_prev,
186 int const process_id)
override;
190 _mat_trans->computeA(*_M, *_K, A);
195 _mat_trans->computeRhs(*_M, *_K, *_b, x_prev, rhs);
199 int const process_id)
override;
206 bool isLinear()
const override {
return _ode.isLinear(); }
210 _ode.preIteration(iter, x);
215 return _ode.postIteration(x);
220 const int process_id)
const override
222 return _ode.getMatrixSpecifications(process_id);
233 std::vector<NumLib::IndexValueVector<Index>>
const* _known_solutions =
240 std::size_t _M_id = 0u;
241 std::size_t _K_id = 0u;
242 std::size_t _b_id = 0u;
Global vector based on Eigen vector.
virtual TimeDiscretization & getTimeDiscretization()=0
Exposes the used time discretization scheme.
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
TimeDisc & getTimeDiscretization() override
Exposes the used time discretization scheme.
ODE & _ode
ode the ODE being wrapped
std::vector< std::size_t > _xdot_ids
MathLib::MatrixSpecifications getMatrixSpecifications(const int process_id) const override
void updateConstraints(GlobalVector &lower, GlobalVector &upper, int const process_id) override
TimeDisc & _time_disc
the time discretization to being used
GlobalMatrix * _M
Matrix .
GlobalMatrix * _K
Matrix .
GlobalVector * _b
Matrix .
bool isLinear() const override
IterationResult postIteration(GlobalVector const &x) override
MathLib::MatrixVectorTraits< GlobalMatrix >::Index Index
void getA(GlobalMatrix &A) const override
GlobalMatrix * _K
Matrix .
void preIteration(const unsigned iter, GlobalVector const &x) override
GlobalMatrix * _M
Matrix .
bool isLinear() const override
std::vector< std::size_t > _xdot_ids
ODE & _ode
ode the ODE being wrapped
TimeDisc & getTimeDiscretization() override
Exposes the used time discretization scheme.
MathLib::MatrixVectorTraits< GlobalMatrix >::Index Index
MathLib::MatrixSpecifications getMatrixSpecifications(const int process_id) const override
IterationResult postIteration(GlobalVector const &x) override
GlobalVector * _b
Matrix .
TimeDisc & _time_disc
the time discretization to being used
void getRhs(GlobalVector const &x_prev, 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
void applyKnownSolutions(std::vector< Solutions > const *const known_solutions, Vector &x)
Applies known solutions to the solution vector x.