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"
83 const unsigned& nlayer)
91 const unsigned n_macro = 5 * nlayer;
95 for (
unsigned i = 0;
i < n_macro;
i++)
115 const unsigned& i_macro,
116 const unsigned& i_direct,
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,
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);
196 for (
unsigned i = 0;
i < 2;
i++)
208 zeta[0] = zeta_centre[
i];
211 for (
unsigned j = 0; j < 4; j++)
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;
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;
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;
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;
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;
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);
Base class for Domains with curvilinear and/or time-dependent boundaries. Domain boundaries are typic...
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).
An OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
QMacroElement specialised to 3 spatial dimensions.
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.
const double Pi
50 digits from maple
//////////////////////////////////////////////////////////////////// ////////////////////////////////...