26 #ifndef OOMPH_CHANNEL_WITH_LEAFLET_DOMAIN_HEADER
27 #define OOMPH_CHANNEL_WITH_LEAFLET_DOMAIN_HEADER
31 #include "../generic/geom_objects.h"
32 #include "../generic/domain.h"
33 #include "../generic/macro_element.h"
57 const unsigned& nleft,
58 const unsigned& nright,
74 Vector<double> zeta(1);
82 Macro_element_pt.resize(nmacro);
85 for (
unsigned i = 0; i < nmacro; i++)
87 Macro_element_pt[i] =
new QMacroElement<2>(
this, i);
126 const unsigned& imacro,
127 const unsigned& idirect,
128 const Vector<double>& zeta,
134 const Vector<double>& zeta,
141 const Vector<double>& zeta,
148 const Vector<double>& zeta,
155 const Vector<double>& zeta,
162 const Vector<double>& zeta,
169 const Vector<double>& zeta,
176 const Vector<double>& zeta,
183 const Vector<double>& zeta,
190 const Vector<double>& zeta,
197 const Vector<double>& zeta,
204 const Vector<double>& zeta,
211 const Vector<double>& zeta,
218 const Vector<double>& zeta,
225 const Vector<double>& zeta,
232 const Vector<double>& zeta,
239 const Vector<double>& zeta,
245 const Vector<double>& zeta,
287 const unsigned& imacro,
288 const unsigned& idirect,
289 const Vector<double>& zeta,
292 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
295 "Order of function arguments has changed between versions 0.8 and 0.85",
296 "ChannelWithLeafletDomain::macro_element_boundary(...)",
297 OOMPH_EXCEPTION_LOCATION);
300 using namespace QuadTreeNames;
304 unsigned iline = int(floor(
double(imacro) /
double(
Nleft +
Nright)));
312 if ((iline <
Ny1) && (icol <
Nleft))
335 else if ((iline <
Ny1) && (icol >=
Nleft))
358 else if ((iline >=
Ny1) && (icol <
Nleft))
381 else if ((iline >=
Ny1) && (icol >=
Nleft))
416 const Vector<double>& zeta,
428 Vector<double> xi_wall(1);
429 xi_wall[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
431 Vector<double> r_wall(2);
442 Vector<double> r_vert(2);
444 r_vert[1] = y0 + (1.0 + zeta[0]) / 2.0 * (y1 - y0);
447 double s = double(j + 1) / double(
Nleft);
450 r[0] = r_vert[0] + s * (r_wall[0] - r_vert[0]);
451 r[1] = r_vert[1] + s * (r_wall[1] - r_vert[1]);
459 const Vector<double>& zeta,
471 Vector<double> xi_wall(1);
472 xi_wall[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
474 Vector<double> r_wall(2);
485 Vector<double> r_vert(2);
487 r_vert[1] = y0 + (1.0 + zeta[0]) / 2.0 * (y1 - y0);
490 double s = double(j) / double(
Nleft);
493 r[0] = r_vert[0] + s * (r_wall[0] - r_vert[0]);
494 r[1] = r_vert[1] + s * (r_wall[1] - r_vert[1]);
502 const Vector<double>& zeta,
508 Vector<double> xi(1);
509 Vector<double> r_left(2);
510 Vector<double> r_right(2);
516 r[0] = r_left[0] + (1.0 + zeta[0]) / 2.0 * (r_right[0] - r_left[0]);
517 r[1] = r_left[1] + (1.0 + zeta[0]) / 2.0 * (r_right[1] - r_left[1]);
525 const Vector<double>& zeta,
531 Vector<double> xi(1);
532 Vector<double> r_left(2);
533 Vector<double> r_right(2);
539 r[0] = r_left[0] + (1.0 + zeta[0]) / 2.0 * (r_right[0] - r_left[0]);
540 r[1] = r_left[1] + (1.0 + zeta[0]) / 2.0 * (r_right[1] - r_left[1]);
555 const Vector<double>& zeta,
568 Vector<double> xi_wall(1);
569 xi_wall[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
571 Vector<double> r_wall(2);
582 Vector<double> r_vert(2);
584 r_vert[1] = y0 + (1.0 + zeta[0]) / 2.0 * (y1 - y0);
590 r[0] = r_vert[0] + s * (r_wall[0] - r_vert[0]);
591 r[1] = r_vert[1] + s * (r_wall[1] - r_vert[1]);
599 const Vector<double>& zeta,
613 Vector<double> xi_wall(1);
614 xi_wall[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
616 Vector<double> r_wall(2);
627 Vector<double> r_vert(2);
629 r_vert[1] = y0 + (1.0 + zeta[0]) / 2.0 * (y1 - y0);
635 r[0] = r_vert[0] + s * (r_wall[0] - r_vert[0]);
636 r[1] = r_vert[1] + s * (r_wall[1] - r_vert[1]);
644 const Vector<double>& zeta,
650 Vector<double> xi(1);
651 Vector<double> r_left(2);
652 Vector<double> r_right(2);
658 r[0] = r_left[0] + (1.0 + zeta[0]) / 2.0 * (r_right[0] - r_left[0]);
659 r[1] = r_left[1] + (1.0 + zeta[0]) / 2.0 * (r_right[1] - r_left[1]);
667 const Vector<double>& zeta,
673 Vector<double> xi(1);
674 Vector<double> r_left(2);
675 Vector<double> r_right(2);
681 r[0] = r_left[0] + (1.0 + zeta[0]) / 2.0 * (r_right[0] - r_left[0]);
682 r[1] = r_left[1] + (1.0 + zeta[0]) / 2.0 * (r_right[1] - r_left[1]);
698 const Vector<double>& zeta,
703 Vector<double> xi(1);
706 Vector<double> r_join(2);
710 r[0] = r_join[0] + zeta[0] * (
X_0 - r_join[0]);
711 r[1] = r_join[1] + zeta[0] * (
Htot - r_join[1]);
719 const Vector<double>& zeta,
729 xi0 = double(i) / double(
Ny2);
730 xi1 = double(i + 1) / double(
Ny2);
732 Vector<double> xi_line(1);
733 xi_line[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
735 Vector<double> r_line(2);
747 Vector<double> r_vert(2);
749 r_vert[1] = y0 + (1.0 + zeta[0]) / 2.0 * (y1 - y0);
752 double s = double(j + 1) / double(
Nleft);
755 r[0] = r_vert[0] + s * (r_line[0] - r_vert[0]);
756 r[1] = r_vert[1] + s * (r_line[1] - r_vert[1]);
764 const Vector<double>& zeta,
774 xi0 = double(i) / double(
Ny2);
775 xi1 = double(i + 1) / double(
Ny2);
777 Vector<double> xi_line(1);
778 xi_line[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
780 Vector<double> r_line(2);
792 Vector<double> r_vert(2);
794 r_vert[1] = y0 + (1.0 + zeta[0]) / 2.0 * (y1 - y0);
797 double s = double(j) / double(
Nleft);
800 r[0] = r_vert[0] + s * (r_line[0] - r_vert[0]);
801 r[1] = r_vert[1] + s * (r_line[1] - r_vert[1]);
809 const Vector<double>& zeta,
815 Vector<double> xi(1);
816 Vector<double> r_left(2);
817 Vector<double> r_right(2);
823 r[0] = r_left[0] + (1.0 + zeta[0]) / 2.0 * (r_right[0] - r_left[0]);
824 r[1] = r_left[1] + (1.0 + zeta[0]) / 2.0 * (r_right[1] - r_left[1]);
832 const Vector<double>& zeta,
838 Vector<double> xi(1);
839 Vector<double> r_left(2);
840 Vector<double> r_right(2);
846 r[0] = r_left[0] + (1.0 + zeta[0]) / 2.0 * (r_right[0] - r_left[0]);
847 r[1] = r_left[1] + (1.0 + zeta[0]) / 2.0 * (r_right[1] - r_left[1]);
862 const Vector<double>& zeta,
872 xi0 = double(i) / double(
Ny2);
873 xi1 = double(i + 1) / double(
Ny2);
875 Vector<double> xi_line(1);
876 xi_line[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
878 Vector<double> r_line(2);
890 Vector<double> r_vert(2);
892 r_vert[1] = y0 + (1.0 + zeta[0]) / 2.0 * (y1 - y0);
898 r[0] = r_vert[0] + s * (r_line[0] - r_vert[0]);
899 r[1] = r_vert[1] + s * (r_line[1] - r_vert[1]);
907 const Vector<double>& zeta,
917 xi0 = double(i) / double(
Ny2);
918 xi1 = double(i + 1) / double(
Ny2);
920 Vector<double> xi_line(1);
921 xi_line[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
923 Vector<double> r_line(2);
935 Vector<double> r_vert(2);
937 r_vert[1] = y0 + (1.0 + zeta[0]) / 2.0 * (y1 - y0);
943 r[0] = r_vert[0] + s * (r_line[0] - r_vert[0]);
944 r[1] = r_vert[1] + s * (r_line[1] - r_vert[1]);
952 const Vector<double>& zeta,
958 Vector<double> xi(1);
959 Vector<double> r_left(2);
960 Vector<double> r_right(2);
966 r[0] = r_left[0] + (1.0 + zeta[0]) / 2.0 * (r_right[0] - r_left[0]);
967 r[1] = r_left[1] + (1.0 + zeta[0]) / 2.0 * (r_right[1] - r_left[1]);
975 const Vector<double>& zeta,
981 Vector<double> xi(1);
982 Vector<double> r_left(2);
983 Vector<double> r_right(2);
989 r[0] = r_left[0] + (1.0 + zeta[0]) / 2.0 * (r_right[0] - r_left[0]);
990 r[1] = r_left[1] + (1.0 + zeta[0]) / 2.0 * (r_right[1] - r_left[1]);
Rectangular domain with a leaflet blocking the lower half.
void macro_bound_IV_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
void macro_bound_III_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
GeomObject * Leaflet_pt
Pointer to leaflet.
void macro_bound_I_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
double Lleft
Length of the domain to the left of the leaflet.
unsigned Nright
Number of macro element columnns to the right of the leaflet.
void macro_bound_II_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
unsigned Ny2
Number of macro element rows above the leaflet.
void macro_bound_I_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
double X_0
Center of the domain : origin of the leaflet, extracted from GeomObject and stored for fast access.
void macro_bound_IV_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
void macro_bound_I_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
unsigned Ny1
Number of macro element rows up to the end of the leaflet.
double lleft()
Length of domain to the left of leaflet.
void macro_bound_II_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
double Lright
Length of the domain to the right of the leaflet.
ChannelWithLeafletDomain(GeomObject *leaflet_pt, const double &lleft, const double &lright, const double &hleaflet, const double &htot, const unsigned &nleft, const unsigned &nright, const unsigned &ny1, const unsigned &ny2)
Constructor: Pass pointer to GeomObject that represents the leaflet, the length of the domain to left...
double Hleaflet
Lagrangian coordinate at end of leaflet.
~ChannelWithLeafletDomain()
Destructor: Empty; cleanup done in base class.
void macro_bound_III_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
void macro_bound_II_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
GeomObject *& leaflet_pt()
Pointer to the wall.
void slanted_bound_up(const unsigned &t, const Vector< double > &zeta, Vector< double > &r)
Helper function.
void macro_bound_III_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
double htot()
Total height of domain (width of channel)
void macro_bound_IV_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
void macro_bound_I_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
unsigned Nleft
Number of macro element columns to the left of the leaflet.
double Htot
Total width of the channel.
void macro_element_boundary(const unsigned &t, const unsigned &imacro, const unsigned &idirect, const Vector< double > &zeta, Vector< double > &r)
Parametrisation of macro element boundaries.
void macro_bound_IV_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
double lright()
Length of domain to the right of leaflet.
void macro_bound_III_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
double hleaflet()
Height of leaflet.
void macro_bound_II_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
////////////////////////////////////////////////////////////////////// //////////////////////////////...