oomph::PeriodicOrbitTimeDiscretisation Class Reference

#include <periodic_orbit_handler.h>

+ Inheritance diagram for oomph::PeriodicOrbitTimeDiscretisation:

Public Types

typedef double(* InitialConditionFctPt) (const double &t)
 

Public Member Functions

 PeriodicOrbitTimeDiscretisation (const unsigned &n_tstorage)
 Constructor for the case when we allow adaptive timestepping. More...
 
 PeriodicOrbitTimeDiscretisation (const PeriodicOrbitTimeDiscretisation &)=delete
 Broken copy constructor. More...
 
void operator= (const PeriodicOrbitTimeDiscretisation &)=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)
 Broken shifting of time values. More...
 
void shift_time_positions (Node *const &node_pt)
 Broken shifting of time positions. More...
 
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...
 
- Public Member Functions inherited from oomph::TimeStepper
 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...
 
doubletime ()
 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
 
ExplicitTimeStepperexplicit_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)
 

Friends

class PeriodicOrbitEquations
 

Additional Inherited Members

- Protected Attributes inherited from oomph::TimeStepper
TimeTime_pt
 Pointer to discrete time storage scheme. More...
 
DenseMatrix< doubleWeight
 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
 
ExplicitTimeStepperExplicit_predictor_pt
 
double Predicted_time
 
int Predictor_storage_index
 

Detailed Description

Timestepper used to calculate periodic orbits directly. It's not really a "timestepper" per se, but represents the time storage and means of calculating time-derivatives given the underlying discretisation.

Member Typedef Documentation

◆ InitialConditionFctPt

typedef double(* oomph::PeriodicOrbitTimeDiscretisation::InitialConditionFctPt) (const double &t)

Typedef for function that returns the (scalar) initial value at a given value of the continuous time t.

Constructor & Destructor Documentation

◆ PeriodicOrbitTimeDiscretisation() [1/2]

oomph::PeriodicOrbitTimeDiscretisation::PeriodicOrbitTimeDiscretisation ( const unsigned n_tstorage)
inline

Constructor for the case when we allow adaptive timestepping.

63  : TimeStepper(n_tstorage, 1)
64  {
65  Type = "PeriodicOrbitTimeDiscretisation";
66  }
std::string Type
Definition: timesteppers.h:241
TimeStepper()
Broken empty constructor.
Definition: timesteppers.h:301

References oomph::TimeStepper::Type.

◆ PeriodicOrbitTimeDiscretisation() [2/2]

oomph::PeriodicOrbitTimeDiscretisation::PeriodicOrbitTimeDiscretisation ( const PeriodicOrbitTimeDiscretisation )
delete

Broken copy constructor.

Member Function Documentation

◆ assign_initial_data_values()

void oomph::PeriodicOrbitTimeDiscretisation::assign_initial_data_values ( Data *const &  data_pt,
Vector< InitialConditionFctPt initial_value_fct 
)
inline

Initialise the time-history for the Data values, corresponding to given time history, specified by Vector of function pointers.

112  {
113  // The time history stores the previous function values
114  unsigned n_time_value = ntstorage();
115 
116  // Find number of values stored
117  unsigned n_value = data_pt->nvalue();
118 
119  // Loop over current and stored timesteps
120  for (unsigned t = 0; t < n_time_value; t++)
121  {
122  // Get corresponding continous time
123  double time = Time_pt->time(t);
124 
125  // Loop over values
126  for (unsigned j = 0; j < n_value; j++)
127  {
128  data_pt->set_value(t, j, initial_value_fct[j](time));
129  }
130  }
131  }
Time * Time_pt
Pointer to discrete time storage scheme.
Definition: timesteppers.h:234
unsigned ntstorage() const
Definition: timesteppers.h:601
double & time()
Return current value of continous time.
Definition: timesteppers.h:332
double & time()
Return the current value of the continuous time.
Definition: timesteppers.h:123
t
Definition: plotPSD.py:36
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References j, oomph::TimeStepper::ntstorage(), oomph::Data::nvalue(), oomph::Data::set_value(), plotPSD::t, oomph::Time::time(), oomph::TimeStepper::time(), and oomph::TimeStepper::Time_pt.

◆ assign_initial_positions_impulsive()

void oomph::PeriodicOrbitTimeDiscretisation::assign_initial_positions_impulsive ( Node *const &  node_pt)
inlinevirtual

Broken initialisation of the positions for the node corresponding to an impulsive start

Implements oomph::TimeStepper.

95  {
96  throw OomphLibError(
97  "Cannot perform impulsive start for PeriodicOrbitTimeDiscretisation",
100  }
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ assign_initial_values_impulsive()

void oomph::PeriodicOrbitTimeDiscretisation::assign_initial_values_impulsive ( Data *const &  data_pt)
inlinevirtual

Broken initialisation the time-history for the Data values corresponding to an impulsive start.

Implements oomph::TimeStepper.

85  {
86  throw OomphLibError(
87  "Cannot perform impulsive start for PeriodicOrbitTimeDiscretisation",
90  }

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ ndt()

unsigned oomph::PeriodicOrbitTimeDiscretisation::ndt ( ) const
inlinevirtual

Number of timestep increments that need to be stored by the scheme.

Implements oomph::TimeStepper.

162  {
163  return ntstorage();
164  }

References oomph::TimeStepper::ntstorage().

◆ nprev_values()

unsigned oomph::PeriodicOrbitTimeDiscretisation::nprev_values ( ) const
inlinevirtual

Number of previous values available.

Implements oomph::TimeStepper.

156  {
157  return ntstorage();
158  }

References oomph::TimeStepper::ntstorage().

◆ operator=()

void oomph::PeriodicOrbitTimeDiscretisation::operator= ( const PeriodicOrbitTimeDiscretisation )
delete

Broken assignment operator.

◆ order()

unsigned oomph::PeriodicOrbitTimeDiscretisation::order ( ) const
inlinevirtual

Return the actual order of the scheme.

Reimplemented from oomph::TimeStepper.

78  {
79  return 1;
80  }

◆ set_weights()

void oomph::PeriodicOrbitTimeDiscretisation::set_weights ( )
inlinevirtual

Set the weights.

Implements oomph::TimeStepper.

152 {}

◆ shift_time_positions()

void oomph::PeriodicOrbitTimeDiscretisation::shift_time_positions ( Node *const &  node_pt)
inlinevirtual

Broken shifting of time positions.

Implements oomph::TimeStepper.

144  {
145  throw OomphLibError(
146  "Cannot shift time positions for PeriodicOrbitTimeDiscretisation",
149  }

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ shift_time_values()

void oomph::PeriodicOrbitTimeDiscretisation::shift_time_values ( Data *const &  data_pt)
inlinevirtual

Broken shifting of time values.

Implements oomph::TimeStepper.

135  {
136  throw OomphLibError(
137  "Cannot shift time values for PeriodicOrbitTimeDiscretisation",
140  }

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Friends And Related Function Documentation

◆ PeriodicOrbitEquations

friend class PeriodicOrbitEquations
friend

The documentation for this class was generated from the following file: