29 #ifndef __SystemImplicitNonLinear_H
30 #define __SystemImplicitNonLinear_H 1
44 template<
typename SpaceType>
65 typedef typename super::value_type value_type;
66 typedef typename super::functionspace_type functionspace_type;
67 typedef typename super::functionspace_type functionspace_ptrtype;
68 typedef typename super::element_type element_type;
71 typedef typename super::backend_ptrtype backend_ptrtype;
73 typedef typename super::sparse_matrix_ptrtype sparse_matrix_ptrtype;
75 typedef typename super::vector_ptrtype vector_ptrtype;
152 virtual void updateResidual(
const vector_ptrtype& X, vector_ptrtype& R ) = 0;
155 virtual void updateJacobian(
const vector_ptrtype& X, sparse_matrix_ptrtype& J ) = 0;
160 vector_ptrtype U( M_backend->newVector( this->functionSpace() ) );
166 M_backend->nlSolve( M_J, U, M_R, 1e-10, 10 );
175 sparse_matrix_ptrtype M_J;
181 template<
typename SpaceType>
183 po::variables_map
const& vm )
186 M_J( M_backend->newMatrix( Xh, Xh ) ),
187 M_R( M_backend->newVector( Xh ) )
194 template<
typename SpaceType>
virtual void updateJacobian(const vector_ptrtype &X, sparse_matrix_ptrtype &J)=0
function that update the jacobian at each non linear iteration
Definition: solverlinear.hpp:33
SystemImplicitNonLinear & operator=(SystemImplicitNonLinear const &o)
copy operator
Definition: systemimplicitnonlinear.hpp:97
sparse_matrix_ptrtype & jacobian()
Definition: systemimplicitnonlinear.hpp:121
void solve(element_type &u)
default implementation that solves the nonlinear system
Definition: systemimplicitnonlinear.hpp:158
sparse_matrix_ptrtype const & jacobian() const
Definition: systemimplicitnonlinear.hpp:115
virtual void updateResidual(const vector_ptrtype &X, vector_ptrtype &R)=0
function that update the residual at each non linear iteration
~SystemImplicitNonLinear()
destructor
Describes nonlinear implicit systems.
Definition: systemimplicitnonlinear.hpp:45
vector_ptrtype const & residual() const
Definition: systemimplicitnonlinear.hpp:127
System of PDE associated to a function space.
Definition: system.hpp:42
base class for all linear algebra backends
Definition: backend.hpp:133
describes an implicit system
Definition: systemimplicit.hpp:45
Definition: matrixsparse.hpp:76
po::variables_map const & vm() const
Definition: system.hpp:95
vector_ptrtype & residual()
Definition: systemimplicitnonlinear.hpp:133
SystemImplicitNonLinear(functionspace_ptrtype const &Xh, po::variables_map const &vm)
default constructor
Definition: systemimplicitnonlinear.hpp:182
SystemImplicit & operator=(SystemImplicit const &o)
copy operator
Definition: systemimplicit.hpp:101