31 #ifndef OOMPH_QUARTER_PIPE_DOMAIN_HEADER    32 #define OOMPH_QUARTER_PIPE_DOMAIN_HEADER    35 #include "../generic/octree.h"    36 #include "../generic/domain.h"    37 #include "../generic/geom_objects.h"    55                    const double &rmin, 
const double &rmax,
    56                    const double &length) :
    61    unsigned nmacro = nr*ntheta*nz;
    64    Macro_element_pt.resize(nmacro);
    67    for (
unsigned i=0;i<nmacro;i++)
    69      Macro_element_pt[i]=
new QMacroElement<3>(
this,i);
    81     BrokenCopy::broken_copy(
"QuarterPipeDomain");
    88     BrokenCopy::broken_assign(
"QuarterPipeDomain");
    95     for (
unsigned i=0;i<n;i++)
    97       delete Macro_element_pt[i];
   125                              const unsigned& i_macro,
   126                              const unsigned& i_direct,
   127                              const Vector<double>& s,
   170  void r_U(
const unsigned& t, 
const Vector<double>& zeta, 
   172           const double& rmin, 
const double& rmax,
   173           const double& thetamin, 
const double& thetamax,
   174           const double& zmin, 
const double& zmax);
   177  void r_L(
const unsigned& t, 
const Vector<double>& zeta, 
   179           const double& rmin, 
const double& rmax,
   180           const double& thetamin, 
const double& thetamax,
   181           const double& zmin, 
const double& zmax);
   184  void r_D(
const unsigned& t, 
const Vector<double>& zeta, 
   186           const double& rmin, 
const double& rmax,
   187           const double& thetamin, 
const double& thetamax,
   188           const double& zmin, 
const double& zmax);
   191  void r_R(
const unsigned& t, 
const Vector<double>& zeta, 
   193           const double& rmin, 
const double& rmax,
   194           const double& thetamin, 
const double& thetamax,
   195           const double& zmin, 
const double& zmax);
   198  void r_F(
const unsigned& t, 
const Vector<double>& zeta, 
   200           const double& rmin, 
const double& rmax,
   201           const double& thetamin, 
const double& thetamax,
   202           const double& zmin, 
const double& zmax);
   205  void r_B(
const unsigned& t, 
const Vector<double>& zeta, 
   207           const double& rmin, 
const double& rmax,
   208           const double& thetamin, 
const double& thetamax,
   209           const double& zmin, 
const double& zmax);
   224  const unsigned& imacro,
   225  const unsigned& idirect,
   226  const Vector<double>& s,
   229   using namespace OcTreeNames;
   231   const double pi=MathematicalConstants::Pi;
   236   unsigned num_x=imacro%
Ntheta;
   245   double thetamin=(pi/2.0)*(1.0-double(num_x+1)/double(
Ntheta));
   246   double thetamax=(pi/2.0)*(1.0-double(num_x)/double(
Ntheta));
   249   double zmin=double(num_z)*
Length/double(
Nz);
   250   double zmax=double(num_z+1)*
Length/double(
Nz);
   256     r_U(t,s,f,rmin,rmax,thetamin,thetamax,zmin,zmax);
   260     r_D(t,s,f,rmin,rmax,thetamin,thetamax,zmin,zmax);
   264     r_L(t,s,f,rmin,rmax,thetamin,thetamax,zmin,zmax);
   268     r_R(t,s,f,rmin,rmax,thetamin,thetamax,zmin,zmax);
   272     r_F(t,s,f,rmin,rmax,thetamin,thetamax,zmin,zmax);
   276     r_B(t,s,f,rmin,rmax,thetamin,thetamax,zmin,zmax);
   280     std::ostringstream error_stream;
   281     error_stream << 
"idirect is " << idirect 
   282                  << 
" not one of U, D, L, R, F, B" <<  std::endl;
   286      OOMPH_CURRENT_FUNCTION,
   287      OOMPH_EXCEPTION_LOCATION);
   291   double z_frac=f[2]/
