27 #ifndef OOMPH_COLLAPSIBLE_CHANNEL_DOMAIN_HEADER
28 #define OOMPH_COLLAPSIBLE_CHANNEL_DOMAIN_HEADER
31 #include "../generic/quadtree.h"
32 #include "../generic/domain.h"
33 #include "../generic/geom_objects.h"
49 const unsigned&
ndown,
52 const double& lcollapsible,
75 for (
unsigned i = 0;
i < nmacro;
i++)
207 const unsigned& imacro,
208 const unsigned& idirect,
231 const unsigned& imacro,
232 const unsigned& part);
238 const unsigned& imacro,
239 const unsigned& part);
245 const unsigned& imacro,
246 const unsigned& part);
252 const unsigned& imacro,
253 const unsigned& part);
260 const unsigned& imacro);
267 const unsigned& imacro);
274 const unsigned& imacro);
281 const unsigned& imacro);
347 const unsigned& imacro,
348 const unsigned& idirect,
352 using namespace QuadTreeNames;
354 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
357 "Order of function arguments has changed between versions 0.8 and 0.85",
358 "CollapsibleChannelDomain::macro_element_boundary(...)",
359 OOMPH_EXCEPTION_LOCATION);
369 if ((imacro % n_x) <
Nup)
385 std::ostringstream error_stream;
386 error_stream <<
"Never get here! imacro, idirect: " << imacro <<
" "
387 << idirect << std::endl;
390 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
393 else if (idirect ==
S)
396 if ((imacro % n_x) <
Nup)
412 std::ostringstream error_stream;
413 error_stream <<
"Never get here! imacro, idirect: " << imacro <<
" "
414 << idirect << std::endl;
417 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
420 else if (idirect ==
E)
423 if ((imacro % n_x) <
Nup)
439 std::ostringstream error_stream;
440 error_stream <<
"Never get here! imacro, idirect: " << imacro <<
" "
441 << idirect << std::endl;
444 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
448 else if (idirect ==
W)
451 if ((imacro % n_x) <
Nup)
467 std::ostringstream error_stream;
468 error_stream <<
"Never get here! imacro, idirect: " << imacro <<
" "
469 << idirect << std::endl;
472 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
479 double radius = r[1];
494 const unsigned& imacro,
495 const unsigned& part)
508 r[1] = (double(y) + (0.5 * (1.0 + zeta[0]))) * (
Ly /
double(
Ny));
521 r[1] = (double(y) + (0.5 * (1.0 + zeta[0]))) * (
Ly /
double(
Ny));
530 std::ostringstream error_stream;
531 error_stream <<
"Never get here! part=" << part << std::endl;
534 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
546 const unsigned& imacro,
547 const unsigned& part)
560 r[1] = (double(y) + (0.5 * (1.0 + zeta[0]))) * (
Ly /
double(
Ny));
573 r[1] = (double(y) + (0.5 * (1.0 + zeta[0]))) * (
Ly /
double(
Ny));
583 std::ostringstream error_stream;
584 error_stream <<
"Never get here! part=" << part << std::endl;
587 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
598 const unsigned& imacro,
599 const unsigned& part)
614 r[1] = (double(y) + 1.0) * (
Ly /
double(
Ny));
628 r[1] = (double(y) + 1.0) * (
Ly /
double(
Ny));
638 std::ostringstream error_stream;
639 error_stream <<
"Never get here! part=" << part << std::endl;
642 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
654 const unsigned& imacro,
655 const unsigned& part)
669 r[1] = double(y) * (
Ly / double(
Ny));
683 r[1] = double(y) * (
Ly / double(
Ny));
693 std::ostringstream error_stream;
694 error_stream <<
"Never get here! part=" << part << std::endl;
697 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
709 const unsigned& imacro)
724 double fract = (double(y) + (0.5 * (1.0 + zeta[0]))) /
double(
Ny);
731 r[0] =
Lup + xi[0] + (r_wall[0] - (xi[0] +
Lup)) * fract;
734 r[1] = r_wall[1] * fract;
745 const unsigned& imacro)
760 double fract = (double(y) + (0.5 * (1.0 + zeta[0]))) /
double(
Ny);
767 r[0] =
Lup + xi[0] + (r_wall[0] - (xi[0] +
Lup)) * fract;
770 r[1] = r_wall[1] * fract;
781 const unsigned& imacro)
789 xi[0] = (double(x -
Nup) + (0.5 * (1.0 + zeta[0]))) *
797 double fract = (double(y) + 1.0) /
double(
Ny);
804 r[0] =
Lup + xi[0] + (r_wall[0] - (xi[0] +
Lup)) * fract;
807 r[1] = r_wall[1] * fract;
818 const unsigned& imacro)
826 xi[0] = (double(x -
Nup) + (0.5 * (1.0 + zeta[0]))) *
834 double fract = double(y) / double(
Ny);
841 r[0] =
Lup + xi[0] + (r_wall[0] - (xi[0] +
Lup)) * fract;
844 r[1] = r_wall[1] * fract;
Collapsible channel domain.
void r_N_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Northern boundary of the macro element imacro in the collapsible section.
GeomObject *& wall_pt()
Access to pointer to the geometric object that parametrises the collapsible wall.
double l_collapsible()
Length of collapsible segment.
unsigned ndown()
Number of vertical columns of macro elements in the downstream section.
void r_S_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Southern boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) section...
unsigned Ny
Number of macro elements across channel.
unsigned Nup
Number of vertical element columns in upstream section.
AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that implements axial spacing of macro elements.
double Lup
x-length in the upstream part of the channel
void r_S_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Southern boundary of the macro element imacro in the collapsible section.
void r_E_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Eastern boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) sections...
unsigned Ndown
Number of vertical element columns in downstream section.
~CollapsibleChannelDomain()
Destructor: emtpy; cleanup done in base class.
double(* BLSquashFctPt)(const double &s)
Typedef for function pointer for function that squashes the macro elements near the wall to help reso...
void macro_element_boundary(const unsigned &t, const unsigned &imacro, const unsigned &idirect, const Vector< double > &zeta, Vector< double > &r)
Vector representation of the imacro-th macro element boundary idirect (N/S/W/E) at time level t (t=0:...
bool Rotate_domain
Rotate domain (for axisymmetric problems, say)
double(* AxialSpacingFctPt)(const double &xi)
Typedef for function pointer for function that implements axial spacing of macro elements.
double l_up()
Length of upstream section.
static double default_axial_spacing_fct(const double &xi)
Default for function that implements axial spacing of macro elements.
BLSquashFctPt BL_squash_fct_pt
Function pointer for function that squashes the macro elements near the walls.
static double default_BL_squash_fct(const double &s)
Default for function that squashes the macro elements near the walls. Identity.
GeomObject * wall_pt() const
Access to pointer to the geometric object that parametrises the collapsible wall (const version)
unsigned ncollapsible()
Number of vertical clumns of macro elements in the "collapsible" segment.
unsigned Ncollapsible
Number of vertical element columns in "collapsible" section.
unsigned ny()
Number of macro-elements across the channel.
double s_squash(const double &s)
Function that squashes the macro elements near the wall. Input argument should vary between 0 and 1; ...
void disable_rotate_domain()
Undo rotation of the domain (for axisymmetric problems)
GeomObject * Wall_pt
Pointer to the geometric object that parametrises the collapsible wall.
AxialSpacingFctPt Axial_spacing_fct_pt
Function pointer for function that implements axial spacing of macro elements.
unsigned nup()
Number of vertical columns of macro elements the upstream section.
CollapsibleChannelDomain(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt)
Constructor: Pass the number of (macro-)elements, the domain lengths in the x- and y-direction and th...
void enable_rotate_domain()
Rotate the domain (for axisymmetric problems)
double l_down()
Length of downstream section.
void r_W_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Western boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) sections...
BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the macro elements near wall. Default mapping (identity) ...
double Lcollapsible
x-length in the "collapsible" part of the channel
void r_W_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Western boundary of the macro element imacro in the collapsible section.
double l_y()
Width of channel.
double axial_spacing_fct(const double &xi)
Function that implements axial spacing of macro elements.
double Ldown
x-length in the downstream part of the channel
void r_N_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Northern boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) section...
void r_E_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Eastern boundary of the macro element imacro in the collapsible section.
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 OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
QMacroElement specialised to 2 spatial dimensions.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...