30 #ifndef OOMPH_CHANNEL_WITH_LEAFLET_DOMAIN_HEADER 31 #define OOMPH_CHANNEL_WITH_LEAFLET_DOMAIN_HEADER 35 #include "../generic/geom_objects.h" 36 #include "../generic/domain.h" 37 #include "../generic/macro_element.h" 61 const unsigned& nleft,
const unsigned& nright,
62 const unsigned& ny1,
const unsigned& ny2)
76 Vector<double> zeta(1);
84 Macro_element_pt.resize(nmacro);
87 for (
unsigned i=0;i<nmacro;i++)
89 Macro_element_pt[i]=
new QMacroElement<2>(
this,i);
99 for (
unsigned i=0;i<nmacro;i++){
delete Macro_element_pt[i];}
120 const unsigned& imacro,
121 const unsigned& idirect,
122 const Vector<double>& zeta,
129 Vector<double>& r,
const unsigned& i,
const unsigned& j);
133 Vector<double>& r,
const unsigned& i,
const unsigned& j);
137 Vector<double>& r,
const unsigned& i,
const unsigned& j);
141 Vector<double>& r,
const unsigned& i,
147 const unsigned& i,
const unsigned& j);
151 Vector<double>& r,
const unsigned& i,
const unsigned& j);
155 Vector<double>& r,
const unsigned& i,
const unsigned& j);
159 Vector<double>& r,
const unsigned& i,
165 const unsigned& i,
const unsigned& j);
169 Vector<double>& r,
const unsigned& i,
const unsigned& j);
173 Vector<double>& r,
const unsigned& i,
const unsigned& j);
177 Vector<double>& r,
const unsigned& i,
183 const unsigned& i,
const unsigned& j);
187 Vector<double>& r,
const unsigned& i,
const unsigned& j);
191 Vector<double>& r,
const unsigned& i,
const unsigned& j);
195 Vector<double>& r,
const unsigned& i,
199 const Vector<double>& zeta,
244 const unsigned& imacro,
245 const unsigned& idirect,
246 const Vector<double>& zeta,
250 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES 253 "Order of function arguments has changed between versions 0.8 and 0.85",
254 "ChannelWithLeafletDomain::macro_element_boundary(...)",
255 OOMPH_EXCEPTION_LOCATION);
258 using namespace QuadTreeNames;
262 unsigned iline = int(floor(
double(imacro)/
double(
Nleft+
Nright)));
293 else if( (iline<
Ny1) && (icol>=
Nleft) )
316 else if( (iline>=
Ny1) && (icol<
Nleft) )
339 else if( (iline>=
Ny1) && (icol>=
Nleft) )
376 const Vector<double>& zeta,
389 Vector<double> xi_wall(1);
390 xi_wall[0] = xi0 + (1.0+zeta[0])/2.0*(xi1-xi0);
392 Vector<double> r_wall(2);
403 Vector<double> r_vert(2);
405 r_vert[1] = y0 + (1.0+zeta[0])/2.0*(y1-y0);
408 double s = double(j+1)/double(
Nleft);
411 r[0] = r_vert[0] + s*( r_wall[0]-r_vert[0]);
412 r[1] = r_vert[1] + s*( r_wall[1]-r_vert[1]);
420 const Vector<double>& zeta,
432 Vector<double> xi_wall(1);
433 xi_wall[0] = xi0 + (1.0+zeta[0])/2.0*(xi1-xi0);
435 Vector<double> r_wall(2);
446 Vector<double> r_vert(2);
448 r_vert[1] = y0 + (1.0+zeta[0])/2.0*(y1-y0);
451 double s = double(j)/double(
Nleft);
454 r[0] = r_vert[0] + s*( r_wall[0]-r_vert[0]);
455 r[1] = r_vert[1] + s*( r_wall[1]-r_vert[1]);
465 const Vector<double>& zeta,
471 Vector<double> xi(1);
472 Vector<double> r_left(2);
473 Vector<double> r_right(2);
479 r[0] = r_left[0] + (1.0+zeta[0])/2.0*(r_right[0]-r_left[0]);
480 r[1] = r_left[1] + (1.0+zeta[0])/2.0*(r_right[1]-r_left[1]);
489 const Vector<double>& zeta,
495 Vector<double> xi(1);
496 Vector<double> r_left(2);
497 Vector<double> r_right(2);
503 r[0] = r_left[0] + (1.0+zeta[0])/2.0*(r_right[0]-r_left[0]);
504 r[1] = r_left[1] + (1.0+zeta[0])/2.0*(r_right[1]-r_left[1]);
524 const Vector<double>& zeta,
537 Vector<double> xi_wall(1);
538 xi_wall[0] = xi0 + (1.0+zeta[0])/2.0*(xi1-xi0);
540 Vector<double> r_wall(2);
551 Vector<double> r_vert(2);
553 r_vert[1] = y0 + (1.0+zeta[0])/2.0*(y1-y0);
559 r[0] = r_vert[0] + s*( r_wall[0]-r_vert[0]);
560 r[1] = r_vert[1] + s*( r_wall[1]-r_vert[1]);
570 const Vector<double>& zeta,
584 Vector<double> xi_wall(1);
585 xi_wall[0] = xi0 + (1.0+zeta[0])/2.0*(xi1-xi0);
587 Vector<double> r_wall(2);
598 Vector<double> r_vert(2);
600 r_vert[1] = y0 + (1.0+zeta[0])/2.0*(y1-y0);
606 r[0] = r_vert[0] + s*( r_wall[0]-r_vert[0]);
607 r[1] = r_vert[1] + s*( r_wall[1]-r_vert[1]);
617 const Vector<double>& zeta,
623 Vector<double> xi(1);
624 Vector<double> r_left(2);
625 Vector<double> r_right(2);
631 r[0] = r_left[0] + (1.0+zeta[0])/2.0*(r_right[0]-r_left[0]);
632 r[1] = r_left[1] + (1.0+zeta[0])/2.0*(r_right[1]-r_left[1]);
642 const Vector<double>& zeta,
648 Vector<double> xi(1);
649 Vector<double> r_left(2);
650 Vector<double> r_right(2);
656 r[0] = r_left[0] + (1.0+zeta[0])/2.0*(r_right[0]-r_left[0]);
657 r[1] = r_left[1] + (1.0+zeta[0])/2.0*(r_right[1]-r_left[1]);
679 const Vector<double>& zeta,
684 Vector<double> xi(1);
687 Vector<double> r_join(2);
691 r[0] = r_join[0] + zeta[0]*(
X_0-r_join[0]);
692 r[1] = r_join[1] + zeta[0]*(
Htot-r_join[1]);
701 const Vector<double>& zeta,
711 xi0 = double(i)/double(
Ny2);
712 xi1 = double(i+1)/double(
Ny2);
714 Vector<double> xi_line(1);
715 xi_line[0] = xi0 + (1.0+zeta[0])/2.0*(xi1-xi0);
717 Vector<double> r_line(2);
728 Vector<double> r_vert(2);
730 r_vert[1] = y0 + (1.0+zeta[0])/2.0*(y1-y0);
733 double s = double(j+1)/double(
Nleft);
736 r[0] = r_vert[0] + s*( r_line[0]-r_vert[0]);
737 r[1] = r_vert[1] + s*( r_line[1]-r_vert[1]);
747 const Vector<double>& zeta,
757 xi0 = double(i)/double(
Ny2);
758 xi1 = double(i+1)/double(
Ny2);
760 Vector<double> xi_line(1);
761 xi_line[0] = xi0 + (1.0+zeta[0])/2.0*(xi1-xi0);
763 Vector<double> r_line(2);
774 Vector<double> r_vert(2);
776 r_vert[1] = y0 + (1.0+zeta[0])/2.0*(y1-y0);
779 double s = double(j)/double(
Nleft);
782 r[0] = r_vert[0] + s*( r_line[0]-r_vert[0]);
783 r[1] = r_vert[1] + s*( r_line[1]-r_vert[1]);
793 const Vector<double>& zeta,
799 Vector<double> xi(1);
800 Vector<double> r_left(2);
801 Vector<double> r_right(2);
807 r[0] = r_left[0] + (1.0+zeta[0])/2.0*(r_right[0]-r_left[0]);
808 r[1] = r_left[1] + (1.0+zeta[0])/2.0*(r_right[1]-r_left[1]);
817 const Vector<double>& zeta,
823 Vector<double> xi(1);
824 Vector<double> r_left(2);
825 Vector<double> r_right(2);
831 r[0] = r_left[0] + (1.0+zeta[0])/2.0*(r_right[0]-r_left[0]);
832 r[1] = r_left[1] + (1.0+zeta[0])/2.0*(r_right[1]-r_left[1]);
852 const Vector<double>& zeta,
862 xi0 = double(i)/double(
Ny2);
863 xi1 = double(i+1)/double(
Ny2);
865 Vector<double> xi_line(1);
866 xi_line[0] = xi0 + (1.0+zeta[0])/2.0*(xi1-xi0);
868 Vector<double> r_line(2);
879 Vector<double> r_vert(2);
881 r_vert[1] = y0 + (1.0+zeta[0])/2.0*(y1-y0);
887 r[0] = r_vert[0] + s*( r_line[0]-r_vert[0]);
888 r[1] = r_vert[1] + s*( r_line[1]-r_vert[1]);
897 const Vector<double>& zeta,
907 xi0 = double(i)/double(
Ny2);
908 xi1 = double(i+1)/double(
Ny2);
910 Vector<double> xi_line(1);
911 xi_line[0] = xi0 + (1.0+zeta[0])/2.0*(xi1-xi0);
913 Vector<double> r_line(2);
924 Vector<double> r_vert(2);
926 r_vert[1] = y0 + (1.0+zeta[0])/2.0*(y1-y0);
932 r[0] = r_vert[0] + s*( r_line[0]-r_vert[0]);
933 r[1] = r_vert[1] + s*( r_line[1]-r_vert[1]);
942 const Vector<double>& zeta,
948 Vector<double> xi(1);
949 Vector<double> r_left(2);
950 Vector<double> r_right(2);
956 r[0] = r_left[0] + (1.0+zeta[0])/2.0*(r_right[0]-r_left[0]);
957 r[1] = r_left[1] + (1.0+zeta[0])/2.0*(r_right[1]-r_left[1]);
966 const Vector<double>& zeta,
972 Vector<double> xi(1);
973 Vector<double> r_left(2);
974 Vector<double> r_right(2);
980 r[0] = r_left[0] + (1.0+zeta[0])/2.0*(r_right[0]-r_left[0]);
981 r[1] = r_left[1] + (1.0+zeta[0])/2.0*(r_right[1]-r_left[1]);
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 width of the channel.
double Lright
Length of the domain to the right of the leaflet.
void macro_bound_II_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
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_II_S(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
void macro_bound_IV_N(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.
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.
double Hleaflet
Lagrangian coordinate at end of leaflet.
void macro_bound_III_W(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
void macro_bound_IV_E(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.
GeomObject * Leaflet_pt
Pointer to leaflet.
void slanted_bound_up(const unsigned &t, const Vector< double > &zeta, Vector< double > &r)
Helper function.
void macro_bound_IV_S(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.
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 X_0
Center of the domain : origin of the leaflet, extracted from GeomObject and stored for fast access...
void macro_bound_II_N(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.
unsigned Nright
Number of macro element columnns to the right of the leaflet.
GeomObject *& leaflet_pt()
Pointer to the wall.
unsigned Nleft
Number of macro element columns to the left of the leaflet.
~ChannelWithLeafletDomain()
Destructor: Kill macro elements.
void macro_bound_II_W(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)
unsigned Ny2
Number of macro element rows above the leaflet.
void macro_bound_I_N(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.
void macro_bound_I_W(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.
double lleft()
Length of domain to the left of leaflet.
double hleaflet()
Height of leaflet.
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_III_E(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &i, const unsigned &j)
Helper function.