26 #ifndef OOMPH_SINGLE_LAYER_CUBIC_SPINE_MESH_TEMPLATE_CC
27 #define OOMPH_SINGLE_LAYER_CUBIC_SPINE_MESH_TEMPLATE_CC
40 template<
class ELEMENT>
52 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(3);
55 MeshChecker::assert_geometric_element<SpineFiniteElement, ELEMENT>(3);
65 template<
class ELEMENT>
70 unsigned n_x = this->Nx;
72 unsigned n_y = this->Ny;
74 unsigned n_z = this->Nz;
79 unsigned n_p =
dynamic_cast<ELEMENT*
>(finite_element_pt(0))->nnode_1d();
83 Spine_pt.reserve(((n_p - 1) * n_x + 1) * ((n_p - 1) * n_y + 1));
89 for (
unsigned l1 = 0; l1 < n_p; l1++)
91 for (
unsigned l2 = 0; l2 < n_p; l2++)
95 Spine_pt.push_back(new_spine_pt);
98 SpineNode* nod_pt = element_node_pt(0, l2 + l1 * n_p);
108 for (
unsigned long k = 0; k < n_z; k++)
111 for (
unsigned l3 = 1; l3 < n_p; l3++)
115 element_node_pt(k * n_x * n_y, l3 * n_p * n_p + l2 + l1 * n_p);
120 (double(k) + double(l3) / double(n_p - 1)) /
double(n_z);
135 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++)
147 Spine_pt.push_back(new_spine_pt);
150 SpineNode* nod_pt = element_node_pt(j, l2 + l1 * n_p);
161 for (
unsigned long k = 0; k < n_z; k++)
164 for (
unsigned l3 = 1; l3 < n_p; l3++)
168 j + k * n_x * n_y, l3 * n_p * n_p + l2 + l1 * n_p);
173 (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++)
192 for (
unsigned l2 = 0; l2 < n_p; l2++)
197 Spine_pt.push_back(new_spine_pt);
202 SpineNode* nod_pt = element_node_pt(
i * n_x, l2 + l1 * n_p);
212 for (
unsigned long k = 0; k < n_z; k++)
215 for (
unsigned l3 = 1; l3 < n_p; l3++)
219 i * n_x + k * n_x * n_y, l3 * n_p * n_p + l2 + l1 * n_p);
224 (double(k) + double(l3) / double(n_p - 1)) /
double(n_z);
234 for (
unsigned j = 1; j < n_x; j++)
237 for (
unsigned l1 = 1; l1 < n_p; l1++)
239 for (
unsigned l2 = 1; l2 < n_p; l2++)
244 Spine_pt.push_back(new_spine_pt);
249 SpineNode* nod_pt = element_node_pt(j +
i * n_x, l2 + l1 * n_p);
259 for (
unsigned long k = 0; k < n_z; k++)
262 for (
unsigned l3 = 1; l3 < n_p; l3++)
266 j +
i * n_x + k * n_x * n_y, l3 * n_p * n_p + l2 + l1 * n_p);
271 (double(k) + double(l3) / double(n_p - 1)) /
double(n_z);
Simple cubic 3D Brick mesh class.
virtual void build_single_layer_mesh(TimeStepper *time_stepper_pt)
Helper function to actually build the single-layer spine mesh (called from various constructors)
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,...
Class for nodes that live on spines. The assumption is that each Node lies at a fixed fraction on a s...
SpineMesh *& spine_mesh_pt()
Access function to Pointer to SpineMesh that this node is a part of and which implements the node upd...
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...
////////////////////////////////////////////////////////////////////// //////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...