31 #ifndef OOMPH_ANNULAR_MESH_HEADER 32 #define OOMPH_ANNULAR_MESH_HEADER 50 template<
class ELEMENT>
59 const unsigned &ntheta,
const unsigned &nr,
60 const double& a,
const double &h,
TimeStepper* time_stepper_pt
63 periodic,time_stepper_pt)
66 MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(2);
75 const unsigned &ntheta,
const unsigned &nr,
76 const double& a,
const double &h,
80 periodic,time_stepper_pt)
83 MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(2);
94 const double& azimuthal_fraction,
109 template<
class ELEMENT>
118 const double& azimuthal_fraction,
119 const unsigned &ntheta,
126 periodic,time_stepper_pt),
128 nr,a,h,time_stepper_pt)
131 MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(2);
140 for (
unsigned ielem=0;ielem<nel;ielem++)
143 set_macro_elem_pt(this->Domain_pt->macro_element_pt(ielem));
151 this->setup_quadtree_forest();
159 for(
unsigned i=0;
i<nr;
i++)
162 dynamic_cast<ELEMENT*
>(this->
element_pt(
i*ntheta))->
163 tree_pt()->root_pt();
166 dynamic_cast<ELEMENT*
>(this->
element_pt((
i+1)*ntheta-1))->
167 tree_pt()->root_pt();
171 using namespace QuadTreeNames;
172 for(
unsigned i=0;
i<nr;
i++)
174 left_root_pt[
i]->neighbour_pt(
W) = right_root_pt[
i];
175 left_root_pt[
i]->set_neighbour_periodic(
W);
177 right_root_pt[
i]->neighbour_pt(
E) = left_root_pt[
i];
178 right_root_pt[
i]->set_neighbour_periodic(
E);
187 const double& azimuthal_fraction,
188 const unsigned &ntheta,
196 periodic,time_stepper_pt),
198 nr,a,h,phi,time_stepper_pt)
201 MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(2);
209 for (
unsigned ielem=0;ielem<nel;ielem++)
212 set_macro_elem_pt(this->Domain_pt->macro_element_pt(ielem));
220 this->setup_quadtree_forest();
228 for(
unsigned i=0;
i<nr;
i++)
231 dynamic_cast<ELEMENT*
>(this->
element_pt(
i*ntheta))->
232 tree_pt()->root_pt();
235 dynamic_cast<ELEMENT*
>(this->
element_pt((
i+1)*ntheta-1))->
236 tree_pt()->root_pt();
240 using namespace QuadTreeNames;
241 for(
unsigned i=0;
i<nr;
i++)
243 left_root_pt[
i]->neighbour_pt(
W) = right_root_pt[
i];
244 left_root_pt[
i]->set_neighbour_periodic(
W);
246 right_root_pt[
i]->neighbour_pt(
E) = left_root_pt[
i];
247 right_root_pt[
i]->set_neighbour_periodic(
E);
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors. ...
void wrap_into_annular_shape(const double &a, const double &h, const double &azimuthal_fraction, const double &phi)
Wrap mesh into annular shape.
AnnularDomain * Domain_pt
Pointer to domain.
unsigned long nelement() const
Return number of elements in the mesh.
TwoDAnnularMesh(const bool &periodic, const double &azimuthal_fraction, const unsigned &ntheta, const unsigned &nr, const double &a, const double &h, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor.
RefineableTwoDAnnularMesh(const bool &periodic, const double &azimuthal_fraction, const unsigned &ntheta, const unsigned &nr, const double &a, const double &h, const double &phi, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor; rotate mesh by angle phi.
TwoDAnnularMesh(const bool &periodic, const double &azimuthal_fraction, const unsigned &ntheta, const unsigned &nr, const double &a, const double &h, const double &phi, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor; rotate mesh by angle phi.
virtual void node_update(const bool &update_all_solid_nodes=false)
Update nodal positions in response to changes in the domain shape. Uses the FiniteElement::get_x(...) function for FiniteElements and doesn't do anything for other element types. If a MacroElement pointer has been set for a FiniteElement, the MacroElement representation is used to update the nodal positions; if not get_x(...) uses the FE interpolation and thus leaves the nodal positions unchanged. Virtual, so it can be overloaded by specific meshes, such as AlgebraicMeshes or SpineMeshes. Generally, this function updates the position of all nodes in response to changes in the boundary position. However, we ignore all SolidNodes since their position is computed as part of the solution – unless the bool flag is set to true. Such calls are typically made when the initial mesh is created and/or after a mesh has been refined repeatedly before the start of the computation.
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
RefineableTwoDAnnularMesh(const bool &periodic, const double &azimuthal_fraction, const unsigned &ntheta, const unsigned &nr, const double &a, const double &h, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor.