Public Member Functions | Private Attributes | List of all members
oomph::ContinuationStorageScheme Class Reference

GeneralisedTimestepper used to store the arclength derivatives and pervious solutions required in continuation problems. The data is stored as auxilliary data in the (fake) TimeStepper so that spatial adaptivity will be handled automatically through our standard mechanisms. The adopted storage scheme is that the continuation derivatives will be stored at the first auxilliary value and the previous value will be the second auixilliary value. More...

#include <generalised_timesteppers.h>

+ Inheritance diagram for oomph::ContinuationStorageScheme:

Public Member Functions

 ContinuationStorageScheme ()
 Constructor for the case when we allow adaptive continuation It can evaulate up to second derivatives, but doesn't do anything the time-derivatives evaluate to zero. More...
 
 ContinuationStorageScheme (const ContinuationStorageScheme &)=delete
 Broken copy constructor. More...
 
void modify_storage (GeneralisedTimeStepper *const &time_stepper_pt)
 Modify the scheme based on the underlying timestepper. More...
 
void operator= (const ContinuationStorageScheme &)=delete
 Broken assignment operator. More...
 
unsigned order () const
 Return the actual order of the scheme. It's a steady scheme so it's zero, but that doesn't really make sense. More...
 
void undo_make_steady ()
 This is a steady scheme, so you can't do this. More...
 
void assign_initial_values_impulsive (Data *const &data_pt)
 Broken initialisation the time-history for the Data values corresponding to an impulsive start. More...
 
void assign_initial_positions_impulsive (Node *const &node_pt)
 Broken initialisation of the positions for the node corresponding to an impulsive start. More...
 
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 (Do nothing) 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_consistent_pinned_values (Data *const &data_pt)
 Set consistent values of the derivatives and current value when the data is pinned. This must be done by the "timestepper" because only it knows the local storage scheme. More...
 
void set_consistent_pinned_positions (Node *const &node_pt)
 Set consistent values of the derivatives and current value when the Nodes position is pinned. This must be done by the "timestepper" because only it knows the local storage scheme. More...
 
unsigned dof_derivative_offset ()
 
unsigned dof_current_offset ()
 
- Public Member Functions inherited from oomph::GeneralisedTimeStepper
unsigned ndof_storage_entries () const
 Return the number of entries that correspond to dof storage. More...
 
- Public Member Functions inherited from oomph::TimeStepper
 TimeStepper (const unsigned &tstorage, const unsigned &max_deriv)
 Constructor. Pass the amount of storage required by timestepper (present value + history values) and the order of highest time-derivative. More...
 
 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
 Number of previous values needed to calculate the value at the current time. i.e. how many previous values must we loop over to calculate the values at the evaluation time. For most methods this is 1, i.e. just use the value at t_{n+1}. See midpoint method for a counter-example. More...
 
void make_steady ()
 Function to make the time stepper temporarily steady. This is trivially achieved by setting all the weights to zero. More...
 
bool is_steady () const
 Flag to indicate if a timestepper has been made steady (possibly temporarily to switch off time-dependence) More...
 
bool predict_by_explicit_step () const
 Flag: is adaptivity done by taking a separate step using an ExplicitTimeStepper object? More...
 
ExplicitTimeStepperexplicit_predictor_pt ()
 Get the pointer to the explicit timestepper to use as a predictor in adaptivity if Predict_by_explicit_step is set. More...
 
void set_predictor_pt (ExplicitTimeStepper *_pred_pt)
 Set the pointer to the explicit timestepper to use as a predictor in adaptivity if Predict_by_explicit_step is set. More...
 
void update_predicted_time (const double &new_time)
 Set the time that the current predictions apply for, only needed for paranoid checks when doing Predict_by_explicit_step. More...
 
void check_predicted_values_up_to_date () const
 Check that the predicted values are the ones we want. More...
 
unsigned predictor_storage_index () const
 Return the time-index in each Data where predicted values are stored if the timestepper is adaptive. More...
 
void enable_warning_in_assign_initial_data_values ()
 Enable the output of warnings due to possible fct pointer vector size mismatch in assign_initial_data_values (Default) More...
 
void disable_warning_in_assign_initial_data_values ()
 Disable the output of warnings due to possible fct pointer vector size mismatch in assign_initial_data_values. More...
 
const DenseMatrix< double > * weights_pt () const
 Get a (const) pointer to the weights. More...
 
std::string type () const
 Return string that indicates the type of the timestepper (e.g. "BDF", "Newmark", etc.) More...
 
