78 unsigned long Spine_pt_range =
Spine_pt.size();
80 for(
unsigned long i=Spine_pt_range;
i>0;
i--)
95 if (update_all_solid_nodes)
98 "Doesn't make sense to use an SpineMesh with\n";
100 "SolidElements so specifying update_all_solid_nodes=true\n";
101 error_message +=
"doesn't make sense either\n";
104 OOMPH_CURRENT_FUNCTION,
105 OOMPH_EXCEPTION_LOCATION);
110 unsigned long Node_pt_range = Node_pt.size();
111 for(
unsigned long l=0;l<Node_pt_range;l++)
114 if(!dynamic_cast<SpineNode*>(Node_pt[l]))
116 std::ostringstream error_stream;
118 <<
"Error: Node " << l <<
"is a " <<
typeid(Node_pt[l]).name()
119 <<
", not a SpineNode" << std::endl;
121 OOMPH_CURRENT_FUNCTION,
122 OOMPH_EXCEPTION_LOCATION);
138 unsigned long equation_number = Dof_pt.size();
143 unsigned long Spine_pt_range =
Spine_pt.size();
144 for(
unsigned long i=0;
i<Spine_pt_range;
i++)
150 return(equation_number);
167 unsigned long Spine_pt_range =
Spine_pt.size();
168 for(
unsigned long i=0;
i<Spine_pt_range;
i++)
170 std::stringstream conversion;
171 conversion <<
" of Spine Height "<<
i<<current_string;
181 const bool &preserve_existing_data)
186 const unsigned long n_spine = this->nspine();
187 for(
unsigned long i=0;
i<n_spine;
i++)
190 preserve_existing_data);
203 const unsigned long n_spine = this->nspine();
204 for(
unsigned long i=0;
i<n_spine;
i++)
217 double*
const ¶meter_pt)
220 const unsigned long n_spine = this->nspine();
221 for(
unsigned long i=0;
i<n_spine;
i++)
245 unsigned long n_spine = nspine();
247 dump_file << n_spine <<
" # number of spines " << std::endl;
250 for(
unsigned long s=0;
s<n_spine;
s++)
269 unsigned long n_spine = nspine();
273 getline(restart_file,input_string,
'#');
275 restart_file.ignore(80,
'\n');
278 unsigned long check_n_spine = atoi(input_string.c_str());
280 if(check_n_spine != n_spine)
282 std::ostringstream error_stream;
284 <<
"Number of spines in the restart file, " << check_n_spine
285 << std::endl <<
"does not equal the number of spines in the mesh " 286 << n_spine << std::endl;
289 OOMPH_CURRENT_FUNCTION,
290 OOMPH_EXCEPTION_LOCATION);
294 for(
unsigned long s=0;
s<n_spine;
s++)
virtual ~SpineMesh()
Destructor to clean up the memory allocated to the spines.
bool does_pointer_correspond_to_value(double *const ¶meter_pt)
Check whether the pointer parameter_pt addresses internal data values.
unsigned long assign_global_spine_eqn_numbers(Vector< double *> &Dof_pt)
Assign spines to Spine_pt vector of element.
void node_update(const bool &update_all_solid_nodes=false)
Update function to update all nodes of mesh [Doesn't make sense to use this mesh with SolidElements a...
virtual void dump(std::ofstream &dump_file, const bool &use_old_ordering=true) const
Dump the data in the mesh into a file for restart.
virtual void describe_dofs(std::ostream &out, const std::string ¤t_string) const
Function to describe the dofs of the Node. The ostream specifies the output stream to which the descr...
AuxNodeUpdateFctPt Aux_node_update_fct_pt
Pointer to auxiliary update function – this can be used to update any nodal values following the upd...
void set_consistent_pinned_spine_values_for_continuation(ContinuationStorageScheme *const &continuation_stepper_pt)
Set any pinned spine "history" values to be consistent for continuation problems. ...
void node_update(const bool &update_all_time_levels_for_new_node=false)
Update function, call the update function in the Node's SpineMesh.
void describe_spine_dofs(std::ostream &out, const std::string ¤t_string) const
Function to describe the dofs of the Spine. The ostream specifies the output stream to which the desc...
void set_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Set a new timestepper by resizing the appropriate storage. If already assigned the equation numbering...
void read(std::ifstream &restart_file)
Read data object from a file.
virtual void assign_eqn_numbers(unsigned long &global_ndof, Vector< double *> &dof_pt)
Assign global equation numbers; increment global number of unknowns, global_ndof; and add any new dof...
void dump(std::ostream &dump_file) const
Dump the data object to a file.
virtual void spine_node_update(SpineNode *spine_node_pt)=0
Update function for given spine node – this must be implemented by all specific SpineMeshes.
GeneralisedTimestepper used to store the arclength derivatives and pervious solutions required in con...
Spine * Spine_pt
Private internal data pointer to a spine.
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.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
void set_spine_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Set the time stepper forthe spine data that is stored in the mesh.
void dump(std::ofstream &dump_file) const
Overload the dump function so that the spine data is dumped.
SpineMesh * Spine_mesh_pt
Pointer to SpineMesh that this node is a part of. (The mesh implements the node update function(s)) ...
Data *& spine_height_pt()
Access function to Data object that stores the spine height.
Spine *& spine_pt()
Access function to spine.
bool does_pointer_correspond_to_spine_data(double *const ¶meter_pt)
Check whether the pointer parameter_pt addresses data stored in the spines.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
virtual void read(std::ifstream &restart_file)
Read solution from restart file.
void read(std::ifstream &restart_file)
Overload the read function so that the spine data is read from the restart file.