27 #ifndef OOMPH_QUARTER_PIPE_DOMAIN_HEADER
28 #define OOMPH_QUARTER_PIPE_DOMAIN_HEADER
31 #include "../generic/octree.h"
32 #include "../generic/domain.h"
33 #include "../generic/geom_objects.h"
60 unsigned nmacro = nr * ntheta * nz;
66 for (
unsigned i = 0;
i < nmacro;
i++)
113 const unsigned& i_macro,
114 const unsigned& i_direct,
157 void r_U(
const unsigned&
t,
162 const double& thetamin,
163 const double& thetamax,
168 void r_L(
const unsigned&
t,
173 const double& thetamin,
174 const double& thetamax,
179 void r_D(
const unsigned&
t,
184 const double& thetamin,
185 const double& thetamax,
190 void r_R(
const unsigned&
t,
195 const double& thetamin,
196 const double& thetamax,
201 void r_F(
const unsigned&
t,
206 const double& thetamin,
207 const double& thetamax,
212 void r_B(
const unsigned&
t,
217 const double& thetamin,
218 const double& thetamax,
231 const unsigned& imacro,
232 const unsigned& idirect,
236 using namespace OcTreeNames;
241 unsigned num_z = imacro / (
Nr *
Ntheta);
243 unsigned num_x = imacro %
Ntheta;
249 double rmax =
Rmin + (
Rmax -
Rmin) *
double(num_y + 1) / double(
Nr);
252 double thetamin = (pi / 2.0) * (1.0 -
double(num_x + 1) / double(
Ntheta));
253 double thetamax = (pi / 2.0) * (1.0 -
double(num_x) / double(
Ntheta));
256 double zmin = double(num_z) *
Length / double(
Nz);
257 double zmax = double(num_z + 1) *
Length / double(
Nz);
263 r_U(
t,
s, f, rmin, rmax, thetamin, thetamax, zmin, zmax);
265 else if (idirect ==
D)
267 r_D(
t,
s, f, rmin, rmax, thetamin, thetamax, zmin, zmax);
269 else if (idirect ==
L)
271 r_L(
t,
s, f, rmin, rmax, thetamin, thetamax, zmin, zmax);
273 else if (idirect ==
R)
275 r_R(
t,
s, f, rmin, rmax, thetamin, thetamax, zmin, zmax);
277 else if (idirect ==
F)
279 r_F(
t,
s, f, rmin, rmax, thetamin, thetamax, zmin, zmax);
281 else if (idirect ==
B)
283 r_B(
t,
s, f, rmin, rmax, thetamin, thetamax, zmin, zmax);
287 std::ostringstream error_stream;
288 error_stream <<
"idirect is " << idirect <<
" not one of U, D, L, R, F, B"
292 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
296 double z_frac = f[2] /
Length;
309 const double& thetamin,
310 const double& thetamax,
328 for (
unsigned i = 0;
i < 2;
i++)
331 r_inner[
i] + (r_outer[
i] - r_inner[
i]) * (rmax -
Rmin) / (
Rmax -
Rmin);
333 r_inner[
i] + (r_outer[
i] - r_inner[
i]) * (rmin -
Rmin) / (
Rmax -
Rmin);
337 f[0] = r_bot[0] + (0.5 * (
s[0] + 1.0)) * (r_top[0] - r_bot[0]);
338 f[1] = r_bot[1] + (0.5 * (
s[0] + 1.0)) * (r_top[1] - r_bot[1]);
339 f[2] = zmin + (zmax - zmin) * (0.5 * (
s[1] + 1.0));
350 const double& thetamin,
351 const double& thetamax,
369 for (
unsigned i = 0;
i < 2;
i++)
372 r_inner[
i] + (r_outer[
i] - r_inner[
i]) * (rmax -
Rmin) / (
Rmax -
Rmin);
374 r_inner[
i] + (r_outer[
i] - r_inner[
i]) * (rmin -
Rmin) / (
Rmax -
Rmin);
378 f[0] = r_bot[0] + (0.5 * (
s[0] + 1.0)) * (r_top[0] - r_bot[0]);
379 f[1] = r_bot[1] + (0.5 * (
s[0] + 1.0)) * (r_top[1] - r_bot[1]);
380 f[2] = zmin + (zmax - zmin) * (0.5 * (
s[1] + 1.0));
392 const double& thetamin,
393 const double& thetamax,
398 x[0] = thetamax + (0.5 * (
s[0] + 1.0)) * (thetamin - thetamax);
409 for (
unsigned i = 0;
i < 2;
i++)
412 r_inner[
i] + (r_outer[
i] - r_inner[
i]) * (rmin -
Rmin) / (
Rmax -
Rmin);
414 f[2] = zmin + (zmax - zmin) * (0.5 * (
s[1] + 1.0));
426 const double& thetamin,
427 const double& thetamax,
432 x[0] = thetamax + (0.5 * (
s[0] + 1.0)) * (thetamin - thetamax);
443 for (
unsigned i = 0;
i < 2;
i++)
446 r_inner[
i] + (r_outer[
i] - r_inner[
i]) * (rmax -
Rmin) / (
Rmax -
Rmin);
448 f[2] = zmin + (zmax - zmin) * (0.5 * (
s[1] + 1.0));
460 const double& thetamin,
461 const double& thetamax,
466 x[0] = thetamax + (0.5 * (
s[0] + 1.0)) * (thetamin - thetamax);
477 double rad = rmin + (0.5 * (
s[1] + 1.0)) * (rmax - rmin);
478 for (
unsigned i = 0;
i < 2;
i++)
495 const double& thetamin,
496 const double& thetamax,
501 x[0] = thetamax + (0.5 * (
s[0] + 1.0)) * (thetamin - thetamax);
512 double rad = rmin + (0.5 * (
s[1] + 1.0)) * (rmax - rmin);
513 for (
unsigned i = 0;
i < 2;
i++)
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....
QMacroElement specialised to 3 spatial dimensions.
Domain representing a quarter pipe.
double axial_spacing_fct(const double &xi)
Function that implements axial spacing of macro elements.
unsigned Nr
Number of elements radial direction.
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 .
GeomObject * Inner_boundary_cross_section_pt
Geom object representing the inner boundary of the cross section.
static double default_axial_spacing_fct(const double &xi)
Default for function that implements axial spacing of macro elements.
double(* AxialSpacingFctPt)(const double &xi)
Typedef for function pointer 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 .
QuarterPipeDomain(const QuarterPipeDomain &)=delete
Broken copy constructor.
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:
AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that implements axial spacing of macro elements.
unsigned Nz
Number of elements axial direction.
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 operator=(const QuarterPipeDomain &)=delete
Broken assignment operator.
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 .
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.
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...
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.
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...
const double Pi
50 digits from maple
//////////////////////////////////////////////////////////////////// ////////////////////////////////...