fish_domain.h
Go to the documentation of this file.
1 //LIC// ====================================================================
2 //LIC// This file forms part of oomph-lib, the object-oriented,
3 //LIC// multi-physics finite-element library, available
4 //LIC// at http://www.oomph-lib.org.
5 //LIC//
6 //LIC// Version 1.0; svn revision $LastChangedRevision$
7 //LIC//
8 //LIC// $LastChangedDate$
9 //LIC//
10 //LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11 //LIC//
12 //LIC// This library is free software; you can redistribute it and/or
13 //LIC// modify it under the terms of the GNU Lesser General Public
14 //LIC// License as published by the Free Software Foundation; either
15 //LIC// version 2.1 of the License, or (at your option) any later version.
16 //LIC//
17 //LIC// This library is distributed in the hope that it will be useful,
18 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 //LIC// Lesser General Public License for more details.
21 //LIC//
22 //LIC// You should have received a copy of the GNU Lesser General Public
23 //LIC// License along with this library; if not, write to the Free Software
24 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 //LIC// 02110-1301 USA.
26 //LIC//
27 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28 //LIC//
29 //LIC//====================================================================
30 //Include guards
31 #ifndef OOMPH_FISH_DOMAIN_HEADER
32 #define OOMPH_FISH_DOMAIN_HEADER
33 
34 // Generic oomph-lib includes
35 #include "../generic/quadtree.h"
36 #include "../generic/domain.h"
37 #include "../generic/geom_objects.h"
38 
39 namespace oomph
40 {
41 
42 
43 
44 //===========start_of_fish_domain=======================================
45 /// \short Fish shaped domain, represented by four
46 /// MacroElements. Shape is parametrised by GeomObject
47 /// that represents the fish's back.
48 //=======================================================================
49 class FishDomain : public Domain
50 {
51 
52 public:
53 
54  /// \short Constructor: Pass pointer to GeomObject that represents the
55  /// (upper) curved boundary of the fish's body, and the start and end values
56  /// of the Lagrangian coordinates along the GeomObject.
57  FishDomain(GeomObject* back_pt,
58  const double& xi_nose,
59  const double& xi_tail) :
60  Xi_nose(xi_nose), Xi_tail(xi_tail), Back_pt(back_pt)
61  {
62  // Set values for private data members that are describe
63  // geometric features of the fish: x-coordinate of the fin,
64  // (half-)height of the fin, and x-position of the mouth.
65  X_fin=1.7;
66  Y_fin=0.9;
67  X_mouth=0.0;
68 
69  // There are four macro elements
70  unsigned nmacro=4;
71  Macro_element_pt.resize(nmacro);
72 
73  // Build them
74  for (unsigned i=0;i<nmacro;i++)
75  {
76  Macro_element_pt[i]= new QMacroElement<2>(this,i);
77  }
78  } // end of constructor
79 
80 
81  /// Broken copy constructor
83  {
84  BrokenCopy::broken_copy("FishDomain");
85  }
86 
87 
88  /// Broken assignment operator
89  void operator=(const FishDomain&)
90  {
91  BrokenCopy::broken_assign("FishDomain");
92  }
93 
94 
95  /// Destructor for FishDomain: Kill macro elements
96  virtual ~FishDomain()
97  {
98  for (unsigned i=0;i<4;i++) delete Macro_element_pt[i];
99  }
100 
101  /// x-position of fin tip
102  double& x_fin() {return X_fin;}
103 
104  /// y-position of fin tip
105  double& y_fin() {return Y_fin;}
106 
107  /// x-position of mouth
108  double& x_mouth() {return X_mouth;}
109 
110  /// Start coordinate on wall (near nose)
111  double& xi_nose() {return Xi_nose;}
112 
113  /// End coordinate on wall (near tail)
114  double& xi_tail() {return Xi_tail;}
115 
116  /// \short Vector representation of the i_macro-th macro element
117  /// boundary i_direct (N/S/W/E) at the discrete time level t
118  /// (t=0: present; t>0: previous): \f$ {\bf r}({\bf zeta}) \f$
119  /// Note that the local coordinate \b zeta is a 1D
120  /// Vector rather than a scalar -- this is unavoidable because
121  /// this function implements the pure virtual function in the
122  /// Domain base class.
123  void macro_element_boundary(const unsigned& t,
124  const unsigned& i_macro,
125  const unsigned& i_direct,
126  const Vector<double>& zeta,
127  Vector<double>& r);
128 
129 private:
130 
131  /// "Nose" limit for the (1D) coordinates along the wall
132  double Xi_nose;
133 
134  /// "Tail" limit for the (1D) coordinates along the wall
135  double Xi_tail;
136 
137  /// X coordinate of fin tip
138  double X_fin;
139 
140  /// Y coordinate of fin tip
141  double Y_fin;
142 
143  /// X coordinate of corner of mouth
144  double X_mouth;
145 
146  /// Pointer to the fish's back
147  GeomObject* Back_pt;
148 
149  /// \short Boundary of upper body macro element zeta \f$ \in [-1,1] \f$
150  void r_upper_body_N(const unsigned& t, const Vector<double>& zeta,
151  Vector<double>& f);
152 
153  /// \short Boundary of upper body macro element zeta \f$ \in [-1,1] \f$
154  void r_upper_body_W(const unsigned& t, const Vector<double>& zeta,
155  Vector<double>& f);
156 
157  /// \short Boundary of upper body macro element zeta \f$ \in [-1,1] \f$
158  void r_upper_body_S(const unsigned& t, const Vector<double>& zeta,
159  Vector<double>& f);
160 
161  /// \short Boundary of upper body macro element zeta \f$ \in [-1,1] \f$
162  void r_upper_body_E(const unsigned& t, const Vector<double>& zeta,
163  Vector<double>& f);
164 
165  /// \short Boundary of upper fin macro element zeta \f$ \in [-1,1] \f$
166  void r_upper_fin_N(const unsigned& t, const Vector<double>& zeta,
167  Vector<double>& f);
168 
169  /// \short Boundary of upper fin macro element zeta \f$ \in [-1,1] \f$
170  void r_upper_fin_W(const unsigned& t, const Vector<double>& zeta,
171  Vector<double>& f);
172 
173  /// \short Boundary of upper fin macro element zeta \f$ \in [-1,1] \f$
174  void r_upper_fin_S(const unsigned& t, const Vector<double>& zeta,
175  Vector<double>& f);
176 
177  /// \short Boundary of upper fin macro element zeta \f$ \in [-1,1] \f$
178  void r_upper_fin_E(const unsigned& t, const Vector<double>& zeta,
179  Vector<double>& f);
180 
181 
182 
183  /// \short Boundary of lower body macro element zeta \f$ \in [-1,1] \f$
184  void r_lower_body_N(const unsigned& t, const Vector<double>& zeta,
185  Vector<double>& f)
186  {
187  // North of lower body is element is south of upper one.
188  // Direction of the coordinate stays the same.
189  r_upper_body_S(t,zeta,f);
190  // Reflect vertical position
191  f[1]=-f[1];
192  }
193 
194 
195  /// \short Boundary of lower body macro element zeta \f$ \in [-1,1] \f$
196  void r_lower_body_W(const unsigned& t, const Vector<double>& zeta,
197  Vector<double>& f)
198  {
199  // West of lower body is element is west of upper one.
200  // Direction of the coordinate is inverted
201  Vector<double> zeta_new(1);
202  zeta_new[0]=-zeta[0];
203  r_upper_body_W(t,zeta_new,f);
204  // Vertical coordinate is reflected
205  f[1]=-f[1];
206  }
207 
208  ///\short Southern boundary of lower body macro element zeta \f$\in [-1,1] \f$
209  void r_lower_body_S(const unsigned& t, const Vector<double>& zeta,
210  Vector<double>& f)
211  {
212  // South of lower body is element is north of upper one.
213  // Direction of the coordinate stays the same.
214  r_upper_body_N(t,zeta,f);
215  // Reflect vertical position
216  f[1]=-f[1];
217  }
218 
219  /// \short Boundary of lower body macro element zeta \f$ \in [-1,1] \f$
220  void r_lower_body_E(const unsigned& t, const Vector<double>& zeta,
221  Vector<double>& f)
222  {
223  // East of lower body is element is east of upper one.
224  // Direction of the coordinate is inverted.
225  Vector<double> zeta_new(1);
226  zeta_new[0]=-zeta[0];
227  r_upper_body_E(t,zeta_new,f);
228  // Vertical coordinate is reflected
229  f[1]=-f[1];
230  }
231 
232 
233  /// \short Boundary of lower fin macro element zeta \f$ \in [-1,1] \f$
234  void r_lower_fin_N(const unsigned& t, const Vector<double>& zeta,
235  Vector<double>& f)
236  {
237  // North of lower fin is element is south of upper one.
238  // Direction of the coordinate stays the same.
239  r_upper_fin_S(t,zeta,f);
240  // Reflect vertical position
241  f[1]=-f[1];
242  }
243 
244 
245  /// \short Boundary of lower fin macro element zeta \f$ \in [-1,1] \f$
246  void r_lower_fin_W(const unsigned& t, const Vector<double>& zeta,
247  Vector<double>& f)
248  {
249  // West of lower fin is element is west of upper one.
250  // Direction of the coordinate is inverted
251  Vector<double> zeta_new(1);
252  zeta_new[0]=-zeta[0];
253  r_upper_fin_W(t,zeta_new,f);
254  // Vertical coordinate is reflected
255  f[1]=-f[1];
256  }
257 
258  /// \short Boundary of lower fin macro element zeta \f$ \in [-1,1] \f$
259  void r_lower_fin_S(const unsigned& t, const Vector<double>& zeta,
260  Vector<double>& f)
261  {
262  // South of lower fin is element is north of upper one.
263  // Direction of the coordinate stays the same.
264  r_upper_fin_N(t,zeta,f);
265  // Reflect vertical position
266  f[1]=-f[1];
267  }
268 
269  /// \short Boundary of lower fin macro element zeta \f$ \in [-1,1] \f$
270  void r_lower_fin_E(const unsigned& t, const Vector<double>& zeta,
271  Vector<double>& f)
272  {
273  // East of lower fin is element is east of upper one.
274  // Direction of the coordinate is inverted.
275  Vector<double> zeta_new(1);
276  zeta_new[0]=-zeta[0];
277  r_upper_fin_E(t,zeta_new,f);
278  // Vertical coordinate is reflected
279  f[1]=-f[1];
280  }
281 };
282 
283 
284 /////////////////////////////////////////////////////////////////////////
285 /////////////////////////////////////////////////////////////////////////
286 /////////////////////////////////////////////////////////////////////////
287 
288 
289 
290 
291 
292 //==========start_of_macro_element_boundary========================
293 /// \short Vector representation of the imacro-th macro element
294 /// boundary idirect (N/S/W/E) at time level t
295 /// (t=0: present; t>0: previous): \f$ {\bf r}({\bf zeta}) \f$
296 /// Note that the local coordinate \b zeta is a 1D
297 /// Vector rather than a scalar -- this is unavoidable because
298 /// this function implements the pure virtual function in the
299 /// Domain base class.
300 //=================================================================
301 void FishDomain::macro_element_boundary(const unsigned& t,
302  const unsigned& imacro,
303  const unsigned& idirect,
304  const Vector<double>& zeta,
305  Vector<double>& r)
306 {
307 
308  using namespace QuadTreeNames;
309 
310 
311 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
312  // Warn about time argument being moved to the front
313  OomphLibWarning(
314  "Order of function arguments has changed between versions 0.8 and 0.85",
315  "FishDomain::macro_element_boundary(...)",
316  OOMPH_EXCEPTION_LOCATION);
317 #endif
318 
319 
320  // Which macro element?
321  // --------------------
322  switch(imacro)
323  {
324 
325  // Macro element 0: Lower body
326  case 0:
327 
328  // Which direction?
329  if (idirect==N)
330  {
331  FishDomain::r_lower_body_N(t,zeta,r);
332  }
333  else if (idirect==S)
334  {
335  FishDomain::r_lower_body_S(t,zeta,r);
336  }
337  else if (idirect==W)
338  {
339  FishDomain::r_lower_body_W(t,zeta,r);
340  }
341  else if (idirect==E)
342  {
343  FishDomain::r_lower_body_E(t,zeta,r);
344  }
345  else
346  {
347  std::ostringstream error_stream;
348  error_stream << "idirect is " << idirect
349  << " not one of N, S, E, W" << std::endl;
350 
351  throw OomphLibError(
352  error_stream.str(),
353  OOMPH_CURRENT_FUNCTION,
354  OOMPH_EXCEPTION_LOCATION);
355  }
356 
357  break;
358 
359  // Macro element 1: Lower Fin
360  case 1:
361 
362  // Which direction?
363  if (idirect==N)
364  {
365  FishDomain::r_lower_fin_N(t,zeta,r);
366  }
367  else if (idirect==S)
368  {
369  FishDomain::r_lower_fin_S(t,zeta,r);
370  }
371  else if (idirect==W)
372  {
373  FishDomain::r_lower_fin_W(t,zeta,r);
374  }
375  else if (idirect==E)
376  {
377  FishDomain::r_lower_fin_E(t,zeta,r);
378  }
379  else
380  {
381  std::ostringstream error_stream;
382  error_stream << "idirect is " << idirect
383  << " not one of N, S, E, W" << std::endl;
384 
385  throw OomphLibError(
386  error_stream.str(),
387  OOMPH_CURRENT_FUNCTION,
388  OOMPH_EXCEPTION_LOCATION);
389  }
390 
391  break;
392 
393 
394  // Macro element 2: Upper body
395  case 2:
396 
397  // Which direction?
398  if (idirect==N)
399  {
400  FishDomain::r_upper_body_N(t,zeta,r);
401  }
402  else if (idirect==S)
403  {
404  FishDomain::r_upper_body_S(t,zeta,r);
405  }
406  else if (idirect==W)
407  {
408  FishDomain::r_upper_body_W(t,zeta,r);
409  }
410  else if (idirect==E)
411  {
412  FishDomain::r_upper_body_E(t,zeta,r);
413  }
414  else
415  {
416  std::ostringstream error_stream;
417  error_stream << "idirect is " << idirect
418  << " not one of N, S, E, W" << std::endl;
419 
420  throw OomphLibError(
421  error_stream.str(),
422  OOMPH_CURRENT_FUNCTION,
423  OOMPH_EXCEPTION_LOCATION);
424  }
425 
426  break;
427 
428 
429  // Macro element 3: Upper Fin
430  case 3:
431 
432  // Which direction?
433  if (idirect==N)
434  {
435  FishDomain::r_upper_fin_N(t,zeta,r);
436  }
437  else if (idirect==S)
438  {
439  FishDomain::r_upper_fin_S(t,zeta,r);
440  }
441  else if (idirect==W)
442  {
443  FishDomain::r_upper_fin_W(t,zeta,r);
444  }
445  else if (idirect==E)
446  {
447  FishDomain::r_upper_fin_E(t,zeta,r);
448  }
449  else
450  {
451  std::ostringstream error_stream;
452  error_stream << "idirect is " << idirect
453  << " not one of N, S, E, W" << std::endl;
454 
455  throw OomphLibError(
456  error_stream.str(),
457  OOMPH_CURRENT_FUNCTION,
458  OOMPH_EXCEPTION_LOCATION);
459  }
460 
461  break;
462 
463  default:
464 
465  // Error
466  std::ostringstream error_stream;
467  error_stream << "Wrong imacro " << imacro << std::endl;
468 
469  throw OomphLibError(
470  error_stream.str(),
471  OOMPH_CURRENT_FUNCTION,
472  OOMPH_EXCEPTION_LOCATION);
473  }
474 
475 } // end of macro_element_boundary
476 
477 
478 
479 
480 
481 
482 //=================================================================
483 /// Northern edge of upper fin macro element; \f$ \zeta \in [-1,1] \f$
484 //=================================================================
485 void FishDomain::r_upper_fin_N(const unsigned& t,
486  const Vector<double>& zeta,
487  Vector<double>& r)
488 {
489  // Right end of fish back
490  Vector<double> x(1);
491  x[0]=Xi_tail;
492  Vector<double> r_fish(2);
493  Back_pt->position(t,x,r_fish);
494 
495  // Top end of fin
496  Vector<double> r_fin(2);
497  r_fin[0]=X_fin;
498  r_fin[1]=Y_fin;
499 
500 
501  // Straight line along upper fin
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);
504 
505 
506 
507 }
508 
509 
510 
511 
512 //=================================================================
513 /// Western edge of upper fin macro element; \f$ \zeta \in [-1,1] \f$
514 //=================================================================
515 void FishDomain::r_upper_fin_W(const unsigned& t,
516  const Vector<double>& zeta,
517  Vector<double>& r)
518 {
519 
520  // Right end of fish back
521  Vector<double> x(1);
522  x[0]=Xi_tail;
523  Vector<double> r_fish(2);
524  Back_pt->position(t,x,r_fish);
525 
526  r[0]=r_fish[0];
527  r[1]=r_fish[1]*0.5*(zeta[0]+1.0);
528 
529 
530 }
531 
532 
533 
534 
535 //=================================================================
536 /// Southern edge of upper fin macro element; \f$ \zeta \in [-1,1] \f$
537 //=================================================================
538 void FishDomain::r_upper_fin_S(const unsigned& t,
539  const Vector<double>& zeta,
540  Vector<double>& r)
541 {
542  // Right end of fish back
543  Vector<double> x(1);
544  x[0]=Xi_tail;
545  Vector<double> r_fish(2);
546  Back_pt->position(t,x,r_fish);
547 
548 
549  r[0]=r_fish[0]*0.5*(zeta[0]+1.0);
550  r[1]=0.0;
551 
552 }
553 
554 
555 
556 
557 //=================================================================
558 /// Eastern edge of upper fin macro element; \f$ \zeta \in [-1,1] \f$
559 //=================================================================
560 void FishDomain::r_upper_fin_E(const unsigned& t,
561  const Vector<double>& zeta,
562  Vector<double>& r)
563 {
564  // Straight vertical line from top of fin
565  r[0]=X_fin;
566  r[1]=Y_fin*0.5*(zeta[0]+1.0);
567 }
568 
569 
570 
571 //===============start_of_r_upper_body_N==============================
572 /// Northern edge of upper body macro element; \f$ \zeta \in [-1,1] \f$
573 //=====================================================================
574 void FishDomain::r_upper_body_N(const unsigned& t,
575  const Vector<double>& zeta,
576  Vector<double>& r)
577 {
578  // Lagrangian coordinate along curved "back"
579  Vector<double> x(1);
580  x[0]=Xi_nose+(Xi_tail-Xi_nose)*0.5*(zeta[0]+1.0);
581 
582  // Get position on curved back
583  Back_pt->position(t,x,r);
584 
585 } // end of r_upper_body_N
586 
587 
588 
589 
590 
591 //================start_of_r_upper_body_E=============================
592 /// Eastern edge of upper body macro element; \f$ \zeta \in [-1,1] \f$
593 //=====================================================================
594 void FishDomain::r_upper_body_E(const unsigned& t,
595  const Vector<double>& zeta,
596  Vector<double>& r)
597 {
598 
599  // Top right corner (tail end) of body
600  Vector<double> r_top(2);
601  Vector<double> x(1);
602  x[0]=Xi_tail;
603  Back_pt->position(t,x,r_top);
604 
605  // Corresponding point on the x-axis
606  Vector<double> r_back(2);
607  r_back[0]=r_top[0];
608  r_back[1]=0.0;
609 
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);
612 
613 
614 } // end of r_upper_body_E
615 
616 
617 
618 
619 //==================start_of_r_upper_body_S============================
620 /// Southern edge of upper body macro element; \f$ \zeta \in [-1,1] \f$
621 //=====================================================================
622 void FishDomain::r_upper_body_S(const unsigned& t,
623  const Vector<double>& zeta,
624  Vector<double>& r)
625 {
626 
627  // Top right (tail) corner of fish body
628  Vector<double> r_top(2);
629  Vector<double> x(1);
630  x[0]=Xi_tail;
631  Back_pt->position(t,x,r_top);
632 
633  // Straight line from mouth to start of fin (=end of body)
634  r[0]=X_mouth+(r_top[0]-X_mouth)*0.5*(zeta[0]+1.0);
635  r[1]=0.0;
636 
637 } // end of r_upper_body_S
638 
639 
640 
641 //===============start_of_r_upper_body_W==============================
642 /// Western edge of upper body macro element; \f$ \zeta \in [-1,1] \f$
643 //====================================================================
644 void FishDomain::r_upper_body_W(const unsigned& t,
645  const Vector<double>& zeta,
646  Vector<double>& r)
647 {
648  // Top left (mouth) corner of curved boundary of upper body
649  Vector<double> r_top(2);
650  Vector<double> x(1);
651  x[0]=Xi_nose;
652  Back_pt->position(t,x,r_top);
653 
654  // The "mouth"
655  Vector<double> r_mouth(2);
656  r_mouth[0]=X_mouth;
657  r_mouth[1]=0.0;
658 
659  // Straight line from mouth to leftmost corner on curved boundary
660  // of upper body
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);
663 
664 } // end of r_upper_body_W
665 
666 
667 
668 
669 }
670 
671 #endif
double Xi_tail
"Tail" limit for the (1D) coordinates along the wall
Definition: fish_domain.h:135
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:246
FishDomain(const FishDomain &)
Broken copy constructor.
Definition: fish_domain.h:82
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...
Definition: fish_domain.h:301
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:644
double & y_fin()
y-position of fin tip
Definition: fish_domain.h:105
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:184
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:209
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:234
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:538
GeomObject * Back_pt
Pointer to the fish&#39;s back.
Definition: fish_domain.h:147
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:259
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:196
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:594
double X_fin
X coordinate of fin tip.
Definition: fish_domain.h:138
double & xi_tail()
End coordinate on wall (near tail)
Definition: fish_domain.h:114
double & x_mouth()
x-position of mouth
Definition: fish_domain.h:108
double Xi_nose
"Nose" limit for the (1D) coordinates along the wall
Definition: fish_domain.h:132
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:515
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:560
void operator=(const FishDomain &)
Broken assignment operator.
Definition: fish_domain.h:89
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:574
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&#39;s bod...
Definition: fish_domain.h:57
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:485
virtual ~FishDomain()
Destructor for FishDomain: Kill macro elements.
Definition: fish_domain.h:96
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:270
Fish shaped domain, represented by four MacroElements. Shape is parametrised by GeomObject that repre...
Definition: fish_domain.h:49
double Y_fin
Y coordinate of fin tip.
Definition: fish_domain.h:141
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:220
double & x_fin()
x-position of fin tip
Definition: fish_domain.h:102
double X_mouth
X coordinate of corner of mouth.
Definition: fish_domain.h:144
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:622
double & xi_nose()
Start coordinate on wall (near nose)
Definition: fish_domain.h:111