oomph::CollapsibleChannelDomain Class Reference

Collapsible channel domain. More...

#include <collapsible_channel_domain.h>

+ Inheritance diagram for oomph::CollapsibleChannelDomain:

Public Types

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

Public Member Functions

 CollapsibleChannelDomain (const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt)
 
 ~CollapsibleChannelDomain ()
 Destructor: emtpy; cleanup done in base class. More...
 
unsigned nup ()
 Number of vertical columns of macro elements the upstream section. More...
 
unsigned ncollapsible ()
 Number of vertical clumns of macro elements in the "collapsible" segment. More...
 
unsigned ndown ()
 Number of vertical columns of macro elements in the downstream section. More...
 
unsigned ny ()
 Number of macro-elements across the channel. More...
 
double l_up ()
 Length of upstream section. More...
 
double l_collapsible ()
 Length of collapsible segment. More...
 
double l_down ()
 Length of downstream section. More...
 
double l_y ()
 Width of channel. More...
 
GeomObject *& wall_pt ()
 
GeomObjectwall_pt () const
 
BLSquashFctPtbl_squash_fct_pt ()
 
double s_squash (const double &s)
 
AxialSpacingFctPtaxial_spacing_fct_pt ()
 
double axial_spacing_fct (const double &xi)
 
void macro_element_boundary (const unsigned &t, const unsigned &imacro, const unsigned &idirect, const Vector< double > &zeta, Vector< double > &r)
 
void enable_rotate_domain ()
 Rotate the domain (for axisymmetric problems) More...
 
void disable_rotate_domain ()
 Undo rotation of the domain (for axisymmetric problems) More...
 
- 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)
 

Static Public Member Functions

static double default_BL_squash_fct (const double &s)
 

Private Member Functions

