29#ifndef OOMPH_SPINES_HEADER
30#define OOMPH_SPINES_HEADER
360 const unsigned&
n_dim,
473 template<
class ELEMENT>
527 std::ostringstream error_message;
528 error_message <<
"Range Error: Node number " <<
n
529 <<
" is not in the range (0," <<
n_node - 1 <<
")";
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 "
753#pragma clang diagnostic push
754#pragma clang diagnostic ignored "-Woverloaded-virtual"
761#pragma clang diagnostic pop
780 template<
class ELEMENT>
792 if (Spine_geometric_index)
794 delete[] Spine_geometric_index;
796 Spine_geometric_index =
new unsigned[
n_node];
802 Spine*
const spine_pt =
817 Spine_geometric_index[
n] =
i;
GeneralisedTimestepper used to store the arclength derivatives and pervious solutions required in con...
A class that represents a collection of data; each Data object may contain many different individual ...
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
int geometric_data_local_eqn(const unsigned &n, const unsigned &i)
Return the local equation number corresponding to the i-th value at the n-th geometric data object.
unsigned ngeom_data() const
Return the number of geometric data upon which the shape of the element depends.
Specific implementation of the class for specified element and node type.
FaceGeometry()
Constructor.
FaceGeometry()
Constructor.
FaceGeometry()
Constructor.
FaceGeometry class definition: This policy class is used to allow construction of face elements that ...
A general Finite Element class.
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
unsigned nnode() const
Return the number of nodes.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
unsigned ngeom_data() const
A standard FiniteElement is fixed, so there are no geometric data when viewed in its GeomObject incar...
virtual void complete_setup_of_dependencies()
Complete the setup of any additional dependencies that the element may have. Empty virtual function t...
A geometric object is an object that provides a parametrised description of its shape via the functio...
Vector< Node * > Node_pt
Vector of pointers to nodes.
Vector< GeneralisedElement * > Element_pt
Vector of pointers to generalised elements.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
An OomphLibError object which should be thrown when an run-time error is encountered....
The SpineElement<ELEMENT> class takes an existing element as a template parameter and adds the necess...
unsigned * Spine_geometric_index
Array to hold the index of the geometric data associated with the spine height of the spine that affe...
~SpineElement()
Destructor, clean up the storage allocated to the local equation numbers.
void complete_setup_of_dependencies()
Complete the setup of additional dependencies. Overloads empty virtual function in GeneralisedElement...
int spine_local_eqn(const unsigned &n)
Return the local equation number corresponding to the height of the spine at the n-th node.
SpineElement(FiniteElement *const &element_pt, const int &face_index)
Constructor used for spine face elements.
SpineElement()
Constructor, call the constructor of the base element.
A policy class that serves only to establish the interface for assigning the spine equation numbers.
SpineFiniteElement()
Empty constructor.
virtual ~SpineFiniteElement()
Emtpty virtual destructor.
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.
const Spine * spine_pt(const unsigned long &i) const
Return the i-th spine in the mesh (const version)
void dump(std::ofstream &dump_file) const
Overload the dump function so that the spine data is dumped.
void add_spine_pt(Spine *const &spine_pt)
Add a spine to the mesh.
Vector< Spine * > Spine_pt
A Spine mesh contains a Vector of pointers to spines.
Spine *& spine_pt(const unsigned long &i)
Return the i-th spine in the mesh.
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.
SpineNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global SpineNode.
virtual void spine_node_update(SpineNode *spine_node_pt)=0
Update function for given spine node – this must be implemented by all specific SpineMeshes.
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.
void set_mesh_level_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Overload the mesh_level timestepper function to set the timestepper data for the spines.
unsigned long assign_global_spine_eqn_numbers(Vector< double * > &Dof_pt)
Assign spines to Spine_pt vector of element.
SpineNode * element_node_pt(const unsigned long &e, const unsigned &n)
Return the n-th local SpineNode in element e. This is required to cast the nodes in a spine mesh to b...
Class for nodes that live on spines. The assumption is that each Node lies at a fixed fraction on a s...
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.
double & fraction()
Set reference to fraction along spine.
unsigned ngeom_data() const
Return the number of geometric data, zero if no spine.
double & h()
Access function to spine height.
SpineMesh * Spine_mesh_pt
Pointer to SpineMesh that this node is a part of. (The mesh implements the node update function(s))
double Fraction
Private double that represents the fixed fraction along the spine.
SpineMesh *& spine_mesh_pt()
Access function to Pointer to SpineMesh that this node is a part of and which implements the node upd...
Spine * Spine_pt
Private internal data pointer to a spine.
unsigned Node_update_fct_id
ID of node update function (within specific mesh – useful if there are multiple node update functions...
Spine *& spine_pt()
Access function to spine.
unsigned & node_update_fct_id()
Access function to ID of node update function (within specific mesh)
Data ** all_geom_data_pt()
Return the vector of all geometric data.
GeomObject ** all_geom_object_pt()
Return the vector of all geometric objects.
SpineNode(const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_nvalue)
Steady Constructor, initialise pointers to zero.
unsigned ngeom_object() const
Return the number of geometric objects, zero if no spine.
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.
Spines are used for algebraic node update operations in free-surface fluid problems: They form the ba...
Vector< Data * > & vector_geom_data_pt()
Return the vector of geometric data.
~Spine()
Destructor: Wipe Data object that stores the Spine height. All other objects (geometric Data and geom...
Spine(const double &height, const Vector< Data * > &geom_data_pt, const Vector< GeomObject * > &geom_object_pt)
Constructor: Create the Spine and initialise its height to the specified value. Store the vector of (...
const double & geom_parameter(const unsigned &i) const
Return i-th geometric parameter that is involved in the node update operations for this Spine....
void set_geom_data_pt(const Vector< Data * > &geom_data_pt)
Set vector of (pointers to) geometric Data that is involved in the node update operations for this Sp...
Data * geom_data_pt(const unsigned &i) const
Return i-th geometric Data that is involved in the node update operations for this Spine....
Data *& spine_height_pt()
Access function to Data object that stores the spine height.
void add_geom_data_pt(Data *geom_data_pt)
Add (pointer to) geometric Data that is involved in the node update operations for this Spine.
Data *& geom_data_pt(const unsigned &i)
Return i-th geometric Data that is involved in the node update operations for this Spine.
unsigned ngeom_object()
Number of geometric objects that is involved in the node update operations for this Spine.
Vector< Data * > Geom_data_pt
Data that stores the spine height.
void set_geom_object_pt(const Vector< GeomObject * > &geom_object_pt)
Set vector of (pointers to) geometric objects that is involved in the node update operations for this...
double & geom_parameter(const unsigned &i)
Return i-th geometric parameter that is involved in the node update operations for this Spine.
void add_geom_parameter(const double &geom_parameter)
Add geometric parameter involved in the node update operations for this Spine.
unsigned ngeom_data()
Number of geometric Data that is involved in the node update operations for this Spine.
GeomObject * geom_object_pt(const unsigned &i) const
Return i-th geometric object that is involved in the node update operations for this Spine....
void set_geom_parameter(const Vector< double > &geom_parameter)
Set vector of geometric parameters that are involved in the node update operations for this Spine....
Spine(const double &height)
Constructor: Create the Spine and initialise its height to the specified value.
unsigned ngeom_parameter()
Number of geometric parameters that are involved in the node update operations for this Spine.
GeomObject *& geom_object_pt(const unsigned &i)
Return i-th geometric object that is involved in the node update operations for this Spine.
Spine()
Default constructor: Create the Spine and initialise its height to zero.
Vector< double > Geom_parameter
Vector that stores doubles that are used in the geometric updates.
Vector< GeomObject * > Geom_object_pt
Vector that stores the pointers to geometric objects that is involved in the node update operation.
double & height()
Access function to spine height.
Data * spine_height_pt() const
Access function to Data object that stores the spine height (const version)
void add_geom_object_pt(GeomObject *geom_object_pt)
Add (pointer to) geometric object that is involved in the node update operations for this Spine.
Vector< GeomObject * > & vector_geom_object_pt()
Return the vector of all geometric objects that affect this spine.
Spine(const double &height, const Vector< Data * > &geom_data_pt)
Constructor: Create the Spine and initialise its height to the specified value. Store the vector of (...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).