28 #ifndef OOMPH_PERTURBED_SPINES_HEADER
29 #define OOMPH_PERTURBED_SPINES_HEADER
38 class PerturbedSpineNode;
108 double&
height(
const unsigned&
t,
const unsigned&
i)
157 for (
unsigned i=1;
i<n_geom_data;
i++)
191 for (
unsigned i=0;
i<n_geom_object;
i++)
298 const unsigned &n_position_type,
299 const unsigned &initial_nvalue) :
300 Node(n_dim,n_position_type,initial_nvalue),
306 const unsigned &n_dim,
307 const unsigned &n_position_type,
308 const unsigned &initial_nvalue) :
331 void node_update(
const bool& update_all_time_levels_for_new_node=
false);
391 template<
class ELEMENT>
421 const int &face_index) :
440 #ifdef RANGE_CHECKING
441 const unsigned n_node = this->
nnode();
444 std::ostringstream error_message;
445 error_message <<
"Range Error: Node number " <<
n
446 <<
" is not in the range (0,"
449 "PerturbedSpineElement::spine_local_eqn()",
458 std::ostringstream error_message;
459 error_message <<
"Perturbed spines only have two height components:"
460 <<
"\nComponent i=" <<
i
461 <<
" is not in the range (0,2)";
463 "PerturbedSpineElement::spine_local_eqn()",
469 std::ostringstream error_stream;
471 <<
"PerturbedSpineNode " <<
n <<
" does not have a PerturbedSpine\n"
472 <<
"attached, so you can't get its local equation number. Check that\n"
473 <<
"the Mesh is correctly associating PerturbedSpines with is Nodes\n";
475 "PerturbedSpineElement<ELEMENT>::spine_local_eqn()",
486 const unsigned &
n,
const unsigned &
i)
499 template<
class ELEMENT>
513 template<
class ELEMENT>
527 template<
class ELEMENT>
568 for(
unsigned long i=PerturbedSpine_pt_range;
i>0;
i--)
595 std::ostringstream error_message;
596 error_message <<
"Node " <<
n <<
"is a "
598 <<
", not a PerturbedSpineNode" << std::endl;
601 "PerturbedSpineMesh::node_pt()",
622 "Can't execute element_node_pt(...) for non FiniteElements",
623 "PerturbedSpineMesh::element_node_pt()",
628 std::ostringstream error_message;
629 error_message <<
"Node " <<
n <<
"is a "
631 <<
", not a PerturbedSpineNode" << std::endl;
634 "PerturbedSpineMesh::node_pt()",
650 void node_update(
const bool& update_all_solid_nodes=
false);
657 void dump(std::ofstream &dump_file,
const bool &use_old_ordering=
true)
const;
661 void read(std::ifstream &restart_file);
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.)
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: perturbed_spines.h:520
FaceGeometry()
Constructor.
Definition: perturbed_spines.h:506
FaceGeometry()
Constructor.
Definition: perturbed_spines.h:534
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
Definition: perturbed_spines.h:395
PerturbedSpineElement()
Constructor, call the constructor of the base element.
Definition: perturbed_spines.h:414
PerturbedSpineElement(FiniteElement *const &element_pt, const int &face_index)
Constructor used for spine face elements.
Definition: perturbed_spines.h:420
virtual int get_local_eqn_number_corresponding_to_geometric_dofs(const unsigned &n, const unsigned &i)
Definition: perturbed_spines.h:485
void complete_setup_of_dependencies()
Construct and fill the node_update_data vector.
Definition: perturbed_spines.cc:76
~PerturbedSpineElement()
Destructor, clean up the storage allocated to the local equation numbers.
Definition: perturbed_spines.h:428
unsigned * PerturbedSpine_geometric_index
Definition: perturbed_spines.h:400
int spine_local_eqn(const unsigned &n, const unsigned &i)
Definition: perturbed_spines.h:438
Definition: perturbed_spines.h:371
PerturbedSpineFiniteElement()
Empty constructor.
Definition: perturbed_spines.h:375
virtual ~PerturbedSpineFiniteElement()
Emtpty virtual destructor.
Definition: perturbed_spines.h:378
Definition: perturbed_spines.h:553
void node_update(const bool &update_all_solid_nodes=false)
Definition: perturbed_spines.cc:147
void dump(std::ofstream &dump_file, const bool &use_old_ordering=true) const
Overload the dump function so that the spine data is dumped.
Definition: perturbed_spines.cc:216
void add_perturbed_spine_pt(PerturbedSpine *const &spine_pt)
Add a perturbed spine to the mesh.
Definition: perturbed_spines.h:584
unsigned long assign_global_eqn_numbers(Vector< double * > &Dof_pt)
Assign equation numbers for perturbed spines.
Definition: perturbed_spines.cc:192
virtual ~PerturbedSpineMesh()
Destructor to clean up the memory allocated to the perturbed spines.
Definition: perturbed_spines.h:562
unsigned long nspine() const
Return the number of perturbed spines in the mesh.
Definition: perturbed_spines.h:581
virtual void perturbed_spine_node_update(PerturbedSpineNode *spine_node_pt)=0
PerturbedSpineNode * element_node_pt(const unsigned long &e, const unsigned &n)
Definition: perturbed_spines.h:613
Vector< PerturbedSpine * > PerturbedSpine_pt
A PerturbedSpine mesh contains a Vector of pointers to perturbed spines.
Definition: perturbed_spines.h:557
PerturbedSpineNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global PerturbedSpineNode.
Definition: perturbed_spines.h:590
PerturbedSpine *const & perturbed_spine_pt(const unsigned long &i) const
Return the i-th perturbed spine in the mesh.
Definition: perturbed_spines.h:575
void read(std::ifstream &restart_file)
Overload the read function so that the spine data is also read.
Definition: perturbed_spines.cc:244
Class for nodes that ‘live’ on perturbed spines.
Definition: perturbed_spines.h:276
PerturbedSpineMesh * PerturbedSpine_mesh_pt
Definition: perturbed_spines.h:287
GeomObject ** all_geom_object_pt()
Return the vector of all geometric objects.
Definition: perturbed_spines.h:351
unsigned ngeom_object() const
Return the number of geometric objects, zero if no spine.
Definition: perturbed_spines.h:341
void node_update(const bool &update_all_time_levels_for_new_node=false)
Definition: perturbed_spines.cc:50
unsigned Node_update_fct_id
Definition: perturbed_spines.h:291
unsigned & node_update_fct_id()
Access function to ID of node update function (within specific mesh)
Definition: perturbed_spines.h:320
double Fraction
Private double that represents the fixed fraction along the spine.
Definition: perturbed_spines.h:283
PerturbedSpineNode(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: perturbed_spines.h:305
double & fraction()
Set reference to fraction along spine.
Definition: perturbed_spines.h:317
double & h(const unsigned &i)
Access function to i-th component of spine "height".
Definition: perturbed_spines.h:327
PerturbedSpine *& perturbed_spine_pt()
Access function to perturbed spine.
Definition: perturbed_spines.h:314
PerturbedSpine * PerturbedSpine_pt
Private internal data pointer to a perturbed spine.
Definition: perturbed_spines.h:280
unsigned ngeom_data() const
Return the number of geometric data, zero if no spine.
Definition: perturbed_spines.h:334
Data ** all_geom_data_pt()
Return the vector of all geometric data.
Definition: perturbed_spines.h:348
PerturbedSpineNode(const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_nvalue)
Steady Constructor, initialise pointers to zero.
Definition: perturbed_spines.h:297
PerturbedSpineMesh *& spine_mesh_pt()
Definition: perturbed_spines.h:324
Definition: perturbed_spines.h:49
unsigned ngeom_object()
Definition: perturbed_spines.h:183
PerturbedSpineNode *& node_at_bottom_of_spine_pt()
Access function to SpineNode at bottom of spine.
Definition: perturbed_spines.h:121
Data *& height_pt()
Access function to Data object that stores the spine "heights".
Definition: perturbed_spines.h:114
void add_geom_object_pt(GeomObject *geom_object_pt)
Definition: perturbed_spines.h:199
Vector< GeomObject * > Geom_object_pt
Definition: perturbed_spines.h:254
PerturbedSpine(Spine *&base_spine_pt)
Definition: perturbed_spines.h:56
double & height(const unsigned &t, const unsigned &i)
Definition: perturbed_spines.h:108
unsigned ngeom_data()
Definition: perturbed_spines.h:148
Vector< Data * > & vector_geom_data_pt()
Return the vector of geometric data.
Definition: perturbed_spines.h:179
~PerturbedSpine()
Definition: perturbed_spines.h:95
void add_geom_parameter(const double &geom_parameter)
Definition: perturbed_spines.h:230
Data *& geom_data_pt(const unsigned &i)
Definition: perturbed_spines.h:172
Data * height_pt() const
Definition: perturbed_spines.h:118
Spine *& base_spine_pt()
Access function to pointer to base spine.
Definition: perturbed_spines.h:98
Vector< double > Geom_parameter
Definition: perturbed_spines.h:258
PerturbedSpineNode * node_at_top_of_spine_pt() const
Definition: perturbed_spines.h:141
PerturbedSpineNode * node_at_bottom_of_spine_pt() const
Definition: perturbed_spines.h:128
double & height(const unsigned &i)
Access function to i-th component of spine "height".
Definition: perturbed_spines.h:101
void set_geom_parameter(const Vector< double > &geom_parameter)
Definition: perturbed_spines.h:225
PerturbedSpine(Spine *&base_spine_pt, const double &height)
Definition: perturbed_spines.h:79
GeomObject * geom_object_pt(const unsigned &i) const
Definition: perturbed_spines.h:210
void set_geom_data_pt(const Vector< Data * > &geom_data_pt)
Definition: perturbed_spines.h:153
GeomObject *& geom_object_pt(const unsigned &i)
Definition: perturbed_spines.h:206
PerturbedSpine(TimeStepper *const &time_stepper_pt, Spine *&base_spine_pt)
Definition: perturbed_spines.h:67
PerturbedSpineNode * Node_at_top_of_spine_pt
Definition: perturbed_spines.h:263
void add_geom_data_pt(Data *geom_data_pt)
Definition: perturbed_spines.h:165
const double & geom_parameter(const unsigned &i) const
Definition: perturbed_spines.h:240
Spine * Base_spine_pt
Pointer to corresponding (real) spine in the base problem.
Definition: perturbed_spines.h:247
void set_geom_object_pt(const Vector< GeomObject * > &geom_object_pt)
Definition: perturbed_spines.h:187
double & geom_parameter(const unsigned &i)
Definition: perturbed_spines.h:235
unsigned ngeom_parameter()
Definition: perturbed_spines.h:220
PerturbedSpineNode * Node_at_bottom_of_spine_pt
Definition: perturbed_spines.h:262
PerturbedSpineNode *& node_at_top_of_spine_pt()
Access function to SpineNode at top of spine.
Definition: perturbed_spines.h:134
Vector< GeomObject * > & vector_geom_object_pt()
Return vector of all geometric objects that affect this spine.
Definition: perturbed_spines.h:216
Vector< Data * > Geom_data_pt
Vector that stores the pointers to additional geometric Data.
Definition: perturbed_spines.h:250
Data * geom_data_pt(const unsigned &i) const
Definition: perturbed_spines.h:176
Definition: timesteppers.h:231
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
string name
Definition: plotDoE.py:33
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61