OGS
NonlinearSystem.h
Go to the documentation of this file.
1
10
11#pragma once
12
13#include "EquationSystem.h"
16#include "Types.h"
17
18namespace NumLib
19{
22
27template <NonlinearSolverTag NLTag>
29
35template <>
37{
38public:
42 virtual void assemble(std::vector<GlobalVector*> const& x,
43 std::vector<GlobalVector*> const& x_prev,
44 int const process_id) = 0;
45
48 virtual std::vector<GlobalIndexType>
49 getIndicesOfResiduumWithoutInitialCompensation() const = 0;
50
51 virtual void setReleaseNodalForces(GlobalVector const* /*r_neq*/,
52 int const /*process_id*/) = 0;
53
60 virtual void getResidual(GlobalVector const& x,
61 GlobalVector const& x_prev,
62 GlobalVector& res) const = 0;
63
68 virtual void getJacobian(GlobalMatrix& Jac) const = 0;
69
71 virtual void computeKnownSolutions(GlobalVector const& x,
72 int const process_id) = 0;
73
76 virtual void applyKnownSolutions(GlobalVector& x) const = 0;
77
81 virtual void applyKnownSolutionsNewton(
82 GlobalMatrix& Jac, GlobalVector& res, GlobalVector const& x,
83 GlobalVector& minus_delta_x) const = 0;
84
88 virtual void applyKnownSolutionsPETScSNES(GlobalMatrix& Jac,
89 GlobalVector& res,
90 GlobalVector& x) const = 0;
91
92 virtual void updateConstraints(GlobalVector& /*lower*/,
93 GlobalVector& /*upper*/,
94 int /*process_id*/) = 0;
95};
96
103template <>
105{
106public:
110 virtual void assemble(std::vector<GlobalVector*> const& x,
111 std::vector<GlobalVector*> const& x_prev,
112 int const process_id) = 0;
113
116 virtual std::vector<GlobalIndexType>
117 getIndicesOfResiduumWithoutInitialCompensation() const = 0;
118
119 virtual void setReleaseNodalForces(GlobalVector const* /*r_neq*/,
120 int const /*process_id*/) = 0;
121
124 virtual void getA(GlobalMatrix& A) const = 0;
125
128 virtual void getRhs(GlobalVector const& x_prev,
129 GlobalVector& rhs) const = 0;
130
134 virtual void getAandRhsNormalized(GlobalMatrix& A,
135 GlobalVector& rhs) const = 0;
136
138 virtual void computeKnownSolutions(GlobalVector const& x,
139 int const process_id) = 0;
140
143 virtual void applyKnownSolutions(GlobalVector& x) const = 0;
144
148 virtual void applyKnownSolutionsPicard(
150 MathLib::DirichletBCApplicationMode const mode) const = 0;
151
154 virtual MathLib::LinearSolverBehaviour linearSolverNeedsToCompute()
155 const = 0;
156};
157
159} // namespace NumLib
MathLib::EigenMatrix GlobalMatrix
MathLib::EigenVector GlobalVector
NonlinearSolverTag
Tag used to specify which nonlinear solver will be used.
Definition Types.h:20
DirichletBCApplicationMode
Definition LinAlgEnums.h:42