void time_derivative (const unsigned &i, Data *const &data_pt, Vector< double > &deriv)
 Evaluate i-th derivative of all values in Data and return in Vector deriv[]. More...
 
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)
 Evaluate i-th derivative of all values in Node and return in Vector deriv[] (this can't be simply combined with time_derivative(.., Data, ...) because of differences with haning nodes). More...
 
double time_derivative (const unsigned &i, Node *const &node_pt, const unsigned &j)
 Evaluate i-th derivative of j-th value in Node. Note the use of the node's value() function so that hanging nodes are taken into account (this is why the functions for Data and Node cannot be combined through simple polymorphism: value is not virtual). More...
 
Time *const & time_pt () const
 Access function for the pointer to time (const version) More...
 
Time *& time_pt ()
 Access function for the pointer to time (can't have a paranoid test for null pointers because this is used as a set function). More...
 
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
 Return the number of doubles required to represent history (one for steady) More...
 
bool adaptive_flag () const
 Function to indicate whether the scheme is adaptive (false by default) More...
 
virtual void set_predictor_weights ()
 Set the weights for the predictor previous timestep (currently empty – overwrite for specific scheme) More...
 
virtual void calculate_predicted_values (Data *const &data_pt)
 Do the predictor step for data stored in a Data object (currently empty – overwrite for specific scheme) More...
 
virtual void calculate_predicted_positions (Node *const &node_pt)
 Do the predictor step for the positions at a node (currently empty — overwrite for a specific scheme) More...
 
virtual void set_error_weights ()
 Set the weights for the error computation, (currently empty – overwrite for specific scheme) More...
 
virtual double temporal_error_in_position (Node *const &node_pt, const unsigned &i)
 Compute the error in the position i at a node zero here – overwrite for specific scheme. More...
 
virtual double temporal_error_in_value (Data *const &data_pt, const unsigned &i)
 Compute the error in the value i in a Data structure zero here – overwrite for specific scheme. More...
 
virtual void actions_before_timestep (Problem *problem_pt)
 Interface for any actions that need to be performed before a time step. More...
 
virtual void actions_after_timestep (Problem *problem_pt)
 Interface for any actions that need to be performed after a time step. More...
 

Private Attributes

unsigned Dof_derivative_offset
 
unsigned Dof_current_offset
 

Additional Inherited Members

- Protected Member Functions inherited from oomph::GeneralisedTimeStepper
 GeneralisedTimeStepper (const unsigned &n_tstorage, const unsigned &max_deriv, const unsigned &ndof_storage_entries=1)
 Constructor that can only be called by derived objects. Pass the information directly through to the TimeStepper object. More...
 
 GeneralisedTimeStepper ()
 Broken empty constructor. More...
 
 GeneralisedTimeStepper (const GeneralisedTimeStepper &)=delete
 Broken copy constructor. More...
 
void operator= (const GeneralisedTimeStepper &)=delete
 Broken assignment operator. More...
 
- Protected Attributes inherited from oomph::GeneralisedTimeStepper
unsigned Ndof_storage_entries
 
- Protected Attributes inherited from oomph::TimeStepper
TimeTime_pt
 Pointer to discrete time storage scheme. More...
 
DenseMatrix< double > Weight
 Storage for the weights associated with the timestepper. More...
 
std::string Type
 String that indicates the type of the timestepper (e.g. "BDF", "Newmark", etc.) More...
 
bool Adaptive_Flag
 Boolean variable to indicate whether the timestepping scheme can be adaptive. More...
 
bool Is_steady
 Bool to indicate if the timestepper is steady, i.e. its time-derivatives evaluate to zero. This status may be achieved temporarily by calling make_steady(). It can be reset to the appropriate default by the function undo_make_steady(). More...
 
bool Shut_up_in_assign_initial_data_values
 Boolean to indicate if the timestepper will output warnings when setting possibly an incorrect number of initial data values from function pointers. More...
 
bool Predict_by_explicit_step
 Flag: is adaptivity done by taking a separate step using an ExplicitTimeStepper object? More...
 
ExplicitTimeStepperExplicit_predictor_pt
 Pointer to explicit time stepper to use as predictor if Predict_by_explicit_step is set. ??ds merge the two? predict by explicit if pointer is set? More...
 
double Predicted_time
 Store the time that the predicted values currently stored are at, to compare for paranoid checks. More...
 
int Predictor_storage_index
 The time-index in each Data object where predicted values are stored. -1 if not set. More...
 

Detailed Description

GeneralisedTimestepper used to store the arclength derivatives and pervious solutions required in continuation problems. The data is stored as auxilliary data in the (fake) TimeStepper so that spatial adaptivity will be handled automatically through our standard mechanisms. The adopted storage scheme is that the continuation derivatives will be stored at the first auxilliary value and the previous value will be the second auixilliary value.

Definition at line 100 of file generalised_timesteppers.h.

Constructor & Destructor Documentation

◆ ContinuationStorageScheme() [1/2]

oomph::ContinuationStorageScheme::ContinuationStorageScheme ( )
inline

Constructor for the case when we allow adaptive continuation It can evaulate up to second derivatives, but doesn't do anything the time-derivatives evaluate to zero.

Definition at line 112 of file generalised_timesteppers.h.

References oomph::TimeStepper::Is_steady, and oomph::TimeStepper::Type.

◆ ContinuationStorageScheme() [2/2]

oomph::ContinuationStorageScheme::ContinuationStorageScheme ( const ContinuationStorageScheme )
delete

Broken copy constructor.

Member Function Documentation

◆ assign_initial_positions_impulsive()

void oomph::ContinuationStorageScheme::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.

Definition at line 177 of file generalised_timesteppers.h.

◆ assign_initial_values_impulsive()

void oomph::ContinuationStorageScheme::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.

Definition at line 167 of file generalised_timesteppers.h.

◆ dof_current_offset()

unsigned oomph::ContinuationStorageScheme::dof_current_offset ( )
inline

Definition at line 322 of file generalised_timesteppers.h.

References Dof_current_offset.

◆ dof_derivative_offset()

unsigned oomph::ContinuationStorageScheme::dof_derivative_offset ( )
inline

Definition at line 316 of file generalised_timesteppers.h.

References Dof_derivative_offset.

◆ modify_storage()

void oomph::ContinuationStorageScheme::modify_storage ( GeneralisedTimeStepper *const &  time_stepper_pt)
inline

◆ ndt()

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

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

Implements oomph::TimeStepper.

Definition at line 213 of file generalised_timesteppers.h.

◆ nprev_values()

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

Number of previous values available.

Implements oomph::TimeStepper.

Definition at line 207 of file generalised_timesteppers.h.

◆ operator=()

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

Broken assignment operator.

◆ order()

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

Return the actual order of the scheme. It's a steady scheme so it's zero, but that doesn't really make sense.

Reimplemented from oomph::TimeStepper.

Definition at line 154 of file generalised_timesteppers.h.

◆ set_consistent_pinned_positions()

void oomph::ContinuationStorageScheme::set_consistent_pinned_positions ( Node *const &  node_pt)
inline

Set consistent values of the derivatives and current value when the Nodes position is pinned. This must be done by the "timestepper" because only it knows the local storage scheme.

Definition at line 261 of file generalised_timesteppers.h.

References Dof_current_offset, Dof_derivative_offset, i, oomph::GeneralisedTimeStepper::Ndof_storage_entries, oomph::Node::position_time_stepper_pt(), and t.

Referenced by oomph::Mesh::set_consistent_pinned_values_for_continuation().

◆ set_consistent_pinned_values()

void oomph::ContinuationStorageScheme::set_consistent_pinned_values ( Data *const &  data_pt)
inline

◆ set_weights()

void oomph::ContinuationStorageScheme::set_weights ( )
inlinevirtual

Set the weights (Do nothing)

Implements oomph::TimeStepper.

Definition at line 204 of file generalised_timesteppers.h.

◆ shift_time_positions()

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

Broken shifting of time positions.

Implements oomph::TimeStepper.

Definition at line 195 of file generalised_timesteppers.h.

◆ shift_time_values()

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

Broken shifting of time values.

Implements oomph::TimeStepper.

Definition at line 186 of file generalised_timesteppers.h.

◆ undo_make_steady()

void oomph::ContinuationStorageScheme::undo_make_steady ( )
inlinevirtual

This is a steady scheme, so you can't do this.

Reimplemented from oomph::TimeStepper.

Definition at line 160 of file generalised_timesteppers.h.

References oomph::TimeStepper::Is_steady.

Member Data Documentation

◆ Dof_current_offset

unsigned oomph::ContinuationStorageScheme::Dof_current_offset
private

◆ Dof_derivative_offset

unsigned oomph::ContinuationStorageScheme::Dof_derivative_offset
private

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