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;
67 for (
unsigned i=0;
i<nmacro;
i++)
95 for (
unsigned i=0;
i<n;
i++)
125 const unsigned& i_macro,
126 const unsigned& i_direct,
172 const double& rmin,
const double& rmax,
173 const double& thetamin,
const double& thetamax,
174 const double& zmin,
const double& zmax);
179 const double& rmin,
const double& rmax,
180 const double& thetamin,
const double& thetamax,
181 const double& zmin,
const double& zmax);
186 const double& rmin,
const double& rmax,
187 const double& thetamin,
const double& thetamax,
188 const double& zmin,
const double& zmax);
193 const double& rmin,
const double& rmax,
194 const double& thetamin,
const double& thetamax,
195 const double& zmin,
const double& zmax);
200 const double& rmin,
const double& rmax,
201 const double& thetamin,
const double& thetamax,
202 const double& zmin,
const double& zmax);
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,
229 using namespace OcTreeNames;
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;
303 const double& rmin,
const double& rmax,
304 const double& thetamin,
const double& thetamax,
305 const double& zmin,
const double& zmax)
321 for (
unsigned i=0;
i<2;
i++)
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));
339 const double& rmin,
const double& rmax,
340 const double& thetamin,
const double& thetamax,
341 const double& zmin,
const double& zmax)
359 for (
unsigned i=0;
i<2;
i++)
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));
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);
395 for (
unsigned i=0;
i<2;
i++)
399 f[2]=zmin+(zmax-zmin)*(0.5*(s[1]+1.0));
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);
427 for (
unsigned i=0;
i<2;
i++)
431 f[2]=zmin+(zmax-zmin)*(0.5*(s[1]+1.0));
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);
460 double rad=rmin+(0.5*(s[1]+1.0))*(rmax-rmin);
461 for (
unsigned i=0;
i<2;
i++)
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);
491 double rad=rmin+(0.5*(s[1]+1.0))*(rmax-rmin);
492 for (
unsigned i=0;
i<2;
i++)
unsigned Nz
Number of elements axial direction.
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
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.
const double Pi
50 digits from maple
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that implements axial spacing of macro elements.
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
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 .
Steady ellipse with half axes A and B as geometric object: .
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.
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
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.
Base class for Domains with curvilinear and/or time-dependent boundaries. Domain boundaries are typic...
unsigned Nr
Number of elements radial direction.