31 #ifndef OOMPH_FISH_DOMAIN_HEADER    32 #define OOMPH_FISH_DOMAIN_HEADER    35 #include "../generic/quadtree.h"    36 #include "../generic/domain.h"    37 #include "../generic/geom_objects.h"    71    Macro_element_pt.resize(nmacro); 
    74    for (
unsigned i=0;i<nmacro;i++)
    76      Macro_element_pt[i]= 
new QMacroElement<2>(
this,i);
    84    BrokenCopy::broken_copy(
"FishDomain");
    91    BrokenCopy::broken_assign(
"FishDomain");
    98   for (
unsigned i=0;i<4;i++) 
delete Macro_element_pt[i];
   124                              const unsigned& i_macro,
   125                              const unsigned& i_direct,
   126                              const Vector<double>& zeta,
   150  void r_upper_body_N(
const unsigned& t, 
const Vector<double>& zeta, 
   154  void r_upper_body_W(
const unsigned& t, 
const Vector<double>& zeta, 
   158  void r_upper_body_S(
const unsigned& t, 
const Vector<double>& zeta, 
   162  void r_upper_body_E(
const unsigned& t, 
const Vector<double>& zeta, 
   166  void r_upper_fin_N(
const unsigned& t, 
const Vector<double>& zeta, 
   170  void r_upper_fin_W(
const unsigned& t, 
const Vector<double>& zeta, 
   174  void r_upper_fin_S(
const unsigned& t, 
const Vector<double>& zeta, 
   178  void r_upper_fin_E(
const unsigned& t, 
const Vector<double>& zeta, 
   201    Vector<double> zeta_new(1);
   202    zeta_new[0]=-zeta[0];
   225    Vector<double> zeta_new(1);
   226    zeta_new[0]=-zeta[0];
   251    Vector<double> zeta_new(1);
   252    zeta_new[0]=-zeta[0];
   275    Vector<double> zeta_new(1);
   276    zeta_new[0]=-zeta[0];
   302                                         const unsigned& imacro,
   303                                         const unsigned& idirect,
   304                                         const Vector<double>& zeta,
   308  using namespace QuadTreeNames;
   311 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES   314     "Order of function arguments has changed between versions 0.8 and 0.85",
   315     "FishDomain::macro_element_boundary(...)",
   316     OOMPH_EXCEPTION_LOCATION);
   347      std::ostringstream error_stream;
   348      error_stream << 
"idirect is " << idirect 
   349                   << 
" not one of N, S, E, W" <<  std::endl;
   353       OOMPH_CURRENT_FUNCTION,
   354       OOMPH_EXCEPTION_LOCATION);
   381      std::ostringstream error_stream;
   382      error_stream << 
"idirect is " << idirect 
   383                   << 
" not one of N, S, E, W" <<  std::endl;
   387       OOMPH_CURRENT_FUNCTION,
   388       OOMPH_EXCEPTION_LOCATION);
   416      std::ostringstream error_stream;
   417      error_stream << 
"idirect is " << idirect 
   418                   << 
" not one of N, S, E, W" <<  std::endl;
   422       OOMPH_CURRENT_FUNCTION,
   423       OOMPH_EXCEPTION_LOCATION);
   451      std::ostringstream error_stream;
   452      error_stream << 
"idirect is " << idirect 
   453                   << 
" not one of N, S, E, W" <<  std::endl;
   457       OOMPH_CURRENT_FUNCTION,
   458       OOMPH_EXCEPTION_LOCATION);
   466    std::ostringstream error_stream;
   467    error_stream << 
"Wrong imacro " << imacro << std::endl;
   471     OOMPH_CURRENT_FUNCTION,
   472     OOMPH_EXCEPTION_LOCATION);
   486                                const Vector<double>& zeta,
   492  Vector<double> r_fish(2);
   496  Vector<double> r_fin(2);
   502  r[0]=r_fish[0]+(r_fin[0]-r_fish[0])*0.5*(zeta[0]+1.0);
   503  r[1]=r_fish[1]+(r_fin[1]-r_fish[1])*0.5*(zeta[0]+1.0);
   516                                const Vector<double>& zeta, 
   523  Vector<double> r_fish(2);
   527  r[1]=r_fish[1]*0.5*(zeta[0]+1.0);
   539                                const Vector<double>& zeta, 
   545  Vector<double> r_fish(2);
   549  r[0]=r_fish[0]*0.5*(zeta[0]+1.0);
   561                                const Vector<double>& zeta,
   566  r[1]=
Y_fin*0.5*(zeta[0]+1.0);
   575                                 const Vector<double>& zeta,
   595                                 const Vector<double>& zeta,
   600  Vector<double> r_top(2);
   606  Vector<double> r_back(2);
   610  r[0]=r_back[0]+(r_top[0]-r_back[0])*0.5*(zeta[0]+1.0);
   611  r[1]=r_back[1]+(r_top[1]-r_back[1])*0.5*(zeta[0]+1.0);
   623                                 const Vector<double>& zeta,
   628  Vector<double> r_top(2);
   645                                 const Vector<double>& zeta,
   649  Vector<double> r_top(2);
   655  Vector<double> r_mouth(2);
   661  r[0]=r_mouth[0]+(r_top[0]-r_mouth[0])*0.5*(zeta[0]+1.0);
   662  r[1]=r_mouth[1]+(r_top[1]-r_mouth[1])*0.5*(zeta[0]+1.0);
 double Xi_tail
"Tail" limit for the (1D) coordinates along the wall 
 
void r_lower_fin_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin macro element zeta . 
 
FishDomain(const FishDomain &)
Broken copy constructor. 
 
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...
 
void r_upper_body_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper body macro element zeta . 
 
double & y_fin()
y-position of fin tip 
 
void r_lower_body_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower body macro element zeta . 
 
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_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin 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 . 
 
GeomObject * Back_pt
Pointer to the fish's back. 
 
void r_lower_fin_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin macro element zeta . 
 
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_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper body macro element zeta . 
 
double X_fin
X coordinate of fin tip. 
 
double & xi_tail()
End coordinate on wall (near tail) 
 
double & x_mouth()
x-position of mouth 
 
double Xi_nose
"Nose" limit for the (1D) coordinates along the wall 
 
void r_upper_fin_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper fin macro element zeta . 
 
void r_upper_fin_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper fin macro element zeta . 
 
void operator=(const FishDomain &)
Broken assignment operator. 
 
void r_upper_body_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper body 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...
 
void r_upper_fin_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of upper fin macro element zeta . 
 
virtual ~FishDomain()
Destructor for FishDomain: Kill macro elements. 
 
void r_lower_fin_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower fin macro element zeta . 
 
Fish shaped domain, represented by four MacroElements. Shape is parametrised by GeomObject that repre...
 
double Y_fin
Y coordinate of fin tip. 
 
void r_lower_body_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of lower body macro element zeta . 
 
double & x_fin()
x-position of fin tip 
 
double X_mouth
X coordinate of corner of mouth. 
 
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()
Start coordinate on wall (near nose)