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 
71  virtual void applyKnownSolutionsNewton(
72  GlobalMatrix& Jac, GlobalVector& res,
73  GlobalVector& minus_delta_x) const = 0;
74 };
75 
82 template <>
84 {
85 public:
89  virtual void assemble(std::vector<GlobalVector*> const& x,
90  std::vector<GlobalVector*> const& x_prev,
91  int const process_id) = 0;
92 
95  virtual void getA(GlobalMatrix& A) const = 0;
96 
99  virtual void getRhs(GlobalVector const& x_prev,
100  GlobalVector& rhs) const = 0;
101 
103  virtual void computeKnownSolutions(GlobalVector const& x,
104  int const process_id) = 0;
105 
108  virtual void applyKnownSolutions(GlobalVector& x) const = 0;
109 
113  virtual void applyKnownSolutionsPicard(GlobalMatrix& A, GlobalVector& rhs,
114  GlobalVector& x) const = 0;
115 };
116 
118 } // namespace NumLib
Types.h
NumLib
Definition: ProjectData.h:35
EquationSystem.h
NumLib::EquationSystem
Definition: EquationSystem.h:30
NumLib::NonlinearSolverTag
NonlinearSolverTag
Tag used to specify which nonlinear solver will be used.
Definition: Types.h:20
detail::applyKnownSolutions
void applyKnownSolutions(std::vector< Solutions > const *const known_solutions, Vector &x)
Applies known solutions to the solution vector x.
Definition: TimeDiscretizedODESystem.cpp:22
NumLib::NonlinearSolverTag::Picard
@ Picard
NumLib::NonlinearSolverTag::Newton
@ Newton
NumLib::NonlinearSystem
Definition: NonlinearSystem.h:26