Public Types |
typedef Aitken< fs_type > | self_type |
typedef fs_type | functionspace_type |
typedef boost::shared_ptr
< functionspace_type > | functionspace_ptrtype |
typedef
functionspace_type::element_type | element_type |
typedef
functionspace_type::template
Element< typename
functionspace_type::value_type,
typename VectorUblas< typename
functionspace_type::value_type >
::range::type > | element_range_type |
typedef std::map< std::string,
double > | convergence_iteration_type |
typedef std::map< int,
convergence_iteration_type > | convergence_type |
typedef fs_type | functionspace_type |
typedef boost::shared_ptr
< functionspace_type > | functionspace_ptrtype |
typedef
functionspace_type::element_type | element_type |
typedef
functionspace_type::template
Element< typename
functionspace_type::value_type,
typename VectorUblas< typename
functionspace_type::value_type >
::range::type > | element_range_type |
Public Member Functions |
| Aitken (functionspace_ptrtype _Xh, AitkenType _aitkenType=AITKEN_STANDARD, double _failsafeParameter=1.0, double _tol=1.0e-6) |
| Aitken (Aitken const &tc) |
| ~Aitken () |
| BOOST_PARAMETER_MEMBER_FUNCTION ((void), initialize, tag,(required(residual,*)(currentElt,*))) |
| BOOST_PARAMETER_MEMBER_FUNCTION ((element_type), apply, tag,(required(residual,*)(currentElt,*))(optional(forceRelaxation,(bool), false))) |
template<typename eltType > |
element_type | operator() (element_type const &residual, eltType const &elem, bool _forceRelax=false) |
| BOOST_PARAMETER_MEMBER_FUNCTION ((void), apply2, tag,(required(newElt,*)(residual,*)(currentElt,*))(optional(forceRelaxation,(bool), false))) |
void | setType (AitkenType t) |
| set Aitken method type
|
AitkenType | type () const |
void | shiftRight () |
self_type & | operator++ () |
void | restart () |
double | theta () |
uint | nIterations () |
bool | isFinished () |
double | residualNorm () |
void | printInfo () |
void | saveConvergenceHistory (std::string const &fname) const |
void | forceConvergence (bool b) |
| Aitken (functionspace_ptrtype _Xh, double _failsafeParameter=0.1) |
| Aitken (Aitken const &tc) |
| ~Aitken () |
void | initialize (element_type const &residual, element_type const &elem) |
void | initialize (element_type const &residual, element_range_type const &elem) |
void | setElement (element_type const &residual, element_type const &elem) |
void | setElement (element_type const &residual, element_range_type const &elem) |
double | calculateParameter () |
void | relaxationStep (element_type &new_elem) |
void | shiftRight () |
void | resetPreviousParameter () |
template<typename fs_type>
class Feel::Aitken< fs_type >
Aitken relaxation method for fixed point iterations.
auto Xh = space_type::New(mesh);
auto residual = Xh->element();
auto u_old->element();
auto u_new->element();
AitkenType relaxmethod = (AitkenType)this->vm()["relaxmethod"].as<int>();
Aitken<space_type> aitken( Xh, relaxmethod,init_theta, tol );
in
this last
case the relaxation parameter
theta remains fixed
during the itérations(
theta = init_theta) and the particular case (init_theta=1)
corresponds to the case without relaxation
while(!aitken.isFinished())
{
u_old = u_new;
commpute u_new;
residual = u_new-u_old;
u_new = aitken.apply(residual, u_new);
aitken.printInfo();
++aitken;
}
*
- Author:
- Goncalo Pena
-
Christophe Prud'homme
-
Vincent Chabannes
space_ptrtype Xh;
space_type::element_type residual( Xh );
space_type::element_type u_old( Xh );
space_type::element_type u_new( Xh );
Aitken<space_type> aitken( Xh );
aitken.initialize( residual, u_new );
aitken.resetPreviousParameter();
for( int i = 0; i < niter; ++i )
{
aitken.SetElement( residual, u_new );
theta = aitken.calculateParameter();
aitken.shiftRight();
u_old = u_new;
}
- Author:
- Vincent Chabannes