32 explicit BDF(
int order = 0);
47 bool advanceStep(
double dt = 0.0,
double dtn = 0.0);
50 virtual const std::vector<double>&
getCoefs()
const;
58 template<
class T> T
extrapolate(
const std::vector<T>& values)
const
60 const T& v0 = values.front();
62 return 2.0*v0 - values[1];
85 explicit BDFD2(
int order = 2,
int step_ = 0);
88 const std::vector<double>&
getCoefs()
const override;
Helper class for Backwards Difference schemes for 2nd order problems.
Definition: BDF.h:80
std::vector< double > coefs2
BDF coefficients for second time step.
Definition: BDF.h:91
const std::vector< double > & getCoefs() const override
Returns the BDF coefficients.
Definition: BDF.C:93
BDFD2(int order=2, int step_=0)
Default constructor.
Definition: BDF.C:72
Helper class for Backwards Difference Formula integration schemes.
Definition: BDF.h:28
BDF(int order=0)
Default constructor.
Definition: BDF.C:17
void setOrder(int order)
Initializes the coefficients for the specified order.
Definition: BDF.C:24
int step
Time step counter.
Definition: BDF.h:69
int getActualOrder() const
Returns the order of the scheme.
Definition: BDF.h:42
double operator[](int idx) const
Indexing operator returning the idx'th coefficient.
Definition: BDF.h:53
std::vector< double > coefs1
BDF coefficients for first time step.
Definition: BDF.h:71
short int getDegree() const
Returns the degree of the time derivative approximation.
Definition: BDF.h:44
int getOrder() const
Returns the order to be used for current time step.
Definition: BDF.C:41
short int degree
Degree of the time derivative approximation.
Definition: BDF.h:68
std::vector< double > coefs
The BDF coefficients.
Definition: BDF.h:70
virtual ~BDF()
Empty destructor.
Definition: BDF.h:34
virtual const std::vector< double > & getCoefs() const
Returns the BDF coefficients.
Definition: BDF.C:66
bool advanceStep(double dt=0.0, double dtn=0.0)
Advances the time stepping scheme.
Definition: BDF.C:47
T extrapolate(const std::vector< T > &values) const
Extrapolates values.
Definition: BDF.h:58
Utilities for time integration.
Definition: BDF.h:21