69 unsigned long Spine_pt_range =
Spine_pt.size();
71 for (
unsigned long i = Spine_pt_range;
i > 0;
i--)
87 if (update_all_solid_nodes)
90 "Doesn't make sense to use an SpineMesh with\n";
92 "SolidElements so specifying update_all_solid_nodes=true\n";
93 error_message +=
"doesn't make sense either\n";
96 error_message, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
101 unsigned long Node_pt_range =
Node_pt.size();
102 for (
unsigned long l = 0; l < Node_pt_range; l++)
107 std::ostringstream error_stream;
108 error_stream <<
"Error: Node " << l <<
"is a "
109 <<
typeid(
Node_pt[l]).name() <<
", not a SpineNode"
112 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
128 unsigned long equation_number = Dof_pt.size();
133 unsigned long Spine_pt_range =
Spine_pt.size();
134 for (
unsigned long i = 0;
i < Spine_pt_range;
i++)
136 Spine_pt[
i]->spine_height_pt()->assign_eqn_numbers(equation_number,
141 return (equation_number);
158 unsigned long Spine_pt_range =
Spine_pt.size();
159 for (
unsigned long i = 0;
i < Spine_pt_range;
i++)
161 std::stringstream conversion;
162 conversion <<
" of Spine Height " <<
i << current_string;
164 Spine_pt[
i]->spine_height_pt()->describe_dofs(out, in);
172 const bool& preserve_existing_data)
177 const unsigned long n_spine = this->
nspine();
178 for (
unsigned long i = 0;
i < n_spine;
i++)
180 this->
Spine_pt[
i]->spine_height_pt()->set_time_stepper(
181 time_stepper_pt, preserve_existing_data);
194 const unsigned long n_spine = this->
nspine();
195 for (
unsigned long i = 0;
i < n_spine;
i++)
208 double*
const& parameter_pt)
211 const unsigned long n_spine = this->
nspine();
212 for (
unsigned long i = 0;
i < n_spine;
i++)
216 ->does_pointer_correspond_to_value(parameter_pt))
239 unsigned long n_spine =
nspine();
241 dump_file << n_spine <<
" # number of spines " << std::endl;
244 for (
unsigned long s = 0;
s < n_spine;
s++)
263 unsigned long n_spine =
nspine();
267 getline(restart_file, input_string,
'#');
269 restart_file.ignore(80,
'\n');
272 unsigned long check_n_spine = atoi(input_string.c_str());
274 if (check_n_spine != n_spine)
276 std::ostringstream error_stream;
277 error_stream <<
"Number of spines in the restart file, " << check_n_spine
279 <<
"does not equal the number of spines in the mesh "
280 << n_spine << std::endl;
283 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
287 for (
unsigned long s = 0;
s < n_spine;
s++)
GeneralisedTimestepper used to store the arclength derivatives and pervious solutions required in con...
void set_consistent_pinned_values(Data *const &data_pt)
Set consistent values of the derivatives and current value when the data is pinned....
void dump(std::ostream &dump_file) const
Dump the data object to a file.
void read(std::ifstream &restart_file)
Read data object from a file.
Vector< Node * > Node_pt
Vector of pointers to nodes.
virtual void read(std::ifstream &restart_file)
Read solution from restart file.
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.
AuxNodeUpdateFctPt Aux_node_update_fct_pt
Pointer to auxiliary update function – this can be used to update any nodal values following the upda...
An OomphLibError object which should be thrown when an run-time error is encountered....
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 read(std::ifstream &restart_file)
Overload the read function so that the spine data is read from the restart file.
void dump(std::ofstream &dump_file) const
Overload the dump function so that the spine data is dumped.
Vector< Spine * > Spine_pt
A Spine mesh contains a Vector of pointers to spines.
bool does_pointer_correspond_to_spine_data(double *const ¶meter_pt)
Check whether the pointer parameter_pt addresses data stored in the spines.
unsigned long nspine() const
Return the number of spines in the mesh.
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_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.
virtual void spine_node_update(SpineNode *spine_node_pt)=0
Update function for given spine node – this must be implemented by all specific SpineMeshes.
Spine *& spine_pt(const unsigned long &i)
Return the i-th spine in the mesh.
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 ~SpineMesh()
Destructor to clean up the memory allocated to the spines.
unsigned long assign_global_spine_eqn_numbers(Vector< double * > &Dof_pt)
Assign spines to Spine_pt vector of element.
Class for nodes that live on spines. The assumption is that each Node lies at a fixed fraction on a s...
SpineMesh * Spine_mesh_pt
Pointer to SpineMesh that this node is a part of. (The mesh implements the node update function(s))
void node_update(const bool &update_all_time_levels_for_new_node=false)
Overload thet node update function, call the update function in the Node's SpineMesh.
Data *& spine_height_pt()
Access function to Data object that stores the spine height.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...