38 GeomObject* top_flag_pt,
39 GeomObject* bottom_flag_pt,
40 GeomObject* tip_flag_pt,
43 const double& flag_length,
44 const double& flag_height,
45 const double& centre_x,
46 const double& centre_y,
48 : Cylinder_pt(cylinder_pt),
49 Top_flag_pt(top_flag_pt),
50 Bottom_flag_pt(bottom_flag_pt),
51 Tip_flag_pt(tip_flag_pt),
70 p3[0] = 0.155596 * length;
74 p4[0] = 0.183596 * length;
78 p5[0] = 0.239596 * length;
82 p6[0] = 0.285123967 * length;
86 p7[0] = 0.433884298 * length;
90 p8[0] = 0.578512397 * length;
94 p9[0] = 0.789256198 * length;
102 p11[0] = 0.127596 * length;
103 p11[1] = 0.778024390 * height;
106 p12[0] = 0.155596 * length;
107 p12[1] = 0.778024390 * height;
110 p13[0] = 0.183596 * length;
111 p13[1] = 0.778024390 * height;
114 p14[0] = 0.211596 * length;
115 p14[1] = 0.778024390 * height;
118 p15[0] = 0.285123967 * length;
119 p15[1] = 0.625 * height;
122 p16[0] = 0.351239669 * length;
123 p16[1] = 0.625 * height;
134 p35[0] = 0.285123967 * length;
135 p35[1] = 0.350609756 * height;
138 p36[0] = 0.351239669 * length;
139 p36[1] = 0.350609756 * height;
142 p37[0] = 0.127596 * length;
143 p37[1] = 0.197585366 * height;
146 p38[0] = 0.155596 * length;
147 p38[1] = 0.197585366 * height;
150 p39[0] = 0.183596 * length;
151 p39[1] = 0.197585366 * height;
154 p40[0] = 0.211596 * length;
155 p40[1] = 0.197585366 * height;
166 p43[0] = 0.155596 * length;
170 p44[0] = 0.183596 * length;
174 p45[0] = 0.239596 * length;
178 p46[0] = 0.285123967 * length;
182 p47[0] = 0.433884298 * length;
186 p48[0] = 0.578512397 * length;
190 p49[0] = 0.789256198 * length;
211 Macro_element_pt.resize(31);
214 for (
unsigned i = 0; i < 31; i++)
216 Macro_element_pt[i] =
new QMacroElement<2>(
this, i);
229 const unsigned& direction,
230 const Vector<double>& s,
234 using namespace QuadTreeNames;
236 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
239 "Order of function arguments has changed between versions 0.8 and 0.85",
240 "CylinderWithFlagDomain::macro_element_boundary(...)",
241 OOMPH_EXCEPTION_LOCATION);
246 Vector<double> xi(1);
249 Vector<double> point_on_circle(2);
252 Vector<double> zeta(1);
256 zeta[0] = 1. / 5. *
Lx;
259 zeta[0] = 2. / 5. *
Lx;
262 zeta[0] = 3. / 5. *
Lx;
265 zeta[0] = 4. / 5. *
Lx;
271 zeta[0] = 1. / 5. *
Lx;
274 zeta[0] = 2. / 5. *
Lx;
277 zeta[0] = 3. / 5. *
Lx;
280 zeta[0] = 4. / 5. *
Lx;
287 std::ostringstream error_message;
298 xi[0] = 3.0 * atan(1.0);
304 xi[0] = -3.0 * atan(1.0);
314 xi[0] = 5.0 * atan(1.0) - 2.0 * atan(1.0) * 0.5 * (1.0 + s[0]);
319 error_message <<
"Direction is incorrect: " << direction
321 throw OomphLibError(error_message.str(),
322 OOMPH_CURRENT_FUNCTION,
323 OOMPH_EXCEPTION_LOCATION);
338 xi[0] = 3.0 * atan(1.0) - atan(1.0) * 0.5 * (1.0 + s[0]);
343 xi[0] = 3.0 * atan(1.0);
353 error_message <<
"Direction is incorrect: " << direction
355 throw OomphLibError(error_message.str(),
356 OOMPH_CURRENT_FUNCTION,
357 OOMPH_EXCEPTION_LOCATION);
372 xi[0] = 2.0 * atan(1.0) - atan(1.0) * 0.5 * (1.0 + s[0]);
387 error_message <<
"Direction is incorrect: " << direction
389 throw OomphLibError(error_message.str(),
390 OOMPH_CURRENT_FUNCTION,
391 OOMPH_EXCEPTION_LOCATION);
408 xi[0] = (1. + s[0]) / 2. * 1. / 5. *
Lx;
413 xi[0] = asin(
Ly /
A / 2.) +
414 (atan(1.0) - asin(
Ly /
A / 2.)) * 0.5 * (1.0 + s[0]);
423 error_message <<
"Direction is incorrect: " << direction
425 throw OomphLibError(error_message.str(),
426 OOMPH_CURRENT_FUNCTION,
427 OOMPH_EXCEPTION_LOCATION);
438 xi[0] = (1. + s[0]) / 2. * 1. / 5. *
Lx;
450 -atan(1.0) + (atan(1.0) - asin(
Ly /
A / 2.)) * 0.5 * (1.0 + s[0]);
459 error_message <<
"Direction is incorrect: " << direction
461 throw OomphLibError(error_message.str(),
462 OOMPH_CURRENT_FUNCTION,
463 OOMPH_EXCEPTION_LOCATION);
474 xi[0] = 6 * atan(1.0) + atan(1.0) * 0.5 * (1.0 + s[0]);
493 error_message <<
"Direction is incorrect: " << direction
495 throw OomphLibError(error_message.str(),
496 OOMPH_CURRENT_FUNCTION,
497 OOMPH_EXCEPTION_LOCATION);
508 xi[0] = 5.0 * atan(1.0) + atan(1.0) * 0.5 * (1.0 + s[0]);
517 xi[0] = 5.0 * atan(1.0);
527 error_message <<
"Direction is incorrect: " << direction
529 throw OomphLibError(error_message.str(),
530 OOMPH_CURRENT_FUNCTION,
531 OOMPH_EXCEPTION_LOCATION);
558 error_message <<
"Direction is incorrect: " << direction
560 throw OomphLibError(error_message.str(),
561 OOMPH_CURRENT_FUNCTION,
562 OOMPH_EXCEPTION_LOCATION);
576 xi[0] = 1. / 5. *
Lx + (1. + s[0]) / 2. * 1. / 5. *
Lx;
589 error_message <<
"Direction is incorrect: " << direction
591 throw OomphLibError(error_message.str(),
592 OOMPH_CURRENT_FUNCTION,
593 OOMPH_EXCEPTION_LOCATION);
602 xi[0] = 1. / 5. *
Lx + (1. + s[0]) / 2. * 1. / 5. *
Lx;
619 error_message <<
"Direction is incorrect: " << direction
621 throw OomphLibError(error_message.str(),
622 OOMPH_CURRENT_FUNCTION,
623 OOMPH_EXCEPTION_LOCATION);
649 error_message <<
"Direction is incorrect: " << direction
651 throw OomphLibError(error_message.str(),
652 OOMPH_CURRENT_FUNCTION,
653 OOMPH_EXCEPTION_LOCATION);
678 error_message <<
"Direction is incorrect: " << direction
680 throw OomphLibError(error_message.str(),
681 OOMPH_CURRENT_FUNCTION,
682 OOMPH_EXCEPTION_LOCATION);
697 xi[0] = 2. / 5. *
Lx + (1. + s[0]) / 2. * 1. / 5. *
Lx;
710 error_message <<
"Direction is incorrect: " << direction
712 throw OomphLibError(error_message.str(),
713 OOMPH_CURRENT_FUNCTION,
714 OOMPH_EXCEPTION_LOCATION);
724 xi[0] = 2. / 5. *
Lx + (1. + s[0]) / 2. * 1. / 5. *
Lx;
741 error_message <<
"Direction is incorrect: " << direction
743 throw OomphLibError(error_message.str(),
744 OOMPH_CURRENT_FUNCTION,
745 OOMPH_EXCEPTION_LOCATION);
771 error_message <<
"Direction is incorrect: " << direction
773 throw OomphLibError(error_message.str(),
774 OOMPH_CURRENT_FUNCTION,
775 OOMPH_EXCEPTION_LOCATION);
801 error_message <<
"Direction is incorrect: " << direction
803 throw OomphLibError(error_message.str(),
804 OOMPH_CURRENT_FUNCTION,
805 OOMPH_EXCEPTION_LOCATION);
819 xi[0] = 3. / 5. *
Lx + (1. + s[0]) / 2. * 1. / 5. *
Lx;
832 error_message <<
"Direction is incorrect: " << direction
834 throw OomphLibError(error_message.str(),
835 OOMPH_CURRENT_FUNCTION,
836 OOMPH_EXCEPTION_LOCATION);
846 xi[0] = 3. / 5. *
Lx + (1. + s[0]) / 2. * 1. / 5. *
Lx;
863 error_message <<
"Direction is incorrect: " << direction
865 throw OomphLibError(error_message.str(),
866 OOMPH_CURRENT_FUNCTION,
867 OOMPH_EXCEPTION_LOCATION);
893 error_message <<
"Direction is incorrect: " << direction
895 throw OomphLibError(error_message.str(),
896 OOMPH_CURRENT_FUNCTION,
897 OOMPH_EXCEPTION_LOCATION);
911 xi[0] = 4. / 5. *
Lx + (1. + s[0]) / 2. * 1. / 5. *
Lx;
924 error_message <<
"Direction is incorrect: " << direction
926 throw OomphLibError(error_message.str(),
927 OOMPH_CURRENT_FUNCTION,
928 OOMPH_EXCEPTION_LOCATION);
938 xi[0] = 4. / 5. *
Lx + (1. + s[0]) / 2. * 1. / 5. *
Lx;
955 error_message <<
"Direction is incorrect: " << direction
957 throw OomphLibError(error_message.str(),
958 OOMPH_CURRENT_FUNCTION,
959 OOMPH_EXCEPTION_LOCATION);
985 error_message <<
"Direction is incorrect: " << direction
987 throw OomphLibError(error_message.str(),
988 OOMPH_CURRENT_FUNCTION,
989 OOMPH_EXCEPTION_LOCATION);
1007 xi[0] = s[0] *
Ly / 2.;
1016 error_message <<
"Direction is incorrect: " << direction
1018 throw OomphLibError(error_message.str(),
1019 OOMPH_CURRENT_FUNCTION,
1020 OOMPH_EXCEPTION_LOCATION);
1046 error_message <<
"Direction is incorrect: " << direction
1048 throw OomphLibError(error_message.str(),
1049 OOMPH_CURRENT_FUNCTION,
1050 OOMPH_EXCEPTION_LOCATION);
1076 error_message <<
"Direction is incorrect: " << direction
1078 throw OomphLibError(error_message.str(),
1079 OOMPH_CURRENT_FUNCTION,
1080 OOMPH_EXCEPTION_LOCATION);
1106 error_message <<
"Direction is incorrect: " << direction
1108 throw OomphLibError(error_message.str(),
1109 OOMPH_CURRENT_FUNCTION,
1110 OOMPH_EXCEPTION_LOCATION);
1136 error_message <<
"Direction is incorrect: " << direction
1138 throw OomphLibError(error_message.str(),
1139 OOMPH_CURRENT_FUNCTION,
1140 OOMPH_EXCEPTION_LOCATION);
1166 error_message <<
"Direction is incorrect: " << direction
1168 throw OomphLibError(error_message.str(),
1169 OOMPH_CURRENT_FUNCTION,
1170 OOMPH_EXCEPTION_LOCATION);
1196 error_message <<
"Direction is incorrect: " << direction
1198 throw OomphLibError(error_message.str(),
1199 OOMPH_CURRENT_FUNCTION,
1200 OOMPH_EXCEPTION_LOCATION);
1226 error_message <<
"Direction is incorrect: " << direction
1228 throw OomphLibError(error_message.str(),
1229 OOMPH_CURRENT_FUNCTION,
1230 OOMPH_EXCEPTION_LOCATION);
1256 error_message <<
"Direction is incorrect: " << direction
1258 throw OomphLibError(error_message.str(),
1259 OOMPH_CURRENT_FUNCTION,
1260 OOMPH_EXCEPTION_LOCATION);
1267 error_message <<
"Wrong macro element number" << m << std::endl;
1268 throw OomphLibError(error_message.str(),
1269 OOMPH_CURRENT_FUNCTION,
1270 OOMPH_EXCEPTION_LOCATION);
GeomObject * Tip_flag_pt
Pointer to geometric object that represents the tip of the flag.
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...
GeomObject * Top_flag_pt
Pointer to geometric object that represents the top of the flag.
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; .
CylinderWithFlagDomain(Circle *cylinder_pt, GeomObject *top_flag_pt, GeomObject *bottom_flag_pt, GeomObject *tip_flag_pt, const double &length, const double &height, const double &flag_length, const double &flag_height, const double ¢re_x, const double ¢re_y, const double &a)
Constructor. Pass the pointers to the GeomObjects that parametrise the cylinder, the three edges of t...
GeomObject * Bottom_flag_pt
Pointer to geometric object that represents the bottom of the flag.
Circle * Cylinder_pt
Pointer to geometric object that represents the central cylinder.
////////////////////////////////////////////////////////////////////// //////////////////////////////...