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

Detailed Description

template<class T>
class gismo::gsIterative< T >

A general iterative solver for nonlinear problems. An equation to solve is specified by an assembler class which provides the following interfaces:

int numDofs() const; const gsSparseMatrix<T> & matrix() const; const gsMatrix<T> & rhs() const; void assemble(const gsMatrix<T> & solutionVector); options().setReal("DirichletScaling",T); options().setReal("ForceScaling",T);Currently uses gsElBaseAssembler as a parent interface class. Potentially, can operate on gsAssembler.

+ Collaboration diagram for gsIterative< T >:

Public Member Functions

const std::vector< gsMatrix< T > > & allFixedDofs () const
 returns the fixed degrees of freedom
 
bool compute ()
 computes update or the next solution
 
 gsIterative (gsBaseAssembler< T > &assembler_)
 constructor without an initial guess. Assumes a zero initial guess.
 
 gsIterative (gsBaseAssembler< T > &assembler_, const gsMatrix< T > &initSolutionVector)
 
 gsIterative (gsBaseAssembler< T > &assembler_, const gsMatrix< T > &initSolutionVector, const std::vector< gsMatrix< T > > &initFixedDoFs)
 
index_t numberIterations () const
 number of iteration that Newton's method took
 
gsOptionListoptions ()
 get options list to read or set parameters
 
void recoverState ()
 recover solver state from saved state
 
void reset ()
 reset the solver state
 
void saveState ()
 save solver state
 
virtual void setFixedDofs (const std::vector< gsMatrix< T > > &ddofs)
 set all fixed degrees of freedom
 
void setSolutionVector (const gsMatrix< T > &solutionVector)
 set initial guess
 
const gsMatrix< T > & solution () const
 returns the solution vector
 
void solve ()
 solution procedure
 
std::string status ()
 return solver status as a string
 

Static Public Member Functions

static gsOptionList defaultOptions ()
 default option list. used for initialization More...
 

Protected Attributes

gsBaseAssembler< T > & assembler
 assembler object that generates the linear system
 
std::vector< gsMatrix< T > > fixedDoFs
 current Dirichlet DoFs that the solution satisfies
 
initResidualNorm
 norm of the residual vector
 
initUpdateNorm
 norm of the update vector
 
gsOptionList m_options
 option list More...
 
solver_status m_status
 number of iterations performed
 
index_t numIterations
 -— status variables --— ///
 
residualNorm
 status of the solver (converged, interrupted, working)
 
gsMatrix< T > solVector
 solution vector
 
updateNorm
 norm of the residual vector at the beginning of the loop
 

Constructor & Destructor Documentation

gsIterative ( gsBaseAssembler< T > &  assembler_,
const gsMatrix< T > &  initSolutionVector 
)

constructor with an given initial free degrees of freedom. Fixed/Dirichlet degrees of freedom are taken from the assembler. fixed DoFs are given as a single vector arranged according to the function gsMatrix<> fixedDoFsAsVector() of gsBaseAssembler

gsIterative ( gsBaseAssembler< T > &  assembler_,
const gsMatrix< T > &  initSolutionVector,
const std::vector< gsMatrix< T > > &  initFixedDoFs 
)

constructor with an initial guess given as a combination of free and fixed/Dirichlet degrees of freedom. fixed DoFs are given as a single vector arranged according to the function gsMatrix<> fixedDoFsAsVector() of gsBaseAssembler

Member Function Documentation

gsOptionList defaultOptions ( )
static

default option list. used for initialization

linear solver

stopping creteria

additional setting

Member Data Documentation

gsOptionList m_options
protected

option list

norm of the update vector at the beginning of the loop