G+Smo
24.08.0
Geometry + Simulation Modules
|
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.
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 | |
gsOptionList & | options () |
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 | |
T | initResidualNorm |
norm of the residual vector | |
T | 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 --— /// | |
T | residualNorm |
status of the solver (converged, interrupted, working) | |
gsMatrix< T > | solVector |
solution vector | |
T | updateNorm |
norm of the residual vector at the beginning of the loop | |
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
|
static |
default option list. used for initialization
linear solver
stopping creteria
additional setting
|
protected |
option list
norm of the update vector at the beginning of the loop