30 #ifndef OOMPH_TWO_LAYER_SPINE_MESH_HEADER 31 #define OOMPH_TWO_LAYER_SPINE_MESH_HEADER 35 #include "../generic/spines.h" 64 template <
class ELEMENT>
81 TimeStepper* time_stepper_pt=
82 &Mesh::Default_TimeStepper);
96 const bool& periodic_in_x,
97 TimeStepper* time_stepper_pt=
98 &Mesh::Default_TimeStepper);
113 const bool& periodic_in_x,
115 TimeStepper* time_stepper_pt=
116 &Mesh::Default_TimeStepper);
163 unsigned id=spine_node_pt->node_update_fct_id();
175 std::ostringstream error_message;
176 error_message <<
"Unknown id passed to spine_node_update " <<
id 178 throw OomphLibError(error_message.str(),
179 OOMPH_CURRENT_FUNCTION,
180 OOMPH_EXCEPTION_LOCATION);
218 unsigned yelement,
unsigned ynode);
223 unsigned yelement,
unsigned ynode);
229 double W = spine_node_pt->fraction();
231 double H = spine_node_pt->h();
233 spine_node_pt->x(1) = this->
Ymin + W*H;
241 double W = spine_node_pt->fraction();
244 double H = spine_node_pt->h();
247 spine_node_pt->x(1) = (this->
Ymin+H) + W *(this->
Ymax - (this->
Ymin+H) );
Vector< FiniteElement * > Lower_layer_element_pt
Vector of pointers to element in the upper layer.
const unsigned & nx() const
Return number of elements in x direction.
int interface_lower_face_index_at_boundary(const unsigned &e)
Index of the face of the elements next to the interface in the lower region (always 2) ...
FiniteElement *& interface_lower_boundary_element_pt(const unsigned long &i)
Access functions for pointers to elements in bottom layer.
unsigned long nlower() const
Number of elements in top layer.
void spine_node_update(SpineNode *spine_node_pt)
General node update function implements pure virtual function defined in SpineMesh base class and per...
virtual void build_two_layer_mesh(TimeStepper *time_stepper_pt)
Helper function to actually build the two-layer spine mesh (called from various constructors) ...
double y_spacing_function(unsigned xelement, unsigned xnode, unsigned yelement, unsigned ynode)
The spacing function for the y co-ordinates with three regions in each fluid.
FiniteElement *& interface_upper_boundary_element_pt(const unsigned long &i)
Access functions for pointers to elements in upper layer.
FiniteElement *& upper_layer_element_pt(const unsigned long &i)
Access functions for pointers to elements in upper layer.
unsigned long ninterface_lower() const
Number of elements in top layer.
unsigned long nupper() const
Number of elements in upper layer.
TwoLayerSpineMesh(const unsigned &nx, const unsigned &ny1, const unsigned &ny2, const double &lx, const double &h1, const double &h2, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in x-direction, number of elements in y-direction in bottom and ...
FiniteElement *& lower_layer_element_pt(const unsigned long &i)
Access functions for pointers to elements in bottom layer.
int interface_upper_face_index_at_boundary(const unsigned &e)
Index of the face of the elements next to the interface in the upper region (always -2) ...
void spine_node_update_upper(SpineNode *spine_node_pt)
Update function for the upper part of the domain.
unsigned Ny2
Number of elements in upper layer.
unsigned Ny1
Number of elements in lower layer.
Vector< FiniteElement * > Interface_lower_boundary_element_pt
Vector of pointers to the elements adjacent to the interface on the lower layer.
Vector< FiniteElement * > Upper_layer_element_pt
Vector of pointers to element in the lower layer.
double H1
Height of the lower layer.
double H2
Height of the upper layer.
unsigned long ninterface_upper() const
Number of elements in upper layer.
void build_mesh(TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Generic mesh construction function: contains all the hard work.
Vector< FiniteElement * > Interface_upper_boundary_element_pt
Vector of pointers to the element adjacent to the interface on the upper layer.
double Ymax
Maximum value of y coordinate.
double x_spacing_function(unsigned xelement, unsigned xnode, unsigned yelement, unsigned ynode)
The spacing function for the x co-ordinates with two regions.
void spine_node_update_lower(SpineNode *spine_node_pt)
Update function for the lower part of the domain.
double Ymin
Minimum value of y coordinate.