30 #ifndef OOMPH_SINGLE_LAYER_CUBIC_SPINE_MESH_TEMPLATE_CC 31 #define OOMPH_SINGLE_LAYER_CUBIC_SPINE_MESH_TEMPLATE_CC 45 template<
class ELEMENT>
48 const unsigned &nx,
const unsigned &ny,
const unsigned &nz,
49 const double &lx,
const double &ly,
const double &h,
54 MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(3);
57 MeshChecker::assert_geometric_element<SpineFiniteElement,ELEMENT>(3);
67 template<
class ELEMENT>
73 unsigned n_x = this->
Nx;
75 unsigned n_y = this->
Ny;
77 unsigned n_z = this->
Nz;
85 Spine_pt.reserve(((n_p-1)*n_x+1)*((n_p-1)*n_y+1));
91 for(
unsigned l1=0;l1<n_p;l1++)
93 for(
unsigned l2=0;l2<n_p;l2++)
110 for(
unsigned long k=0;k<n_z;k++)
113 for(
unsigned l3=1;l3<n_p;l3++)
120 nod_pt->
fraction()=(double(k)+double(l3)/double(n_p-1))/
double(n_z);
136 for(
unsigned j=1;j<n_x;j++)
138 for(
unsigned l1=0;l1<n_p;l1++)
142 for(
unsigned l2=1;l2<n_p;l2++)
161 for(
unsigned long k=0;k<n_z;k++)
164 for(
unsigned l3=1;l3<n_p;l3++)
171 nod_pt->
fraction()=(double(k)+double(l3)/double(n_p-1))/
double(n_z);
185 for(
unsigned long i=1;
i<n_y;
i++)
190 for(
unsigned l1=1;l1<n_p;l1++)
193 for(
unsigned l2=0;l2<n_p;l2++)
214 for(
unsigned long k=0;k<n_z;k++)
217 for(
unsigned l3=1;l3<n_p;l3++)
225 nod_pt->
fraction()=(double(k)+double(l3)/double(n_p-1))/
double(n_z);
240 for(
unsigned j=1;j<n_x;j++)
245 for(
unsigned l1=1;l1<n_p;l1++)
247 for(
unsigned l2=1;l2<n_p;l2++)
268 for(
unsigned long k=0;k<n_z;k++)
271 for(
unsigned l3=1;l3<n_p;l3++)
279 nod_pt->
fraction()=(double(k)+double(l3)/double(n_p-1))/
double(n_z);
unsigned Ny
Number of elements in y direction.
unsigned Nx
Number of elements in x direction.
Simple cubic 3D Brick mesh class.
double & fraction()
Set reference to fraction along spine.
unsigned Nz
Number of elements in y direction.
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...
SingleLayerCubicSpineMesh(const unsigned &nx, const unsigned &ny, const unsigned &nz, const double &lx, const double &ly, const double &h, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in x-direction, number of elements in y-direction, number of elements in z-direction, lengths in x- and y- directions, 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) ...
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.