30 #ifndef OOMPH_SINGLE_LAYER_SPINE_MESH_TEMPLATE_CC    31 #define OOMPH_SINGLE_LAYER_SPINE_MESH_TEMPLATE_CC    54 template<
class ELEMENT>
    56  const unsigned &nx, 
const unsigned &ny,
    57  const double &lx, 
const double &h, 
TimeStepper* time_stepper_pt) :
    62  MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(2);
    65  MeshChecker::assert_geometric_element<SpineFiniteElement,ELEMENT>(2);
    88 template<
class ELEMENT>
    90  const unsigned &
nx, 
const unsigned &
ny,
    91  const double &lx, 
const double &h,  
const bool& periodic_in_x,
    97  MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(2);
   100  MeshChecker::assert_geometric_element<SpineFiniteElement,ELEMENT>(2);
   118 template<
class ELEMENT>
   124  MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(2);
   130  unsigned n_x = this->
Nx;
   131  unsigned n_y = this->
Ny;
   171  for(
unsigned long i=0;
i<n_y;
i++)
   174    for(
unsigned l1=1;l1<n_p;l1++)
   181      nod_pt->
fraction()=(double(
i)+double(l1)/double(n_p-1))/
double(n_y);
   192  for(
unsigned long j=0;j<n_x;j++)
   199    if ((this->
Xperiodic)&&(j==n_x-1)) n_pmax=n_p-1;
   201    for(
unsigned l2=1;l2<n_pmax;l2++)
   204      new_spine_pt=
new Spine(1.0);
   218      for(
unsigned long i=0;
i<n_y;
i++)
   221        for(
unsigned l1=1;l1<n_p;l1++)
   228          nod_pt->
fraction()=(double(
i)+double(l1)/double(n_p-1))/
double(n_y);
   249    nod_pt->
spine_pt() = final_spine_pt;
   256    for(
unsigned i=0;
i<n_y;
i++)
   259      for(
unsigned l1=1;l1<n_p;l1++)
   265        nod_pt->
spine_pt() = final_spine_pt;
 const unsigned & nx() const
Return number of elements in x direction. 
SingleLayerSpineMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &h, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in x-direction, number of elements in y-direction, axial length, height of layer, and pointer to timestepper (defaults to Steady timestepper) 
virtual void build_single_layer_mesh(TimeStepper *time_stepper_pt)
Helper function to actually build the single-layer spine mesh (called from various constructors) ...
double & fraction()
Set reference to fraction along spine. 
unsigned Ny
Ny: number of elements in y-direction. 
const unsigned & ny() const
Return number of elements in y direction. 
unsigned Nx
Nx: number of elements in x-direction. 
bool Xperiodic
Boolean variable used to determine whether the mesh is periodic in the x-direction. 
void build_mesh(TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Generic mesh construction function: contains all the hard work. 
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions). 
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...
Spine *& spine_pt()
Access function to spine. 
SpineMesh *& spine_mesh_pt()
Access function to Pointer to SpineMesh that this node is a part of and which implements the node upd...
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
Vector< Spine * > Spine_pt
A Spine mesh contains a Vector of pointers to spines.