oomph::FishDomain Class Reference

#include <fish_domain.h>

+ Inheritance diagram for oomph::FishDomain:

Public Member Functions

 FishDomain (GeomObject *back_pt, const double &xi_nose, const double &xi_tail)
 
 FishDomain (const FishDomain &)=delete
 Broken copy constructor. More...
 
void operator= (const FishDomain &)=delete
 Broken assignment operator. More...
 
virtual ~FishDomain ()
 Destructor for FishDomain: Empty; cleanup done in base class. More...
 
doublex_fin ()
 x-position of fin tip More...
 
doubley_fin ()
 y-position of fin tip More...
 
doublex_mouth ()
 x-position of mouth More...
 
doublexi_nose ()
 Start coordinate on wall (near nose) More...
 
doublexi_tail ()
 End coordinate on wall (near tail) More...
 
void macro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &zeta, Vector< double > &r)
 
- 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_upper_body_N (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of upper body macro element zeta \( \in [-1,1] \). More...
 
void r_upper_body_W (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of upper body macro element zeta \( \in [-1,1] \). More...
 
void r_upper_body_S (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of upper body macro element zeta \( \in [-1,1] \). More...
 
void r_upper_body_E (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of upper body macro element zeta \( \in [-1,1] \). More...
 
void r_upper_fin_N (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of upper fin macro element zeta \( \in [-1,1] \). More...
 
void r_upper_fin_W (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of upper fin macro element zeta \( \in [-1,1] \). More...
 
void r_upper_fin_S (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of upper fin macro element zeta \( \in [-1,1] \). More...
 
void r_upper_fin_E (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of upper fin macro element zeta \( \in [-1,1] \). More...
 
void r_lower_body_N (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of lower body macro element zeta \( \in [-1,1] \). More...
 
void r_lower_body_W (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of lower body macro element zeta \( \in [-1,1] \). More...
 
void r_lower_body_S (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Southern boundary of lower body macro element zeta \(\in [-1,1] \). More...
 
void r_lower_body_E (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of lower body macro element zeta \( \in [-1,1] \). More...
 
void r_lower_fin_N (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of lower fin macro element zeta \( \in [-1,1] \). More...
 
void r_lower_fin_W (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of lower fin macro element zeta \( \in [-1,1] \). More...
 
void r_lower_fin_S (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of lower fin macro element zeta \( \in [-1,1] \). More...
 
void r_lower_fin_E (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 Boundary of lower fin macro element zeta \( \in [-1,1] \). More...
 

Private Attributes

double Xi_nose
 "Nose" limit for the (1D) coordinates along the wall More...
 
double Xi_tail
 "Tail" limit for the (1D) coordinates along the wall More...
 
double X_fin
 X coordinate of fin tip. More...
 
double Y_fin
 Y coordinate of fin tip. More...
 
double X_mouth
 X coordinate of corner of mouth. More...
 
GeomObjectBack_pt
 Pointer to the fish's back. More...
 

Additional Inherited Members

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

Detailed Description

Fish shaped domain, represented by four MacroElements. Shape is parametrised by GeomObject that represents the fish's back.

Constructor & Destructor Documentation

◆ FishDomain() [1/2]

oomph::FishDomain::FishDomain ( GeomObject back_pt,
const double xi_nose,
const double xi_tail 
)
inline

Constructor: Pass pointer to GeomObject that represents the (upper) curved boundary of the fish's body, and the start and end values of the Lagrangian coordinates along the GeomObject.

51  : Xi_nose(xi_nose), Xi_tail(xi_tail), Back_pt(back_pt)
52  {
53  // Set values for private data members that are describe
54  // geometric features of the fish: x-coordinate of the fin,
55  // (half-)height of the fin, and x-position of the mouth.
56  X_fin = 1.7;
57  Y_fin = 0.9;
58  X_mouth = 0.0;
59 
60  // There are four macro elements
61  unsigned nmacro = 4;
62  Macro_element_pt.resize(nmacro);
63 
64  // Build them
65  for (unsigned i = 0; i < nmacro; i++)
66  {
67  Macro_element_pt[i] = new QMacroElement<2>(this, i);
68  }
69  } // end of constructor
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
Definition: domain.h:301
double Y_fin
Y coordinate of fin tip.
Definition: fish_domain.h:136
double Xi_tail
"Tail" limit for the (1D) coordinates along the wall
Definition: fish_domain.h:130
double & xi_nose()
Start coordinate on wall (near nose)
Definition: fish_domain.h:101
double X_mouth
X coordinate of corner of mouth.
Definition: fish_domain.h:139
double & xi_tail()
End coordinate on wall (near tail)
Definition: fish_domain.h:107
GeomObject * Back_pt
Pointer to the fish's back.
Definition: fish_domain.h:142
double X_fin
X coordinate of fin tip.
Definition: fish_domain.h:133
double Xi_nose
"Nose" limit for the (1D) coordinates along the wall
Definition: fish_domain.h:127

References i, oomph::Domain::Macro_element_pt, X_fin, X_mouth, and Y_fin.

◆ FishDomain() [2/2]

oomph::FishDomain::FishDomain ( const FishDomain )
delete

Broken copy constructor.

◆ ~FishDomain()

virtual oomph::FishDomain::~FishDomain ( )
inlinevirtual

Destructor for FishDomain: Empty; cleanup done in base class.

79 {}

Member Function Documentation

◆ macro_element_boundary()

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

Vector representation of the i_macro-th macro element boundary i_direct (N/S/W/E) at the discrete 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.

313  {
314  using namespace QuadTreeNames;
315 
316 
317 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
318  // Warn about time argument being moved to the front
319  OomphLibWarning(
320  "Order of function arguments has changed between versions 0.8 and 0.85",
321  "FishDomain::macro_element_boundary(...)",
323 #endif
324 
325 
326  // Which macro element?
327  // --------------------
328  switch (imacro)
329  {
330  // Macro element 0: Lower body
331  case 0:
332 
333  // Which direction?
334  if (idirect == N)
335  {
337  }
338  else if (idirect == S)
339  {
341  }
342  else if (idirect == W)
343  {
345  }
346  else if (idirect == E)
347  {
349  }
350  else
351  {
352  std::ostringstream error_stream;
353  error_stream << "idirect is " << idirect << " not one of N, S, E, W"
354  << std::endl;
355 
356  throw OomphLibError(error_stream.str(),
359  }
360 
361  break;
362 
363  // Macro element 1: Lower Fin
364  case 1:
365 
366  // Which direction?
367  if (idirect == N)
368  {
370  }
371  else if (idirect == S)
372  {
374  }
375  else if (idirect == W)
376  {
378  }
379  else if (idirect == E)
380  {
382  }
383  else
384  {
385  std::ostringstream error_stream;
386  error_stream << "idirect is " << idirect << " not one of N, S, E, W"
387  << std::endl;
388 
389  throw OomphLibError(error_stream.str(),
392  }
393 
394  break;
395 
396 
397  // Macro element 2: Upper body
398  case 2:
399 
400  // Which direction?
401  if (idirect == N)
402  {
404  }
405  else if (idirect == S)
406  {
408  }
409  else if (idirect == W)
410  {
412  }
413  else if (idirect == E)
414  {
416  }
417  else
418  {
419  std::ostringstream error_stream;
420  error_stream << "idirect is " << idirect << " not one of N, S, E, W"
421  << std::endl;
422 
423  throw OomphLibError(error_stream.str(),
426  }
427 
428  break;
429 
430 
431  // Macro element 3: Upper Fin
432  case 3:
433 
434  // Which direction?
435  if (idirect == N)
436  {
438  }
439  else if (idirect == S)
440  {
442  }
443  else if (idirect == W)
444  {
446  }
447  else if (idirect == E)
448  {
450  }
451  else
452  {
453  std::ostringstream error_stream;
454  error_stream << "idirect is " << idirect << " not one of N, S, E, W"
455  << std::endl;
456 
457  throw OomphLibError(error_stream.str(),
460  }
461 
462  break;
463 
464  default:
465 
466  // Error
467  std::ostringstream error_stream;
468  error_stream << "Wrong imacro " << imacro << std::endl;
469 
470  throw OomphLibError(
471  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
472  }
473 
474  } // end of macro_element_boundary
void r_upper_fin_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper fin macro element zeta .
Definition: fish_domain.h:542
void r_lower_fin_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin macro element zeta .
Definition: fish_domain.h:267
void r_lower_body_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower body macro element zeta .
Definition: fish_domain.h:199
void r_upper_body_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper body macro element zeta .
Definition: fish_domain.h:555
void r_upper_body_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper body macro element zeta .
Definition: fish_domain.h:572
void r_upper_fin_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper fin macro element zeta .
Definition: fish_domain.h:480
void r_lower_fin_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin macro element zeta .
Definition: fish_domain.h:240
void r_upper_fin_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper fin macro element zeta .
Definition: fish_domain.h:505
void r_lower_body_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower body macro element zeta .
Definition: fish_domain.h:186
void r_lower_fin_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin macro element zeta .
Definition: fish_domain.h:279
void r_lower_body_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Southern boundary of lower body macro element zeta .
Definition: fish_domain.h:213
void r_lower_fin_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin macro element zeta .
Definition: fish_domain.h:253
void r_lower_body_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower body macro element zeta .
Definition: fish_domain.h:225
void r_upper_body_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper body macro element zeta .
Definition: fish_domain.h:617
void r_upper_fin_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper fin macro element zeta .
Definition: fish_domain.h:523
void r_upper_body_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper body macro element zeta .
Definition: fish_domain.h:597
@ 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
@ 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, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, UniformPSDSelfTest::r, r_lower_body_E(), r_lower_body_N(), r_lower_body_S(), r_lower_body_W(), r_lower_fin_E(), r_lower_fin_N(), r_lower_fin_S(), r_lower_fin_W(), r_upper_body_E(), r_upper_body_N(), r_upper_body_S(), r_upper_body_W(), r_upper_fin_E(), r_upper_fin_N(), r_upper_fin_S(), r_upper_fin_W(), oomph::QuadTreeNames::S, plotPSD::t, oomph::QuadTreeNames::W, and Eigen::zeta().

◆ operator=()

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

Broken assignment operator.

◆ r_lower_body_E()

void oomph::FishDomain::r_lower_body_E ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
inlineprivate

Boundary of lower body macro element zeta \( \in [-1,1] \).

228  {
229  // East of lower body is element is east of upper one.
230  // Direction of the coordinate is inverted.
231  Vector<double> zeta_new(1);
232  zeta_new[0] = -zeta[0];
233  r_upper_body_E(t, zeta_new, f);
234  // Vertical coordinate is reflected
235  f[1] = -f[1];
236  }
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237

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

Referenced by macro_element_boundary().

◆ r_lower_body_N()

void oomph::FishDomain::r_lower_body_N ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
inlineprivate

Boundary of lower body macro element zeta \( \in [-1,1] \).

189  {
190  // North of lower body is element is south of upper one.
191  // Direction of the coordinate stays the same.
192  r_upper_body_S(t, zeta, f);
193  // Reflect vertical position
194  f[1] = -f[1];
195  }

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

Referenced by macro_element_boundary().

◆ r_lower_body_S()

void oomph::FishDomain::r_lower_body_S ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
inlineprivate

Southern boundary of lower body macro element zeta \(\in [-1,1] \).

216  {
217  // South of lower body is element is north of upper one.
218  // Direction of the coordinate stays the same.
219  r_upper_body_N(t, zeta, f);
220  // Reflect vertical position
221  f[1] = -f[1];
222  }

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

Referenced by macro_element_boundary().

◆ r_lower_body_W()

void oomph::FishDomain::r_lower_body_W ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
inlineprivate

Boundary of lower body macro element zeta \( \in [-1,1] \).

202  {
203  // West of lower body is element is west of upper one.
204  // Direction of the coordinate is inverted
205  Vector<double> zeta_new(1);
206  zeta_new[0] = -zeta[0];
207  r_upper_body_W(t, zeta_new, f);
208  // Vertical coordinate is reflected
209  f[1] = -f[1];
210  }

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

Referenced by macro_element_boundary().

◆ r_lower_fin_E()

void oomph::FishDomain::r_lower_fin_E ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
inlineprivate

Boundary of lower fin macro element zeta \( \in [-1,1] \).

282  {
283  // East of lower fin is element is east of upper one.
284  // Direction of the coordinate is inverted.
285  Vector<double> zeta_new(1);
286  zeta_new[0] = -zeta[0];
287  r_upper_fin_E(t, zeta_new, f);
288  // Vertical coordinate is reflected
289  f[1] = -f[1];
290  }

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

Referenced by macro_element_boundary().

◆ r_lower_fin_N()

void oomph::FishDomain::r_lower_fin_N ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
inlineprivate

Boundary of lower fin macro element zeta \( \in [-1,1] \).

243  {
244  // North of lower fin is element is south of upper one.
245  // Direction of the coordinate stays the same.
246  r_upper_fin_S(t, zeta, f);
247  // Reflect vertical position
248  f[1] = -f[1];
249  }

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

Referenced by macro_element_boundary().

◆ r_lower_fin_S()

void oomph::FishDomain::r_lower_fin_S ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
inlineprivate

Boundary of lower fin macro element zeta \( \in [-1,1] \).

270  {
271  // South of lower fin is element is north of upper one.
272  // Direction of the coordinate stays the same.
273  r_upper_fin_N(t, zeta, f);
274  // Reflect vertical position
275  f[1] = -f[1];
276  }

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

Referenced by macro_element_boundary().

◆ r_lower_fin_W()

void oomph::FishDomain::r_lower_fin_W ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
inlineprivate

Boundary of lower fin macro element zeta \( \in [-1,1] \).

256  {
257  // West of lower fin is element is west of upper one.
258  // Direction of the coordinate is inverted
259  Vector<double> zeta_new(1);
260  zeta_new[0] = -zeta[0];
261  r_upper_fin_W(t, zeta_new, f);
262  // Vertical coordinate is reflected
263  f[1] = -f[1];
264  }

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

Referenced by macro_element_boundary().

◆ r_upper_body_E()

void oomph::FishDomain::r_upper_body_E ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of upper body macro element zeta \( \in [-1,1] \).

Eastern edge of upper body macro element; \( \zeta \in [-1,1] \).

575  {
576  // Top right corner (tail end) of body
577  Vector<double> r_top(2);
578  Vector<double> x(1);
579  x[0] = Xi_tail;
580  Back_pt->position(t, x, r_top);
581 
582  // Corresponding point on the x-axis
583  Vector<double> r_back(2);
584  r_back[0] = r_top[0];
585  r_back[1] = 0.0;
586 
587  r[0] = r_back[0] + (r_top[0] - r_back[0]) * 0.5 * (zeta[0] + 1.0);
588  r[1] = r_back[1] + (r_top[1] - r_back[1]) * 0.5 * (zeta[0] + 1.0);
589 
590 
591  } // end of r_upper_body_E
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
list x
Definition: plotDoE.py:28

References Back_pt, oomph::GeomObject::position(), UniformPSDSelfTest::r, plotPSD::t, plotDoE::x, Xi_tail, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_lower_body_E().

◆ r_upper_body_N()

void oomph::FishDomain::r_upper_body_N ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of upper body macro element zeta \( \in [-1,1] \).

Northern edge of upper body macro element; \( \zeta \in [-1,1] \).

558  {
559  // Lagrangian coordinate along curved "back"
560  Vector<double> x(1);
561  x[0] = Xi_nose + (Xi_tail - Xi_nose) * 0.5 * (zeta[0] + 1.0);
562 
563  // Get position on curved back
564  Back_pt->position(t, x, r);
565 
566  } // end of r_upper_body_N

References Back_pt, oomph::GeomObject::position(), UniformPSDSelfTest::r, plotPSD::t, plotDoE::x, Xi_nose, Xi_tail, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_lower_body_S().

◆ r_upper_body_S()

void oomph::FishDomain::r_upper_body_S ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of upper body macro element zeta \( \in [-1,1] \).

Southern edge of upper body macro element; \( \zeta \in [-1,1] \).

600  {
601  // Top right (tail) corner of fish body
602  Vector<double> r_top(2);
603  Vector<double> x(1);
604  x[0] = Xi_tail;
605  Back_pt->position(t, x, r_top);
606 
607  // Straight line from mouth to start of fin (=end of body)
608  r[0] = X_mouth + (r_top[0] - X_mouth) * 0.5 * (zeta[0] + 1.0);
609  r[1] = 0.0;
610 
611  } // end of r_upper_body_S

References Back_pt, oomph::GeomObject::position(), UniformPSDSelfTest::r, plotPSD::t, plotDoE::x, X_mouth, Xi_tail, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_lower_body_N().

◆ r_upper_body_W()

void oomph::FishDomain::r_upper_body_W ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of upper body macro element zeta \( \in [-1,1] \).

Western edge of upper body macro element; \( \zeta \in [-1,1] \).

620  {
621  // Top left (mouth) corner of curved boundary of upper body
622  Vector<double> r_top(2);
623  Vector<double> x(1);
624  x[0] = Xi_nose;
625  Back_pt->position(t, x, r_top);
626 
627  // The "mouth"
628  Vector<double> r_mouth(2);
629  r_mouth[0] = X_mouth;
630  r_mouth[1] = 0.0;
631 
632  // Straight line from mouth to leftmost corner on curved boundary
633  // of upper body
634  r[0] = r_mouth[0] + (r_top[0] - r_mouth[0]) * 0.5 * (zeta[0] + 1.0);
635  r[1] = r_mouth[1] + (r_top[1] - r_mouth[1]) * 0.5 * (zeta[0] + 1.0);
636 
637  } // end of r_upper_body_W

References Back_pt, oomph::GeomObject::position(), UniformPSDSelfTest::r, plotPSD::t, plotDoE::x, X_mouth, Xi_nose, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_lower_body_W().

◆ r_upper_fin_E()

void oomph::FishDomain::r_upper_fin_E ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of upper fin macro element zeta \( \in [-1,1] \).

Eastern edge of upper fin macro element; \( \zeta \in [-1,1] \).

545  {
546  // Straight vertical line from top of fin
547  r[0] = X_fin;
548  r[1] = Y_fin * 0.5 * (zeta[0] + 1.0);
549  }

References UniformPSDSelfTest::r, X_fin, Y_fin, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_lower_fin_E().

◆ r_upper_fin_N()

void oomph::FishDomain::r_upper_fin_N ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of upper fin macro element zeta \( \in [-1,1] \).

Northern edge of upper fin macro element; \( \zeta \in [-1,1] \).

483  {
484  // Right end of fish back
485  Vector<double> x(1);
486  x[0] = Xi_tail;
487  Vector<double> r_fish(2);
488  Back_pt->position(t, x, r_fish);
489 
490  // Top end of fin
491  Vector<double> r_fin(2);
492  r_fin[0] = X_fin;
493  r_fin[1] = Y_fin;
494 
495 
496  // Straight line along upper fin
497  r[0] = r_fish[0] + (r_fin[0] - r_fish[0]) * 0.5 * (zeta[0] + 1.0);
498  r[1] = r_fish[1] + (r_fin[1] - r_fish[1]) * 0.5 * (zeta[0] + 1.0);
499  }

References Back_pt, oomph::GeomObject::position(), UniformPSDSelfTest::r, plotPSD::t, plotDoE::x, X_fin, Xi_tail, Y_fin, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_lower_fin_S().

◆ r_upper_fin_S()

void oomph::FishDomain::r_upper_fin_S ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of upper fin macro element zeta \( \in [-1,1] \).

Southern edge of upper fin macro element; \( \zeta \in [-1,1] \).

526  {
527  // Right end of fish back
528  Vector<double> x(1);
529  x[0] = Xi_tail;
530  Vector<double> r_fish(2);
531  Back_pt->position(t, x, r_fish);
532 
533 
534  r[0] = r_fish[0] * 0.5 * (zeta[0] + 1.0);
535  r[1] = 0.0;
536  }

References Back_pt, oomph::GeomObject::position(), UniformPSDSelfTest::r, plotPSD::t, plotDoE::x, Xi_tail, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_lower_fin_N().

◆ r_upper_fin_W()

void oomph::FishDomain::r_upper_fin_W ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of upper fin macro element zeta \( \in [-1,1] \).

Western edge of upper fin macro element; \( \zeta \in [-1,1] \).

508  {
509  // Right end of fish back
510  Vector<double> x(1);
511  x[0] = Xi_tail;
512  Vector<double> r_fish(2);
513  Back_pt->position(t, x, r_fish);
514 
515  r[0] = r_fish[0];
516  r[1] = r_fish[1] * 0.5 * (zeta[0] + 1.0);
517  }

References Back_pt, oomph::GeomObject::position(), UniformPSDSelfTest::r, plotPSD::t, plotDoE::x, Xi_tail, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_lower_fin_W().

◆ x_fin()

double& oomph::FishDomain::x_fin ( )
inline

x-position of fin tip

84  {
85  return X_fin;
86  }

References X_fin.

◆ x_mouth()

double& oomph::FishDomain::x_mouth ( )
inline

x-position of mouth

96  {
97  return X_mouth;
98  }

References X_mouth.

◆ xi_nose()

double& oomph::FishDomain::xi_nose ( )
inline

Start coordinate on wall (near nose)

102  {
103  return Xi_nose;
104  }

References Xi_nose.

Referenced by oomph::AlgebraicFishMesh< ELEMENT >::update_node_update().

◆ xi_tail()

double& oomph::FishDomain::xi_tail ( )
inline

End coordinate on wall (near tail)

108  {
109  return Xi_tail;
110  }

References Xi_tail.

Referenced by oomph::AlgebraicFishMesh< ELEMENT >::update_node_update().

◆ y_fin()

double& oomph::FishDomain::y_fin ( )
inline

y-position of fin tip

90  {
91  return Y_fin;
92  }

References Y_fin.

Member Data Documentation

◆ Back_pt

GeomObject* oomph::FishDomain::Back_pt
private

◆ X_fin

double oomph::FishDomain::X_fin
private

X coordinate of fin tip.

Referenced by FishDomain(), r_upper_fin_E(), r_upper_fin_N(), and x_fin().

◆ X_mouth

double oomph::FishDomain::X_mouth
private

X coordinate of corner of mouth.

Referenced by FishDomain(), r_upper_body_S(), r_upper_body_W(), and x_mouth().

◆ Xi_nose

double oomph::FishDomain::Xi_nose
private

"Nose" limit for the (1D) coordinates along the wall

Referenced by r_upper_body_N(), r_upper_body_W(), and xi_nose().

◆ Xi_tail

double oomph::FishDomain::Xi_tail
private

"Tail" limit for the (1D) coordinates along the wall

Referenced by r_upper_body_E(), r_upper_body_N(), r_upper_body_S(), r_upper_fin_N(), r_upper_fin_S(), r_upper_fin_W(), and xi_tail().

◆ Y_fin

double oomph::FishDomain::Y_fin
private

Y coordinate of fin tip.

Referenced by FishDomain(), r_upper_fin_E(), r_upper_fin_N(), and y_fin().


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