![]() |
|
#include <timesteppers.h>
Public Types | |
typedef double(* | InitialConditionFctPt) (const double &t) |
Public Member Functions | |
BDF (const bool &adaptive=false) | |
Constructor for the case when we allow adaptive timestepping. More... | |
BDF (const BDF &)=delete | |
Broken copy constructor. More... | |
void | operator= (const BDF &)=delete |
Broken assignment operator. More... | |
unsigned | order () const |
Return the actual order of the scheme. More... | |
void | assign_initial_values_impulsive (Data *const &data_pt) |
void | assign_initial_positions_impulsive (Node *const &node_pt) |
void | assign_initial_data_values (Data *const &data_pt, Vector< InitialConditionFctPt > initial_value_fct) |
void | shift_time_values (Data *const &data_pt) |
void | shift_time_positions (Node *const &node_pt) |
void | set_weights () |
Set the weights. More... | |
unsigned | nprev_values () const |
Number of previous values available. More... | |
unsigned | ndt () const |
Number of timestep increments that need to be stored by the scheme. More... | |
void | set_predictor_weights () |
Function to set the predictor weights. More... | |
void | calculate_predicted_positions (Node *const &node_pt) |
Function to calculate predicted positions at a node. More... | |
void | calculate_predicted_values (Data *const &data_pt) |
Function to calculate predicted data values in a Data object. More... | |
void | set_error_weights () |
Function to set the error weights. More... | |
double | temporal_error_in_position (Node *const &node_pt, const unsigned &i) |
Compute the error in the position i at a node. More... | |
double | temporal_error_in_value (Data *const &data_pt, const unsigned &i) |
Compute the error in the value i in a Data structure. More... | |
void | set_weights () |
Assign the values of the weights. More... | |
void | set_predictor_weights () |
Set the predictor weights (Gresho and Sani pg. 270) More... | |
void | calculate_predicted_values (Data *const &data_pt) |
void | calculate_predicted_positions (Node *const &node_pt) |
Calculate predictions for the positions. More... | |
void | set_error_weights () |
Set the error weights (Gresho and Sani pg. 270) More... | |
double | temporal_error_in_position (Node *const &node_pt, const unsigned &i) |
Function to compute the error in position i at node. More... | |
double | temporal_error_in_value (Data *const &data_pt, const unsigned &i) |
Function to calculate the error in the data value i. More... | |
void | set_weights () |
void | set_predictor_weights () |
void | calculate_predicted_values (Data *const &data_pt) |
void | calculate_predicted_positions (Node *const &node_pt) |
Calculate predictions for the positions. More... | |
void | set_error_weights () |
Function that sets the error weights. More... | |
double | temporal_error_in_position (Node *const &node_pt, const unsigned &i) |
Function to compute the error in position i at node. More... | |
double | temporal_error_in_value (Data *const &data_pt, const unsigned &i) |
Function to calculate the error in the data value i. More... | |
void | set_weights () |
Assign the values of the weights; pass the value of the timestep. More... | |
void | set_predictor_weights () |
Calculate the predictor weights. More... | |
void | calculate_predicted_values (Data *const &data_pt) |
void | calculate_predicted_positions (Node *const &node_pt) |
Calculate predictions for the positions. More... | |
void | set_error_weights () |
Function that sets the error weights. More... | |
double | temporal_error_in_position (Node *const &node_pt, const unsigned &i) |
Function to compute the error in position i at node. More... | |
double | temporal_error_in_value (Data *const &data_pt, const unsigned &i) |
Function to calculate the error in the data value i. More... | |
![]() | |
TimeStepper (const unsigned &tstorage, const unsigned &max_deriv) | |
TimeStepper () | |
Broken empty constructor. More... | |
TimeStepper (const TimeStepper &)=delete | |
Broken copy constructor. More... | |
void | operator= (const TimeStepper &)=delete |
Broken assignment operator. More... | |
virtual | ~TimeStepper () |
virtual destructor More... | |
unsigned | highest_derivative () const |
Highest order derivative that the scheme can compute. More... | |
double & | time () |
Return current value of continous time. More... | |
double | time () const |
Return current value of continous time. More... | |
virtual unsigned | nprev_values_for_value_at_evaluation_time () const |
void | make_steady () |
bool | is_steady () const |
bool | predict_by_explicit_step () const |
ExplicitTimeStepper * | explicit_predictor_pt () |
void | set_predictor_pt (ExplicitTimeStepper *_pred_pt) |
void | update_predicted_time (const double &new_time) |
void | check_predicted_values_up_to_date () const |
Check that the predicted values are the ones we want. More... | |
unsigned | predictor_storage_index () const |
void | enable_warning_in_assign_initial_data_values () |
void | disable_warning_in_assign_initial_data_values () |
const DenseMatrix< double > * | weights_pt () const |
Get a (const) pointer to the weights. More... | |
virtual void | undo_make_steady () |
std::string | type () const |
void | time_derivative (const unsigned &i, Data *const &data_pt, Vector< double > &deriv) |
double | time_derivative (const unsigned &i, Data *const &data_pt, const unsigned &j) |
Evaluate i-th derivative of j-th value in Data. More... | |
void | time_derivative (const unsigned &i, Node *const &node_pt, Vector< double > &deriv) |
double | time_derivative (const unsigned &i, Node *const &node_pt, const unsigned &j) |
Time *const & | time_pt () const |
Access function for the pointer to time (const version) More... | |
Time *& | time_pt () |
virtual double | weight (const unsigned &i, const unsigned &j) const |
Access function for j-th weight for the i-th derivative. More... | |
unsigned | ntstorage () const |
bool | adaptive_flag () const |
Function to indicate whether the scheme is adaptive (false by default) More... | |
virtual void | actions_before_timestep (Problem *problem_pt) |
virtual void | actions_after_timestep (Problem *problem_pt) |
Private Attributes | |
Vector< double > | Predictor_weight |
Private data for the predictor weights. More... | |
double | Error_weight |
Private data for the error weight. More... | |
Additional Inherited Members | |
![]() | |
Time * | Time_pt |
Pointer to discrete time storage scheme. More... | |
DenseMatrix< double > | Weight |
Storage for the weights associated with the timestepper. More... | |
std::string | Type |
bool | Adaptive_Flag |
bool | Is_steady |
bool | Shut_up_in_assign_initial_data_values |
bool | Predict_by_explicit_step |
ExplicitTimeStepper * | Explicit_predictor_pt |
double | Predicted_time |
int | Predictor_storage_index |
////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// Templated class for BDF-type time-steppers with fixed or variable timestep. 1st time derivative recovered directly from the previous function values. Template parameter represents the number of previous timesteps stored, so that BDF<1> is the classical first order backward Euler scheme. Need to reset weights after every change in timestep.
typedef double(* oomph::BDF< NSTEPS >::InitialConditionFctPt) (const double &t) |
Typedef for function that returns the (scalar) initial value at a given value of the continuous time t.
|
inline |
Constructor for the case when we allow adaptive timestepping.
References Global_Physical_Variables::adaptive, and ProblemParameters::Weight.
|
delete |
Broken copy constructor.
|
inline |
Initialise the time-history for the Data values, corresponding to given time history, specified by Vector of function pointers.
References j, oomph::Data::nvalue(), oomph::Data::set_value(), plotPSD::t, and Flag_definition::Time_pt.
|
inlinevirtual |
Initialise the time-history for the nodal positions corresponding to an impulsive start.
Implements oomph::TimeStepper.
References i, k, oomph::Node::ndim(), oomph::Node::nposition_type(), oomph::Node::position_is_a_copy(), plotPSD::t, and oomph::Node::x_gen().
|
inlinevirtual |
Initialise the time-history for the Data values, corresponding to an impulsive start.
Implements oomph::TimeStepper.
References oomph::Data::is_a_copy(), j, oomph::Data::nvalue(), oomph::Data::set_value(), plotPSD::t, and oomph::Data::value().
|
virtual |
Calculate predictions for the positions.
Reimplemented from oomph::TimeStepper.
References i, j, oomph::Node::ndim(), oomph::Node::position_is_a_copy(), and oomph::Node::x().
|
virtual |
Calculate predictions for the positions.
Reimplemented from oomph::TimeStepper.
References i, j, oomph::Node::ndim(), oomph::Node::position_is_a_copy(), and oomph::Node::x().
|
virtual |
Calculate predictions for the positions.
Reimplemented from oomph::TimeStepper.
References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
virtual |
Function to calculate predicted positions at a node.
Reimplemented from oomph::TimeStepper.
|
virtual |
Calculate the predicted values and store them at the appropriate location in the data structure This function must be called after the time-values have been shifted!
Reimplemented from oomph::TimeStepper.
References i, oomph::Data::is_a_copy(), j, oomph::Data::nvalue(), oomph::Data::set_value(), and oomph::Data::value().
|
virtual |
Calculate the predicted values and store them at the appropriate location in the data structure This function must be called after the time-values have been shifted!
Reimplemented from oomph::TimeStepper.
References i, oomph::Data::is_a_copy(), j, oomph::Data::nvalue(), oomph::Data::set_value(), and oomph::Data::value().
|
virtual |
Calculate the predicted values and store them at the appropriate location in the data structure This function must be called after the time-values have been shifted!
Reimplemented from oomph::TimeStepper.
References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
virtual |
Function to calculate predicted data values in a Data object.
Reimplemented from oomph::TimeStepper.
|
inlinevirtual |
Number of timestep increments that need to be stored by the scheme.
Implements oomph::TimeStepper.
|
inlinevirtual |
Number of previous values available.
Implements oomph::TimeStepper.
|
delete |
Broken assignment operator.
|
inlinevirtual |
Return the actual order of the scheme.
Reimplemented from oomph::TimeStepper.
|
virtual |
Set the error weights (Gresho and Sani pg. 270)
Reimplemented from oomph::TimeStepper.
|
virtual |
Function that sets the error weights.
Reimplemented from oomph::TimeStepper.
References Eigen::ArrayBase< Derived >::pow(), and Flag_definition::Time_pt.
|
virtual |
Function that sets the error weights.
Reimplemented from oomph::TimeStepper.
References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
virtual |
Function to set the error weights.
Reimplemented from oomph::TimeStepper.
|
virtual |
Set the predictor weights (Gresho and Sani pg. 270)
Reimplemented from oomph::TimeStepper.
References oomph::Time::dt(), and Flag_definition::Time_pt.
|
virtual |
Calculate the predictor weights. The scheme used is from Gresho & Sani, Incompressible Flow and the Finite Element Method (advection-diffusion and isothermal laminar flow), 1998, pg. 715.
Reimplemented from oomph::TimeStepper.
References Flag_definition::Time_pt.
|
virtual |
Calculate the predictor weights.
Reimplemented from oomph::TimeStepper.
References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
virtual |
Function to set the predictor weights.
Reimplemented from oomph::TimeStepper.
|
virtual |
Assign the values of the weights.
///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
Implements oomph::TimeStepper.
References oomph::Time::dt(), Flag_definition::Time_pt, and ProblemParameters::Weight.
|
virtual |
Assign the values of the weights. The scheme used is from Gresho & Sani, Incompressible Flow and the Finite Element Method (advection-diffusion and isothermal laminar flow), 1998, pg. 715 (with some algebraic rearrangement).
Implements oomph::TimeStepper.
References Flag_definition::Time_pt, and ProblemParameters::Weight.
|
virtual |
Assign the values of the weights; pass the value of the timestep.
Implements oomph::TimeStepper.
References i, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, Flag_definition::Time_pt, and ProblemParameters::Weight.
|
virtual |
Set the weights.
Implements oomph::TimeStepper.
|
inlinevirtual |
This function advances the time history of the positions at a node.
Implements oomph::TimeStepper.
References i, k, oomph::Node::ndim(), oomph::Node::nposition_type(), oomph::Node::position_is_a_copy(), plotPSD::t, Jeffery_Solution::velocity(), ProblemParameters::Weight, and oomph::Node::x_gen().
|
inlinevirtual |
This function updates the Data's time history so that we can advance to the next timestep. For BDF schemes, we simply push the values backwards...
Implements oomph::TimeStepper.
References oomph::Data::is_a_copy(), j, oomph::Data::nvalue(), oomph::Data::set_value(), plotPSD::t, oomph::Data::value(), and Jeffery_Solution::velocity().
|
virtual |
Function to compute the error in position i at node.
Reimplemented from oomph::TimeStepper.
References i, and oomph::Node::x().
|
virtual |
Function to compute the error in position i at node.
Reimplemented from oomph::TimeStepper.
References i, and oomph::Node::x().
|
virtual |
Function to compute the error in position i at node.
Reimplemented from oomph::TimeStepper.
References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
virtual |
Compute the error in the position i at a node.
Reimplemented from oomph::TimeStepper.
|
virtual |
Function to calculate the error in the data value i.
Reimplemented from oomph::TimeStepper.
References i, and oomph::Data::value().
|
virtual |
Function to calculate the error in the data value i.
Reimplemented from oomph::TimeStepper.
References i, and oomph::Data::value().
|
virtual |
Function to calculate the error in the data value i.
Reimplemented from oomph::TimeStepper.
References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
virtual |
Compute the error in the value i in a Data structure.
Reimplemented from oomph::TimeStepper.
|
private |
Private data for the error weight.
|
private |
Private data for the predictor weights.