26 #ifndef OOMPH_EIGHTH_SPHERE_MESH_TEMPLATE_CC
27 #define OOMPH_EIGHTH_SPHERE_MESH_TEMPLATE_CC
38 template<
class ELEMENT>
44 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(3);
69 for (
unsigned i = 0;
i < nnode1d;
i++)
71 for (
unsigned j = 0; j < nnode1d; j++)
73 for (
unsigned k = 0; k < nnode1d; k++)
75 unsigned jnod = k * nnode1d * nnode1d + j * nnode1d +
i;
78 if ((
i == 0) || (j == 0) || (k == 0))
83 jnod, time_stepper_pt));
90 jnod, time_stepper_pt));
99 s[0] = -1.0 + 2.0 * s_fraction[0];
100 s[1] = -1.0 + 2.0 * s_fraction[1];
101 s[2] = -1.0 + 2.0 * s_fraction[2];
129 for (
unsigned i = 0;
i < nnode1d;
i++)
131 for (
unsigned j = 0; j < nnode1d; j++)
133 for (
unsigned k = 0; k < nnode1d; k++)
135 unsigned jnod = k * nnode1d * nnode1d + j * nnode1d +
i;
141 if ((
i == nnode1d - 1) || (j == 0) || (k == 0))
145 jnod, time_stepper_pt));
161 s[0] = -1.0 + 2.0 * s_fraction[0];
162 s[1] = -1.0 + 2.0 * s_fraction[1];
163 s[2] = -1.0 + 2.0 * s_fraction[2];
176 if (
i == nnode1d - 1)
198 for (
unsigned i = 0;
i < nnode1d;
i++)
200 for (
unsigned j = 0; j < nnode1d; j++)
202 for (
unsigned k = 0; k < nnode1d; k++)
204 unsigned jnod = k * nnode1d * nnode1d + j * nnode1d +
i;
207 if ((
i < nnode1d - 1) && (j > 0))
210 if ((
i == 0) || (j == nnode1d - 1) || (k == 0))
215 jnod, time_stepper_pt));
232 s[0] = -1.0 + 2.0 * s_fraction[0];
233 s[1] = -1.0 + 2.0 * s_fraction[1];
234 s[2] = -1.0 + 2.0 * s_fraction[2];
247 if (j == nnode1d - 1)
258 nnode1d * (nnode1d - 1));
261 else if (
i == nnode1d - 1)
278 for (
unsigned i = 0;
i < nnode1d;
i++)
280 for (
unsigned j = 0; j < nnode1d; j++)
282 for (
unsigned k = 0; k < nnode1d; k++)
284 unsigned jnod = k * nnode1d * nnode1d + j * nnode1d +
i;
287 if ((k > 0) && (
i < nnode1d - 1) && (j < nnode1d - 1))
290 if ((
i == 0) || (j == 0) || (k == nnode1d - 1))
295 jnod, time_stepper_pt));
312 s[0] = -1.0 + 2.0 * s_fraction[0];
313 s[1] = -1.0 + 2.0 * s_fraction[1];
314 s[2] = -1.0 + 2.0 * s_fraction[2];
327 if (k == nnode1d - 1)
344 if (
i == nnode1d - 1)
348 k +
i * nnode1d * nnode1d + j * nnode1d);
355 j * nnode1d * nnode1d);
void setup_boundary_element_info()
Setup lookup schemes which establish whic elements are located next to mesh's boundaries (wrapper to ...
MacroElement * macro_element_pt(const unsigned &i)
Access to i-th macro element.
Eighth sphere as domain. Domain is parametrised by four macro elements.
EighthSphereMesh(const double &radius, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass radius and timestepper; defaults to static default timestepper.
Domain * Domain_pt
Pointer to the domain.
double Radius
Radius of the sphere.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual void local_fraction_of_node(const unsigned &j, Vector< double > &s_fraction)
Get the local fraction of the node j in the element A dumb, but correct default implementation is pro...
virtual unsigned nnode_1d() const
Return the number of nodes along one edge of the element Default is to return zero — must be overload...
void macro_map(const Vector< double > &s, Vector< double > &r)
The mapping from local to global coordinates at the current time : r(s)
void add_boundary_node(const unsigned &b, Node *const &node_pt)
Add a (pointer to) a node to the b-th boundary.
Vector< Node * > Node_pt
Vector of pointers to nodes.
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
void set_nboundary(const unsigned &nbound)
Set the number of boundaries in the mesh.
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
Vector< GeneralisedElement * > Element_pt
Vector of pointers to generalised elements.
double & x(const unsigned &i)
Return the i-th nodal coordinate.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...