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

Detailed Description

template<class T>
class gismo::gsStaticNewton< T >

Static solver using a newton method.

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

Public Member Functions

virtual bool converged () const
 Returns whether the solver converged or not.
 
void defaultOptions () override
 See gsStaticBase.
 
void getOptions () override
 See gsStaticBase.
 
 gsStaticNewton (const gsSparseMatrix< T > &linear, const gsVector< T > &force)
 Constructor. More...
 
 gsStaticNewton (const gsSparseMatrix< T > &linear, const gsVector< T > &force, const Jacobian_t &nonlinear, const Residual_t &residual)
 Constructor. More...
 
 gsStaticNewton (const gsSparseMatrix< T > &linear, const gsVector< T > &force, const Jacobian_t &nonlinear, const ALResidual_t &ALResidual)
 Constructor. More...
 
 gsStaticNewton (const gsSparseMatrix< T > &linear, const gsVector< T > &force, const dJacobian_t &dnonlinear, const Residual_t &residual)
 { function_description } More...
 
virtual T indicator (const gsSparseMatrix< T > &jacMat, T shift=-1e-2)
 Returns the stability indicator.
 
indicator ()
 See gsStaticBase.
 
virtual void initialize ()
 See gsStaticBase.
 
void initOutput () override
 See gsStaticBase.
 
virtual index_t iterations () const
 Returns the number of iterations.
 
virtual index_t numDofs ()
 Returns the number of DoFs of the system.
 
virtual gsOptionList options () const
 Get options.
 
void reset () override
 See gsStaticBase.
 
virtual void setDisplacement (const gsVector< T > &displacement)
 Set the displacement.
 
virtual void setLoad (const T L)
 Set the load.
 
virtual void setOptions (gsOptionList &options)
 Set the options from options.
 
virtual void setSolution (const gsVector< T > &displacement, const T L)
 Set the displacement and the load.
 
virtual gsVector< T > solution () const
 Access the solution.
 
gsStatus solve () override
 See gsStaticBase.
 
gsStatus solveLinear ()
 Perform a linear solve.
 
gsStatus solveNonlinear (gsVector< T > &solution)
 Perform a nonlinearg solve.
 
virtual gsVector< T > stabilityVec (const gsSparseMatrix< T > &jacMat, T shift=-1e-2)
 Returns the stability vector.
 
gsVector< T > stabilityVec ()
 See gsStaticBase.
 
virtual gsStatus status () const
 Returns the status.
 
void stepOutput (index_t k) override
 See gsStaticBase.
 
virtual gsVector< T > update () const
 Access the update.
 

Protected Member Functions

virtual bool _computeStability (const gsSparseMatrix< T > &jacMat, T shift)
 Computes the stability of the Jacobian, optionally applying a shift (if provided)
 
virtual bool _computeStabilityDet (const gsSparseMatrix< T > &jacMat)
 Computes the stability vector using the determinant of the Jacobian.
 
virtual bool _computeStabilityEig (const gsSparseMatrix< T > &jacMat, T shift)
 Computes the stability vector using the eigenvalues of the Jacobian, optionally applying a shift.
 
void _factorizeMatrix (const gsSparseMatrix< T > &jacMat) const
 Factorizes the jacMat.
 
void _init ()
 Initializes the method.
 
gsVector< T > _solveLinear ()
 Perform a linear solve.
 
gsVector< T > _solveNonlinear ()
 Perform a nonlinear solve.
 
gsVector< T > _solveSystem (const gsVector< T > &F)
 Solves the system with RHS F and LHS the Jacobian.
 
void _start ()
 Starts the method.
 

Constructor & Destructor Documentation

gsStaticNewton ( const gsSparseMatrix< T > &  linear,
const gsVector< T > &  force 
)
inline

Constructor.

Parameters
[in]linearThe linear stiffness matrix
[in]forceThe external force
gsStaticNewton ( const gsSparseMatrix< T > &  linear,
const gsVector< T > &  force,
const Jacobian_t &  nonlinear,
const Residual_t &  residual 
)
inline

Constructor.

Parameters
[in]linearThe linear stiffness matrix
[in]forceThe external force
[in]nonlinearThe Jacobian
[in]residualThe residual
gsStaticNewton ( const gsSparseMatrix< T > &  linear,
const gsVector< T > &  force,
const Jacobian_t &  nonlinear,
const ALResidual_t &  ALResidual 
)
inline

Constructor.

Parameters
[in]linearThe linear stiffness matrix
[in]forceThe external force
[in]nonlinearThe Jacobian
[in]residualThe residual as arc-length object
gsStaticNewton ( const gsSparseMatrix< T > &  linear,
const gsVector< T > &  force,
const dJacobian_t &  dnonlinear,
const Residual_t &  residual 
)
inline

{ function_description }

Parameters
[in]linearThe linear matrix
[in]forceThe force vector
[in]dnonlinearThe jacobian taking the solution x and the iterative update dx
[in]residualThe residual function