OGS
NonlinearSystem.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include "EquationSystem.h"
14 #include "Types.h"
15 
16 namespace NumLib
17 {
20 
25 template <NonlinearSolverTag NLTag>
27 
33 template <>
35 {
36 public:
40  virtual void assemble(std::vector<GlobalVector*> const& x,
41  std::vector<GlobalVector*> const& x_prev,
42  int const process_id) = 0;
43 
50  virtual void getResidual(GlobalVector const& x,
51  GlobalVector const& x_prev,
52  GlobalVector& res) const = 0;
53 
58  virtual void getJacobian(GlobalMatrix& Jac) const = 0;
59 
61  virtual void computeKnownSolutions(GlobalVector const& x,
62  int const process_id) = 0;
63 
66  virtual void applyKnownSolutions(GlobalVector& x) const = 0;
67 
72  GlobalMatrix& Jac, GlobalVector& res,
73  GlobalVector& minus_delta_x) const = 0;
74 
75  virtual void updateConstraints(GlobalVector& /*lower*/,
76  GlobalVector& /*upper*/,
77  int /*process_id*/) = 0;
78 };
79 
86 template <>
88 {
89 public:
93  virtual void assemble(std::vector<GlobalVector*> const& x,
94  std::vector<GlobalVector*> const& x_prev,
95  int const process_id) = 0;
96 
99  virtual void getA(GlobalMatrix& A) const = 0;
100 
103  virtual void getRhs(GlobalVector const& x_prev,
104  GlobalVector& rhs) const = 0;
105 
107  virtual void computeKnownSolutions(GlobalVector const& x,
108  int const process_id) = 0;
109 
112  virtual void applyKnownSolutions(GlobalVector& x) const = 0;
113 
118  GlobalVector& x) const = 0;
119 };
120 
122 } // namespace NumLib
Global vector based on Eigen vector.
Definition: EigenVector.h:26
virtual void updateConstraints(GlobalVector &, GlobalVector &, int)=0
virtual void assemble(std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id)=0
virtual void getJacobian(GlobalMatrix &Jac) const =0
virtual void getResidual(GlobalVector const &x, GlobalVector const &x_prev, GlobalVector &res) const =0
virtual void applyKnownSolutions(GlobalVector &x) const =0
virtual void applyKnownSolutionsNewton(GlobalMatrix &Jac, GlobalVector &res, GlobalVector &minus_delta_x) const =0
virtual void computeKnownSolutions(GlobalVector const &x, int const process_id)=0
Pre-compute known solutions and possibly store them internally.
virtual void applyKnownSolutionsPicard(GlobalMatrix &A, GlobalVector &rhs, GlobalVector &x) const =0
virtual void getA(GlobalMatrix &A) const =0
virtual void computeKnownSolutions(GlobalVector const &x, int const process_id)=0
Pre-compute known solutions and possibly store them internally.
virtual void applyKnownSolutions(GlobalVector &x) const =0
virtual void assemble(std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id)=0
virtual void getRhs(GlobalVector const &x_prev, GlobalVector &rhs) const =0
NonlinearSolverTag
Tag used to specify which nonlinear solver will be used.
Definition: Types.h:20