G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsALMRiks.h
Go to the documentation of this file.
1
14#pragma once
15
17
18namespace gismo
19{
20
28template <class T>
29class gsALMRiks : 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
38public:
39
40 using Base::setLength;
41
42protected:
43
45 using Base::getOptions;
46 using Base::computeJacobian;
47 using Base::computeResidual;
49 using Base::computeUt;
53
54public:
55
57 gsALMRiks( const Jacobian_t &Jacobian,
58 const ALResidual_t&ALResidual,
59 const gsVector<T> &Force )
60 : Base(Jacobian,ALResidual,Force)
61 {
63 getOptions();
64
66 }
67
69 gsALMRiks( const dJacobian_t &dJacobian,
70 const ALResidual_t&ALResidual,
71 const gsVector<T> &Force )
72 : Base(dJacobian,ALResidual,Force)
73 {
75 getOptions();
76
78 }
79
80public:
81 T distance(const gsVector<T>& DeltaU, const T DeltaL) const
82 {
83 return math::pow(m_phi * math::pow(DeltaU.norm(),2.0) + (1.0-m_phi) * math::pow(DeltaL,2.0),0.5);
84 }
85
86protected:
87
89 void initMethods();
91 void initiateStep();
93 void iterationFinish();
94
99
101 void predictor();
102 void predictorGuess();
104 void iteration();
105
107 void initOutput();
109 void stepOutput();
110
111protected:
112
113 // Number of degrees of freedom
114 using Base::m_numDof;
115
116 using Base::m_jacobian;
117 using Base::m_djacobian;
118 using Base::m_residualFun;
119 using Base::m_forcing;
120
122 using Base::m_options;
123
126
129
131 using Base::m_arcLength;
132 using Base::m_arcLength_prev;
133
135 using Base::m_verbose;
136
138 using Base::m_note;
139
141 using Base::m_converged;
142
144 using Base::m_residueF;
145
147 using Base::m_residueU;
148
150 using Base::m_residueL;
151
153 using Base::m_indicator;
154 using Base::m_negatives;
155
157 using Base::m_relax;
158
159 // Previous update
160 using Base::m_DeltaUold;
161 using Base::m_DeltaLold;
163 using Base::m_U;
164 using Base::m_Uprev;
165 using Base::m_Uguess;
167 using Base::m_DeltaU;
169 using Base::m_deltaUbar;
171 using Base::m_deltaUt;
173 using Base::m_deltaU;
174
176 using Base::m_L;
177 using Base::m_Lprev;
178 using Base::m_Lguess;
180 using Base::m_DeltaL;
182 using Base::m_deltaL;
184 using Base::m_deltaLs;
185
187 using Base::m_jacMat;
188 using Base::m_detKT;
189
192};
193
194} // namespace gismo
195
196#ifndef GISMO_BUILD_LIB
197#include GISMO_HPP_HEADER(gsALMRiks.hpp)
198#endif
Performs the arc length method to solve a nonlinear system of equations.
Definition gsALMBase.h:38
bool m_converged
Convergence result.
Definition gsALMBase.h:454
gsVector< T > m_deltaLs
Vector with lambda updates.
Definition gsALMBase.h:504
virtual void computeLength()
Compute the adaptive arc-length.
Definition gsALMBase.hpp:106
gsVector< T > m_deltaUt
u_t
Definition gsALMBase.h:493
virtual void defaultOptions()
Set default options.
Definition gsALMBase.hpp:23
gsVector< T > m_DeltaU
Update of displacement vector.
Definition gsALMBase.h:489
gsVector< T > m_deltaU
Update of update of displacement vector.
Definition gsALMBase.h:495
index_t m_numIterations
Number of Arc Length iterations performed.
Definition gsALMBase.h:418
T m_relax
Relaxation factor.
Definition gsALMBase.h:479
virtual void setLength(T length)
Set arc length to length.
Definition gsALMBase.h:118
gsVector< T > m_U
Displacement vector (present, at previously converged point)
Definition gsALMBase.h:487
virtual void computeResidualNorms()
Compute the residual error norms.
Definition gsALMBase.hpp:151
T m_residueF
Force residuum.
Definition gsALMBase.h:460
index_t m_maxIterations
Maximum number of Arc Length iterations allowed.
Definition gsALMBase.h:421
T m_L
Lambda (present, at previously converged point)
Definition gsALMBase.h:498
T m_DeltaL
Update of lambdaGeneralizedSelfAdjointEigenSolver.
Definition gsALMBase.h:500
virtual void computeUt()
Compute .
Definition gsALMBase.hpp:255
T m_arcLength
Length of the step in the u,f plane.
Definition gsALMBase.h:427
virtual gsStatus computeStability(bool jacobian=true, T shift=-1e2)
Calculates the stability of the solution x.
Definition gsALMBase.hpp:521
gsSparseMatrix< T > m_jacMat
Jacobian matrix.
Definition gsALMBase.h:510
T m_deltaL
Update of update of lambda.
Definition gsALMBase.h:502
virtual void computeUbar()
Compute .
Definition gsALMBase.hpp:249
T m_residueL
Load residuum.
Definition gsALMBase.h:468
T m_residueU
Displacement residuum.
Definition gsALMBase.h:464
gsVector< T > m_deltaUbar
u_bar
Definition gsALMBase.h:491
T m_indicator
Indicator for bifurcation.
Definition gsALMBase.h:475
virtual void getOptions()
Apply options.
Definition gsALMBase.hpp:57
Performs the Riks arc length method to solve a nonlinear equation system.
Definition gsALMRiks.h:30
gsALMRiks(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 gsALMRiks.h:69
T m_phi
Scaling parameter.
Definition gsALMRiks.h:191
gsALMRiks(const Jacobian_t &Jacobian, const ALResidual_t &ALResidual, const gsVector< T > &Force)
Constructor.
Definition gsALMRiks.h:57
virtual void defaultOptions()
Set default options.
Definition gsALMBase.hpp:23
void predictor()
See gsALMBase.
Definition gsALMRiks.hpp:98
void initOutput()
See gsALMBase.
Definition gsALMRiks.hpp:219
void stepOutput()
See gsALMBase.
Definition gsALMRiks.hpp:243
void iteration()
See gsALMBase.
Definition gsALMRiks.hpp:69
void quasiNewtonPredictor()
See gsALMBase.
Definition gsALMRiks.hpp:38
void initiateStep()
See gsALMBase.
Definition gsALMRiks.hpp:87
void quasiNewtonIteration()
See gsALMBase.
Definition gsALMRiks.hpp:48
void initMethods()
See gsALMBase.
Definition gsALMRiks.hpp:23
void iterationFinish()
See gsALMBase.
Definition gsALMRiks.hpp:205
virtual void getOptions()
Apply options.
Definition gsALMBase.hpp:57
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
Base class to perform the arc length method to solve a nonlinear equation system.
The G+Smo namespace, containing all definitions for the library.