26 #ifndef OOMPH_TWO_LAYER_PERTURBED_SPINE_MESH_HEADER
27 #define OOMPH_TWO_LAYER_PERTURBED_SPINE_MESH_HEADER
46 template <
class ELEMENT>
88 const bool& periodic_in_x,
111 const bool& periodic_in_x,
158 std::ostringstream error_message;
159 error_message <<
"Unknown id passed to perturbed_spine_node_update " <<
id
162 "TwoLayerPerturbedSpineMesh::perturbed_spine_node_update()",
168 const unsigned&
ny1()
const {
return Ny1; }
171 const unsigned&
ny2()
const {
return Ny2; }
177 const unsigned& cosine_index,
178 const unsigned& sine_index)
226 unsigned yelement,
unsigned ynode);
231 unsigned yelement,
unsigned ynode);
237 const double w = spine_node_pt->
fraction();
244 spine_node_pt->
x(1) = this->
Ymin + w*h;
260 std::ostringstream error_message;
261 error_message <<
"The cosine part of the perturbation to the nodal\n"
262 <<
"y-position has not been set up." << std::endl;
265 "TwoLayerPerturbedSpineMesh::spine_node_update_lower(...)",
274 std::ostringstream error_message;
275 error_message <<
"The sine part of the perturbation to the nodal\n"
276 <<
"y-position has not been set up." << std::endl;
279 "TwoLayerPerturbedSpineMesh::spine_node_update_lower(...)",
288 const double w = spine_node_pt->
fraction();
295 spine_node_pt->
x(1) = (this->
Ymin + h) +
w*(this->
Ymax - (this->
Ymin+h));
313 std::ostringstream error_message;
314 error_message <<
"The cosine part of the perturbation to the nodal\n"
315 <<
"y-position has not been set up." << std::endl;
318 "TwoLayerPerturbedSpineMesh::spine_node_update_upper(...)",
329 std::ostringstream error_message;
330 error_message <<
"The sine part of the perturbation to the nodal\n"
331 <<
"y-position has not been set up." << std::endl;
334 "TwoLayerPerturbedSpineMesh::spine_node_update_upper(...)",
int i
Definition: BiCGSTAB_step_by_step.cpp:9
RowVector3d w
Definition: Matrix_resize_int.cpp:3
void set_value(const unsigned &i, const double &value_)
Definition: nodes.h:271
Definition: elements.h:1313
static Steady< 0 > Default_TimeStepper
The Steady Timestepper.
Definition: mesh.h:75
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
Definition: oomph_definitions.h:222
Definition: perturbed_spines.h:553
Class for nodes that ‘live’ on perturbed spines.
Definition: perturbed_spines.h:276
unsigned & node_update_fct_id()
Access function to ID of node update function (within specific mesh)
Definition: perturbed_spines.h:320
double & fraction()
Set reference to fraction along spine.
Definition: perturbed_spines.h:317
PerturbedSpine *& perturbed_spine_pt()
Access function to perturbed spine.
Definition: perturbed_spines.h:314
Spine *& base_spine_pt()
Access function to pointer to base spine.
Definition: perturbed_spines.h:98
double & height(const unsigned &i)
Access function to i-th component of spine "height".
Definition: perturbed_spines.h:101
Definition: rectangular_quadmesh.template.h:59
double Ymax
Maximum value of y coordinate.
Definition: rectangular_quadmesh.template.h:77
const unsigned & nx() const
Return number of elements in x direction.
Definition: rectangular_quadmesh.template.h:224
double Ymin
Minimum value of y coordinate.
Definition: rectangular_quadmesh.template.h:75
void build_mesh(TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Generic mesh construction function: contains all the hard work.
Definition: rectangular_quadmesh.template.cc:43
double & height()
Access function to spine height.
Definition: spines.h:150
Definition: timesteppers.h:231
Definition: two_layer_perturbed_spine_mesh.template.h:49
unsigned long nlower() const
Number of elements in top layer.
Definition: two_layer_perturbed_spine_mesh.template.h:134
void spine_node_update_upper(PerturbedSpineNode *spine_node_pt)
Update function for the upper part of the domain.
Definition: two_layer_perturbed_spine_mesh.template.h:285
virtual void build_two_layer_mesh(TimeStepper *time_stepper_pt)
Definition: two_layer_perturbed_spine_mesh.template.cc:296
TwoLayerPerturbedSpineMesh(const unsigned &nx, const unsigned &ny1, const unsigned &ny2, const double &lx, const double &h1, const double &h2, SpineMesh *&base_mesh_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: two_layer_perturbed_spine_mesh.template.cc:65
unsigned Ny1
Number of elements in lower layer.
Definition: two_layer_perturbed_spine_mesh.template.h:187
const unsigned & ny2() const
Access function for number of elements in upper layer.
Definition: two_layer_perturbed_spine_mesh.template.h:171
int YC_index
Definition: two_layer_perturbed_spine_mesh.template.h:209
const unsigned & ny1() const
Access function for number of elements in lower layer.
Definition: two_layer_perturbed_spine_mesh.template.h:168
double y_spacing_function(unsigned xelement, unsigned xnode, unsigned yelement, unsigned ynode)
Definition: two_layer_perturbed_spine_mesh.template.cc:250
void spine_node_update_lower(PerturbedSpineNode *spine_node_pt)
Update function for the lower part of the domain.
Definition: two_layer_perturbed_spine_mesh.template.h:234
int YS_index
Definition: two_layer_perturbed_spine_mesh.template.h:215
Vector< FiniteElement * > Lower_layer_element_pt
Vector of pointers to element in the lower layer.
Definition: two_layer_perturbed_spine_mesh.template.h:218
const void set_perturbation_to_nodal_positions_indices(const unsigned &cosine_index, const unsigned &sine_index)
Definition: two_layer_perturbed_spine_mesh.template.h:176
FiniteElement *& upper_layer_element_pt(const unsigned long &i)
Access functions for pointers to elements in upper layer.
Definition: two_layer_perturbed_spine_mesh.template.h:123
double x_spacing_function(unsigned xelement, unsigned xnode, unsigned yelement, unsigned ynode)
Definition: two_layer_perturbed_spine_mesh.template.cc:233
SpineMesh * Base_mesh_pt
Pointer to corresponding mesh of base state problem.
Definition: two_layer_perturbed_spine_mesh.template.h:203
Vector< FiniteElement * > Upper_layer_element_pt
Vector of pointers to element in the upper layer.
Definition: two_layer_perturbed_spine_mesh.template.h:221
FiniteElement *& lower_layer_element_pt(const unsigned long &i)
Access functions for pointers to elements in lower layer.
Definition: two_layer_perturbed_spine_mesh.template.h:127
unsigned Ny2
Number of elements in upper layer.
Definition: two_layer_perturbed_spine_mesh.template.h:190
void element_reorder()
Definition: two_layer_perturbed_spine_mesh.template.cc:544
static int Perturbation_to_nodal_position_indices_not_set_up
Definition: two_layer_perturbed_spine_mesh.template.h:348
double H1
Height of the lower layer.
Definition: two_layer_perturbed_spine_mesh.template.h:193
void perturbed_spine_node_update(PerturbedSpineNode *spine_node_pt)
Definition: two_layer_perturbed_spine_mesh.template.h:144
double H2
Height of the upper layer.
Definition: two_layer_perturbed_spine_mesh.template.h:196
unsigned long nupper() const
Number of elements in upper layer.
Definition: two_layer_perturbed_spine_mesh.template.h:131
const double lx
Definition: ConstraintElementsUnitTest.cpp:33
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61