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(...)",
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"
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"
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"
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"
467 std::ostringstream error_stream;
468 error_stream <<
"Wrong imacro " << imacro << std::endl;
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);
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);
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
Definition: domain.h:301
Definition: fish_domain.h:43
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
double Y_fin
Y coordinate of fin tip.
Definition: fish_domain.h:136
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 macro_element_boundary(const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &zeta, Vector< double > &r)
Definition: fish_domain.h:308
double Xi_tail
"Tail" limit for the (1D) coordinates along the wall
Definition: fish_domain.h:130
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 .
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
double & xi_nose()
Start coordinate on wall (near nose)
Definition: fish_domain.h:101
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 .
Definition: fish_domain.h:279
FishDomain(GeomObject *back_pt, const double &xi_nose, const double &xi_tail)
Definition: fish_domain.h:48
double X_mouth
X coordinate of corner of mouth.
Definition: fish_domain.h:139
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
virtual ~FishDomain()
Destructor for FishDomain: Empty; cleanup done in base class.
Definition: fish_domain.h:79
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
double & x_mouth()
x-position of mouth
Definition: fish_domain.h:95
double & y_fin()
y-position of fin tip
Definition: fish_domain.h:89
double & xi_tail()
End coordinate on wall (near tail)
Definition: fish_domain.h:107
double & x_fin()
x-position of fin tip
Definition: fish_domain.h:83
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
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
double Xi_nose
"Nose" limit for the (1D) coordinates along the wall
Definition: fish_domain.h:127
Definition: geom_objects.h:101
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
Definition: oomph_definitions.h:222
Definition: oomph_definitions.h:267
Definition: macro_element.h:279
@ N
Definition: constructor.cpp:22
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
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
@ S
Definition: quadtree.h:62
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
list x
Definition: plotDoE.py:28
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86