Length;
   301                              const Vector<double>& s,
   303                              const double& rmin, 
const double& rmax,
   304                              const double& thetamin, 
const double& thetamax,
   305                              const double& zmin, 
const double& zmax)
   311    Vector<double> r_outer(2);
   315    Vector<double> r_inner(2);
   319    Vector<double> r_top(2);
   320    Vector<double> r_bot(2);
   321    for (
unsigned i=0;i<2;i++)
   323      r_top[i]=r_inner[i]+(r_outer[i]-r_inner[i])*(rmax-
Rmin)/(
Rmax-
Rmin);
   324      r_bot[i]=r_inner[i]+(r_outer[i]-r_inner[i])*(rmin-
Rmin)/(
Rmax-
Rmin);
   328    f[0]=r_bot[0]+(0.5*(s[0]+1.0))*(r_top[0]-r_bot[0]);
   329    f[1]=r_bot[1]+(0.5*(s[0]+1.0))*(r_top[1]-r_bot[1]);
   330    f[2]=zmin+(zmax-zmin)*(0.5*(s[1]+1.0));
   337                              const Vector<double>& s,
   339                              const double& rmin, 
const double& rmax,
   340                              const double& thetamin, 
const double& thetamax,
   341                              const double& zmin, 
const double& zmax)
   349    Vector<double> r_outer(2);
   353    Vector<double> r_inner(2);
   357    Vector<double> r_top(2);
   358    Vector<double> r_bot(2);
   359    for (
unsigned i=0;i<2;i++)
   361      r_top[i]=r_inner[i]+(r_outer[i]-r_inner[i])*(rmax-
Rmin)/(
Rmax-
Rmin);
   362      r_bot[i]=r_inner[i]+(r_outer[i]-r_inner[i])*(rmin-
Rmin)/(
Rmax-
Rmin);
   366    f[0]=r_bot[0]+(0.5*(s[0]+1.0))*(r_top[0]-r_bot[0]);
   367    f[1]=r_bot[1]+(0.5*(s[0]+1.0))*(r_top[1]-r_bot[1]);
   368    f[2]=zmin+(zmax-zmin)*(0.5*(s[1]+1.0));
   377                              const Vector<double>& s, 
   379                              const double& rmin, 
const double& rmax,
   380                              const double& thetamin, 
const double& thetamax,
   381                              const double& zmin, 
const double& zmax)
   384    x[0]=thetamax+(0.5*(s[0]+1.0))*(thetamin-thetamax);
   387    Vector<double> r_outer(2);
   391    Vector<double> r_inner(2);
   395    for (
unsigned i=0;i<2;i++)
   397      f[i]=r_inner[i]+(r_outer[i]-r_inner[i])*(rmin-
Rmin)/(
Rmax-
Rmin);
   399    f[2]=zmin+(zmax-zmin)*(0.5*(s[1]+1.0));
   409                              const Vector<double>& s, 
   411                              const double& rmin, 
const double& rmax,
   412                              const double& thetamin, 
const double& thetamax,
   413                              const double& zmin, 
const double& zmax)
   416    x[0]=thetamax+(0.5*(s[0]+1.0))*(thetamin-thetamax);
   419    Vector<double> r_outer(2);
   423    Vector<double> r_inner(2);
   427    for (
unsigned i=0;i<2;i++)
   429      f[i]=r_inner[i]+(r_outer[i]-r_inner[i])*(rmax-
Rmin)/(
Rmax-
Rmin);
   431    f[2]=zmin+(zmax-zmin)*(0.5*(s[1]+1.0));
   442                              const Vector<double>& s, 
   444                              const double& rmin, 
const double& rmax,
   445                              const double& thetamin, 
const double& thetamax,
   446                              const double& zmin, 
