![]() |
|
#include <timesteppers.h>
Public Types | |
typedef double(* | InitialConditionFctPt) (const double &t) |
typedef double(* | NodeInitialConditionFctPt) (const double &t, const Vector< double > &x) |
Public Member Functions | |
Newmark () | |
Newmark (const Newmark &)=delete | |
Broken copy constructor. More... | |
void | operator= (const Newmark &)=delete |
Broken assignment operator. More... | |
unsigned | order () const |
The actual order (accuracy 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, Vector< InitialConditionFctPt > initial_veloc_fct, Vector< InitialConditionFctPt > initial_accel_fct) |
void | assign_initial_data_values (Node *const &node_pt, Vector< NodeInitialConditionFctPt > initial_value_fct, Vector< NodeInitialConditionFctPt > initial_veloc_fct, Vector< NodeInitialConditionFctPt > initial_accel_fct) |
void | assign_initial_data_values_stage1 (const unsigned t_deriv, Data *const &data_pt) |
void | assign_initial_data_values_stage2 (Data *const &data_pt) |
void | shift_time_values (Data *const &data_pt) |
void | shift_time_positions (Node *const &node_pt) |
void | set_weights () |
Set 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... | |
![]() | |
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 | set_predictor_weights () |
virtual void | calculate_predicted_values (Data *const &data_pt) |
virtual void | calculate_predicted_positions (Node *const &node_pt) |
virtual void | set_error_weights () |
virtual double | temporal_error_in_position (Node *const &node_pt, const unsigned &i) |
virtual double | temporal_error_in_value (Data *const &data_pt, const unsigned &i) |
virtual void | actions_before_timestep (Problem *problem_pt) |
virtual void | actions_after_timestep (Problem *problem_pt) |
Protected Attributes | |
double | Beta1 |
First Newmark parameter (usually 0.5) More... | |
double | Beta2 |
Second Newmark parameter (usually 0.5) More... | |
![]() | |
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 |
////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// Newmark scheme for second time deriv. Stored data represents
NSTEPS=1 gives normal Newmark.
typedef double(* oomph::Newmark< NSTEPS >::InitialConditionFctPt) (const double &t) |
Typedef for function that returns the (scalar) initial value at a given value of the continuous time t.
typedef double(* oomph::Newmark< NSTEPS >::NodeInitialConditionFctPt) (const double &t, const Vector< double > &x) |
Typedef for function that returns the (scalar) initial value at a given value of the continuous time t and the spatial coordinate – appropriate for assignement of initial conditions for nodes
|
inline |
Constructor: Pass pointer to global time. We set up a timestepping scheme with NSTEPS+2 doubles to represent the history and the highest deriv is 2.
References GlobalParameters::Beta1.
|
delete |
Broken copy constructor.
void oomph::Newmark< NSTEPS >::assign_initial_data_values | ( | Data *const & | data_pt, |
Vector< InitialConditionFctPt > | initial_value_fct, | ||
Vector< InitialConditionFctPt > | initial_veloc_fct, | ||
Vector< InitialConditionFctPt > | initial_accel_fct | ||
) |
Initialise the time-history for the Data values, so that the Newmark representations for current veloc and acceleration are exact.
References j, matrix(), oomph::Data::nvalue(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::Data::set_value(), plotPSD::t, Flag_definition::Time_pt, RachelsAdvectionDiffusion::U, ExactSolution::U0, and ProblemParameters::Weight.
void oomph::Newmark< NSTEPS >::assign_initial_data_values | ( | Node *const & | node_pt, |
Vector< NodeInitialConditionFctPt > | initial_value_fct, | ||
Vector< NodeInitialConditionFctPt > | initial_veloc_fct, | ||
Vector< NodeInitialConditionFctPt > | initial_accel_fct | ||
) |
Initialise the time-history for the nodal values, so that the Newmark representations for current veloc and acceleration are exact.
Initialise the time-history for the Data values, so that the Newmark representations for current veloc and acceleration are exact.
References i, j, matrix(), oomph::Node::ndim(), oomph::Data::nvalue(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::Data::set_value(), plotPSD::t, Flag_definition::Time_pt, RachelsAdvectionDiffusion::U, ExactSolution::U0, ProblemParameters::Weight, plotDoE::x, and oomph::Node::x().
void oomph::Newmark< NSTEPS >::assign_initial_data_values_stage1 | ( | const unsigned | t_deriv, |
Data *const & | data_pt | ||
) |
First step in a two-stage procedure to assign the history values for the Newmark scheme so that the veloc and accel that are computed by the scheme are correct at the current time.
Call this function for t_deriv=0,1,2,3. When calling with
Follow this by calls to
References j, oomph::Data::nvalue(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::Data::set_value(), and oomph::Data::value().
void oomph::Newmark< NSTEPS >::assign_initial_data_values_stage2 | ( | Data *const & | data_pt | ) |
Second step in a two-stage procedure to assign the history values for the Newmark scheme so that the veloc and accel that are computed by the scheme are correct at the current time.
This assigns appropriate values for the "previous velocities and accelerations" so that their current values, which were defined in assign_initial_data_values_stage1(...), are represented exactly by the Newmark scheme.
References j, matrix(), oomph::Data::nvalue(), oomph::Data::set_value(), RachelsAdvectionDiffusion::U, ExactSolution::U0, oomph::Data::value(), and ProblemParameters::Weight.
|
virtual |
Initialise the time-history for the values, 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().
|
virtual |
Initialise the time-history for the values, corresponding to an impulsive start.
////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// Initialise the time-history for the 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().
|
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 |
The actual order (accuracy of the scheme)
Reimplemented from oomph::TimeStepper.
References OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().
|
virtual |
Set weights.
Implements oomph::TimeStepper.
Reimplemented in oomph::NewmarkBDF< NSTEPS >, oomph::NewmarkBDF< NSTEPS >, oomph::NewmarkBDF< NSTEPS >, and oomph::NewmarkBDF< NSTEPS >.
References GlobalParameters::Beta1, plotPSD::t, Flag_definition::Time_pt, and ProblemParameters::Weight.
|
virtual |
This function updates a nodal time history so that we can advance to the next timestep.
Implements oomph::TimeStepper.
Reimplemented in oomph::NewmarkBDF< NSTEPS >.
References i, k, oomph::Node::ndim(), oomph::Node::nposition_type(), and plotPSD::t.
|
virtual |
This function updates the Data's time history so that we can advance to the next timestep.
Implements oomph::TimeStepper.
Reimplemented in oomph::NewmarkBDF< NSTEPS >.
|
protected |
First Newmark parameter (usually 0.5)
|
protected |
Second Newmark parameter (usually 0.5)