G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsALMLoadControl.h
Go to the documentation of this file.
1 
14 #pragma once
15 
17 
18 namespace gismo
19 {
20 
28 template <class T>
29 class gsALMLoadControl : public gsALMBase<T>
30 {
31 
32  typedef gsALMBase<T> Base;
33 
34  typedef typename Base::ALResidual_t ALResidual_t;
35  typedef typename Base::Jacobian_t Jacobian_t;
36  typedef typename Base::dJacobian_t dJacobian_t;
37 
38 public:
39 
40  using Base::setLength;
41 
42 protected:
43 
45  using Base::getOptions;
46  using Base::computeJacobian;
47  using Base::computeResidual;
49  using Base::computeUt;
50  using Base::computeUbar;
52  using Base::computeLength;
53 
54 public:
55 
57  gsALMLoadControl( Jacobian_t &Jacobian,
58  ALResidual_t&ALResidual,
59  gsVector<T> &Force )
60  : Base(Jacobian,ALResidual,Force)
61  {
63  getOptions();
64 
65  initMethods();
66  }
67 
69  gsALMLoadControl( dJacobian_t &dJacobian,
70  ALResidual_t&ALResidual,
71  gsVector<T> &Force )
72  : Base(dJacobian,ALResidual,Force)
73  {
75  getOptions();
76 
77  initMethods();
78  }
79 
80 
81 protected:
82 
84  void initMethods();
86  void initiateStep();
88  void iterationFinish();
89 
91  void quasiNewtonPredictor();
93  void quasiNewtonIteration();
94 
96  void predictor();
97  void predictorGuess();
99  void iteration();
100 
102  void initOutput();
104  void stepOutput();
105 
106 protected:
107 
108  // Number of degrees of freedom
109  using Base::m_numDof;
110 
111  using Base::m_jacobian;
112  using Base::m_djacobian;
113  using Base::m_residualFun;
114  using Base::m_forcing;
115 
117  using Base::m_options;
118 
120  using Base::m_numIterations;
121 
123  using Base::m_maxIterations;
124 
126  using Base::m_arcLength;
127 
129  using Base::m_verbose;
130 
132  using Base::m_note;
133 
135  using Base::m_converged;
136 
138  using Base::m_residueF;
139 
141  using Base::m_residueU;
142 
144  using Base::m_residueL;
145 
147  using Base::m_indicator;
148  using Base::m_negatives;
149 
151  using Base::m_relax;
152 
153  // Previous update
154  using Base::m_DeltaUold;
155  using Base::m_DeltaLold;
157  using Base::m_U;
158  using Base::m_Uprev;
159  using Base::m_Uguess;
161  using Base::m_DeltaU;
163  using Base::m_deltaUbar;
165  using Base::m_deltaUt;
167  using Base::m_deltaU;
168 
170  using Base::m_L;
171  using Base::m_Lprev;
172  using Base::m_Lguess;
174  using Base::m_DeltaL;
176  using Base::m_deltaL;
178  using Base::m_deltaLs;
179 
181  using Base::m_jacMat;
182  using Base::m_detKT;
183 
184 };
185 
186 
187 } // namespace gismo
188 
189 #ifndef GISMO_BUILD_LIB
190 #include GISMO_HPP_HEADER(gsALMLoadControl.hpp)
191 #endif
virtual void defaultOptions()
Set default options.
Definition: gsALMBase.hpp:23
gsVector< T > m_deltaLs
Vector with lambda updates.
Definition: gsALMBase.h:504
virtual gsStatus computeStability(bool jacobian=true, T shift=-1e2)
Calculates the stability of the solution x.
Definition: gsALMBase.hpp:521
virtual void computeUbar()
Compute .
Definition: gsALMBase.hpp:249
Performs the load-controlled arc length method to solve a nonlinear equation system.
Definition: gsALMLoadControl.h:29
gsALMLoadControl(Jacobian_t &Jacobian, ALResidual_t &ALResidual, gsVector< T > &Force)
Constructor.
Definition: gsALMLoadControl.h:57
gsVector< T > m_deltaUbar
u_bar
Definition: gsALMBase.h:491
bool m_converged
Convergence result.
Definition: gsALMBase.h:454
gsVector< T > m_deltaUt
u_t
Definition: gsALMBase.h:493
virtual void computeUt()
Compute .
Definition: gsALMBase.hpp:255
T m_residueU
Displacement residuum.
Definition: gsALMBase.h:464
T m_residueF
Force residuum.
Definition: gsALMBase.h:460
T m_relax
Relaxation factor.
Definition: gsALMBase.h:479
T m_deltaL
Update of update of lambda.
Definition: gsALMBase.h:502
void initMethods()
See gsALMBase.
Definition: gsALMLoadControl.hpp:39
void iterationFinish()
See gsALMBase.
Definition: gsALMLoadControl.hpp:100
virtual void computeResidualNorms()
Compute the residual error norms.
Definition: gsALMBase.hpp:151
void initiateStep()
See gsALMBase.
Definition: gsALMLoadControl.hpp:61
index_t m_maxIterations
Maximum number of Arc Length iterations allowed.
Definition: gsALMBase.h:421
gsVector< T > m_DeltaU
Update of displacement vector.
Definition: gsALMBase.h:489
gsSparseMatrix< T > m_jacMat
Jacobian matrix.
Definition: gsALMBase.h:510
void initOutput()
See gsALMBase.
Definition: gsALMLoadControl.hpp:114
T m_DeltaL
Update of lambdaGeneralizedSelfAdjointEigenSolver.
Definition: gsALMBase.h:500
virtual void setLength(T length)
Set arc length to length.
Definition: gsALMBase.h:118
void iteration()
See gsALMBase.
Definition: gsALMLoadControl.hpp:51
T m_residueL
Load residuum.
Definition: gsALMBase.h:468
Base class to perform the arc length method to solve a nonlinear equation system. ...
void predictor()
See gsALMBase.
Definition: gsALMLoadControl.hpp:72
gsALMLoadControl(dJacobian_t &dJacobian, ALResidual_t &ALResidual, gsVector< T > &Force)
Constructor using the jacobian that takes the solution and the solution step.
Definition: gsALMLoadControl.h:69
virtual void computeLength()
Compute the adaptive arc-length.
Definition: gsALMBase.hpp:106
gsVector< T > m_U
Displacement vector (present, at previously converged point)
Definition: gsALMBase.h:487
T m_L
Lambda (present, at previously converged point)
Definition: gsALMBase.h:498
void quasiNewtonPredictor()
See gsALMBase.
Definition: gsALMLoadControl.hpp:23
index_t m_numIterations
Number of Arc Length iterations performed.
Definition: gsALMBase.h:418
void quasiNewtonIteration()
See gsALMBase.
Definition: gsALMLoadControl.hpp:32
T m_arcLength
Length of the step in the u,f plane.
Definition: gsALMBase.h:427
void stepOutput()
See gsALMBase.
Definition: gsALMLoadControl.hpp:134
Performs the arc length method to solve a nonlinear system of equations.
Definition: gsALMBase.h:37
T m_indicator
Indicator for bifurcation.
Definition: gsALMBase.h:475
virtual void getOptions()
Apply options.
Definition: gsALMBase.hpp:57
gsVector< T > m_deltaU
Update of update of displacement vector.
Definition: gsALMBase.h:495