30 #ifndef OOMPH_RECTANGLE_WITH_HOLE_DOMAIN_HEADER 31 #define OOMPH_RECTANGLE_WITH_HOLE_DOMAIN_HEADER 35 #include "../generic/quadtree.h" 36 #include "../generic/geom_objects.h" 37 #include "../generic/macro_element.h" 38 #include "../generic/domain.h" 61 const double &length) :
106 for (
unsigned i=0;
i<4;
i++)
124 for(
unsigned i=0;
i<2;
i++)
126 f[
i] = left[
i] + (right[
i] - left[
i])*0.5*(s+1.0);
137 const unsigned &direction,
142 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES 145 "Order of function arguments has changed between versions 0.8 and 0.85",
146 "RectangleWithHoleDomain::macro_element_boundary(...)",
147 OOMPH_EXCEPTION_LOCATION);
156 using namespace QuadTreeNames;
168 xi[0] = 3.0*atan(1.0);
174 xi[0] = -3.0*atan(1.0);
184 xi[0] = 5.0*atan(1.0) - 2.0*atan(1.0)*0.5*(1.0+s[0]);
190 std::ostringstream error_stream;
191 error_stream <<
"Direction is incorrect: " << direction << std::endl;
193 OOMPH_CURRENT_FUNCTION,
194 OOMPH_EXCEPTION_LOCATION);
209 xi[0] = 3.0*atan(1.0) - 2.0*atan(1.0)*0.5*(1.0+s[0]);
214 xi[0] = 3.0*atan(1.0);
220 xi[0] = 1.0*atan(1.0);
227 std::ostringstream error_stream;
228 error_stream <<
"Direction is incorrect: " << direction << std::endl;
230 OOMPH_CURRENT_FUNCTION,
231 OOMPH_EXCEPTION_LOCATION);
242 xi[0] = 1.0*atan(1.0);
248 xi[0] = -1.0*atan(1.0);
254 xi[0] = -atan(1.0) + 2.0*atan(1.0)*0.5*(1.0+s[0]);
264 std::ostringstream error_stream;
265 error_stream <<
"Direction is incorrect: " << direction << std::endl;
267 OOMPH_CURRENT_FUNCTION,
268 OOMPH_EXCEPTION_LOCATION);
279 xi[0] = -3.0*atan(1.0) + 2.0*atan(1.0)*0.5*(1.0+s[0]);
288 xi[0] = -3.0*atan(1.0);
294 xi[0] = -1.0*atan(1.0);
301 std::ostringstream error_stream;
302 error_stream <<
"Direction is incorrect: " << direction << std::endl;
304 OOMPH_CURRENT_FUNCTION,
305 OOMPH_EXCEPTION_LOCATION);
312 std::ostringstream error_stream;
313 error_stream <<
"Wrong macro element number" << m << std::endl;
315 OOMPH_CURRENT_FUNCTION,
316 OOMPH_EXCEPTION_LOCATION);
Rectangular domain with circular whole.
Vector< double > Lower_right
Lower right corner of rectangle.
RectangleWithHoleDomain(GeomObject *cylinder_pt, const double &length)
Constructor. Pass pointer to geometric object that represents the cylinder, the length of the (square...
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
Vector< double > Lower_mid_right
Where the "radial" line from circle meets lower boundary on right.
Vector< double > Lower_left
Lower left corner of rectangle.
~RectangleWithHoleDomain()
Destructor: Kill macro elements, why isn't this generic?
Vector< double > Upper_mid_left
Where the "radial" line from circle meets upper boundary on left.
Vector< double > Lower_mid_left
Where the "radial" line from circle meets lower boundary on left.
Vector< double > Upper_right
Upper right corner of rectangle.
Vector< double > Upper_left
Upper left corner of rectangle.
Vector< double > Upper_mid_right
Where the "radial" line from circle meets upper boundary on right.
GeomObject * Cylinder_pt
Pointer to geometric object that represents the central cylinder.
void linear_interpolate(Vector< double > left, Vector< double > right, const double &s, Vector< double > &f)
Helper function to interpolate linearly between the "right" and "left" points; .
Base class for Domains with curvilinear and/or time-dependent boundaries. Domain boundaries are typic...
void macro_element_boundary(const unsigned &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...