OGS
NonlinearSystem.h
Go to the documentation of this file.
1
10
11#pragma once
12
13#include "EquationSystem.h"
15#include "Types.h"
16
17namespace NumLib
18{
21
26template <NonlinearSolverTag NLTag>
28
34template <>
36{
37public:
41 virtual void assemble(std::vector<GlobalVector*> const& x,
42 std::vector<GlobalVector*> const& x_prev,
43 int const process_id) = 0;
44
47 virtual std::vector<GlobalIndexType>
48 getIndicesOfResiduumWithoutInitialCompensation() const = 0;
49
50 virtual void setReleaseNodalForces(GlobalVector const* /*r_neq*/,
51 int const /*process_id*/) = 0;
52
59 virtual void getResidual(GlobalVector const& x,
60 GlobalVector const& x_prev,
61 GlobalVector& res) const = 0;
62
67 virtual void getJacobian(GlobalMatrix& Jac) const = 0;
68
70 virtual void computeKnownSolutions(GlobalVector const& x,
71 int const process_id) = 0;
72
75 virtual void applyKnownSolutions(GlobalVector& x) const = 0;
76
80 virtual void applyKnownSolutionsNewton(
81 GlobalMatrix& Jac, GlobalVector& res, GlobalVector const& x,
82 GlobalVector& minus_delta_x) const = 0;
83
87 virtual void applyKnownSolutionsPETScSNES(GlobalMatrix& Jac,
88 GlobalVector& res,
89 GlobalVector& x) const = 0;
90
91 virtual void updateConstraints(GlobalVector& /*lower*/,
92 GlobalVector& /*upper*/,
93 int /*process_id*/) = 0;
94};
95
102template <>
104{
105public:
109 virtual void assemble(std::vector<GlobalVector*> const& x,
110 std::vector<GlobalVector*> const& x_prev,
111 int const process_id) = 0;
112
115 virtual std::vector<GlobalIndexType>
116 getIndicesOfResiduumWithoutInitialCompensation() const = 0;
117
118 virtual void setReleaseNodalForces(GlobalVector const* /*r_neq*/,
119 int const /*process_id*/) = 0;
120
123 virtual void getA(GlobalMatrix& A) const = 0;
124
127 virtual void getRhs(GlobalVector const& x_prev,
128 GlobalVector& rhs) const = 0;
129
133 virtual void getAandRhsNormalized(GlobalMatrix& A,
134 GlobalVector& rhs) const = 0;
135
137 virtual void computeKnownSolutions(GlobalVector const& x,
138 int const process_id) = 0;
139
142 virtual void applyKnownSolutions(GlobalVector& x) const = 0;
143
147 virtual void applyKnownSolutionsPicard(GlobalMatrix& A, GlobalVector& rhs,
148 GlobalVector& x) const = 0;
149
152 virtual MathLib::LinearSolverBehaviour linearSolverNeedsToCompute()
153 const = 0;
154};
155
157} // namespace NumLib
MathLib::EigenMatrix GlobalMatrix
MathLib::EigenVector GlobalVector
NonlinearSolverTag
Tag used to specify which nonlinear solver will be used.
Definition Types.h:20