void r_N_straight (const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
 
void r_W_straight (const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
 
void r_S_straight (const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
 
void r_E_straight (const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
 
void r_N_collapsible (const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
 
void r_W_collapsible (const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
 
void r_S_collapsible (const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
 
void r_E_collapsible (const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
 

Static Private Member Functions

static double default_axial_spacing_fct (const double &xi)
 

Private Attributes

BLSquashFctPt BL_squash_fct_pt
 
AxialSpacingFctPt Axial_spacing_fct_pt
 
unsigned Nup
 Number of vertical element columns in upstream section. More...
 
unsigned Ncollapsible
 Number of vertical element columns in "collapsible" section. More...
 
unsigned Ndown
 Number of vertical element columns in downstream section. More...
 
unsigned Ny
 Number of macro elements across channel. More...
 
double Lup
 x-length in the upstream part of the channel More...
 
double Lcollapsible
 x-length in the "collapsible" part of the channel More...
 
double Ldown
 x-length in the downstream part of the channel More...
 
double Ly
 Width. More...
 
GeomObjectWall_pt
 Pointer to the geometric object that parametrises the collapsible wall. More...
 
bool Rotate_domain
 Rotate domain (for axisymmetric problems, say) More...
 

Additional Inherited Members

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

Detailed Description

Collapsible channel domain.

Member Typedef Documentation

◆ AxialSpacingFctPt

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

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

◆ BLSquashFctPt

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

Typedef for function pointer for function that squashes the macro elements near the wall to help resolution of any wall boundary layers.

Constructor & Destructor Documentation

◆ CollapsibleChannelDomain()

oomph::CollapsibleChannelDomain::CollapsibleChannelDomain ( const unsigned nup,
const unsigned ncollapsible,
const unsigned ndown,
const unsigned ny,
const double lup,
const double lcollapsible,
const double ldown,
const double ly,
GeomObject wall_pt 
)
inline

Constructor: Pass the number of (macro-)elements, the domain lengths in the x- and y-direction and the pointer to the geometric object that specifies the shape of the "collapsible" segment.

58  Rotate_domain(false)
59  {
60  Nup = nup;
62  Ndown = ndown;
63  Ny = ny;
64  Lup = lup;
65  Lcollapsible = lcollapsible;
66  Ldown = ldown;
67  Ly = ly;
68  Wall_pt = wall_pt;
69 
70  // Total number of macro elements
71  unsigned nmacro = (Nup + Ncollapsible + Ndown) * Ny;
72 
73  // Build the macro elements
74  Macro_element_pt.resize(nmacro);
75  for (unsigned i = 0; i < nmacro; i++)
76  {
77  Macro_element_pt[i] = new QMacroElement<2>(this, i);
78  }
79  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
GeomObject *& wall_pt()
Definition: collapsible_channel_domain.h:136
unsigned ndown()
Number of vertical columns of macro elements in the downstream section.
Definition: collapsible_channel_domain.h:99
unsigned Ny
Number of macro elements across channel.
Definition: collapsible_channel_domain.h:310
unsigned Nup
Number of vertical element columns in upstream section.
Definition: collapsible_channel_domain.h:301
double Lup
x-length in the upstream part of the channel
Definition: collapsible_channel_domain.h:313
unsigned Ndown
Number of vertical element columns in downstream section.
Definition: collapsible_channel_domain.h:307
bool Rotate_domain
Rotate domain (for axisymmetric problems, say)
Definition: collapsible_channel_domain.h:328
static double default_axial_spacing_fct(const double &xi)
Definition: collapsible_channel_domain.h:294
BLSquashFctPt BL_squash_fct_pt
Definition: collapsible_channel_domain.h:286
static double default_BL_squash_fct(const double &s)
Definition: collapsible_channel_domain.h:157
unsigned ncollapsible()
Number of vertical clumns of macro elements in the "collapsible" segment.
Definition: collapsible_channel_domain.h:93
unsigned Ncollapsible
Number of vertical element columns in "collapsible" section.
Definition: collapsible_channel_domain.h:304
unsigned ny()
Number of macro-elements across the channel.
Definition: collapsible_channel_domain.h:105
GeomObject * Wall_pt
Pointer to the geometric object that parametrises the collapsible wall.
Definition: collapsible_channel_domain.h:325
AxialSpacingFctPt Axial_spacing_fct_pt
Definition: collapsible_channel_domain.h:290
unsigned nup()
Number of vertical columns of macro elements the upstream section.
Definition: collapsible_channel_domain.h:87
double Lcollapsible
x-length in the "collapsible" part of the channel
Definition: collapsible_channel_domain.h:316
double Ly
Width.
Definition: collapsible_channel_domain.h:322
double Ldown
x-length in the downstream part of the channel
Definition: collapsible_channel_domain.h:319
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
Definition: domain.h:301
const double ly
Definition: ConstraintElementsUnitTest.cpp:34

References i, Lcollapsible, Ldown, Lup, Mesh_Parameters::ly, Ly, oomph::Domain::Macro_element_pt, ncollapsible(), Ncollapsible, ndown(), Ndown, nup(), Nup, ny(), Ny, wall_pt(), and Wall_pt.

◆ ~CollapsibleChannelDomain()

oomph::CollapsibleChannelDomain::~CollapsibleChannelDomain ( )
inline

Destructor: emtpy; cleanup done in base class.

83 {}

Member Function Documentation

◆ axial_spacing_fct()

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

Function that implements axial spacing of macro elements

194  {
195  return Axial_spacing_fct_pt(xi);
196  }

References Axial_spacing_fct_pt.

Referenced by r_E_straight(), r_N_straight(), r_S_straight(), and r_W_straight().

◆ axial_spacing_fct_pt()

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

Function pointer for function that implements axial spacing of macro elements

187  {
188  return Axial_spacing_fct_pt;
189  }

References Axial_spacing_fct_pt.

Referenced by oomph::CollapsibleChannelMesh< ELEMENT >::axial_spacing_fct_pt().

◆ bl_squash_fct_pt()

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

Function pointer for function that squashes the macro elements near wall. Default mapping (identity) leaves the y-coordinate of the nodal points unchanged.

166  {
167  return BL_squash_fct_pt;
168  }

References BL_squash_fct_pt.

Referenced by oomph::AlgebraicCollapsibleChannelMesh< ELEMENT >::AlgebraicCollapsibleChannelMesh(), oomph::CollapsibleChannelMesh< ELEMENT >::bl_squash_fct_pt(), and oomph::MyAlgebraicCollapsibleChannelMesh< ELEMENT >::MyAlgebraicCollapsibleChannelMesh().

◆ default_axial_spacing_fct()

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

Default for function that implements axial spacing of macro elements

295  {
296  return xi;
297  }

◆ default_BL_squash_fct()

static double oomph::CollapsibleChannelDomain::default_BL_squash_fct ( const double s)
inlinestatic

Default for function that squashes the macro elements near the walls. Identity.

158  {
159  return s;
160  }
RealScalar s
Definition: level1_cplx_impl.h:130

References s.

◆ disable_rotate_domain()

void oomph::CollapsibleChannelDomain::disable_rotate_domain ( )
inline

Undo rotation of the domain (for axisymmetric problems)

221  {
222  Rotate_domain = false;
223  }

References Rotate_domain.

◆ enable_rotate_domain()

void oomph::CollapsibleChannelDomain::enable_rotate_domain ( )
inline

Rotate the domain (for axisymmetric problems)

215  {
216  Rotate_domain = true;
217  }

References Rotate_domain.

◆ l_collapsible()

double oomph::CollapsibleChannelDomain::l_collapsible ( )
inline

Length of collapsible segment.

118  {
119  return Lcollapsible;
120  }

References Lcollapsible.

◆ l_down()

double oomph::CollapsibleChannelDomain::l_down ( )
inline

Length of downstream section.

124  {
125  return Ldown;
126  }

References Ldown.

◆ l_up()

double oomph::CollapsibleChannelDomain::l_up ( )
inline

Length of upstream section.

112  {
113  return Lup;
114  }

References Lup.

◆ l_y()

double oomph::CollapsibleChannelDomain::l_y ( )
inline

Width of channel.

130  {
131  return Ly;
132  }

References Ly.

◆ macro_element_boundary()

void oomph::CollapsibleChannelDomain::macro_element_boundary ( const unsigned t,
const unsigned imacro,
const unsigned idirect,
const Vector< double > &  zeta,
Vector< double > &  r 
)
virtual

Vector representation of the imacro-th macro element boundary idirect (N/S/W/E) at time level t (t=0: present; t>0: previous): \( {\bf r}({\bf zeta}) \) Note that the local coordinate zeta is a 1D Vector rather than a scalar – this is unavoidable because this function implements the pure virtual function in the Domain base class.

////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// Vector representation of the imacro-th macro element boundary idirect (N/S/W/E) at time level t (t=0: present; t>0: previous): \( {\bf r}({\bf zeta}) \) Note that the local coordinate zeta is a 1D Vector rather than a scalar – this is unavoidable because this function implements the pure virtual function in the Domain base class.

Implements oomph::Domain.

351  {
352  using namespace QuadTreeNames;
353 
354 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
355  // Warn about time argument being moved to the front
356  OomphLibWarning(
357  "Order of function arguments has changed between versions 0.8 and 0.85",
358  "CollapsibleChannelDomain::macro_element_boundary(...)",
360 #endif
361 
362  // Total number of vertical columns of (macro-)elements
363  unsigned n_x = Nup + Ncollapsible + Ndown;
364 
365  // Which direction?
366  if (idirect == N)
367  {
368  // Upstream part of the channel
369  if ((imacro % n_x) < Nup)
370  {
371  r_N_straight(zeta, r, imacro, 0);
372  }
373  // Downstream part of channel
374  else if ((imacro % n_x) >= Nup + Ncollapsible)
375  {
376  r_N_straight(zeta, r, imacro, 1);
377  }
378  // Collapsible segment
379  else if (((imacro % n_x) < Nup + Ncollapsible) && ((imacro % n_x) >= Nup))
380  {
381  r_N_collapsible(t, zeta, r, imacro);
382  }
383  else
384  {
385  std::ostringstream error_stream;
386  error_stream << "Never get here! imacro, idirect: " << imacro << " "
387  << idirect << std::endl;
388 
389  throw OomphLibError(
390  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
391  }
392  }
393  else if (idirect == S)
394  {
395  // Upstream part
396  if ((imacro % n_x) < Nup)
397  {
398  r_S_straight(zeta, r, imacro, 0);
399  }
400  // Downstream part
401  else if ((imacro % n_x) >= Nup + Ncollapsible)
402  {
403  r_S_straight(zeta, r, imacro, 1);
404  }
405  // "Collapsible" bit
406  else if (((imacro % n_x) < Nup + Ncollapsible) && ((imacro % n_x) >= Nup))
407  {
408  r_S_collapsible(t, zeta, r, imacro);
409  }
410  else
411  {
412  std::ostringstream error_stream;
413  error_stream << "Never get here! imacro, idirect: " << imacro << " "
414  << idirect << std::endl;
415 
416  throw OomphLibError(
417  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
418  }
419  }
420  else if (idirect == E)
421  {
422  // Upstream bit
423  if ((imacro % n_x) < Nup)
424  {
425  r_E_straight(zeta, r, imacro, 0);
426  }
427  // Downstream bit
428  else if ((imacro % n_x) >= Nup + Ncollapsible)
429  {
430  r_E_straight(zeta, r, imacro, 1);
431  }
432  // "Collapsible" bit
433  else if (((imacro % n_x) < Nup + Ncollapsible) && ((imacro % n_x) >= Nup))
434  {
435  r_E_collapsible(t, zeta, r, imacro);
436  }
437  else
438  {
439  std::ostringstream error_stream;
440  error_stream << "Never get here! imacro, idirect: " << imacro << " "
441  << idirect << std::endl;
442 
443  throw OomphLibError(
444  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
445  }
446  }
447 
448  else if (idirect == W)
449  {
450  // Upstream bit
451  if ((imacro % n_x) < Nup)
452  {
453  r_W_straight(zeta, r, imacro, 0);
454  }
455  // Downstream bit
456  else if ((imacro % n_x) >= Nup + Ncollapsible)
457  {
458  r_W_straight(zeta, r, imacro, 1);
459  }
460  // "Collapsible" bit
461  else if (((imacro % n_x) < Nup + Ncollapsible) && ((imacro % n_x) >= Nup))
462  {
463  r_W_collapsible(t, zeta, r, imacro);
464  }
465  else
466  {
467  std::ostringstream error_stream;
468  error_stream << "Never get here! imacro, idirect: " << imacro << " "
469  << idirect << std::endl;
470 
471  throw OomphLibError(
472  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
473  }
474  }
475 
476  // Rotate?
477  if (Rotate_domain)
478  {
479  double radius = r[1];
480  double z = r[0];
481 
482  r[0] = radius;
483  r[1] = -z;
484  }
485  }
void r_N_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Definition: collapsible_channel_domain.h:778
void r_S_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Definition: collapsible_channel_domain.h:652
void r_S_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Definition: collapsible_channel_domain.h:815
void r_E_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Definition: collapsible_channel_domain.h:544
void r_W_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Definition: collapsible_channel_domain.h:492
void r_W_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Definition: collapsible_channel_domain.h:706
void r_N_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Definition: collapsible_channel_domain.h:596
void r_E_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Definition: collapsible_channel_domain.h:742
@ N
Definition: constructor.cpp:22
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
double E
Elastic modulus.
Definition: TwenteMeshGluing.cpp:68
r
Definition: UniformPSDSelfTest.py:20
radius
Definition: UniformPSDSelfTest.py:15
@ S
Definition: quadtree.h:62
@ W
Definition: quadtree.h:63
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References Global_Physical_Variables::E, N, Ncollapsible, Ndown, Nup, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, UniformPSDSelfTest::r, r_E_collapsible(), r_E_straight(), r_N_collapsible(), r_N_straight(), r_S_collapsible(), r_S_straight(), r_W_collapsible(), r_W_straight(), UniformPSDSelfTest::radius, Rotate_domain, oomph::QuadTreeNames::S, plotPSD::t, oomph::QuadTreeNames::W, and Eigen::zeta().

◆ ncollapsible()

unsigned oomph::CollapsibleChannelDomain::ncollapsible ( )
inline

Number of vertical clumns of macro elements in the "collapsible" segment.

94  {
95  return Ncollapsible;
96  }

References Ncollapsible.

Referenced by CollapsibleChannelDomain().

◆ ndown()

unsigned oomph::CollapsibleChannelDomain::ndown ( )
inline

Number of vertical columns of macro elements in the downstream section.

100  {
101  return Ndown;
102  }

References Ndown.

Referenced by CollapsibleChannelDomain().

◆ nup()

unsigned oomph::CollapsibleChannelDomain::nup ( )
inline

Number of vertical columns of macro elements the upstream section.

88  {
89  return Nup;
90  }

References Nup.

Referenced by CollapsibleChannelDomain().

◆ ny()

unsigned oomph::CollapsibleChannelDomain::ny ( )
inline

Number of macro-elements across the channel.

106  {
107  return Ny;
108  }

References Ny.

Referenced by CollapsibleChannelDomain().

◆ r_E_collapsible()

void oomph::CollapsibleChannelDomain::r_E_collapsible ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  r,
const unsigned imacro 
)
private

Eastern boundary of the macro element imacro in the collapsible section

Eastern edge of the macro element in the collapsible part of the channel; \( \zeta \in [-1,1] \)

746  {
747  // Determines the "coordinates" of the macro-element
748  unsigned x = unsigned(imacro % (Nup + Ncollapsible + Ndown));
749  unsigned y = unsigned(double(imacro) / double(Nup + Ncollapsible + Ndown));
750 
751  // Vector of Lagrangian coordinates
752  Vector<double> xi(1);
753  xi[0] = (double(x - Nup) + 1.0) * (Lcollapsible / double(Ncollapsible));
754 
755  // Position vector on upper wall:
756  Vector<double> r_wall(2);
757  Wall_pt->position(t, xi, r_wall);
758 
759  // Point will be located on straight line from bottom to top wall
760  double fract = (double(y) + (0.5 * (1.0 + zeta[0]))) / double(Ny);
761 
762  // Map it via squash fct
763  fract = s_squash(fract);
764 
765  // x-cooordinate -- straight line from fixed position on the bottom
766  // wall to moving position on the top wall
767  r[0] = Lup + xi[0] + (r_wall[0] - (xi[0] + Lup)) * fract;
768 
769  // y-coordinate
770  r[1] = r_wall[1] * fract;
771  }
double s_squash(const double &s)
Definition: collapsible_channel_domain.h:175
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
Scalar * y
Definition: level1_cplx_impl.h:128
list x
Definition: plotDoE.py:28

References Lcollapsible, Lup, Ncollapsible, Ndown, Nup, Ny, oomph::GeomObject::position(), UniformPSDSelfTest::r, s_squash(), plotPSD::t, Wall_pt, plotDoE::x, y, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_E_straight()

void oomph::CollapsibleChannelDomain::r_E_straight ( const Vector< double > &  zeta,
Vector< double > &  r,
const unsigned imacro,
const unsigned part 
)
private

Eastern boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) sections

Eastern edge of the macro element in the straight parts of the channel; \( \zeta \in [-1,1] \) part=0 in the upstream part, part=1 in the downstream part

548  {
549  // Determines the "coordinates" of the macro-element
550  unsigned x = unsigned(imacro % (Nup + Ncollapsible + Ndown));
551  unsigned y = unsigned(double(imacro) / double(Nup + Ncollapsible + Ndown));
552 
553  // Where are we?
554  switch (part)
555  {
556  case 0: // in the upstream part of the channel
557 
558  // Parametrizes the boundary
559  r[0] = axial_spacing_fct((double(x) + 1.0) * (Lup / double(Nup)));
560  r[1] = (double(y) + (0.5 * (1.0 + zeta[0]))) * (Ly / double(Ny));
561 
562  // Map it via squash fct
563  r[1] = Ly * s_squash(r[1] / Ly);
564 
565  break;
566 
567  case 1: // in the downstream part of the channel
568 
569  // Parametrizes the boundary
570  r[0] = axial_spacing_fct((double(x - Nup - Ncollapsible) + 1.0) *
571  (Ldown / double(Ndown)) +
572  Lup + Lcollapsible);
573  r[1] = (double(y) + (0.5 * (1.0 + zeta[0]))) * (Ly / double(Ny));
574 
575  // Map it via squash fct
576  r[1] = Ly * s_squash(r[1] / Ly);
577 
578  break;
579 
580  default:
581 
582 
583  std::ostringstream error_stream;
584  error_stream << "Never get here! part=" << part << std::endl;
585 
586  throw OomphLibError(
587  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
588  }
589  }
double axial_spacing_fct(const double &xi)
Definition: collapsible_channel_domain.h:193

References axial_spacing_fct(), Lcollapsible, Ldown, Lup, Ly, Ncollapsible, Ndown, Nup, Ny, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, UniformPSDSelfTest::r, s_squash(), plotDoE::x, y, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_N_collapsible()

void oomph::CollapsibleChannelDomain::r_N_collapsible ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  r,
const unsigned imacro 
)
private

Northern boundary of the macro element imacro in the collapsible section

Northern edge of the macro element in the collapsible part of the channel; \( \zeta \in [-1,1] \)

782  {
783  // Determines the "coordinates" of the macro-element
784  unsigned x = unsigned(imacro % (Nup + Ncollapsible + Ndown));
785  unsigned y = unsigned(double(imacro) / double(Nup + Ncollapsible + Ndown));
786 
787  // Vector of Lagrangian coordinates
788  Vector<double> xi(1);
789  xi[0] = (double(x - Nup) + (0.5 * (1.0 + zeta[0]))) *
790  (Lcollapsible / double(Ncollapsible));
791 
792  // Position vector on upper wall:
793  Vector<double> r_wall(2);
794  Wall_pt->position(t, xi, r_wall);
795 
796  // Point will be located on straight line from bottom to top wall
797  double fract = (double(y) + 1.0) / double(Ny);
798 
799  // Map it via squash fct
800  fract = s_squash(fract);
801 
802  // x-cooordinate -- straight line from fixed position on the bottom
803  // wall to moving position on the top wall
804  r[0] = Lup + xi[0] + (r_wall[0] - (xi[0] + Lup)) * fract;
805 
806  // y-coordinate
807  r[1] = r_wall[1] * fract;
808  }

References Lcollapsible, Lup, Ncollapsible, Ndown, Nup, Ny, oomph::GeomObject::position(), UniformPSDSelfTest::r, s_squash(), plotPSD::t, Wall_pt, plotDoE::x, y, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_N_straight()

void oomph::CollapsibleChannelDomain::r_N_straight ( const Vector< double > &  zeta,
Vector< double > &  r,
const unsigned imacro,
const unsigned part 
)
private

Northern boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) sections

Northern edge of the macro element in the straight parts of the channel; \( \zeta \in [-1,1] \) part=0 in the left part, part=1 in the right part

600  {
601  // Determines the "coordinates" of the macro-element
602  unsigned x = unsigned(imacro % (Nup + Ncollapsible + Ndown));
603  unsigned y = unsigned(double(imacro) / double(Nup + Ncollapsible + Ndown));
604 
605 
606  // Where are we?
607  switch (part)
608  {
609  case 0: // in the upstream part of the channel
610 
611  // Parametrizes the boundary
612  r[0] = axial_spacing_fct((double(x) + (0.5 * (1.0 + zeta[0]))) *
613  (Lup / double(Nup)));
614  r[1] = (double(y) + 1.0) * (Ly / double(Ny));
615 
616  // Map it via squash fct
617  r[1] = Ly * s_squash(r[1] / Ly);
618 
619  break;
620 
621  case 1: // in the downstream part of the channel
622 
623  // Parametrizes the boundary
624  r[0] = axial_spacing_fct(
625  (double(x - Nup - Ncollapsible) + (0.5 * (1.0 + zeta[0]))) *
626  (Ldown / double(Ndown)) +
627  Lup + Lcollapsible);
628  r[1] = (double(y) + 1.0) * (Ly / double(Ny));
629 
630  // Map it via squash fct
631  r[1] = Ly * s_squash(r[1] / Ly);
632 
633  break;
634 
635  default:
636 
637 
638  std::ostringstream error_stream;
639  error_stream << "Never get here! part=" << part << std::endl;
640 
641  throw OomphLibError(
642  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
643  }
644  }

References axial_spacing_fct(), Lcollapsible, Ldown, Lup, Ly, Ncollapsible, Ndown, Nup, Ny, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, UniformPSDSelfTest::r, s_squash(), plotDoE::x, y, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_S_collapsible()

void oomph::CollapsibleChannelDomain::r_S_collapsible ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  r,
const unsigned imacro 
)
private

Southern boundary of the macro element imacro in the collapsible section

Southern edge of the macro element in the collapsible part of the channel; \( \zeta \in [-1,1] \)

819  {
820  // Determines the "coordinates" of the macro-element
821  unsigned x = unsigned(imacro % (Nup + Ncollapsible + Ndown));
822  unsigned y = unsigned(double(imacro) / double(Nup + Ncollapsible + Ndown));
823 
824  // Vector of Lagrangian coordinates
825  Vector<double> xi(1);
826  xi[0] = (double(x - Nup) + (0.5 * (1.0 + zeta[0]))) *
827  (Lcollapsible / double(Ncollapsible));
828 
829  // Position vector on upper wall:
830  Vector<double> r_wall(2);
831  Wall_pt->position(t, xi, r_wall);
832 
833  // Point will be located on straight line from bottom to top wall
834  double fract = double(y) / double(Ny);
835 
836  // Map it via squash fct
837  fract = s_squash(fract);
838 
839  // x-cooordinate -- straight line from fixed position on the bottom
840  // wall to moving position on the top wall
841  r[0] = Lup + xi[0] + (r_wall[0] - (xi[0] + Lup)) * fract;
842 
843  // y-coordinate
844  r[1] = r_wall[1] * fract;
845  }

References Lcollapsible, Lup, Ncollapsible, Ndown, Nup, Ny, oomph::GeomObject::position(), UniformPSDSelfTest::r, s_squash(), plotPSD::t, Wall_pt, plotDoE::x, y, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_S_straight()

void oomph::CollapsibleChannelDomain::r_S_straight ( const Vector< double > &  zeta,
Vector< double > &  r,
const unsigned imacro,
const unsigned part 
)
private

Southern boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) sections

Southern edge of the macro element in the straight parts of the channel; \( \zeta \in [-1,1] \) part=0 in the left part, part=1 in the right part

656  {
657  // Determines the "coordinates" of the macro-element
658  unsigned x = unsigned(imacro % (Nup + Ncollapsible + Ndown));
659  unsigned y = unsigned(double(imacro) / double(Nup + Ncollapsible + Ndown));
660 
661  // Where are we?
662  switch (part)
663  {
664  case 0: // in the upstream bit
665 
666  // Parametrizes the boundary
667  r[0] = axial_spacing_fct((double(x) + (0.5 * (1 + zeta[0]))) *
668  (Lup / double(Nup)));
669  r[1] = double(y) * (Ly / double(Ny));
670 
671  // Map it via squash fct
672  r[1] = Ly * s_squash(r[1] / Ly);
673 
674  break;
675 
676  case 1: // in the downstream bit
677 
678  // Parametrizes the boundary
679  r[0] = axial_spacing_fct(
680  (double(x - Nup - Ncollapsible) + (0.5 * (1 + zeta[0]))) *
681  (Ldown / double(Ndown)) +
682  Lup + Lcollapsible);
683  r[1] = double(y) * (Ly / double(Ny));
684 
685  // Map it via squash fct
686  r[1] = Ly * s_squash(r[1] / Ly);
687 
688  break;
689 
690  default:
691 
692 
693  std::ostringstream error_stream;
694  error_stream << "Never get here! part=" << part << std::endl;
695 
696  throw OomphLibError(
697  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
698  }
699  }

References axial_spacing_fct(), Lcollapsible, Ldown, Lup, Ly, Ncollapsible, Ndown, Nup, Ny, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, UniformPSDSelfTest::r, s_squash(), plotDoE::x, y, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_W_collapsible()

void oomph::CollapsibleChannelDomain::r_W_collapsible ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  r,
const unsigned imacro 
)
private

Western boundary of the macro element imacro in the collapsible section

Western edge of the macro element in the collapsible part of the channel; \( \zeta \in [-1,1] \).

710  {
711  // Determines the "coordinates" of the macro-element
712  unsigned x = unsigned(imacro % (Nup + Ncollapsible + Ndown));
713  unsigned y = unsigned(double(imacro) / double(Nup + Ncollapsible + Ndown));
714 
715  // Vector of Lagrangian coordinates
716  Vector<double> xi(1);
717  xi[0] = double(x - Nup) * (Lcollapsible / double(Ncollapsible));
718 
719  // Position vector on upper wall:
720  Vector<double> r_wall(2);
721  Wall_pt->position(t, xi, r_wall);
722 
723  // Point will be located on straight line from bottom to top wall
724  double fract = (double(y) + (0.5 * (1.0 + zeta[0]))) / double(Ny);
725 
726  // Map it via squash fct
727  fract = s_squash(fract);
728 
729  // x-cooordinate -- straight line from fixed position on the bottom
730  // wall to moving position on the top wall
731  r[0] = Lup + xi[0] + (r_wall[0] - (xi[0] + Lup)) * fract;
732 
733  // y-coordinate
734  r[1] = r_wall[1] * fract;
735  }

References Lcollapsible, Lup, Ncollapsible, Ndown, Nup, Ny, oomph::GeomObject::position(), UniformPSDSelfTest::r, s_squash(), plotPSD::t, Wall_pt, plotDoE::x, y, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_W_straight()

void oomph::CollapsibleChannelDomain::r_W_straight ( const Vector< double > &  zeta,
Vector< double > &  r,
const unsigned imacro,
const unsigned part 
)
private

Western boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) sections

Western edge of the macro element in the upstream (part=0) or downstream (part=1) parts of the channel; \( \zeta \in [-1,1] \)

496  {
497  // Determines the "coordinates" of the macro-element
498  unsigned x = unsigned(imacro % (Nup + Ncollapsible + Ndown));
499  unsigned y = unsigned(double(imacro) / double(Nup + Ncollapsible + Ndown));
500 
501  // Where are we?
502  switch (part)
503  {
504  case 0: // in the upstream part of the channel
505 
506  // Parametrize the boundary
507  r[0] = axial_spacing_fct(double(x) * (Lup / double(Nup)));
508  r[1] = (double(y) + (0.5 * (1.0 + zeta[0]))) * (Ly / double(Ny));
509 
510  // Map it via squash fct
511  r[1] = Ly * s_squash(r[1] / Ly);
512 
513  break;
514 
515  case 1: // in the downstream part of the channel
516 
517  // Parametrizes the boundary
518  r[0] = axial_spacing_fct(double(x - Nup - Ncollapsible) *
519  (Ldown / double(Ndown)) +
520  Lup + Lcollapsible);
521  r[1] = (double(y) + (0.5 * (1.0 + zeta[0]))) * (Ly / double(Ny));
522 
523  // Map it via squash fct
524  r[1] = Ly * s_squash(r[1] / Ly);
525 
526  break;
527 
528  default:
529 
530  std::ostringstream error_stream;
531  error_stream << "Never get here! part=" << part << std::endl;
532 
533  throw OomphLibError(
534  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
535  }
536  }

References axial_spacing_fct(), Lcollapsible, Ldown, Lup, Ly, Ncollapsible, Ndown, Nup, Ny, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, UniformPSDSelfTest::r, s_squash(), plotDoE::x, y, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ s_squash()

double oomph::CollapsibleChannelDomain::s_squash ( const double s)
inline

Function that squashes the macro elements near the wall. Input argument should vary between 0 and 1; function should return stretched/squashed coordinate in the same range. Default implementation is the identity; can be overloaded by specifying a different function pointer with bl_squash_fct_pt().

176  {
177  return BL_squash_fct_pt(s);
178  }

References BL_squash_fct_pt, and s.

Referenced by r_E_collapsible(), r_E_straight(), r_N_collapsible(), r_N_straight(), r_S_collapsible(), r_S_straight(), r_W_collapsible(), and r_W_straight().

◆ wall_pt() [1/2]

GeomObject*& oomph::CollapsibleChannelDomain::wall_pt ( )
inline

Access to pointer to the geometric object that parametrises the collapsible wall

137  {
138  return Wall_pt;
139  }

References Wall_pt.

Referenced by CollapsibleChannelDomain().

◆ wall_pt() [2/2]

GeomObject* oomph::CollapsibleChannelDomain::wall_pt ( ) const
inline

Access to pointer to the geometric object that parametrises the collapsible wall (const version)

145  {
146  return Wall_pt;
147  }

References Wall_pt.

Member Data Documentation

◆ Axial_spacing_fct_pt

AxialSpacingFctPt oomph::CollapsibleChannelDomain::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::CollapsibleChannelDomain::BL_squash_fct_pt
private

Function pointer for function that squashes the macro elements near the walls

Referenced by bl_squash_fct_pt(), and s_squash().

◆ Lcollapsible

double oomph::CollapsibleChannelDomain::Lcollapsible
private

◆ Ldown

double oomph::CollapsibleChannelDomain::Ldown
private

x-length in the downstream part of the channel

Referenced by CollapsibleChannelDomain(), l_down(), r_E_straight(), r_N_straight(), r_S_straight(), and r_W_straight().

◆ Lup

double oomph::CollapsibleChannelDomain::Lup
private

◆ Ly

double oomph::CollapsibleChannelDomain::Ly
private

◆ Ncollapsible

unsigned oomph::CollapsibleChannelDomain::Ncollapsible
private

◆ Ndown

unsigned oomph::CollapsibleChannelDomain::Ndown
private

◆ Nup

unsigned oomph::CollapsibleChannelDomain::Nup
private

◆ Ny

unsigned oomph::CollapsibleChannelDomain::Ny
private

◆ Rotate_domain

bool oomph::CollapsibleChannelDomain::Rotate_domain
private

Rotate domain (for axisymmetric problems, say)

Referenced by disable_rotate_domain(), enable_rotate_domain(), and macro_element_boundary().

◆ Wall_pt

GeomObject* oomph::CollapsibleChannelDomain::Wall_pt
private

Pointer to the geometric object that parametrises the collapsible wall.

Referenced by CollapsibleChannelDomain(), r_E_collapsible(), r_N_collapsible(), r_S_collapsible(), r_W_collapsible(), and wall_pt().


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