30 #ifndef OOMPH_GENERALISED_TIMESTEPPERS_HEADER 31 #define OOMPH_GENERALISED_TIMESTEPPERS_HEADER 37 #include <oomph-lib-config.h> 69 const unsigned &max_deriv,
124 Dof_derivative_offset(1), Dof_current_offset(2)
126 Type=
"ContinuationStorageScheme";
143 unsigned n_tstorage = time_stepper_pt->
ntstorage();
147 Dof_derivative_offset = n_tstorage;
152 unsigned n_new_tstorage = 2*this->Ndof_storage_entries + n_tstorage;
179 "Cannot perform impulsive start for ContinuationStorageScheme",
180 OOMPH_CURRENT_FUNCTION,
181 OOMPH_EXCEPTION_LOCATION);
189 "Cannot perform impulsive start for ContinuationStorageScheme",
190 OOMPH_CURRENT_FUNCTION,
191 OOMPH_EXCEPTION_LOCATION);
198 "Cannot shift time values forContinuationStorageScheme",
199 OOMPH_CURRENT_FUNCTION,
200 OOMPH_EXCEPTION_LOCATION);
207 "Cannot shift time positions forContinuationStorageScheme",
208 OOMPH_CURRENT_FUNCTION,
209 OOMPH_EXCEPTION_LOCATION);
219 unsigned ndt()
const {
return 0;}
231 std::ostringstream error_stream;
232 error_stream <<
"Data object " << data_pt <<
" has timestepper of type " 235 <<
"Please set the data's timestepper to be a " 236 <<
"ContinuationStorageScheme before calling this function\n";
238 OOMPH_CURRENT_FUNCTION,
239 OOMPH_EXCEPTION_LOCATION);
244 const unsigned n_value = data_pt->
nvalue();
245 for(
unsigned i=0;
i<n_value;++
i)
269 if(
SolidNode*
const solid_node_pt = dynamic_cast<SolidNode*>(node_pt))
276 std::ostringstream error_stream;
277 error_stream <<
"Node object " << node_pt
278 <<
" has position timestepper of type " 281 <<
"Please set the Node's position timestepper to be a " 282 <<
"ContinuationStorageScheme before calling this function\n";
284 OOMPH_CURRENT_FUNCTION,
285 OOMPH_EXCEPTION_LOCATION);
290 const unsigned n_dim = solid_node_pt->ndim();
292 const unsigned n_position_type = solid_node_pt->nposition_type();
295 for(
unsigned i=0;
i<n_dim;
i++)
298 if(solid_node_pt->position_is_a_copy(
i) ==
false)
301 for(
unsigned k=0;k<n_position_type;k++)
304 if(solid_node_pt->position_is_pinned(k,
i))
309 solid_node_pt->x_gen(Dof_derivative_offset+
t,k,
i) = 0.0;
311 solid_node_pt->x_gen(Dof_current_offset+
t,k,
i) =
312 solid_node_pt->x_gen(
t,k,
i);
Generalised timestepper that can serve a variety of purposes in continuation, bifurcation detection a...
unsigned nprev_values() const
Number of previous values available.
double value(const unsigned &i) const
Return i-th stored value. This function is not virtual so that it can be inlined. This means that if ...
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
unsigned ndof_storage_entries() const
Return the number of entries that correspond to dof storage.
unsigned Dof_current_offset
std::string Type
String that indicates the type of the timestepper (e.g. "BDF", "Newmark", etc.)
void undo_make_steady()
This is a steady scheme, so you can't do this.
unsigned ndt() const
Number of timestep increments that need to be stored by the scheme.
void modify_storage(GeneralisedTimeStepper *const &time_stepper_pt)
Modify the scheme based on the underlying timestepper.
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
ContinuationStorageScheme()
void shift_time_values(Data *const &data_pt)
Broken shifting of time values.
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
void set_weights()
Set the weights (Do nothing)
bool Is_steady
Bool to indicate if the timestepper is steady, i.e. its time-derivatives evaluate to zero...
unsigned dof_derivative_offset()
unsigned Dof_derivative_offset
void set_consistent_pinned_positions(Node *const &node_pt)
Set consistent values of the derivatives and current value when the Nodes position is pinned...
DenseMatrix< double > Weight
Storage for the weights associated with the timestepper.
ContinuationStorageScheme(const ContinuationStorageScheme &)
Broken copy constructor.
void shift_time_positions(Node *const &node_pt)
Broken shifting of time positions.
void assign_initial_values_impulsive(Data *const &data_pt)
Broken initialisation the time-history for the Data values corresponding to an impulsive start...
void operator=(const ContinuationStorageScheme &)
Broken assignment operator.
unsigned dof_current_offset()
void set_value(const unsigned &i, const double &value_)
Set the i-th stored data value to specified value. The only reason that we require an explicit set fu...
A class that represents a collection of data; each Data object may contain many different individual ...
void assign_initial_positions_impulsive(Node *const &node_pt)
Broken initialisation of the positions for the node corresponding to an impulsive start...
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
GeneralisedTimestepper used to store the arclength derivatives and pervious solutions required in con...
A Class for nodes that deform elastically (i.e. position is an unknown in the problem). The idea is that the Eulerian positions are stored in a Data object and the Lagrangian coordinates are stored in addition. The pointer that addresses the Eulerian positions is set to the pointer to Value in the Data object. Hence, SolidNode uses knowledge of the internal structure of Data and must be a friend of the Data class. In order to allow a mesh to deform via an elastic-style equation in deforming-domain problems, the positions are stored separately from the values, so that elastic problems may be combined with any other type of problem.
GeneralisedTimeStepper(const GeneralisedTimeStepper &)
Broken copy constructor.
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
unsigned Ndof_storage_entries
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
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.
bool is_pinned(const unsigned &i) const
Test whether the i-th variable is pinned (1: true; 0: false).
void operator=(const GeneralisedTimeStepper &)
Broken assignment operator.
GeneralisedTimeStepper()
Broken empty constructor.
virtual bool is_a_copy() const
Return a boolean to indicate whether the Data objact contains any copied values. A base Data object c...
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
GeneralisedTimeStepper(const unsigned &n_tstorage, const unsigned &max_deriv, const unsigned &ndof_storage_entries=1)
void resize(const unsigned long &n)