oomph::QuarterTubeDomain Class Reference

#include <quarter_tube_domain.h>

+ Inheritance diagram for oomph::QuarterTubeDomain:

Public Types

typedef double(* BLSquashFctPt) (const double &s)
 
typedef double(* AxialSpacingFctPt) (const double &xi)
 

Public Member Functions

 QuarterTubeDomain (GeomObject *boundary_geom_object_pt, const Vector< double > &xi_lo, const double &fract_mid, const Vector< double > &xi_hi, const unsigned &nlayer)
 
 QuarterTubeDomain (const QuarterTubeDomain &)=delete
 Broken copy constructor. More...
 
void operator= (const QuarterTubeDomain &)=delete
 Broken assignment operator. More...
 
 ~QuarterTubeDomain ()
 Destructor: empty; cleanup done in base class. More...
 
BLSquashFctPtbl_squash_fct_pt ()
 
double s_squashed (const double &s)
 
AxialSpacingFctPtaxial_spacing_fct_pt ()
 
double axial_spacing_fct (const double &xi)
 
void macro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
- Public Member Functions inherited from oomph::Domain
 Domain ()
 Constructor. More...
 
 Domain (const Domain &)=delete
 Broken copy constructor. More...
 
void operator= (const Domain &)=delete
 Broken assignment operator. More...
 
virtual ~Domain ()
 
MacroElementmacro_element_pt (const unsigned &i)
 Access to i-th macro element. More...
 
unsigned nmacro_element ()
 Number of macro elements in domain. More...
 
void output (const std::string &filename, const unsigned &nplot)
 Output macro elements. More...
 
void output (std::ostream &outfile, const unsigned &nplot)
 Output macro elements. More...
 
