G+Smo  23.12.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsALMBase< T > Class Template Referenceabstract

Detailed Description

template<class T>
class gismo::gsALMBase< T >

Performs the arc length method to solve a nonlinear system of equations.

Template Parameters
Tcoefficient type
+ Inheritance diagram for gsALMBase< T >:
+ Collaboration diagram for gsALMBase< T >:

Public Member Functions

virtual void applyOptions ()
 Apply the options.
 
virtual gsStatus computeSingularPoint (const gsVector< T > &U, const T &L, bool switchBranch=false, bool jacobian=false, bool testPoint=true)
 Calculates the singular point. More...
 
virtual gsStatus computeStability (bool jacobian=true, T shift=-1e2)
 Calculates the stability of the solution x. More...
 
virtual bool converged () const
 True if the Arc Length method converged.
 
 gsALMBase (const Jacobian_t &Jacobian, const ALResidual_t &ALResidual, const gsVector< T > &Force)
 Constructor.
 
 gsALMBase (const dJacobian_t &dJacobian, const ALResidual_t &Residual, const gsVector< T > &Force)
 Constructor using the jacobian that takes the solution and the solution step.
 
virtual T indicator () const
 Returns the value of the Determinant or other indicator.
 
virtual void initialize (bool stability=true)
 Initialize the arc-length method, computes the stability of the initial configuration if stability is true.
 
virtual bool isBifurcation (bool jacobian=false)
 Returns true if the point is a bifurcation.
 
virtual bool isStable () const
 Returns if solution passed a bifurcation point.
 
virtual index_t numIterations () const
 Returns the number of Newton iterations performed.
 
virtual gsOptionListoptions ()
 Access the options.
 
virtual const void options_into (gsOptionList options)
 Return the options into options.
 
virtual T reduceLength (T fac=0.5)
 Reduce the length by multiplication with a factor fac.
 
virtual T resetLength ()
 Reset the length.
 
virtual void resetStep ()
 Resets the step.
 
virtual T residue () const
 Returns the error after solving the nonlinear system.
 
virtual void setLength (T length)
 Set arc length to length.
 
virtual void setLength (T length, bool adaptive)
 Set arc length to length, enables adaptive steps.
 
virtual void setLength (T length, bool adaptive, index_t iterations)
 Set arc length to length, enables adaptive steps aiming for iterations number of iterations per step.
 
virtual void setLength (T length, index_t iterations)
 Set arc length to length, enables adaptive steps aiming for iterations number of iterations per step.
 
virtual void setOptions (gsOptionList options)
 Set the options to options.
 
virtual void setSolution (const gsVector< T > &U, const T &L)
 Sets the solution.
 
virtual void setSolutionStep (const gsVector< T > &DU, const T &DL)
 Sets the solution step.
 
virtual const gsVector< T > & solutionU () const
 Return the solution vector and factor.
 
virtual index_t stability () const
 Computes the stability: -1 if unstable, +1 if stable.
 
virtual bool stabilityChange () const
 Checks if the stability of the system changed since the previously known solution.
 
virtual gsStatus step ()
 Perform one arc-length step.
 
virtual void switchBranch ()
 Switches branches.
 
virtual T tolerance () const
 Returns the tolerance value used.
 

Protected Member Functions

virtual index_t _bisectionObjectiveFunction (const gsVector< T > &x, bool jacobian=true)
 Returns the objective function for the bisection method given solution x.
 
virtual bool _bisectionSolve (const gsVector< T > &U, const T L, const T tol)
 Perform a bisection system solve to find a singular point.
 
virtual T _bisectionTerminationFunction (const gsVector< T > &x, bool jacobian=true)
 Returns the termination function for the bisection method given solution x.
 
virtual gsSparseMatrix< T > _computeJacobian (const gsVector< T > &U, const gsVector< T > &dU)
 Compute the jacobian matrix.
 
virtual void _computeSingularPoint (const gsVector< T > &U, const T &L, bool switchBranch=false, bool jacobian=false, bool testPoint=true)
 See computeSingularPoint.
 
virtual void _computeStability (const gsVector< T > &x, bool jacobian=true, T shift=-1e2)
 See computeStability.
 
virtual void _extendedSystemIteration ()
 Perform an extended system iteration.
 
virtual bool _extendedSystemSolve (const gsVector< T > &U, const T L, const T tol)
 Perform an extended system solve to find a singular point.
 
virtual void _initOutputExtended ()
 Initialize the output for extended iterations.
 
virtual void _step ()
 Implementation of step.
 
virtual void _stepOutputExtended ()
 Step output for extended iterations.
 
virtual bool _testSingularPoint (bool jacobian=false)
 Tests if a point is a bifurcation point. More...
 
virtual void computeLength ()
 Compute the adaptive arc-length.
 
virtual gsVector< T > computeResidual (const gsVector< T > &U, const T &L)
 Compute the residual.
 
virtual void computeResidualNorms ()
 Compute the residual error norms.
 
virtual void computeUbar ()
 Compute \(\bar_u\).
 
virtual void computeUt ()
 Compute \(\u_t\).
 
virtual void defaultOptions ()
 Set default options.
 
virtual void factorizeMatrix (const gsSparseMatrix< T > &M)
 Factorize the matrix M.
 
virtual void getOptions ()
 Apply options.
 
virtual void init (bool stability)
 Initialize the solver.
 
virtual void initiateStep ()=0
 Initiate the first iteration.
 
virtual void initMethods ()=0
 Initialize the ALM.
 
virtual void initOutput ()=0
 Initialize the output.
 
virtual void iteration ()=0
 A single iteration.
 
virtual void iterationFinish ()=0
 Finish the iterations.
 
virtual void predictor ()=0
 Step predictor.
 
virtual void quasiNewtonIteration ()=0
 Perform iteration using quasi-newton method.
 
virtual void quasiNewtonPredictor ()=0
 Provide a specialized predictor when using quasi newton methods.
 
virtual gsVector< T > solveSystem (const gsVector< T > &F)
 Solve the system with right-hand side F.
 
virtual void stepOutput ()=0
 Provide step-wise output.
 

Protected Attributes

m_arcLength
 Length of the step in the u,f plane.
 
bool m_converged
 Convergence result.
 
m_DeltaL
 Update of lambdaGeneralizedSelfAdjointEigenSolver.
 
m_deltaL
 Update of update of lambda.
 
gsVector< T > m_deltaLs
 Vector with lambda updates.
 
gsVector< T > m_DeltaU
 Update of displacement vector.
 
gsVector< T > m_deltaU
 Update of update of displacement vector.
 
gsVector< T > m_deltaUbar
 u_bar
 
gsVector< T > m_deltaUt
 u_t
 
index_t m_desiredIterations
 Number of desired iterations.
 
m_indicator
 Indicator for bifurcation.
 
gsSparseMatrix< T > m_jacMat
 Jacobian matrix.
 
m_L
 Lambda (present, at previously converged point)
 
index_t m_maxIterations
 Maximum number of Arc Length iterations allowed.
 
index_t m_numIterations
 Number of Arc Length iterations performed.
 
m_relax
 Relaxation factor.
 
m_residue
 Force residuum.
 
m_residueF
 Force residuum.
 
m_residueKTPhi
 Singular point.
 
m_residueL
 Load residuum.
 
m_residueU
 Displacement residuum.
 
gsVector< T > m_resVec
 Value of residual function.
 
m_tolerance
 Tolerance value to decide convergence.
 
m_toleranceF
 Tolerance value to decide convergence - Force criterion.
 
m_toleranceU
 Tolerance value to decide convergence - Displacement criterion.
 
gsVector< T > m_U
 Displacement vector (present, at previously converged point)
 

Member Function Documentation

bool _testSingularPoint ( bool  jacobian = false)
protectedvirtual

Tests if a point is a bifurcation point.

Parameters
[in]jacobianEvaluate the Jacobian?
Returns
True if it is a bifurcation point
gsStatus computeSingularPoint ( const gsVector< T > &  U,
const T &  L,
bool  switchBranch = false,
bool  jacobian = false,
bool  testPoint = true 
)
virtual

Calculates the singular point.

Parameters
[in]singTolThe tolerance for convergence
[in]kmaxThe maximum number of iterations for the initial power method
[in]UThe point to start (displacements)
[in]LThe point to start (loads)
[in]tolEThe tolerance for the extended iterations
[in]tolBThe tolerance for the bisection method
[in]switchBranchSwitches branch if true
[in]jacobianEvaluate the Jacobian?
gsStatus computeStability ( bool  jacobian = true,
shift = -1e2 
)
virtual

Calculates the stability of the solution x.

note; The shift is needed to ensure that a negative eigenvalue is found

Parameters
[in]xSolution vector
[in]jacobianCompute the jacobian?
[in]shiftThe shift to apply