const double& zmax)
   449    x[0]=thetamax+(0.5*(s[0]+1.0))*(thetamin-thetamax);
   452    Vector<double> r_outer(2);
   456    Vector<double> r_inner(2);
   460    double rad=rmin+(0.5*(s[1]+1.0))*(rmax-rmin); 
   461    for (
unsigned i=0;i<2;i++)
   463      f[i]=r_inner[i]+(r_outer[i]-r_inner[i])*(rad-
Rmin)/(
Rmax-
Rmin);
   473                              const Vector<double>& s, 
   475                              const double& rmin, 
const double& rmax,
   476                              const double& thetamin, 
const double& thetamax,
   477                              const double& zmin, 
const double& zmax)
   480    x[0]=thetamax+(0.5*(s[0]+1.0))*(thetamin-thetamax);
   483    Vector<double> r_outer(2);
   487    Vector<double> r_inner(2);
   491    double rad=rmin+(0.5*(s[1]+1.0))*(rmax-rmin); 
   492    for (
unsigned i=0;i<2;i++)
   494      f[i]=r_inner[i]+(r_outer[i]-r_inner[i])*(rad-
Rmin)/(
Rmax-
Rmin);
 unsigned Nz
Number of elements axial direction. 
void r_F(const unsigned &t, const Vector< double > &zeta, Vector< double > &f, const double &rmin, const double &rmax, const double &thetamin, const double &thetamax, const double &zmin, const double &zmax)
Boundary of macro element zeta . 
~QuarterPipeDomain()
Destructor: Cleanup. 
AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that implements axial spacing of macro elements. 
GeomObject * Inner_boundary_cross_section_pt
Geom object representing the inner boundary of the cross section. 
void operator=(const QuarterPipeDomain &)
Broken assignment operator. 
void r_L(const unsigned &t, const Vector< double > &zeta, Vector< double > &f, const double &rmin, const double &rmax, const double &thetamin, const double &thetamax, const double &zmin, const double &zmax)
Boundary of macro element zeta . 
QuarterPipeDomain(const QuarterPipeDomain &)
Broken copy constructor. 
void r_B(const unsigned &t, const Vector< double > &zeta, Vector< double > &f, const double &rmin, const double &rmax, const double &thetamin, const double &thetamax, const double &zmin, const double &zmax)
Boundary of macro element zeta . 
void r_R(const unsigned &t, const Vector< double > &zeta, Vector< double > &f, const double &rmin, const double &rmax, const double &thetamin, const double &thetamax, const double &zmin, const double &zmax)
Boundary of macro element zeta . 
void r_D(const unsigned &t, const Vector< double > &zeta, Vector< double > &f, const double &rmin, const double &rmax, const double &thetamin, const double &thetamax, const double &zmin, const double &zmax)
Boundary of macro element zeta . 
unsigned Ntheta
Number of elements azimuthal direction. 
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 (U/D/L/R/F/B) at time level t...
double(* AxialSpacingFctPt)(const double &xi)
Typedef for function pointer for function that implements axial spacing of macro elements. 
QuarterPipeDomain(const unsigned &ntheta, const unsigned &nr, const unsigned &nz, const double &rmin, const double &rmax, const double &length)
Constructor: Pass number of elements in various directions, the inner and outer radius and the length...
AxialSpacingFctPt Axial_spacing_fct_pt
Function pointer for function that implements axial spacing of macro elements. 
GeomObject * Outer_boundary_cross_section_pt
Geom object representing the outer boundary of the cross section. 
Domain representing a quarter pipe. 
static double default_axial_spacing_fct(const double &xi)
Default for function that implements axial spacing of macro elements. 
void r_U(const unsigned &t, const Vector< double > &zeta, Vector< double > &f, const double &rmin, const double &rmax, const double &thetamin, const double &thetamax, const double &zmin, const double &zmax)
Boundary of macro element zeta . 
double axial_spacing_fct(const double &xi)
Function that implements axial spacing of macro elements. 
unsigned Nr
Number of elements radial direction.