27 #ifndef OOMPH_ANNULAR_MESH_HEADER
28 #define OOMPH_ANNULAR_MESH_HEADER
44 template<
class ELEMENT>
50 const double& azimuthal_fraction,
51 const unsigned& ntheta,
55 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
57 ntheta, nr, 1.0, 1.0, periodic, time_stepper_pt)
60 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
69 const double& azimuthal_fraction,
70 const unsigned& ntheta,
75 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
77 ntheta, nr, 1.0, 1.0, periodic, time_stepper_pt)
80 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
91 const double& azimuthal_fraction,
105 template<
class ELEMENT>
107 public virtual RefineableQuadMesh<ELEMENT>
112 const bool& periodic,
113 const double& azimuthal_fraction,
114 const unsigned& ntheta,
118 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
120 ntheta, nr, 1.0, 1.0, periodic, time_stepper_pt),
122 periodic, azimuthal_fraction, ntheta, nr, a, h, time_stepper_pt)
125 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
132 unsigned nel = this->nelement();
133 for (
unsigned ielem = 0; ielem < nel; ielem++)
135 dynamic_cast<RefineableQElement<2>*
>(this->element_pt(ielem))
136 ->set_macro_elem_pt(this->
Domain_pt->macro_element_pt(ielem));
144 this->setup_quadtree_forest();
150 Vector<TreeRoot*> left_root_pt(nr);
151 Vector<TreeRoot*> right_root_pt(nr);
152 for (
unsigned i = 0; i < nr; i++)
154 left_root_pt[i] =
dynamic_cast<ELEMENT*
>(this->element_pt(i * ntheta))
159 dynamic_cast<ELEMENT*
>(this->element_pt((i + 1) * ntheta - 1))
165 using namespace QuadTreeNames;
166 for (
unsigned i = 0; i < nr; i++)
168 left_root_pt[i]->neighbour_pt(W) = right_root_pt[i];
169 left_root_pt[i]->set_neighbour_periodic(W);
171 right_root_pt[i]->neighbour_pt(E) = left_root_pt[i];
172 right_root_pt[i]->set_neighbour_periodic(E);
180 const bool& periodic,
181 const double& azimuthal_fraction,
182 const unsigned& ntheta,
187 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
189 ntheta, nr, 1.0, 1.0, periodic, time_stepper_pt),
191 periodic, azimuthal_fraction, ntheta, nr, a, h, phi, time_stepper_pt)
194 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
200 unsigned nel = this->nelement();
201 for (
unsigned ielem = 0; ielem < nel; ielem++)
203 dynamic_cast<RefineableQElement<2>*
>(this->element_pt(ielem))
204 ->set_macro_elem_pt(this->
Domain_pt->macro_element_pt(ielem));
212 this->setup_quadtree_forest();
218 Vector<TreeRoot*> left_root_pt(nr);
219 Vector<TreeRoot*> right_root_pt(nr);
220 for (
unsigned i = 0; i < nr; i++)
222 left_root_pt[i] =
dynamic_cast<ELEMENT*
>(this->element_pt(i * ntheta))
227 dynamic_cast<ELEMENT*
>(this->element_pt((i + 1) * ntheta - 1))
233 using namespace QuadTreeNames;
234 for (
unsigned i = 0; i < nr; i++)
236 left_root_pt[i]->neighbour_pt(W) = right_root_pt[i];
237 left_root_pt[i]->set_neighbour_periodic(W);
239 right_root_pt[i]->neighbour_pt(E) = left_root_pt[i];
240 right_root_pt[i]->set_neighbour_periodic(E);
RectangularQuadMesh is a two-dimensional mesh of Quad elements with Nx elements in the "x" (horizonal...
/////////////////////////////////////////////////////////////////// /////////////////////////////////...
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.
AnnularDomain * Domain_pt
Pointer to domain.
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.
2D annular mesh with a unit circle in the middle and a layer of thickness h surrounding it.
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.
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.
void wrap_into_annular_shape(const double &a, const double &h, const double &azimuthal_fraction, const double &phi)
Wrap mesh into annular shape.
////////////////////////////////////////////////////////////////////// //////////////////////////////...