30 #ifndef OOMPH_EIGHTH_SPHERE_MESH_TEMPLATE_CC 31 #define OOMPH_EIGHTH_SPHERE_MESH_TEMPLATE_CC 43 template<
class ELEMENT>
50 MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(3);
75 for (
unsigned i = 0;
i < nnode1d;
i++)
77 for (
unsigned j = 0; j < nnode1d; j++)
79 for (
unsigned k = 0; k < nnode1d; k++)
81 unsigned jnod = k * nnode1d * nnode1d + j * nnode1d +
i;
84 if((i==0) || (j==0) || (k==0))
89 construct_boundary_node(jnod,time_stepper_pt));
96 construct_node(jnod,time_stepper_pt));
105 s[0]=-1.0+2.0*s_fraction[0];
106 s[1]=-1.0+2.0*s_fraction[1];
107 s[2]=-1.0+2.0*s_fraction[2];
135 for (
unsigned i = 0;
i < nnode1d;
i++)
137 for (
unsigned j = 0; j < nnode1d; j++)
139 for (
unsigned k = 0; k < nnode1d; k++)
141 unsigned jnod = k*nnode1d*nnode1d+j*nnode1d+
i;
147 if((i==nnode1d-1) || (j==0) || (k==0))
152 construct_boundary_node(jnod,time_stepper_pt));
158 construct_node(jnod,time_stepper_pt));
166 s[0]=-1.0+2.0*s_fraction[0];
167 s[1]=-1.0+2.0*s_fraction[1];
168 s[2]=-1.0+2.0*s_fraction[2];
205 for (
unsigned i = 0;
i < nnode1d;
i++)
207 for (
unsigned j = 0; j < nnode1d; j++)
209 for (
unsigned k = 0; k < nnode1d; k++)
211 unsigned jnod=k*nnode1d*nnode1d+j*nnode1d+
i;
214 if((i<nnode1d-1) && (j>0))
217 if((i==0) || (j==nnode1d-1) || (k==0))
223 construct_boundary_node(jnod,time_stepper_pt));
230 construct_node(jnod,time_stepper_pt));
238 s[0]=-1.0+2.0*s_fraction[0];
239 s[1]=-1.0+2.0*s_fraction[1];
240 s[2]=-1.0+2.0*s_fraction[2];
283 for (
unsigned i = 0;
i < nnode1d;
i++)
285 for (
unsigned j = 0; j < nnode1d; j++)
287 for (
unsigned k = 0; k < nnode1d; k++)
289 unsigned jnod=k*nnode1d*nnode1d+j*nnode1d+
i;
292 if((k>0) && (i<nnode1d-1) && (j<nnode1d-1))
295 if((i==0) || (j==0) || (k==nnode1d-1))
301 construct_boundary_node(jnod,time_stepper_pt));
308 construct_node(jnod,time_stepper_pt));
316 s[0]=-1.0+2.0*s_fraction[0];
317 s[1]=-1.0+2.0*s_fraction[1];
318 s[2]=-1.0+2.0*s_fraction[2];
343 node_pt(jnod+nnode1d*nnode1d*(nnode1d-1));
351 node_pt(k+i*nnode1d*nnode1d+j*nnode1d);
358 node_pt(i+k*nnode1d+j*nnode1d*nnode1d);
void setup_boundary_element_info()
Vector< Node * > Node_pt
Vector of pointers to nodes.
Domain * Domain_pt
Pointer to the domain.
EighthSphereMesh(const double &radius, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass radius and timestepper; defaults to static default timestepper. ...
void add_boundary_node(const unsigned &b, Node *const &node_pt)
Add a (pointer to) a node to the b-th boundary.
double Radius
Radius of the sphere.
MacroElement * macro_element_pt(const unsigned &i)
Access to i-th macro element.
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...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
void set_nboundary(const unsigned &nbound)
Set the number of boundaries in the mesh.
void macro_map(const Vector< double > &s, Vector< double > &r)
The mapping from local to global coordinates at the current time : r(s)
Vector< GeneralisedElement * > Element_pt
Vector of pointers to generalised elements.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
virtual unsigned nnode_1d() const
Return the number of nodes along one edge of the element Default is to return zero — must be overloa...
Eighth sphere as domain. Domain is parametrised by four macro elements.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...