27 #ifndef OOMPH_TUBE_DOMAIN_HEADER
28 #define OOMPH_TUBE_DOMAIN_HEADER
31 #include "../generic/quadtree.h"
32 #include "../generic/domain.h"
33 #include "../generic/geom_objects.h"
80 const Vector<double>& centreline_limits,
81 const Vector<double>& theta_positions,
82 const Vector<double>& radius_box,
83 const unsigned& nlayer)
91 const unsigned n_macro = 5 * nlayer;
92 Macro_element_pt.resize(n_macro);
95 for (
unsigned i = 0; i < n_macro; i++)
97 Macro_element_pt[i] =
new QMacroElement<3>(
this, i);
115 const unsigned& i_macro,
116 const unsigned& i_direct,
117 const Vector<double>& s,
144 const Vector<double>& high,
149 for (
unsigned i = 0; i < 3; i++)
151 f[i] = low[i] + (high[i] - low[i]) * 0.5 * (s + 1.0);
168 const unsigned& imacro,
169 const unsigned& idirect,
170 const Vector<double>& s,
173 using namespace OcTreeNames;
175 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
178 "Order of function arguments has changed between versions 0.8 and 0.85",
179 "TubeDomain::macro_element_boundary(...)",
180 OOMPH_EXCEPTION_LOCATION);
184 unsigned ilayer = unsigned(imacro / 5);
188 Vector<Vector<Vector<double>>> Box(2);
191 Vector<double> zeta_centre(2);
193 Vector<double> zeta(3);
196 for (
unsigned i = 0; i < 2; i++)
208 zeta[0] = zeta_centre[i];
211 for (
unsigned j = 0; j < 4; j++)
226 Vector<double> pos_1(3), pos_2(3);
228 const double pi = MathematicalConstants::Pi;
243 zeta[0] = zeta_centre[0] +
244 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
262 zeta[0] = zeta_centre[0] +
263 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
281 zeta[0] = zeta_centre[0] +
282 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
299 zeta[0] = zeta_centre[0] +
300 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
336 std::ostringstream error_stream;
337 error_stream <<
"idirect is " << idirect
338 <<
" not one of L, R, D, U, B, F" << std::endl;
340 throw OomphLibError(error_stream.str(),
341 OOMPH_CURRENT_FUNCTION,
342 OOMPH_EXCEPTION_LOCATION);
357 zeta[0] = zeta_centre[0] +
358 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
373 zeta[0] = zeta_centre[0] +
374 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
389 zeta[0] = zeta_centre[0] +
390 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
401 zeta[0] = zeta_centre[0] +
402 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
418 zeta[0] = zeta_centre[0];
434 zeta[0] = zeta_centre[1];
451 std::ostringstream error_stream;
452 error_stream <<
"idirect is " << idirect
453 <<
" not one of L, R, D, U, B, F" << std::endl;
455 throw OomphLibError(error_stream.str(),
456 OOMPH_CURRENT_FUNCTION,
457 OOMPH_EXCEPTION_LOCATION);
473 zeta[0] = zeta_centre[0] +
474 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
490 zeta[0] = zeta_centre[0] +
491 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
501 zeta[0] = zeta_centre[0] +
502 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
517 zeta[0] = zeta_centre[0] +
518 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
533 zeta[0] = zeta_centre[0];
549 zeta[0] = zeta_centre[1];
565 std::ostringstream error_stream;
566 error_stream <<
"idirect is " << idirect
567 <<
" not one of L, R, D, U, B, F" << std::endl;
569 throw OomphLibError(error_stream.str(),
570 OOMPH_CURRENT_FUNCTION,
571 OOMPH_EXCEPTION_LOCATION);
584 zeta[0] = zeta_centre[0] +
585 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
601 zeta[0] = zeta_centre[0] +
602 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
620 zeta[0] = zeta_centre[0] +
621 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
638 zeta[0] = zeta_centre[0] +
639 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
649 zeta[0] = zeta_centre[0];
665 zeta[0] = zeta_centre[1];
681 std::ostringstream error_stream;
682 error_stream <<
"idirect is " << idirect
683 <<
" not one of L, R, D, U, B, F" << std::endl;
685 throw OomphLibError(error_stream.str(),
686 OOMPH_CURRENT_FUNCTION,
687 OOMPH_EXCEPTION_LOCATION);
703 zeta[0] = zeta_centre[0] +
704 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
716 zeta[0] = zeta_centre[0] +
717 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
734 zeta[0] = zeta_centre[0] +
735 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
752 zeta[0] = zeta_centre[0] +
753 (zeta_centre[1] - zeta_centre[0]) * 0.5 * (s[1] + 1.0);
769 zeta[0] = zeta_centre[0];
787 zeta[0] = zeta_centre[1];
803 std::ostringstream error_stream;
804 error_stream <<
"idirect is " << idirect
805 <<
" not one of L, R, D, U, B, F" << std::endl;
807 throw OomphLibError(error_stream.str(),
808 OOMPH_CURRENT_FUNCTION,
809 OOMPH_EXCEPTION_LOCATION);
816 std::ostringstream error_stream;
817 error_stream <<
"Wrong imacro " << imacro << std::endl;
819 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
Tube as a domain. The entire domain must be defined by a GeomObject with the following convention: ze...
TubeDomain(GeomObject *volume_geom_object_pt, const Vector< double > ¢reline_limits, const Vector< double > &theta_positions, const Vector< double > &radius_box, const unsigned &nlayer)
Constructor: Pass geometric object; start and end limit of the centreline coordinate; the theta locat...
void macro_element_boundary(const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
Vector representation of the i_macro-th macro element boundary i_direct (L/R/D/U/B/F) at time level t...
TubeDomain(const TubeDomain &)=delete
Broken copy constructor.
Vector< double > Centreline_limits
Storage for the limits of the centreline coordinate.
void operator=(const TubeDomain &)=delete
Broken assignment operator.
void lin_interpolate(const Vector< double > &low, const Vector< double > &high, const double &s, Vector< double > &f)
A very little linear interpolation helper. Interpolate from the low point to the high point using the...
GeomObject * Volume_pt
Pointer to geometric object that represents the domain.
unsigned Nlayer
Number of axial layers.
Vector< double > Theta_positions
Storage for the dividing lines on the boundary starting from the lower left and proceeding anticlockw...
Vector< double > Radius_box
Storage for the fraction of the radius at which the central box should be located corresponding to th...
~TubeDomain()
Destructor: Empty; cleanup done in base class.
////////////////////////////////////////////////////////////////////// //////////////////////////////...