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,
85 for (
unsigned i = 0;
i < nmacro;
i++)
126 const unsigned& imacro,
127 const unsigned& idirect,
287 const unsigned& imacro,
288 const unsigned& idirect,
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))
429 xi_wall[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
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]);
472 xi_wall[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
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]);
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]);
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]);
569 xi_wall[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
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]);
614 xi_wall[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
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]);
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]);
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]);
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]);
729 xi0 = double(
i) / double(
Ny2);
730 xi1 = double(
i + 1) / double(
Ny2);
733 xi_line[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
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]);
774 xi0 = double(
i) / double(
Ny2);
775 xi1 = double(
i + 1) / double(
Ny2);
778 xi_line[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
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]);
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]);
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]);
872 xi0 = double(
i) / double(
Ny2);
873 xi1 = double(
i + 1) / double(
Ny2);
876 xi_line[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
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]);
917 xi0 = double(
i) / double(
Ny2);
918 xi1 = double(
i + 1) / double(
Ny2);
921 xi_line[0] = xi0 + (1.0 + zeta[0]) / 2.0 * (xi1 - xi0);
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]);
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]);
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.
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.
/////////////////////////////////////////////////////////////////////
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
An OomphLibWarning object which should be created as a temporary object to issue a warning....
QMacroElement specialised to 2 spatial dimensions.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...