Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::CNAB2< FieldType > Class Template Reference
+ Inheritance diagram for Feel::CNAB2< FieldType >:
+ Collaboration diagram for Feel::CNAB2< FieldType >:

Public Types

using field_t = FieldType
 
using mesh_ptr_t = typename field_t::functionspace_type::mesh_ptrtype
 
using mesh_t = typename field_t::functionspace_type::mesh_type
 
using super = TimeSet
 
- Public Types inherited from Feel::TimeSet
using super = std::vector< TimeStepInfo >
 

Public Member Functions

void addStep (double k)
 
template<typename FT >
void addStep (double k1, FT const &f_u, FT const &f_acc)
 
template<typename FT >
void addStep (FT const &f_u, FT const &f_acc, double k1)
 
template<typename BCType >
void averaging (BCType &bc, double k1)
 
template<typename FT >
 CNAB2 (FT const &f)
 
template<typename FT >
double computeError (FT &fd)
 
std::pair< bool, double > computeStep (double step, double err)
 test that during the current time step, the error err has decreazed sufficiently. More...
 
void eraseStep (double k)
 
field_t const & extrapolateVelocity ()
 
field_t const & field () const
 
bool isFinished () const
 
double l2Error () const
 
template<typename FT , typename BCType >
bool next (FT &d, BCType &bc, bool is_converged=true)
 
field_t const & rateOfChange () const
 
template<typename FT , typename BCType >
void start (FT &d, BCType &bc)
 
- Public Member Functions inherited from Feel::TimeSet
size_t index () const
 
double & k ()
 
double k () const
 
double & kprev (int n)
 
double kprev (int n) const
 
void print ()
 
void push_back (double k1, double t1)
 
void push_back (double k1, double t1, double err)
 
void save (std::string const &fname="times.tsv")
 save times and time steps in fname
 
double & t ()
 
double t () const
 
double & tprev (int n)
 
double tprev (int n) const
 

Public Attributes

field_t acc
 
field_t acc_try
 
field_t accp
 
field_t accstar
 
field_t d
 
field_t dd
 
double k0
 
double keps
 
mesh_ptr_t mesh
 
int nstar
 
bool steady
 
double steady_tol
 
double T
 
field_t u
 
field_t u_try
 
field_t uab2
 
field_t up
 
field_t ustar
 
field_t w
 
field_t ww
 

Member Function Documentation

◆ computeStep()

template<typename FieldType >
std::pair< bool, double > Feel::CNAB2< FieldType >::computeStep ( double  step,
double  err 
)

test that during the current time step, the error err has decreazed sufficiently.

Returns
a pair of bool and double

bool states whether the step is accepted (true) or not (false) and the double stores the new timestep in case of acceptance or rejection

◆ isFinished()

template<typename FieldType >
bool Feel::CNAB2< FieldType >::isFinished ( ) const
Returns
true if the adaptive algorithm is finished, false otherwise

◆ l2Error()

template<typename FieldType >
double Feel::CNAB2< FieldType >::l2Error ( ) const
Returns
the l2 error of the increment relative to the latest solution