Class to keep track of discrete/continous time. It is essential to have a single Time object when using multiple time-stepping schemes; e.g., in fluid-structure interaction problems, it is common to use different schemes for the fluid and solid domains. Storage is allocated for the current value of the (continuous) time and a limited history of previous timesteps. The number of previous timesteps must be equal to the number required by the "highest order" scheme. More...
#include <timesteppers.h>
Public Member Functions | |
Time () | |
Constructor: Do not allocate any storage for previous timesteps, but set the initial value of the time to zero. More... | |
Time (const unsigned &ndt) | |
Constructor: Pass the number of timesteps to be stored and set the initial value of time to zero. More... | |
Time (const Time &)=delete | |
Broken copy constructor. More... | |
void | operator= (const Time &)=delete |
Broken assignment operator. More... | |
void | resize (const unsigned &n_dt) |
Resize the vector holding the number of previous timesteps and initialise the new values to zero. More... | |
void | initialise_dt (const double &dt_) |
Set all timesteps to the same value, dt. More... | |
void | initialise_dt (const Vector< double > &dt_) |
Set the value of the timesteps to be equal to the values passed in a vector. More... | |
~Time () | |
Destructor: empty. More... | |
double & | time () |
Return the current value of the continuous time. More... | |
unsigned | ndt () const |
Return the number of timesteps stored. More... | |
double & | dt (const unsigned &t=0) |
Return the value of the t-th stored timestep (t=0: present; t>0: previous). More... | |
double | dt (const unsigned &t=0) const |
Return the value of the t-th stored timestep (t=0: present; t>0: previous), const version. More... | |
double | time (const unsigned &t=0) const |
Return the value of the continuous time at the t-th previous time level (t=0: current; t>0 previous). More... | |
void | shift_dt () |
Update all stored values of dt by shifting each value along the array. This function must be called before starting to solve at a new time level. More... | |
Private Attributes | |
double | Continuous_time |
Pointer to the value of the continuous time. More... | |
Vector< double > | Dt |
Vector that stores the values of the current and previous timesteps. More... | |
Class to keep track of discrete/continous time. It is essential to have a single Time object when using multiple time-stepping schemes; e.g., in fluid-structure interaction problems, it is common to use different schemes for the fluid and solid domains. Storage is allocated for the current value of the (continuous) time and a limited history of previous timesteps. The number of previous timesteps must be equal to the number required by the "highest order" scheme.
Definition at line 62 of file timesteppers.h.
|
inline |
Constructor: Do not allocate any storage for previous timesteps, but set the initial value of the time to zero.
Definition at line 74 of file timesteppers.h.
|
inline |
Constructor: Pass the number of timesteps to be stored and set the initial value of time to zero.
Definition at line 78 of file timesteppers.h.
|
delete |
Broken copy constructor.
|
inline |
Destructor: empty.
Definition at line 120 of file timesteppers.h.
|
inline |
Return the value of the t-th stored timestep (t=0: present; t>0: previous).
Definition at line 136 of file timesteppers.h.
Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::IMRByBDF::actions_before_timestep(), oomph::Problem::adaptive_unsteady_newton_solve(), oomph::Problem::calculate_predictions(), oomph::Problem::copy(), oomph::Problem::doubly_adaptive_unsteady_newton_solve_helper(), oomph::Problem::dump(), oomph::Problem::explicit_timestep(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::extrapolated_strain_rate(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::extrapolated_strain_rate(), oomph::PseudoBucklingRing::position(), oomph::TR::set_error_weights(), oomph::NewmarkBDF< NSTEPS >::set_newmark_veloc_weights(), oomph::TR::set_predictor_weights(), oomph::IMR::set_weights(), oomph::IMRByBDF::set_weights(), oomph::TR::set_weights(), oomph::TR::shift_time_values(), oomph::EBDF3::timestep(), oomph::Problem::unsteady_newton_solve(), and oomph::SegregatableFSIProblem::unsteady_segregated_solve().
|
inline |
Return the value of the t-th stored timestep (t=0: present; t>0: previous), const version.
Definition at line 143 of file timesteppers.h.
|
inline |
Set all timesteps to the same value, dt.
Definition at line 99 of file timesteppers.h.
Referenced by oomph::Problem::initialise_dt().
|
inline |
Set the value of the timesteps to be equal to the values passed in a vector.
Definition at line 107 of file timesteppers.h.
|
inline |
Return the number of timesteps stored.
Definition at line 129 of file timesteppers.h.
References Dt.
Referenced by oomph::Problem::add_time_stepper_pt(), oomph::Problem::copy(), oomph::Problem::dump(), initialise_dt(), Time(), and time().
|
delete |
Broken assignment operator.
|
inline |
Resize the vector holding the number of previous timesteps and initialise the new values to zero.
Definition at line 93 of file timesteppers.h.
References Dt.
Referenced by oomph::Problem::add_time_stepper_pt(), oomph::Problem::copy(), and oomph::Problem::read().
|
inline |
Update all stored values of dt by shifting each value along the array. This function must be called before starting to solve at a new time level.
Definition at line 174 of file timesteppers.h.
Referenced by oomph::Problem::shift_time_values().
|
inline |
Return the current value of the continuous time.
Definition at line 123 of file timesteppers.h.
References Continuous_time.
Referenced by oomph::PseudoBucklingRing::accel(), oomph::IMRByBDF::actions_after_timestep(), oomph::IMRByBDF::actions_before_timestep(), oomph::Problem::adaptive_unsteady_newton_solve(), oomph::PeriodicOrbitTimeDiscretisation::assign_initial_data_values(), oomph::LinearElasticityEquationsBase< DIM >::body_force(), oomph::TimeHarmonicLinearElasticityEquationsBase< DIM >::body_force(), oomph::PVDEquationsBase< DIM >::body_force(), oomph::TimeStepper::check_predicted_values_up_to_date(), oomph::Problem::copy(), oomph::Problem::doubly_adaptive_unsteady_newton_solve_helper(), oomph::Problem::dump(), oomph::AxisymmetricLinearElasticityEquations::fill_in_generic_contribution_to_residuals_axisymmetric_linear_elasticity(), oomph::AxisymmetricPoroelasticityEquations::fill_in_generic_residual_contribution(), oomph::AxisymmetricNavierStokesEquations::fill_in_generic_residual_contribution_axi_nst(), oomph::RefineableAxisymmetricNavierStokesEquations::fill_in_generic_residual_contribution_axi_nst(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::fill_in_generic_residual_contribution_axi_nst(), oomph::RefineableGeneralisedNewtonianAxisymmetricNavierStokesEquations::fill_in_generic_residual_contribution_axi_nst(), oomph::PeriodicOrbitEquations::fill_in_generic_residual_contribution_orbit(), oomph::RefineableSphericalNavierStokesEquations::fill_in_generic_residual_contribution_spherical_nst(), oomph::SphericalNavierStokesEquations::fill_in_generic_residual_contribution_spherical_nst(), oomph::AxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::RefineableAxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::RefineableGeneralisedNewtonianAxisymmetricNavierStokesEquations::get_dresidual_dnodal_coordinates(), oomph::AdvectionDiffusionReactionEquations< NREAGENT, DIM >::get_wind_adv_diff_react(), oomph::PeriodicOrbitEquations::orbit_output(), oomph::AxisymmetricLinearElasticityTractionElement< ELEMENT >::output(), oomph::AxisymmetricNavierStokesTractionElement< ELEMENT >::output(), oomph::AxisymmetricPoroelasticityTractionElement< ELEMENT >::output(), oomph::FSILinearisedAxisymPoroelasticTractionElement< POROELASTICITY_BULK_ELEMENT, NAVIER_STOKES_BULK_ELEMENT >::output(), oomph::PseudoBucklingRing::position(), oomph::Problem::read(), oomph::AxisymmetricNavierStokesTractionElement< ELEMENT >::scalar_value_paraview(), oomph::SolidICProblem::set_newmark_initial_condition_consistently(), oomph::SolidICProblem::set_newmark_initial_condition_directly(), oomph::SolidICProblem::set_static_initial_condition(), oomph::Problem::time(), oomph::TimeStepper::time(), oomph::PeriodicOrbitEquations::time(), oomph::Problem::unsteady_newton_solve(), oomph::SegregatableFSIProblem::unsteady_segregated_solve(), and oomph::PseudoBucklingRing::veloc().
|
inline |
Return the value of the continuous time at the t-th previous time level (t=0: current; t>0 previous).
Definition at line 150 of file timesteppers.h.
References Continuous_time, Dt, i, ndt(), oomph::Global_string_for_annotation::string(), t, and oomph::StringConversion::to_string().
|
private |
Pointer to the value of the continuous time.
Definition at line 66 of file timesteppers.h.
Referenced by time().
|
private |
Vector that stores the values of the current and previous timesteps.
Definition at line 69 of file timesteppers.h.
Referenced by dt(), initialise_dt(), ndt(), resize(), shift_dt(), Time(), and time().