29 #ifndef OOMPH_SPINES_HEADER
30 #define OOMPH_SPINES_HEADER
103 for (
unsigned i = 0;
i < n_geom_data;
i++)
131 for (
unsigned i = 0;
i < n_geom_data;
i++)
183 for (
unsigned i = 1;
i < n_geom_data;
i++)
229 for (
unsigned i = 0;
i < n_geom_object;
i++)
348 const unsigned& n_position_type,
349 const unsigned& initial_nvalue)
350 :
Node(n_dim, n_position_type, initial_nvalue),
360 const unsigned& n_dim,
361 const unsigned& n_position_type,
362 const unsigned& initial_nvalue)
404 void node_update(
const bool& update_all_time_levels_for_new_node =
false);
473 template<
class ELEMENT>
523 #ifdef RANGE_CHECKING
524 const unsigned n_node = this->
nnode();
527 std::ostringstream error_message;
528 error_message <<
"Range Error: Node number " <<
n
529 <<
" is not in the range (0," << n_node - 1 <<
")";
540 std::ostringstream error_stream;
541 error_stream <<
"SpineNode " <<
n
542 <<
" does not have a Spine attached,\n"
543 <<
"so you can't get its local equation number.\n"
544 <<
"Check that the Mesh is correctly associating Spines "
558 template<
class ELEMENT>
573 template<
class ELEMENT>
588 template<
class ELEMENT>
653 std::ostringstream error_message;
654 error_message <<
"Node " <<
n <<
"is a " <<
typeid(
Node_pt[
n]).
name()
655 <<
", not a SpineNode" << std::endl;
677 "Can't execute element_node_pt(...) for non FiniteElements",
683 std::ostringstream error_message;
684 error_message <<
"Node " <<
n <<
"is a "
685 <<
typeid(el_pt->
node_pt(
n)).
name() <<
", not a SpineNode"
722 const bool& preserve_existing_data)
730 const bool& preserve_existing_data);
746 void node_update(
const bool& update_all_solid_nodes =
false);
753 #pragma clang diagnostic push
754 #pragma clang diagnostic ignored "-Woverloaded-virtual"
758 void dump(std::ofstream& dump_file)
const;
761 #pragma clang diagnostic pop
766 void read(std::ifstream& restart_file);
780 template<
class ELEMENT>
785 SpineNode>::complete_setup_of_dependencies();
790 const unsigned n_node = this->nnode();
792 if (Spine_geometric_index)
794 delete[] Spine_geometric_index;
796 Spine_geometric_index =
new unsigned[n_node];
799 for (
unsigned n = 0;
n < n_node;
n++)
802 Spine*
const spine_pt =
803 static_cast<SpineNode*
>(this->node_pt(
n))->spine_pt();
812 const unsigned n_node_update_data = this->ngeom_data();
813 for (
unsigned i = 0;
i < n_node_update_data;
i++)
815 if (this->Geom_data_pt[
i] == spine_height_data_pt)
817 Spine_geometric_index[
n] =
i;
827 Spine_geometric_index[
n] = this->ngeom_data();
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Definition: generalised_timesteppers.h:101
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Definition: nodes.h:238
int geometric_data_local_eqn(const unsigned &n, const unsigned &i)
Definition: element_with_moving_nodes.h:126
unsigned ngeom_data() const
Definition: element_with_moving_nodes.h:345
Definition: element_with_moving_nodes.h:382
FaceGeometry()
Constructor.
Definition: spines.h:579
FaceGeometry()
Constructor.
Definition: spines.h:564
FaceGeometry()
Constructor.
Definition: spines.h:594
Definition: elements.h:4998
Definition: elements.h:1313
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
Definition: geom_objects.h:101
Vector< Node * > Node_pt
Vector of pointers to nodes.
Definition: mesh.h:183
Vector< GeneralisedElement * > Element_pt
Vector of pointers to generalised elements.
Definition: mesh.h:186
Definition: oomph_definitions.h:222
unsigned * Spine_geometric_index
Definition: spines.h:481
~SpineElement()
Destructor, clean up the storage allocated to the local equation numbers.
Definition: spines.h:511
void complete_setup_of_dependencies()
Construct and fill the node_update_data vector.
Definition: spines.h:781
int spine_local_eqn(const unsigned &n)
Definition: spines.h:521
SpineElement(FiniteElement *const &element_pt, const int &face_index)
Constructor used for spine face elements.
Definition: spines.h:502
SpineElement()
Constructor, call the constructor of the base element.
Definition: spines.h:494
SpineFiniteElement()
Empty constructor.
Definition: spines.h:459
virtual ~SpineFiniteElement()
Emtpty virtual destructor.
Definition: spines.h:462
const Spine * spine_pt(const unsigned long &i) const
Return the i-th spine in the mesh (const version)
Definition: spines.h:629
void add_spine_pt(Spine *const &spine_pt)
Add a spine to the mesh.
Definition: spines.h:641
void dump(std::ofstream &dump_file) const
Overload the dump function so that the spine data is dumped.
Definition: spines.cc:229
Vector< Spine * > Spine_pt
A Spine mesh contains a Vector of pointers to spines.
Definition: spines.h:616
SpineNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global SpineNode.
Definition: spines.h:648
void describe_spine_dofs(std::ostream &out, const std::string ¤t_string) const
Definition: spines.cc:154
unsigned long nspine() const
Return the number of spines in the mesh.
Definition: spines.h:635
unsigned long assign_global_spine_eqn_numbers(Vector< double * > &Dof_pt)
Assign spines to Spine_pt vector of element.
Definition: spines.cc:124
bool does_pointer_correspond_to_spine_data(double *const ¶meter_pt)
Definition: spines.cc:207
virtual void spine_node_update(SpineNode *spine_node_pt)=0
Spine *& spine_pt(const unsigned long &i)
Return the i-th spine in the mesh.
Definition: spines.h:623
void node_update(const bool &update_all_solid_nodes=false)
Definition: spines.cc:84
void read(std::ifstream &restart_file)
Overload the read function so that the spine data is also read.
Definition: spines.cc:253
void set_spine_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Assign time stepper to spines data.
Definition: spines.cc:171
void set_mesh_level_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Definition: spines.h:721
virtual ~SpineMesh()
Destructor to clean up the memory allocated to the spines.
Definition: spines.cc:66
SpineNode * element_node_pt(const unsigned long &e, const unsigned &n)
Definition: spines.h:669
void set_consistent_pinned_spine_values_for_continuation(ContinuationStorageScheme *const &continuation_stepper_pt)
Definition: spines.cc:189
Data ** all_geom_data_pt()
Return the vector of all geometric data.
Definition: spines.h:433
SpineNode(TimeStepper *const &time_stepper_pt, const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_nvalue)
Unsteady Constructor, initialise pointers to zero.
Definition: spines.h:359
GeomObject ** all_geom_object_pt()
Return the vector of all geometric objects.
Definition: spines.h:439
unsigned ngeom_data() const
Return the number of geometric data, zero if no spine.
Definition: spines.h:407
double & h()
Access function to spine height.
Definition: spines.h:397
SpineMesh *& spine_mesh_pt()
Definition: spines.h:391
SpineMesh * Spine_mesh_pt
Definition: spines.h:338
double Fraction
Private double that represents the fixed fraction along the spine.
Definition: spines.h:334
Spine * Spine_pt
Private internal data pointer to a spine.
Definition: spines.h:331
unsigned Node_update_fct_id
Definition: spines.h:342
Spine *& spine_pt()
Access function to spine.
Definition: spines.h:372
unsigned & node_update_fct_id()
Access function to ID of node update function (within specific mesh)
Definition: spines.h:384
double & fraction()
Set reference to fraction along spine.
Definition: spines.h:378
SpineNode(const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_nvalue)
Steady Constructor, initialise pointers to zero.
Definition: spines.h:347
unsigned ngeom_object() const
Return the number of geometric objects, zero if no spine.
Definition: spines.h:420
void node_update(const bool &update_all_time_levels_for_new_node=false)
Update function, call the update function in the Node's SpineMesh.
Definition: spines.cc:44
~Spine()
Definition: spines.h:142
Spine(const double &height, const Vector< Data * > &geom_data_pt, const Vector< GeomObject * > &geom_object_pt)
Definition: spines.h:115
Data * spine_height_pt() const
Definition: spines.h:163
GeomObject * geom_object_pt(const unsigned &i) const
Definition: spines.h:251
void set_geom_data_pt(const Vector< Data * > &geom_data_pt)
Definition: spines.h:179
void add_geom_data_pt(Data *geom_data_pt)
Definition: spines.h:191
unsigned ngeom_object()
Definition: spines.h:218
Vector< Data * > Geom_data_pt
Data that stores the spine height.
Definition: spines.h:305
void set_geom_object_pt(const Vector< GeomObject * > &geom_object_pt)
Definition: spines.h:225
void add_geom_parameter(const double &geom_parameter)
Definition: spines.h:280
GeomObject *& geom_object_pt(const unsigned &i)
Definition: spines.h:244
unsigned ngeom_data()
Definition: spines.h:171
void set_geom_parameter(const Vector< double > &geom_parameter)
Definition: spines.h:273
double & height()
Access function to spine height.
Definition: spines.h:150
Spine(const double &height)
Definition: spines.h:77
unsigned ngeom_parameter()
Definition: spines.h:265
Data * geom_data_pt(const unsigned &i) const
Definition: spines.h:205
double & geom_parameter(const unsigned &i)
Definition: spines.h:287
Vector< Data * > & vector_geom_data_pt()
Return the vector of geometric data.
Definition: spines.h:211
Spine()
Definition: spines.h:68
Vector< double > Geom_parameter
Vector that stores doubles that are used in the geometric updates.
Definition: spines.h:312
Vector< GeomObject * > Geom_object_pt
Definition: spines.h:309
Data *& geom_data_pt(const unsigned &i)
Definition: spines.h:198
Data *& spine_height_pt()
Access function to Data object that stores the spine height.
Definition: spines.h:156
Vector< GeomObject * > & vector_geom_object_pt()
Definition: spines.h:258
const double & geom_parameter(const unsigned &i) const
Definition: spines.h:294
void add_geom_object_pt(GeomObject *geom_object_pt)
Definition: spines.h:237
Spine(const double &height, const Vector< Data * > &geom_data_pt)
Definition: spines.h:90
Definition: timesteppers.h:231
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
string name
Definition: plotDoE.py:33
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ofstream out("Result.txt")