31 #ifndef OOMPH_QUARTER_TUBE_DOMAIN_HEADER 32 #define OOMPH_QUARTER_TUBE_DOMAIN_HEADER 35 #include "../generic/quadtree.h" 36 #include "../generic/domain.h" 37 #include "../generic/geom_objects.h" 59 const Vector<double>& xi_lo,
60 const double& fract_mid,
61 const Vector<double>& xi_hi,
62 const unsigned& nlayer) :
68 unsigned nmacro=3*nlayer;
71 Macro_element_pt.resize(nmacro);
74 for (
unsigned i=0;i<nmacro;i++)
76 Macro_element_pt[i]=
new QMacroElement<3>(
this,i);
83 BrokenCopy::broken_copy(
"QuarterTubeDomain");
89 BrokenCopy::broken_assign(
"QuarterTubeDomain");
96 for (
unsigned i=0;i<3*
Nlayer;i++)
98 delete Macro_element_pt[i];
153 const unsigned& i_macro,
154 const unsigned& i_direct,
155 const Vector<double>& s,
208 void r_centr_L(
const unsigned& t,
const Vector<double>& zeta,
209 const unsigned& i_layer, Vector<double>& f);
213 void r_centr_R(
const unsigned& t,
const Vector<double>& zeta,
214 const unsigned& i_layer, Vector<double>& f);
218 void r_centr_D(
const unsigned& t,
const Vector<double>& zeta,
219 const unsigned& i_layer, Vector<double>& f);
223 void r_centr_U(
const unsigned& t,
const Vector<double>& zeta,
224 const unsigned& i_layer, Vector<double>& f);
228 void r_centr_B(
const unsigned& t,
const Vector<double>& zeta,
229 const unsigned& i_layer, Vector<double>& f);
233 void r_centr_F(
const unsigned& t,
const Vector<double>& zeta,
234 const unsigned& i_layer, Vector<double>& f);
242 void r_bot_right_L(
const unsigned& t,
const Vector<double>& zeta,
243 const unsigned& i_layer, Vector<double>& f);
247 void r_bot_right_R(
const unsigned& t,
const Vector<double>& zeta,
248 const unsigned& i_layer, Vector<double>& f);
252 void r_bot_right_D(
const unsigned& t,
const Vector<double>& zeta,
253 const unsigned& i_layer, Vector<double>& f);
257 void r_bot_right_U(
const unsigned& t,
const Vector<double>& zeta,
258 const unsigned& i_layer, Vector<double>& f);
262 void r_bot_right_B(
const unsigned& t,
const Vector<double>& zeta,
263 const unsigned& i_layer, Vector<double>& f);
267 void r_bot_right_F(
const unsigned& t,
const Vector<double>& zeta,
268 const unsigned& i_layer, Vector<double>& f);
276 void r_top_left_L(
const unsigned& t,
const Vector<double>& zeta,
277 const unsigned& i_layer, Vector<double>& f);
281 void r_top_left_R(
const unsigned& t,
const Vector<double>& zeta,
282 const unsigned& i_layer, Vector<double>& f);
286 void r_top_left_D(
const unsigned& t,
const Vector<double>& zeta,
287 const unsigned& i_layer, Vector<double>& f);
291 void r_top_left_U(
const unsigned& t,
const Vector<double>& zeta,
292 const unsigned& i_layer, Vector<double>& f);
296 void r_top_left_B(
const unsigned& t,
const Vector<double>& zeta,
297 const unsigned& i_layer, Vector<double>& f);
301 void r_top_left_F(
const unsigned& t,
const Vector<double>& zeta,
302 const unsigned& i_layer, Vector<double>& f);
321 const unsigned& imacro,
322 const unsigned& idirect,
323 const Vector<double>& s,
327 using namespace OcTreeNames;
329 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES 332 "Order of function arguments has changed between versions 0.8 and 0.85",
333 "QuarterTubeDomain::macro_element_boundary(...)",
334 OOMPH_EXCEPTION_LOCATION);
338 unsigned ilayer=unsigned(imacro/3);
376 std::ostringstream error_stream;
377 error_stream <<
"idirect is " << idirect
378 <<
" not one of L, R, D, U, B, F" << std::endl;
382 OOMPH_CURRENT_FUNCTION,
383 OOMPH_EXCEPTION_LOCATION);
420 std::ostringstream error_stream;
421 error_stream <<
"idirect is " << idirect
422 <<
" not one of L, R, D, U, B, F" << std::endl;
426 OOMPH_CURRENT_FUNCTION,
427 OOMPH_EXCEPTION_LOCATION);
464 std::ostringstream error_stream;
465 error_stream <<
"idirect is " << idirect
466 <<
" not one of L, R, D, U, B, F" << std::endl;
470 OOMPH_CURRENT_FUNCTION,
471 OOMPH_EXCEPTION_LOCATION);
479 std::ostringstream error_stream;
480 error_stream <<
"Wrong imacro " << imacro << std::endl;
483 OOMPH_CURRENT_FUNCTION,
484 OOMPH_EXCEPTION_LOCATION);
496 const Vector<double>& zeta,
497 const unsigned& i_layer,
508 Vector<double> r_top(3);
513 f[1]=r_top[1]*0.25*(1.0+zeta[0]);
516 f[2]=x[0]+rho*(r_top[2]-x[0]);
530 const Vector<double>& zeta,
531 const unsigned& i_layer,
544 Vector<double> r_top(3);
553 Vector<double> r_bottom(3);
554 Wall_pt->position(t,x,r_bottom);
557 f[0]=0.5*r_bottom[0];
558 f[1]=r_top[1]*0.25*(1.0+zeta[0]);
562 f[2]=x[0]+rho*(r_top[2]-x[0]);
578 const Vector<double>& zeta,
579 const unsigned& i_layer,
590 Vector<double> r_bottom(3);
591 Wall_pt->position(t,x,r_bottom);
594 f[0]=r_bottom[0]*0.25*(1.0+zeta[0]);
599 f[2]=x[0]+rho*(r_bottom[2]-x[0]);
611 const Vector<double>& zeta,
612 const unsigned& i_layer,
622 Vector<double> r_top(3);
631 Vector<double> r_bottom(3);
632 Wall_pt->position(t,x,r_bottom);
635 f[0]=r_bottom[0]*0.25*(1.0+zeta[0]);
640 f[2]=x[0]+rho*(r_bottom[2]-x[0]);
653 const Vector<double>& zeta,
654 const unsigned& i_layer,
664 Vector<double> r_bottom(3);
665 Wall_pt->position(t,x,r_bottom);
674 Vector<double> r_top(3);
678 f[0]=r_bottom[0]*0.25*(1.0+zeta[0]);
679 f[1]=r_top[1]*0.25*(1.0+zeta[1]);
683 f[2]=x[0]+rho*(r_top[2]-x[0]);
697 const Vector<double>& zeta,
698 const unsigned& i_layer,
708 Vector<double> r_bottom(3);
709 Wall_pt->position(t,x,r_bottom);
718 Vector<double> r_top(3);
722 f[0]=r_bottom[0]*0.25*(1.0+zeta[0]);
723 f[1]=r_top[1]*0.25*(1.0+zeta[1]);
727 f[2]=x[0]+rho*(r_top[2]-x[0]);
744 const Vector<double>& zeta,
745 const unsigned& i_layer,
758 const Vector<double>& zeta,
759 const unsigned& i_layer,
782 const Vector<double>& zeta,
783 const unsigned& i_layer,
794 Vector<double> r_bottom(3);
795 Wall_pt->position(t,x,r_bottom);
798 f[0]=0.5*r_bottom[0]*(1.0+
s_squashed(0.5*(1.0+zeta[0])));
803 f[2]=x[0]+rho*(r_bottom[2]-x[0]);
815 const Vector<double>& zeta,
816 const unsigned& i_layer,
827 Vector<double> r_div(3);
832 Vector<double> zeta_central(2);
833 Vector<double> r_central(3);
835 zeta_central[1]=zeta[1];
836 r_centr_R(t,zeta_central,i_layer,r_central);
841 f[0]=r_central[0]+(r_div[0]-r_central[0])*
s_squashed(0.5*(1.0+zeta[0]));
842 f[1]=r_central[1]+(r_div[1]-r_central[1])*
s_squashed(0.5*(1.0+zeta[0]));
843 f[2]=r_central[2]+(r_div[2]-r_central[2])*
s_squashed(0.5*(1.0+zeta[0]));
854 const Vector<double>& zeta,
855 const unsigned& i_layer,
865 Vector<double> r_wall(3);
869 Vector<double> zeta_central(2);
870 Vector<double> r_central(3);
871 zeta_central[0]=zeta[1];
872 zeta_central[1]=-1.0;
873 r_centr_R(t,zeta_central,i_layer,r_central);
877 f[0]=r_central[0]+(r_wall[0]-r_central[0])*
s_squashed(0.5*(1.0+zeta[0]));
878 f[1]=r_central[1]+(r_wall[1]-r_central[1])*
s_squashed(0.5*(1.0+zeta[0]));
879 f[2]=r_central[2]+(r_wall[2]-r_central[2])*
s_squashed(0.5*(1.0+zeta[0]));
895 const Vector<double>& zeta,
896 const unsigned& i_layer,
907 Vector<double> r_wall(3);
911 Vector<double> zeta_central(2);
912 Vector<double> r_central(3);
913 zeta_central[0]=zeta[1];
915 r_centr_R(t,zeta_central,i_layer,r_central);
919 f[0]=r_central[0]+(r_wall[0]-r_central[0])*
s_squashed(0.5*(1.0+zeta[0]));
920 f[1]=r_central[1]+(r_wall[1]-r_central[1])*
s_squashed(0.5*(1.0+zeta[0]));
921 f[2]=r_central[2]+(r_wall[2]-r_central[2])*
s_squashed(0.5*(1.0+zeta[0]));
937 const Vector<double>& zeta,
938 const unsigned& i_layer,
949 Vector<double> r_top(3);
954 f[1]=0.5*r_top[1]*(1.0+
s_squashed(0.5*(1.0+zeta[0])));
958 f[2]=x[0]+rho*(r_top[2]-x[0]);
970 const Vector<double>& zeta,
971 const unsigned& i_layer,
975 Vector<double> zeta_br(2);
989 const Vector<double>& zeta,
990 const unsigned& i_layer,
1002 const Vector<double>& zeta,
1003 const unsigned& i_layer,
1009 Vector<double> x(2);
1026 const Vector<double>& zeta,
1027 const unsigned& i_layer,
1032 Vector<double> x(2);
1039 Vector<double> r_wall(3);
1040 Wall_pt->position(t,x,r_wall);
1044 Vector<double> zeta_central(2);
1045 Vector<double> r_central(3);
1046 zeta_central[0]=zeta[0];
1047 zeta_central[1]=-1.0;
1048 r_centr_U(t,zeta_central,i_layer,r_central);
1051 f[0]=r_central[0]+(r_wall[0]-r_central[0])*
s_squashed(0.5*(1.0+zeta[1]));
1052 f[1]=r_central[1]+(r_wall[1]-r_central[1])*
s_squashed(0.5*(1.0+zeta[1]));
1053 f[2]=r_central[2]+(r_wall[2]-r_central[2])*
s_squashed(0.5*(1.0+zeta[1]));
1066 const Vector<double>& zeta,
1067 const unsigned& i_layer,
1072 Vector<double> x(2);
1079 Vector<double> r_wall(3);
1080 Wall_pt->position(t,x,r_wall);
1084 Vector<double> zeta_central(2);
1085 Vector<double> r_central(3);
1086 zeta_central[0]=zeta[0];
1087 zeta_central[1]=1.0;
1088 r_centr_U(t,zeta_central,i_layer,r_central);
1091 f[0]=r_central[0]+(r_wall[0]-r_central[0])*
s_squashed(0.5*(1.0+zeta[1]));
1092 f[1]=r_central[1]+(r_wall[1]-r_central[1])*
s_squashed(0.5*(1.0+zeta[1]));
1093 f[2]=r_central[2]+(r_wall[2]-r_central[2])*
s_squashed(0.5*(1.0+zeta[1]));
AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that implements axial spacing of macro elements.
void r_bot_right_L(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of bottom right box macro element in layer i_layer zeta .
double axial_spacing_fct(const double &xi)
Function that implements axial spacing of macro elements.
void r_top_left_R(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of top left box macro element in layer i_layer zeta .
static double default_axial_spacing_fct(const double &xi)
Default for function that implements axial spacing of macro elements.
void r_centr_L(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of central box macro element in layer i_layer zeta .
void r_top_left_B(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of top left box macro element in layer i_layer zeta .
unsigned Nlayer
Number of layers.
void r_top_left_F(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of top left box macro element in layer i_layer zeta .
BLSquashFctPt BL_squash_fct_pt
Function pointer for function that squashes the outer two macro elements towards the wall by mapping ...
static double default_BL_squash_fct(const double &s)
Default for function that squashes the outer two macro elements towards the wall by mapping the input...
double(* AxialSpacingFctPt)(const double &xi)
Typedef for function pointer for function that implements axial spacing of macro elements.
QuarterTubeDomain(GeomObject *boundary_geom_object_pt, const Vector< double > &xi_lo, const double &fract_mid, const Vector< double > &xi_hi, const unsigned &nlayer)
Constructor: Pass boundary object and start and end coordinates and fraction along boundary object wh...
void r_bot_right_B(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of bottom right box macro element in layer i_layer zeta .
void r_centr_R(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of central box macro element in layer i_layer zeta .
GeomObject * Wall_pt
Pointer to geometric object that represents the curved wall.
BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the outer two macro elements towards the wall by mapping ...
Vector< double > Xi_lo
Lower limit for the coordinates along the wall.
void r_centr_D(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of central box macro element in layer i_layer zeta .
void r_centr_B(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of central box macro element in layer i_layer zeta .
double(* BLSquashFctPt)(const double &s)
Typedef for function pointer for function that squashes the outer two macro elements towards the wall...
AxialSpacingFctPt Axial_spacing_fct_pt
Function pointer for function that implements axial spacing of macro elements.
void r_top_left_D(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of top left box macro element in layer i_layer zeta .
void r_bot_right_R(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of bottom right box macro element in layer i_layer zeta .
Quarter tube as domain. Domain is bounded by curved boundary which is represented by a GeomObject...
double s_squashed(const double &s)
Function that squashes the outer two macro elements towards the wall by mapping the input value of th...
Vector< double > Xi_hi
Upper limit for the coordinates along the wall.
void r_bot_right_D(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of bottom right box macro element in layer i_layer zeta .
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...
void r_top_left_L(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of top left box macro element in layer i_layer zeta .
QuarterTubeDomain(const QuarterTubeDomain &)
Broken copy constructor.
void r_centr_F(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of central box macro element in layer i_layer zeta .
void operator=(const QuarterTubeDomain &)
Broken assignment operator.
double Fract_mid
Fraction along wall where outer ring is to be divided.
void r_bot_right_U(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of bottom right box macro element in layer i_layer zeta .
~QuarterTubeDomain()
Destructor: Kill macro elements.
void r_bot_right_F(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of bottom right box macro element in layer i_layer zeta .
void r_top_left_U(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of top left box macro element in layer i_layer zeta .
void r_centr_U(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Boundary of central box macro element in layer i_layer zeta .