26 #ifndef OOMPH_CHANNEL_SPINE_MESH_HEADER
27 #define OOMPH_CHANNEL_SPINE_MESH_HEADER
30 #include "../generic/spines.h"
41 template<
class ELEMENT>
76 const bool& periodic_in_x,
147 spine_node_pt->
x(1) = this->
Ymin + W * position[1];
162 double xstep1 =
Lx0 / ((this->
Np - 1) *
Nx0);
165 double xstep2 =
Lx1 / ((this->
Np - 1) *
Nx1);
168 double xstep3 =
Lx2 / ((this->
Np - 1) *
Nx2);
174 return (this->
Xmin + xstep1 * ((this->
Np - 1) * xelement + xnode));
177 else if (xelement <
Nx0 +
Nx1)
180 return (
Lx0 + xstep2 * ((this->
Np - 1) * (xelement -
Nx0) + xnode));
187 xstep3 * ((this->
Np - 1) * (xelement -
Nx0 -
Nx1) + xnode));
192 OOMPH_CURRENT_FUNCTION,
193 OOMPH_EXCEPTION_LOCATION);
206 OOMPH_CURRENT_FUNCTION,
207 OOMPH_EXCEPTION_LOCATION);
219 OOMPH_CURRENT_FUNCTION,
220 OOMPH_EXCEPTION_LOCATION);
234 OOMPH_CURRENT_FUNCTION,
235 OOMPH_EXCEPTION_LOCATION);
Spine mesh class derived from standard 2D mesh. The mesh contains a StraightLine GeomObject which def...
Vector< FiniteElement * > Centre_element_pt
Vector of pointers to element in the centre region.
virtual void build_channel_spine_mesh(TimeStepper *time_stepper_pt)
Helper function to actually build the channel-spine mesh (called from various constructors)
virtual double x_spacing_function(unsigned xelement, unsigned xnode, unsigned yelement, unsigned ynode)
Return the value of the x-coordinate at the node given by the local node number (xnode,...
unsigned Nx0
Number of elements in the left region.
FiniteElement *& centre_element_pt(const unsigned long &i)
Access functions for pointers to the -th element in the centre region.
GeomObject * Straight_wall_pt
GeomObject for the straight upper wall.
double Lx1
Length of centre region.
double Lx0
Length of left region.
unsigned long ncentre() const
Number of elements in centre region.
unsigned Nx2
Number of elements in the right region.
unsigned nright_spine()
Access function for the number of spines in the right region.
double Lx2
Length of right region.
GeomObject * straight_wall_pt()
Access function to the GeomObject for the straight upper wall.
unsigned long nright() const
Number of elements in right region.
unsigned Nright_spine
Number of spines in right region.
unsigned Nleft_spine
Number of spines in left region.
unsigned Nx1
Number of elements in the centre region.
Spine *& centre_spine_pt(const unsigned long &i)
Access function for spines in centre region.
unsigned long nleft() const
Number of elements in left region.
GeomObject * wall_pt()
Access function to the GeomObject for upper wall.
Spine *& right_spine_pt(const unsigned long &i)
Access function for spines in right region.
FiniteElement *& left_element_pt(const unsigned long &i)
Access functions for pointers to the -th element in the left region.
unsigned ncentre_spine()
Access function for the number of spines in the centre region.
unsigned long nbulk() const
Number of elements in bulk.
FiniteElement *& right_element_pt(const unsigned long &i)
Access functions for pointers to the -th element in the right region.
ChannelSpineMesh(const unsigned &nx0, const unsigned &nx1, const unsigned &nx2, const unsigned &ny, const double &lx0, const double &lx1, const double &lx2, const double &h, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in x-direction in regions 0,1 and 2, number of elements in y-dir...
Vector< FiniteElement * > Right_element_pt
Vector of pointers to element in the right region.
Vector< FiniteElement * > Left_element_pt
Vector of pointers to element in the left region.
void element_reorder()
Reorder the elements so we loop over them vertically first (advantageous in "wide" domains if a front...
Spine *& left_spine_pt(const unsigned long &i)
Access function for spines in left region.
GeomObject * Wall_pt
GeomObject for upper wall.
virtual void spine_node_update(SpineNode *spine_node_pt)
General node update function implements pure virtual function defined in SpineMesh base class and per...
unsigned nleft_spine()
Access function for the number of spines in the left region.
unsigned Ncentre_spine
Number of spines in centre region.
A general Finite Element class.
/////////////////////////////////////////////////////////////////////
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors.
double & x(const unsigned &i)
Return the i-th nodal coordinate.
An OomphLibError object which should be thrown when an run-time error is encountered....
RectangularQuadMesh is a two-dimensional mesh of Quad elements with Nx elements in the "x" (horizonal...
const unsigned & ny() const
Return number of elements in y direction.
unsigned Np
Np: number of (linear) points in the element.
double Ymin
Minimum value of y coordinate.
double Xmin
Minimum value of x coordinate.
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
Vector< Spine * > Spine_pt
A Spine mesh contains a Vector of pointers to spines.
Class for nodes that live on spines. The assumption is that each Node lies at a fixed fraction on a s...
Spine *& spine_pt()
Access function to spine.
double & fraction()
Set reference to fraction along spine.
Spines are used for algebraic node update operations in free-surface fluid problems: They form the ba...
GeomObject *& geom_object_pt(const unsigned &i)
Return i-th geometric object that is involved in the node update operations for this Spine.
double & geom_parameter(const unsigned &i)
Return i-th geometric parameter that is involved in the node update operations for this Spine.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...