27 #ifndef OOMPH_FISH_DOMAIN_HEADER
28 #define OOMPH_FISH_DOMAIN_HEADER
31 #include "../generic/quadtree.h"
32 #include "../generic/domain.h"
33 #include "../generic/geom_objects.h"
65 for (
unsigned i = 0;
i < nmacro;
i++)
120 const unsigned& i_macro,
121 const unsigned& i_direct,
206 zeta_new[0] = -zeta[0];
232 zeta_new[0] = -zeta[0];
260 zeta_new[0] = -zeta[0];
286 zeta_new[0] = -zeta[0];
309 const unsigned& imacro,
310 const unsigned& idirect,
314 using namespace QuadTreeNames;
317 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
320 "Order of function arguments has changed between versions 0.8 and 0.85",
321 "FishDomain::macro_element_boundary(...)",
322 OOMPH_EXCEPTION_LOCATION);
338 else if (idirect ==
S)
342 else if (idirect ==
W)
346 else if (idirect ==
E)
352 std::ostringstream error_stream;
353 error_stream <<
"idirect is " << idirect <<
" not one of N, S, E, W"
357 OOMPH_CURRENT_FUNCTION,
358 OOMPH_EXCEPTION_LOCATION);
371 else if (idirect ==
S)
375 else if (idirect ==
W)
379 else if (idirect ==
E)
385 std::ostringstream error_stream;
386 error_stream <<
"idirect is " << idirect <<
" not one of N, S, E, W"
390 OOMPH_CURRENT_FUNCTION,
391 OOMPH_EXCEPTION_LOCATION);
405 else if (idirect ==
S)
409 else if (idirect ==
W)
413 else if (idirect ==
E)
419 std::ostringstream error_stream;
420 error_stream <<
"idirect is " << idirect <<
" not one of N, S, E, W"
424 OOMPH_CURRENT_FUNCTION,
425 OOMPH_EXCEPTION_LOCATION);
439 else if (idirect ==
S)
443 else if (idirect ==
W)
447 else if (idirect ==
E)
453 std::ostringstream error_stream;
454 error_stream <<
"idirect is " << idirect <<
" not one of N, S, E, W"
458 OOMPH_CURRENT_FUNCTION,
459 OOMPH_EXCEPTION_LOCATION);
467 std::ostringstream error_stream;
468 error_stream <<
"Wrong imacro " << imacro << std::endl;
471 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
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);
516 r[1] = r_fish[1] * 0.5 * (zeta[0] + 1.0);
534 r[0] = r_fish[0] * 0.5 * (zeta[0] + 1.0);
548 r[1] =
Y_fin * 0.5 * (zeta[0] + 1.0);
584 r_back[0] = r_top[0];
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);
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);
Base class for Domains with curvilinear and/or time-dependent boundaries. Domain boundaries are typic...
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
Fish shaped domain, represented by four MacroElements. Shape is parametrised by GeomObject that repre...
void r_upper_fin_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper fin macro element zeta .
double Y_fin
Y coordinate of fin tip.
void r_lower_fin_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin macro element zeta .
void macro_element_boundary(const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &zeta, Vector< double > &r)
Vector representation of the i_macro-th macro element boundary i_direct (N/S/W/E) at the discrete tim...
double Xi_tail
"Tail" limit for the (1D) coordinates along the wall
void operator=(const FishDomain &)=delete
Broken assignment operator.
void r_lower_body_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower body macro element zeta .
void r_upper_body_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper body macro element zeta .
void r_upper_body_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper body macro element zeta .
void r_upper_fin_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper fin macro element zeta .
void r_lower_fin_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin macro element zeta .
void r_upper_fin_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper fin macro element zeta .
void r_lower_body_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower body macro element zeta .
double & xi_nose()
Start coordinate on wall (near nose)
FishDomain(const FishDomain &)=delete
Broken copy constructor.
void r_lower_fin_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin macro element zeta .
FishDomain(GeomObject *back_pt, const double &xi_nose, const double &xi_tail)
Constructor: Pass pointer to GeomObject that represents the (upper) curved boundary of the fish's bod...
double X_mouth
X coordinate of corner of mouth.
void r_lower_body_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Southern boundary of lower body macro element zeta .
void r_lower_fin_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin macro element zeta .
virtual ~FishDomain()
Destructor for FishDomain: Empty; cleanup done in base class.
void r_lower_body_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower body macro element zeta .
void r_upper_body_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper body macro element zeta .
void r_upper_fin_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper fin macro element zeta .
double & x_mouth()
x-position of mouth
double & y_fin()
y-position of fin tip
double & xi_tail()
End coordinate on wall (near tail)
double & x_fin()
x-position of fin tip
GeomObject * Back_pt
Pointer to the fish's back.
double X_fin
X coordinate of fin tip.
void r_upper_body_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper body macro element zeta .
double Xi_nose
"Nose" limit for the (1D) coordinates along the wall
/////////////////////////////////////////////////////////////////////
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
An OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
QMacroElement specialised to 2 spatial dimensions.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...