27 #ifndef OOMPH_RECTANGLE_WITH_MOVING_CYLINDER_MESH_HEADER
28 #define OOMPH_RECTANGLE_WITH_MOVING_CYLINDER_MESH_HEADER
32 #include <oomph-lib-config.h>
35 #include "../generic/domain.h"
36 #include "../generic/geom_objects.h"
37 #include "../generic/refineable_quad_mesh.h"
62 const double& annular_region_radius,
102 unsigned n_macro_element = 8;
105 Macro_element_pt.resize(n_macro_element);
108 for (
unsigned i = 0; i < n_macro_element; i++)
111 Macro_element_pt[i] =
new QMacroElement<2>(
this, i);
125 const Vector<double>& xi,
133 const Vector<double>& xi,
140 const Vector<double>& right,
145 for (
unsigned i = 0; i < 2; i++)
148 f[i] = left[i] + (right[i] - left[i]) * 0.5 * (s + 1.0);
159 const unsigned& direction,
160 const Vector<double>& s,
169 const unsigned& direction,
170 const Vector<double>& s,
215 template<
class ELEMENT>
226 GeomObject* cylinder_pt,
227 const double& annular_region_radius,
228 const double& length,
229 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
268 template<
class ELEMENT>
271 public RefineableQuadMesh<ELEMENT>
281 GeomObject* cylinder_pt,
282 const double& annular_region_radius,
283 const double& length,
284 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
286 cylinder_pt, annular_region_radius, length, time_stepper_pt)
292 unsigned n_macro_element = this->
Domain_pt->nmacro_element();
295 for (
unsigned e = 0; e < n_macro_element; e++)
297 dynamic_cast<ELEMENT*
>(this->element_pt(e))
298 ->set_macro_elem_pt(this->
Domain_pt->macro_element_pt(e));
302 this->setup_boundary_element_info();
305 this->setup_quadtree_forest();
319 template<
class ELEMENT>
321 :
public virtual RefineableQuadMesh<ELEMENT>
330 GeomObject* cylinder_pt,
331 const double& annular_region_radius,
332 const double& length_of_central_box,
333 const double& x_left,
334 const double& x_right,
335 const double& height,
336 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
Rectangular domain with circular whole DRAIG: This looks like a redefinition of the RectangleWithHole...
Vector< double > Upper_mid_left
Where the "radial" line from circle meets upper boundary on left.
void linear_interpolate(const Vector< double > &left, const Vector< double > &right, const double &s, Vector< double > &f)
Helper function to interpolate linearly between the "right" and "left" points; .
Vector< double > Lower_right
Lower right corner of rectangle.
Vector< double > Upper_right
Upper right corner of rectangle.
void macro_element_boundary(const double &time, const unsigned &m, const unsigned &direction, const Vector< double > &s, Vector< double > &f)
Parametrisation of macro element boundaries: f(s) is the position vector to macro-element m's boundar...
~RectangleWithHoleAndAnnularRegionDomain()
Destructor: Empty; macro elements are deleted in base class destructor.
GeomObject * Cylinder_pt
Pointer to geometric object that represents the central cylinder.
void project_point_on_cylinder_to_annular_boundary(const unsigned &time, const Vector< double > &xi, Vector< double > &r)
Helper function that, given the Lagrangian coordinate, xi, (associated with a point on the cylinder),...
Vector< double > Lower_mid_left
Where the "radial" line from circle meets lower boundary on left.
Vector< double > Lower_mid_right
Where the "radial" line from circle meets lower boundary on right.
double Annular_region_radius
The radius of the outer boundary of the annular region whose inner boundary is described by Cylinder_...
Vector< double > Upper_mid_right
Where the "radial" line from circle meets upper boundary on right.
Vector< double > Lower_left
Lower left corner of rectangle.
Vector< double > Upper_left
Upper left corner of rectangle.
RectangleWithHoleAndAnnularRegionDomain(GeomObject *cylinder_pt, const double &annular_region_radius, const double &length)
Constructor. Pass pointer to geometric object that represents the cylinder, the length of the (square...
///////////////////////////////////////////////////////////////////// ///////////////////////////////...
RectangleWithHoleAndAnnularRegionDomain * Domain_pt
Pointer to the domain.
RectangleWithHoleAndAnnularRegionDomain * domain_pt()
Access function to the domain.
RectangleWithHoleAndAnnularRegionMesh(GeomObject *cylinder_pt, const double &annular_region_radius, const double &length, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to geometric object that represents the cylinder, the length and height of ...
~RectangleWithHoleAndAnnularRegionMesh()
Destructor: We made the Domain object so we have a responsibility for deleting it!
///////////////////////////////////////////////////////////////////// ///////////////////////////////...
RefineableQuadMeshWithMovingCylinder(GeomObject *cylinder_pt, const double &annular_region_radius, const double &length_of_central_box, const double &x_left, const double &x_right, const double &height, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor. Pass pointer to geometric object that represents the cylinder; hierher the length and he...
RefineableRectangleWithHoleAndAnnularRegionMesh< ELEMENT > * Central_mesh_pt
Pointer to the part of the mesh which has a Domain representation. We have to store it because we can...
~RefineableQuadMeshWithMovingCylinder()
Destructor: Delete the part of the mesh which has a Domain representation.
///////////////////////////////////////////////////////////////////// ///////////////////////////////...
RefineableRectangleWithHoleAndAnnularRegionMesh(GeomObject *cylinder_pt, const double &annular_region_radius, const double &length, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor. Pass pointer to geometric object that represents the cylinder, the length and height of ...
virtual ~RefineableRectangleWithHoleAndAnnularRegionMesh()
Destructor: Empty.
////////////////////////////////////////////////////////////////////// //////////////////////////////...