G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsALMCrisfield.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 gsALMCrisfield : 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;
42 
43 protected:
44 
45  using Base::computeJacobian;
46  using Base::computeResidual;
48  using Base::computeUt;
49  using Base::computeUbar;
50  using Base::computeLength;
51 
52 public:
53 
55  gsALMCrisfield( const Jacobian_t &Jacobian,
56  const ALResidual_t&ALResidual,
57  const gsVector<T> &Force )
58  : Base(Jacobian,ALResidual,Force)
59  {
61  getOptions();
62 
63  initMethods();
64  }
65 
67  gsALMCrisfield( const dJacobian_t &dJacobian,
68  const ALResidual_t&ALResidual,
69  const gsVector<T> &Force )
70  : Base(dJacobian,ALResidual,Force)
71  {
73  getOptions();
74 
75  initMethods();
76  }
77 
78 public:
79  T distance(const gsVector<T>& DeltaU, const T DeltaL) const
80  {
81  T A0 = math::pow(m_phi,2)*m_forcing.dot(m_forcing);
82  return math::pow(DeltaU.dot(DeltaU) + A0*math::pow(DeltaL,2.0),0.5);
83  }
84 
85 protected:
86 
88  void initMethods();
90  void initiateStep();
92  void iterationFinish();
93 
95  void quasiNewtonPredictor();
97  void quasiNewtonIteration();
98 
100  void predictor();
101  void predictorGuess();
103  void iteration();
104 
106  void initOutput();
108  void stepOutput();
109 
111  void defaultOptions();
113  void getOptions();
114 
116  void computeLambdas();
118  void computeLambdasSimple();
120  void computeLambdasModified();
122  void computeLambdasComplex();
124  void computeLambdasEta();
126  void computeLambdaDET();
128  void computeLambdaDOT();
130  void computeLambdaMU();
131 
132 protected:
133 
134  // Number of degrees of freedom
135  using Base::m_numDof;
136 
137  using Base::m_jacobian;
138  using Base::m_djacobian;
139  using Base::m_residualFun;
140  using Base::m_forcing;
141 
143  using Base::m_options;
144 
146  using Base::m_numIterations;
147 
149  using Base::m_maxIterations;
150 
152  using Base::m_arcLength;
153 
155  using Base::m_verbose;
156 
158  using Base::m_note;
159 
161  using Base::m_converged;
162 
164  using Base::m_residueF;
165 
167  using Base::m_residueU;
168 
170  using Base::m_residueL;
171 
173  using Base::m_indicator;
174  using Base::m_negatives;
175 
177  using Base::m_relax;
178 
179  // Previous update
180  using Base::m_DeltaUold;
181  using Base::m_DeltaLold;
183  using Base::m_U;
184  using Base::m_Uprev;
185  using Base::m_Uguess;
187  using Base::m_DeltaU;
189  using Base::m_deltaUbar;
191  using Base::m_deltaUt;
193  using Base::m_deltaU;
194 
196  using Base::m_L;
197  using Base::m_Lprev;
198  using Base::m_Lguess;
200  using Base::m_DeltaL;
202  using Base::m_deltaL;
204  using Base::m_deltaLs;
205 
207  using Base::m_jacMat;
208  using Base::m_detKT;
209 
210  // Angle determination method: 0: determine based on previous load step. 1: determine based on previous iteration
211  index_t m_angleDetermine;
212 
214  T m_phi;
215  bool m_phi_user;
216 
217  // MODIFIED ARC LENGTH METHOD
219  T m_eta;
220 
221  // discriminant
222  T m_discriminant;
223 
224  T m_alpha1;
225  T m_alpha2;
226  T m_alpha3;
227 
228  T m_a0;
229  T m_b0,m_b1;
230  T m_c0,m_c1,m_c2;
231 
232 protected:
234  struct angmethod
235  {
236  enum type
237  {
238  Step = 0,
239  Iteration = 1,
240  Predictor = 2,
241  };
242  };
243 
244 };
245 
246 
247 } // namespace gismo
248 
249 #ifndef GISMO_BUILD_LIB
250 #include GISMO_HPP_HEADER(gsALMCrisfield.hpp)
251 #endif
void computeLambdaDET()
Compute the load factors.
Definition: gsALMCrisfield.hpp:367
void iterationFinish()
See gsALMBase.
Definition: gsALMCrisfield.hpp:194
T m_eta
factor (modified arc length method)
Definition: gsALMCrisfield.h:219
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
void predictor()
See gsALMBase.
Definition: gsALMCrisfield.hpp:111
gsVector< T > m_deltaUbar
u_bar
Definition: gsALMBase.h:491
bool m_converged
Convergence result.
Definition: gsALMBase.h:454
void computeLambdas()
Compute the load factors.
Definition: gsALMCrisfield.hpp:328
void iteration()
See gsALMBase.
Definition: gsALMCrisfield.hpp:74
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
void getOptions()
See gsALMBase.
Definition: gsALMCrisfield.hpp:31
T m_relax
Relaxation factor.
Definition: gsALMBase.h:479
T m_deltaL
Update of update of lambda.
Definition: gsALMBase.h:502
#define index_t
Definition: gsConfig.h:32
void computeLambdasEta()
Compute the load factors.
Definition: gsALMCrisfield.hpp:234
void quasiNewtonPredictor()
See gsALMBase.
Definition: gsALMCrisfield.hpp:56
virtual void computeResidualNorms()
Compute the residual error norms.
Definition: gsALMBase.hpp:151
void initOutput()
See gsALMBase.
Definition: gsALMCrisfield.hpp:480
void computeLambdaMU()
Compute the load factors.
Definition: gsALMCrisfield.hpp:385
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
void defaultOptions()
See gsALMBase.
Definition: gsALMCrisfield.hpp:23
gsALMCrisfield(const Jacobian_t &Jacobian, const ALResidual_t &ALResidual, const gsVector< T > &Force)
Constructor.
Definition: gsALMCrisfield.h:55
gsSparseMatrix< T > m_jacMat
Jacobian matrix.
Definition: gsALMBase.h:510
void quasiNewtonIteration()
See gsALMBase.
Definition: gsALMCrisfield.hpp:66
T m_DeltaL
Update of lambdaGeneralizedSelfAdjointEigenSolver.
Definition: gsALMBase.h:500
virtual void setLength(T length)
Set arc length to length.
Definition: gsALMBase.h:118
T m_phi
Scaling parameter.
Definition: gsALMCrisfield.h:214
void computeLambdasModified()
Compute the load factors.
Definition: gsALMCrisfield.hpp:251
T m_residueL
Load residuum.
Definition: gsALMBase.h:468
Base class to perform the arc length method to solve a nonlinear equation system. ...
gsALMCrisfield(const dJacobian_t &dJacobian, const ALResidual_t &ALResidual, const gsVector< T > &Force)
Constructor using the jacobian that takes the solution and the solution step.
Definition: gsALMCrisfield.h:67
Angle determination method option.
Definition: gsALMCrisfield.h:234
Performs the Crisfield arc length method to solve a nonlinear equation system.
Definition: gsALMCrisfield.h:29
void stepOutput()
See gsALMBase.
Definition: gsALMCrisfield.hpp:504
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
index_t m_numIterations
Number of Arc Length iterations performed.
Definition: gsALMBase.h:418
void computeLambdasComplex()
Compute the load factors.
Definition: gsALMCrisfield.hpp:308
void initiateStep()
See gsALMBase.
Definition: gsALMCrisfield.hpp:103
T m_arcLength
Length of the step in the u,f plane.
Definition: gsALMBase.h:427
void computeLambdasSimple()
Compute the load factors.
Definition: gsALMCrisfield.hpp:213
void initMethods()
See gsALMBase.
Definition: gsALMCrisfield.hpp:41
Performs the arc length method to solve a nonlinear system of equations.
Definition: gsALMBase.h:37
void computeLambdaDOT()
Compute the load factors.
Definition: gsALMCrisfield.hpp:402
T m_indicator
Indicator for bifurcation.
Definition: gsALMBase.h:475
gsVector< T > m_deltaU
Update of update of displacement vector.
Definition: gsALMBase.h:495