virtual void macro_element_boundary (const double &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
void macro_element_boundary (const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
void output_macro_element_boundaries (const std::string &filename, const unsigned &nplot)
 Output all macro element boundaries as tecplot zones. More...
 
void output_macro_element_boundaries (std::ostream &outfile, const unsigned &nplot)
 Output all macro element boundaries as tecplot zones. More...
 
virtual void dmacro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
virtual void dmacro_element_boundary (const double &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
void dmacro_element_boundary (const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
virtual void d2macro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
virtual void d2macro_element_boundary (const double &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
void d2macro_element_boundary (const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 

Private Member Functions

void r_centr_L (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_centr_R (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_centr_D (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_centr_U (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_centr_B (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_centr_F (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_bot_right_L (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_bot_right_R (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_bot_right_D (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_bot_right_U (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_bot_right_B (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_bot_right_F (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_top_left_L (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_top_left_R (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_top_left_D (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_top_left_U (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_top_left_B (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 
void r_top_left_F (const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
 

Static Private Member Functions

static double default_BL_squash_fct (const double &s)
 
static double default_axial_spacing_fct (const double &xi)
 

Private Attributes

Vector< doubleXi_lo
 Lower limit for the coordinates along the wall. More...
 
double Fract_mid
 Fraction along wall where outer ring is to be divided. More...
 
Vector< doubleXi_hi
 Upper limit for the coordinates along the wall. More...
 
unsigned Nlayer
 Number of layers. More...
 
GeomObjectWall_pt
 Pointer to geometric object that represents the curved wall. More...
 
BLSquashFctPt BL_squash_fct_pt
 
AxialSpacingFctPt Axial_spacing_fct_pt
 

Additional Inherited Members

- Protected Attributes inherited from oomph::Domain
Vector< MacroElement * > Macro_element_pt
 Vector of pointers to macro elements. More...
 

Detailed Description

Quarter tube as domain. Domain is bounded by curved boundary which is represented by a GeomObject. Domain is parametrised by three macro elements in each of the nlayer slices

Member Typedef Documentation

◆ AxialSpacingFctPt

typedef double(* oomph::QuarterTubeDomain::AxialSpacingFctPt) (const double &xi)

Typedef for function pointer for function that implements axial spacing of macro elements

◆ BLSquashFctPt

typedef double(* oomph::QuarterTubeDomain::BLSquashFctPt) (const double &s)

Typedef for function pointer for function that squashes the outer two macro elements towards the wall by mapping the input value of the "radial" macro element coordinate to the return value

Constructor & Destructor Documentation

◆ QuarterTubeDomain() [1/2]

oomph::QuarterTubeDomain::QuarterTubeDomain ( GeomObject boundary_geom_object_pt,
const Vector< double > &  xi_lo,
const double fract_mid,
const Vector< double > &  xi_hi,
const unsigned nlayer 
)
inline

Constructor: Pass boundary object and start and end coordinates and fraction along boundary object where outer ring is divided. We form nlayer axial slices.

53  : Xi_lo(xi_lo),
54  Fract_mid(fract_mid),
55  Xi_hi(xi_hi),
56  Nlayer(nlayer),
57  Wall_pt(boundary_geom_object_pt),
60  {
61  // There are three macro elements
62  unsigned nmacro = 3 * nlayer;
63 
64  // Resize
65  Macro_element_pt.resize(nmacro);
66 
67  // Create macro elements
68  for (unsigned i = 0; i < nmacro; i++)
69  {
70  Macro_element_pt[i] = new QMacroElement<3>(this, i);
71  }
72  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
Definition: domain.h:301
BLSquashFctPt BL_squash_fct_pt
Definition: quarter_tube_domain.h:160
static double default_BL_squash_fct(const double &s)
Definition: quarter_tube_domain.h:167
Vector< double > Xi_lo
Lower limit for the coordinates along the wall.
Definition: quarter_tube_domain.h:141
unsigned Nlayer
Number of layers.
Definition: quarter_tube_domain.h:150
Vector< double > Xi_hi
Upper limit for the coordinates along the wall.
Definition: quarter_tube_domain.h:147
AxialSpacingFctPt Axial_spacing_fct_pt
Definition: quarter_tube_domain.h:175
static double default_axial_spacing_fct(const double &xi)
Definition: quarter_tube_domain.h:180
double Fract_mid
Fraction along wall where outer ring is to be divided.
Definition: quarter_tube_domain.h:144
GeomObject * Wall_pt
Pointer to geometric object that represents the curved wall.
Definition: quarter_tube_domain.h:153

References i, and oomph::Domain::Macro_element_pt.

◆ QuarterTubeDomain() [2/2]

oomph::QuarterTubeDomain::QuarterTubeDomain ( const QuarterTubeDomain )
delete

Broken copy constructor.

◆ ~QuarterTubeDomain()

oomph::QuarterTubeDomain::~QuarterTubeDomain ( )
inline

Destructor: empty; cleanup done in base class.

81 {}

Member Function Documentation

◆ axial_spacing_fct()

double oomph::QuarterTubeDomain::axial_spacing_fct ( const double xi)
inline

◆ axial_spacing_fct_pt()

AxialSpacingFctPt& oomph::QuarterTubeDomain::axial_spacing_fct_pt ( )
inline

Function pointer for function that implements axial spacing of macro elements

117  {
118  return Axial_spacing_fct_pt;
119  }

References Axial_spacing_fct_pt.

Referenced by oomph::QuarterTubeMesh< ELEMENT >::axial_spacing_fct_pt(), and oomph::AlgebraicRefineableQuarterTubeMesh< ELEMENT >::axial_spacing_fct_pt().

◆ bl_squash_fct_pt()

BLSquashFctPt& oomph::QuarterTubeDomain::bl_squash_fct_pt ( )
inline

Function pointer for function that squashes the outer two macro elements towards the wall by mapping the input value of the "radial" macro element coordinate to the return value

95  {
96  return BL_squash_fct_pt;
97  }

References BL_squash_fct_pt.

Referenced by oomph::QuarterTubeMesh< ELEMENT >::bl_squash_fct_pt().

◆ default_axial_spacing_fct()

static double oomph::QuarterTubeDomain::default_axial_spacing_fct ( const double xi)
inlinestaticprivate

Default for function that implements axial spacing of macro elements

181  {
182  return xi;
183  }

◆ default_BL_squash_fct()

static double oomph::QuarterTubeDomain::default_BL_squash_fct ( const double s)
inlinestaticprivate

Default for function that squashes the outer two macro elements towards the wall by mapping the input value of the "radial" macro element coordinate to the return value: Identity.

168  {
169  return s;
170  }
RealScalar s
Definition: level1_cplx_impl.h:130

References s.

◆ macro_element_boundary()

void oomph::QuarterTubeDomain::macro_element_boundary ( const unsigned t,
const unsigned imacro,
const unsigned idirect,
const Vector< double > &  s,
Vector< double > &  f 
)
virtual

Vector representation of the i_macro-th macro element boundary i_direct (L/R/D/U/B/F) at time level t (t=0: present; t>0: previous): f(s).

////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// Vector representation of the imacro-th macro element boundary idirect (L/R/D/U/B/F) at time level t (t=0: present; t>0: previous): f(s)

Implements oomph::Domain.

331  {
332  using namespace OcTreeNames;
333 
334 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
335  // Warn about time argument being moved to the front
336  OomphLibWarning(
337  "Order of function arguments has changed between versions 0.8 and 0.85",
338  "QuarterTubeDomain::macro_element_boundary(...)",
340 #endif
341 
342 
343  unsigned ilayer = unsigned(imacro / 3);
344 
345  // Which macro element?
346  // --------------------
347  switch (imacro % 3)
348  {
349  // Macro element 0: Central box
350  case 0:
351 
352  // Which direction?
353  if (idirect == L)
354  {
355  r_centr_L(t, s, ilayer, f);
356  }
357  else if (idirect == R)
358  {
359  r_centr_R(t, s, ilayer, f);
360  }
361  else if (idirect == D)
362  {
363  r_centr_D(t, s, ilayer, f);
364  }
365  else if (idirect == U)
366  {
367  r_centr_U(t, s, ilayer, f);
368  }
369  else if (idirect == B)
370  {
371  r_centr_B(t, s, ilayer, f);
372  }
373  else if (idirect == F)
374  {
375  r_centr_F(t, s, ilayer, f);
376  }
377  else
378  {
379  std::ostringstream error_stream;
380  error_stream << "idirect is " << idirect
381  << " not one of L, R, D, U, B, F" << std::endl;
382 
383  throw OomphLibError(error_stream.str(),
386  }
387 
388  break;
389 
390 
391  // Macro element 1: Bottom right
392  case 1:
393 
394  // Which direction?
395  if (idirect == L)
396  {
397  r_bot_right_L(t, s, ilayer, f);
398  }
399  else if (idirect == R)
400  {
401  r_bot_right_R(t, s, ilayer, f);
402  }
403  else if (idirect == D)
404  {
405  r_bot_right_D(t, s, ilayer, f);
406  }
407  else if (idirect == U)
408  {
409  r_bot_right_U(t, s, ilayer, f);
410  }
411  else if (idirect == B)
412  {
413  r_bot_right_B(t, s, ilayer, f);
414  }
415  else if (idirect == F)
416  {
417  r_bot_right_F(t, s, ilayer, f);
418  }
419  else
420  {
421  std::ostringstream error_stream;
422  error_stream << "idirect is " << idirect
423  << " not one of L, R, D, U, B, F" << std::endl;
424 
425  throw OomphLibError(error_stream.str(),
428  }
429 
430 
431  break;
432 
433  // Macro element 2:Top left
434  case 2:
435 
436  // Which direction?
437  if (idirect == L)
438  {
439  r_top_left_L(t, s, ilayer, f);
440  }
441  else if (idirect == R)
442  {
443  r_top_left_R(t, s, ilayer, f);
444  }
445  else if (idirect == D)
446  {
447  r_top_left_D(t, s, ilayer, f);
448  }
449  else if (idirect == U)
450  {
451  r_top_left_U(t, s, ilayer, f);
452  }
453  else if (idirect == B)
454  {
455  r_top_left_B(t, s, ilayer, f);
456  }
457  else if (idirect == F)
458  {
459  r_top_left_F(t, s, ilayer, f);
460  }
461  else
462  {
463  std::ostringstream error_stream;
464  error_stream << "idirect is " << idirect
465  << " not one of L, R, D, U, B, F" << std::endl;
466 
467  throw OomphLibError(error_stream.str(),
470  }
471 
472  break;
473 
474  default:
475 
476  // Error
477  std::ostringstream error_stream;
478  error_stream << "Wrong imacro " << imacro << std::endl;
479  throw OomphLibError(
480  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
481  }
482  }
dominoes D
Definition: Domino.cpp:55
MatrixXd L
Definition: LLT_example.cpp:6
@ R
Definition: StatisticsVector.h:21
Definition: matrices.h:74
void r_top_left_D(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:958
void r_top_left_L(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:909
void r_top_left_R(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:941
void r_bot_right_L(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:725
void r_centr_B(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:642
void r_centr_D(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:567
void r_bot_right_F(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:869
void r_bot_right_D(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:760
void r_bot_right_U(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:792
void r_top_left_B(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:994
void r_top_left_U(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:971
void r_bot_right_R(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:738
void r_centr_F(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:682
void r_centr_L(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:489
void r_centr_R(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:521
void r_top_left_F(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:1033
void r_bot_right_B(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:832
void r_centr_U(const unsigned &t, const Vector< double > &zeta, const unsigned &i_layer, Vector< double > &f)
Definition: quarter_tube_domain.h:599
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
double U
Swimming speed.
Definition: two_d_variable_diff_adapt.cc:53
@ F
Definition: octree.h:74
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References D, f(), oomph::OcTreeNames::F, L, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, R, r_bot_right_B(), r_bot_right_D(), r_bot_right_F(), r_bot_right_L(), r_bot_right_R(), r_bot_right_U(), r_centr_B(), r_centr_D(), r_centr_F(), r_centr_L(), r_centr_R(), r_centr_U(), r_top_left_B(), r_top_left_D(), r_top_left_F(), r_top_left_L(), r_top_left_R(), r_top_left_U(), s, plotPSD::t, and RachelsAdvectionDiffusion::U.

◆ operator=()

void oomph::QuarterTubeDomain::operator= ( const QuarterTubeDomain )
delete

Broken assignment operator.

◆ r_bot_right_B()

void oomph::QuarterTubeDomain::r_bot_right_B ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of bottom right box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

836  {
837  // Wall coordinates
838  Vector<double> x(2);
839  x[0] = Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
840  axial_spacing_fct(double(i_layer) / double(Nlayer));
841  x[1] = Xi_lo[1] + Fract_mid * (Xi_hi[1] - Xi_lo[1]) * 0.5 * (1.0 + zeta[1]);
842 
843  // Get position vector to wall
844  Vector<double> r_wall(3);
845  Wall_pt->position(t, x, r_wall);
846 
847  // Get position vector on central box
848  Vector<double> zeta_central(2);
849  Vector<double> r_central(3);
850  zeta_central[0] = zeta[1];
851  zeta_central[1] = -1.0;
852  r_centr_R(t, zeta_central, i_layer, r_central);
853 
854 
855  // Straight line across
856  f[0] = r_central[0] +
857  (r_wall[0] - r_central[0]) * s_squashed(0.5 * (1.0 + zeta[0]));
858  f[1] = r_central[1] +
859  (r_wall[1] - r_central[1]) * s_squashed(0.5 * (1.0 + zeta[0]));
860  f[2] = r_central[2] +
861  (r_wall[2] - r_central[2]) * s_squashed(0.5 * (1.0 + zeta[0]));
862  }
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
double axial_spacing_fct(const double &xi)
Definition: quarter_tube_domain.h:123
double s_squashed(const double &s)
Definition: quarter_tube_domain.h:103
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
list x
Definition: plotDoE.py:28

References axial_spacing_fct(), f(), Fract_mid, Nlayer, oomph::GeomObject::position(), r_centr_R(), s_squashed(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_bot_right_D()

void oomph::QuarterTubeDomain::r_bot_right_D ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of bottom right box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

764  {
765  // Wall coordinates along bottom edge of wall
766  Vector<double> x(2);
767  x[0] =
768  Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
769  axial_spacing_fct((0.5 * (1.0 + zeta[1]) + double(i_layer)) /
770  double(Nlayer));
771  x[1] = Xi_lo[1];
772 
773  // Get position vector to bottom edge of wall
774  Vector<double> r_bottom(3);
775  Wall_pt->position(t, x, r_bottom);
776 
777  // Scale it down to half the width
778  f[0] = 0.5 * r_bottom[0] * (1.0 + s_squashed(0.5 * (1.0 + zeta[0])));
779  f[1] = r_bottom[1];
780 
781  // Warp it:
782  double rho = s_squashed(0.5 * (1.0 + zeta[0]));
783  f[2] = x[0] + rho * (r_bottom[2] - x[0]);
784  // f[2]=r_bottom[2];
785  }

References axial_spacing_fct(), f(), Nlayer, oomph::GeomObject::position(), s_squashed(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_bot_right_F()

void oomph::QuarterTubeDomain::r_bot_right_F ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of bottom right box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

873  {
874  // Wall coordinates
875  Vector<double> x(2);
876  x[0] = Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
877  axial_spacing_fct(double(1 + i_layer) / double(Nlayer));
878  x[1] = Xi_lo[1] + Fract_mid * (Xi_hi[1] - Xi_lo[1]) * 0.5 * (1.0 + zeta[1]);
879 
880  // Get position vector to wall
881  Vector<double> r_wall(3);
882  Wall_pt->position(t, x, r_wall);
883 
884  // Get position vector on central box
885  Vector<double> zeta_central(2);
886  Vector<double> r_central(3);
887  zeta_central[0] = zeta[1];
888  zeta_central[1] = 1.0;
889  r_centr_R(t, zeta_central, i_layer, r_central);
890 
891 
892  // Straight line across
893  f[0] = r_central[0] +
894  (r_wall[0] - r_central[0]) * s_squashed(0.5 * (1.0 + zeta[0]));
895  f[1] = r_central[1] +
896  (r_wall[1] - r_central[1]) * s_squashed(0.5 * (1.0 + zeta[0]));
897  f[2] = r_central[2] +
898  (r_wall[2] - r_central[2]) * s_squashed(0.5 * (1.0 + zeta[0]));
899  }

References axial_spacing_fct(), f(), Fract_mid, Nlayer, oomph::GeomObject::position(), r_centr_R(), s_squashed(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_bot_right_L()

void oomph::QuarterTubeDomain::r_bot_right_L ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of bottom right box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

729  {
730  r_centr_R(t, zeta, i_layer, f);
731  }

References f(), r_centr_R(), plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_bot_right_R()

void oomph::QuarterTubeDomain::r_bot_right_R ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of bottom right box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

742  {
743  // Wall coordinates
744  Vector<double> x(2);
745  x[0] =
746  Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
747  axial_spacing_fct((0.5 * (1.0 + zeta[1]) + double(i_layer)) /
748  double(Nlayer));
749  x[1] = Xi_lo[1] + Fract_mid * (Xi_hi[1] - Xi_lo[1]) * 0.5 * (1.0 + zeta[0]);
750 
751  // Get position vector on wall
752  Wall_pt->position(t, x, f);
753  }

References axial_spacing_fct(), f(), Fract_mid, Nlayer, oomph::GeomObject::position(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_bot_right_U()

void oomph::QuarterTubeDomain::r_bot_right_U ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of bottom right box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

796  {
797  // Wall coordinates of dividing line
798  Vector<double> x(2);
799  x[0] =
800  Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
801  axial_spacing_fct((0.5 * (1.0 + zeta[1]) + double(i_layer)) /
802  double(Nlayer));
803  x[1] = Xi_lo[1] + Fract_mid * (Xi_hi[1] - Xi_lo[1]);
804 
805  // Get position vector on dividing line
806  Vector<double> r_div(3);
807  Wall_pt->position(t, x, r_div);
808 
809 
810  // Position vector to corner of central box
811  Vector<double> zeta_central(2);
812  Vector<double> r_central(3);
813  zeta_central[0] = 1.0;
814  zeta_central[1] = zeta[1];
815  r_centr_R(t, zeta_central, i_layer, r_central);
816 
817 
818  // Straight line across
819  f[0] = r_central[0] +
820  (r_div[0] - r_central[0]) * s_squashed(0.5 * (1.0 + zeta[0]));
821  f[1] = r_central[1] +
822  (r_div[1] - r_central[1]) * s_squashed(0.5 * (1.0 + zeta[0]));
823  f[2] = r_central[2] +
824  (r_div[2] - r_central[2]) * s_squashed(0.5 * (1.0 + zeta[0]));
825  }

References axial_spacing_fct(), f(), Fract_mid, Nlayer, oomph::GeomObject::position(), r_centr_R(), s_squashed(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_top_left_R().

◆ r_centr_B()

void oomph::QuarterTubeDomain::r_centr_B ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of central box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

646  {
647  // Wall coordinates along bottom edge of wall
648  Vector<double> x(2);
649  x[0] = Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
650  axial_spacing_fct(double(i_layer) / double(Nlayer));
651  x[1] = Xi_lo[1];
652 
653  // Get position vector to bottom edge of wall
654  Vector<double> r_bottom(3);
655  Wall_pt->position(t, x, r_bottom);
656 
657 
658  // Wall coordinates along top edge of wall
659  x[0] = Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
660  axial_spacing_fct(double(i_layer) / double(Nlayer));
661  x[1] = Xi_hi[1];
662 
663  // Get position vector to top edge of wall
664  Vector<double> r_top(3);
665  Wall_pt->position(t, x, r_top);
666 
667  // Map it
668  f[0] = r_bottom[0] * 0.25 * (1.0 + zeta[0]);
669  f[1] = r_top[1] * 0.25 * (1.0 + zeta[1]);
670 
671  // Warp it:
672  double rho = 0.0; // 0.25*(1.0+zeta[1]);
673  f[2] = x[0] + rho * (r_top[2] - x[0]);
674  // f[2]=r_top[2];
675  }

References axial_spacing_fct(), f(), Nlayer, oomph::GeomObject::position(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_centr_D()

void oomph::QuarterTubeDomain::r_centr_D ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of central box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

571  {
572  // Wall coordinates along bottom edge of wall
573  Vector<double> x(2);
574  x[0] =
575  Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
576  axial_spacing_fct((0.5 * (1.0 + zeta[1]) + double(i_layer)) /
577  double(Nlayer));
578  x[1] = Xi_lo[1];
579 
580  // Get position vector to bottom edge of wall
581  Vector<double> r_bottom(3);
582  Wall_pt->position(t, x, r_bottom);
583 
584  // Scale it down to half the width
585  f[0] = r_bottom[0] * 0.25 * (1.0 + zeta[0]);
586  f[1] = r_bottom[1];
587 
588  // Warp it:
589  double rho = 0.0; // 0.25*(1.0+zeta[0]);
590  f[2] = x[0] + rho * (r_bottom[2] - x[0]);
591  // f[2]=r_bottom[2];
592  }

References axial_spacing_fct(), f(), Nlayer, oomph::GeomObject::position(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_centr_F()

void oomph::QuarterTubeDomain::r_centr_F ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of central box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

686  {
687  // Wall coordinates along bottom edge of wall
688  Vector<double> x(2);
689  x[0] = Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
690  axial_spacing_fct(double(1 + i_layer) / double(Nlayer));
691  x[1] = Xi_lo[1];
692 
693  // Get position vector to bottom edge of wall
694  Vector<double> r_bottom(3);
695  Wall_pt->position(t, x, r_bottom);
696 
697 
698  // Wall coordinates along top edge of wall
699  x[0] = Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
700  axial_spacing_fct(double(1 + i_layer) / double(Nlayer));
701  x[1] = Xi_hi[1];
702 
703  // Get position vector to top edge of wall
704  Vector<double> r_top(3);
705  Wall_pt->position(t, x, r_top);
706 
707  // Map it
708  f[0] = r_bottom[0] * 0.25 * (1.0 + zeta[0]);
709  f[1] = r_top[1] * 0.25 * (1.0 + zeta[1]);
710 
711  // Warp it:
712  double rho = 0.0; // 0.25*(1.0+zeta[1]);
713  f[2] = x[0] + rho * (r_top[2] - x[0]);
714  // f[2]=r_top[2];
715  }

References axial_spacing_fct(), f(), Nlayer, oomph::GeomObject::position(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_centr_L()

void oomph::QuarterTubeDomain::r_centr_L ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of central box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

493  {
494  // Wall coordinates along top edge of wall
495  Vector<double> x(2);
496  x[0] =
497  Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
498  axial_spacing_fct((0.5 * (1.0 + zeta[1]) + double(i_layer)) /
499  double(Nlayer));
500  x[1] = Xi_hi[1];
501 
502  // Get position vector to upper edge of wall
503  Vector<double> r_top(3);
504  Wall_pt->position(t, x, r_top);
505 
506  // Scale it down to half the height
507  f[0] = r_top[0];
508  f[1] = r_top[1] * 0.25 * (1.0 + zeta[0]);
509  // Warp it:
510  double rho = 0.0; // 0.25*(1.0+zeta[0]);
511  f[2] = x[0] + rho * (r_top[2] - x[0]);
512 
513  // f[2]=r_top[2];
514  }

References axial_spacing_fct(), f(), Nlayer, oomph::GeomObject::position(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_centr_R()

void oomph::QuarterTubeDomain::r_centr_R ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of central box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

525  {
526  // Note the repetition in the calculation, there is some scope
527  // for optimisation
528 
529  // Wall coordinates along top edge of wall
530  Vector<double> x(2);
531  x[0] =
532  Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
533  axial_spacing_fct((0.5 * (1.0 + zeta[1]) + double(i_layer)) /
534  double(Nlayer));
535  x[1] = Xi_hi[1];
536 
537  // Get position vector to upper edge of wall
538  Vector<double> r_top(3);
539  Wall_pt->position(t, x, r_top);
540 
541  // Wall coordinates along bottom edge of wall
542  x[0] =
543  Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
544  axial_spacing_fct((0.5 * (1.0 + zeta[1]) + double(i_layer)) /
545  double(Nlayer));
546  x[1] = Xi_lo[1];
547 
548  // Get position vector to bottom edge of wall
549  Vector<double> r_bottom(3);
550  Wall_pt->position(t, x, r_bottom);
551 
552  // Scale it down to half the height, halfway across width
553  f[0] = 0.5 * r_bottom[0];
554  f[1] = r_top[1] * 0.25 * (1.0 + zeta[0]);
555 
556  // Warp it:
557  double rho = 0.0; // 0.25*(1.0+zeta[0]);
558  f[2] = x[0] + rho * (r_top[2] - x[0]);
559  // f[2]=r_top[2];
560  }

References axial_spacing_fct(), f(), Nlayer, oomph::GeomObject::position(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary(), r_bot_right_B(), r_bot_right_F(), r_bot_right_L(), and r_bot_right_U().

◆ r_centr_U()

void oomph::QuarterTubeDomain::r_centr_U ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of central box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

603  {
604  // Wall coordinates along top edge of wall
605  Vector<double> x(2);
606  x[0] =
607  Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
608  axial_spacing_fct((0.5 * (1.0 + zeta[1]) + double(i_layer)) /
609  double(Nlayer));
610  x[1] = Xi_hi[1];
611 
612  // Get position vector to upper edge of wall
613  Vector<double> r_top(3);
614  Wall_pt->position(t, x, r_top);
615 
616  // Wall coordinates along bottom edge of wall
617  x[0] =
618  Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
619  axial_spacing_fct((0.5 * (1.0 + zeta[1]) + double(i_layer)) /
620  double(Nlayer));
621  x[1] = Xi_lo[1];
622 
623  // Get position vector to bottom edge of wall
624  Vector<double> r_bottom(3);
625  Wall_pt->position(t, x, r_bottom);
626 
627  // Scale it down to half the width
628  f[0] = r_bottom[0] * 0.25 * (1.0 + zeta[0]);
629  f[1] = 0.5 * r_top[1];
630 
631  // Warp it:
632  double rho = 0.0; // 0.25*(1.0+zeta[0]);
633  f[2] = x[0] + rho * (r_bottom[2] - x[0]);
634  // f[2]=r_bottom[2];
635  }

References axial_spacing_fct(), f(), Nlayer, oomph::GeomObject::position(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary(), r_top_left_B(), r_top_left_D(), and r_top_left_F().

◆ r_top_left_B()

void oomph::QuarterTubeDomain::r_top_left_B ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of top left box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

998  {
999  // Wall coordinates
1000  Vector<double> x(2);
1001  x[0] = Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
1002  axial_spacing_fct(double(i_layer) / double(Nlayer));
1003  x[1] = Xi_hi[1] +
1004  (Xi_lo[1] - Xi_hi[1]) * (1.0 - Fract_mid) * 0.5 * (1.0 + zeta[0]);
1005 
1006 
1007  // Get position vector to wall
1008  Vector<double> r_wall(3);
1009  Wall_pt->position(t, x, r_wall);
1010 
1011 
1012  // Get position vector on central box
1013  Vector<double> zeta_central(2);
1014  Vector<double> r_central(3);
1015  zeta_central[0] = zeta[0];
1016  zeta_central[1] = -1.0;
1017  r_centr_U(t, zeta_central, i_layer, r_central);
1018 
1019  // Straight line across
1020  f[0] = r_central[0] +
1021  (r_wall[0] - r_central[0]) * s_squashed(0.5 * (1.0 + zeta[1]));
1022  f[1] = r_central[1] +
1023  (r_wall[1] - r_central[1]) * s_squashed(0.5 * (1.0 + zeta[1]));
1024  f[2] = r_central[2] +
1025  (r_wall[2] - r_central[2]) * s_squashed(0.5 * (1.0 + zeta[1]));
1026  }

References axial_spacing_fct(), f(), Fract_mid, Nlayer, oomph::GeomObject::position(), r_centr_U(), s_squashed(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_top_left_D()

void oomph::QuarterTubeDomain::r_top_left_D ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of top left box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

962  {
963  r_centr_U(t, zeta, i_layer, f);
964  }

References f(), r_centr_U(), plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_top_left_F()

void oomph::QuarterTubeDomain::r_top_left_F ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of top left box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

1037  {
1038  // Wall coordinates
1039  Vector<double> x(2);
1040  x[0] = Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
1041  axial_spacing_fct(double(1 + i_layer) / double(Nlayer));
1042  x[1] = Xi_hi[1] +
1043  (Xi_lo[1] - Xi_hi[1]) * (1.0 - Fract_mid) * 0.5 * (1.0 + zeta[0]);
1044 
1045 
1046  // Get position vector to wall
1047  Vector<double> r_wall(3);
1048  Wall_pt->position(t, x, r_wall);
1049 
1050 
1051  // Get position vector on central box
1052  Vector<double> zeta_central(2);
1053  Vector<double> r_central(3);
1054  zeta_central[0] = zeta[0];
1055  zeta_central[1] = 1.0;
1056  r_centr_U(t, zeta_central, i_layer, r_central);
1057 
1058  // Straight line across
1059  f[0] = r_central[0] +
1060  (r_wall[0] - r_central[0]) * s_squashed(0.5 * (1.0 + zeta[1]));
1061  f[1] = r_central[1] +
1062  (r_wall[1] - r_central[1]) * s_squashed(0.5 * (1.0 + zeta[1]));
1063  f[2] = r_central[2] +
1064  (r_wall[2] - r_central[2]) * s_squashed(0.5 * (1.0 + zeta[1]));
1065  }

References axial_spacing_fct(), f(), Fract_mid, Nlayer, oomph::GeomObject::position(), r_centr_U(), s_squashed(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_top_left_L()

void oomph::QuarterTubeDomain::r_top_left_L ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of top left box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

913  {
914  // Wall coordinates along top edge of wall
915  Vector<double> x(2);
916  x[0] =
917  Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
918  axial_spacing_fct((0.5 * (1.0 + zeta[1]) + double(i_layer)) /
919  double(Nlayer));
920  x[1] = Xi_hi[1];
921 
922  // Get position vector to upper edge of wall
923  Vector<double> r_top(3);
924  Wall_pt->position(t, x, r_top);
925 
926  // Scale it down to half the height
927  f[0] = r_top[0];
928  f[1] = 0.5 * r_top[1] * (1.0 + s_squashed(0.5 * (1.0 + zeta[0])));
929 
930  // Warp it:
931  double rho = s_squashed(0.5 * (1.0 + zeta[0]));
932  f[2] = x[0] + rho * (r_top[2] - x[0]);
933  // f[2]=r_top[2];
934  }

References axial_spacing_fct(), f(), Nlayer, oomph::GeomObject::position(), s_squashed(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_top_left_R()

void oomph::QuarterTubeDomain::r_top_left_R ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of top left box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

945  {
946  // Swap coordinates
947  Vector<double> zeta_br(2);
948  zeta_br[0] = zeta[0];
949  zeta_br[1] = zeta[1];
950  r_bot_right_U(t, zeta_br, i_layer, f);
951  }

References f(), r_bot_right_U(), plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_top_left_U()

void oomph::QuarterTubeDomain::r_top_left_U ( const unsigned t,
const Vector< double > &  zeta,
const unsigned i_layer,
Vector< double > &  f 
)
private

Boundary of top left box macro element in layer i_layer zeta \( \in [-1,1]^2 \)

975  {
976  // Wall coordinates
977  Vector<double> x(2);
978  x[0] =
979  Xi_lo[0] + (Xi_hi[0] - Xi_lo[0]) *
980  axial_spacing_fct((0.5 * (1.0 + zeta[1]) + double(i_layer)) /
981  double(Nlayer));
982  x[1] = Xi_hi[1] +
983  (Xi_lo[1] - Xi_hi[1]) * (1 - Fract_mid) * 0.5 * (1.0 + zeta[0]);
984 
985  // Get position vector on wall
986  Wall_pt->position(t, x, f);
987  }

References axial_spacing_fct(), f(), Fract_mid, Nlayer, oomph::GeomObject::position(), plotPSD::t, Wall_pt, plotDoE::x, Xi_hi, Xi_lo, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ s_squashed()

double oomph::QuarterTubeDomain::s_squashed ( const double s)
inline

Function that squashes the outer two macro elements towards the wall by mapping the input value of the "radial" macro element coordinate to the return value.

104  {
105  return BL_squash_fct_pt(s);
106  }

References BL_squash_fct_pt, and s.

Referenced by r_bot_right_B(), r_bot_right_D(), r_bot_right_F(), r_bot_right_U(), r_top_left_B(), r_top_left_F(), and r_top_left_L().

Member Data Documentation

◆ Axial_spacing_fct_pt

AxialSpacingFctPt oomph::QuarterTubeDomain::Axial_spacing_fct_pt
private

Function pointer for function that implements axial spacing of macro elements

Referenced by axial_spacing_fct(), and axial_spacing_fct_pt().

◆ BL_squash_fct_pt

BLSquashFctPt oomph::QuarterTubeDomain::BL_squash_fct_pt
private

Function pointer for function that squashes the outer two macro elements towards the wall by mapping the input value of the "radial" macro element coordinate to the return value

Referenced by bl_squash_fct_pt(), and s_squashed().

◆ Fract_mid

double oomph::QuarterTubeDomain::Fract_mid
private

Fraction along wall where outer ring is to be divided.

Referenced by r_bot_right_B(), r_bot_right_F(), r_bot_right_R(), r_bot_right_U(), r_top_left_B(), r_top_left_F(), and r_top_left_U().

◆ Nlayer

◆ Wall_pt

GeomObject* oomph::QuarterTubeDomain::Wall_pt
private

◆ Xi_hi

Vector<double> oomph::QuarterTubeDomain::Xi_hi
private

◆ Xi_lo

Vector<double> oomph::QuarterTubeDomain::Xi_lo
private

The documentation for this class was generated from the following file: