27#ifndef OOMPH_TOPOLOGICALLY_RECTANGULAR_DOMAIN_HEADER
28#define OOMPH_TOPOLOGICALLY_RECTANGULAR_DOMAIN_HEADER
32#include <oomph-lib-config.h>
308 std::ostringstream error_message;
313 (*North_boundary_fn_pt)(1.0,
x_N);
315 (*East_boundary_fn_pt)(1.0,
x_E);
318 error_message <<
"North and East Boundaries do not meet at the "
319 <<
"North East Corner.\n"
320 <<
"North Boundary : x[0] = " <<
x_N[0] <<
"\n"
321 <<
" x[1] = " <<
x_N[1] <<
"\n"
322 <<
"East Boundary : x[0] = " <<
x_E[0] <<
"\n"
323 <<
" x[1] = " <<
x_E[1] <<
"\n\n";
330 (*South_boundary_fn_pt)(1.0,
x_S);
332 (*East_boundary_fn_pt)(-1.0,
x_E);
335 error_message <<
"South and East Boundaries do not meet at the "
336 <<
"South East Corner.\n"
337 <<
"South Boundary : x[0] = " <<
x_S[0] <<
"\n"
338 <<
" x[1] = " <<
x_S[1] <<
"\n"
339 <<
"East Boundary : x[0] = " <<
x_E[0] <<
"\n"
340 <<
" x[1] = " <<
x_E[1] <<
"\n\n";
347 (*South_boundary_fn_pt)(-1.0,
x_S);
349 (*West_boundary_fn_pt)(-1.0,
x_W);
352 error_message <<
"South and West Boundaries do not meet at the "
353 <<
"South West Corner.\n"
354 <<
"South Boundary : x[0] = " <<
x_S[0] <<
"\n"
355 <<
" x[1] = " <<
x_S[1] <<
"\n"
356 <<
"West Boundary : x[0] = " <<
x_W[0] <<
"\n"
357 <<
" x[1] = " <<
x_W[1] <<
"\n\n";
364 (*North_boundary_fn_pt)(-1.0,
x_N);
366 (*West_boundary_fn_pt)(1.0,
x_W);
369 error_message <<
"North and West Boundaries do not meet at the "
370 <<
"North West Corner.\n"
371 <<
"North Boundary : x[0] = " <<
x_N[0] <<
"\n"
372 <<
" x[1] = " <<
x_N[1] <<
"\n"
373 <<
"West Boundary : x[0] = " <<
x_W[0] <<
"\n"
374 <<
" x[1] = " <<
x_W[1] <<
"\n\n";
392 const double&
l_x,
const double& l_y)
537 using namespace QuadTreeNames;
539#ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
542 "Order of function arguments has changed between versions 0.8 and 0.85",
543 "TopologicallyRectangularDomain::macro_element_boundary(...)",
573 using namespace QuadTreeNames;
575#ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
578 "Order of function arguments has changed between versions 0.8 and 0.85",
579 "TopologicallyRectangularDomain::dmacro_element_boundary(...)",
609 using namespace QuadTreeNames;
611#ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
614 "Order of function arguments has changed between versions 0.8 and 0.85",
615 "TopologicallyRectangularDomain::d2macro_element_boundary(...)",
641 (*North_boundary_fn_pt)(
s[0], f);
660 (*East_boundary_fn_pt)(
s[0], f);
679 (*South_boundary_fn_pt)(
s[0], f);
699 (*West_boundary_fn_pt)(
s[0], f);
723 (*dNorth_boundary_fn_pt)(
s[0],
dr);
728 const double h = 10
e-8;
730 (*North_boundary_fn_pt)(
s[0] - 0.5 * h,
x_N_left);
732 (*North_boundary_fn_pt)(
s[0] + 0.5 * h,
x_N_right);
759 (*dEast_boundary_fn_pt)(
s[0],
dr);
764 const double h = 10
e-8;
766 (*East_boundary_fn_pt)(
s[0] - 0.5 * h,
x_E_down);
768 (*East_boundary_fn_pt)(
s[0] + 0.5 * h,
x_E_up);
795 (*dSouth_boundary_fn_pt)(
s[0],
dr);
800 const double h = 10
e-8;
802 (*South_boundary_fn_pt)(
s[0] - 0.5 * h,
x_N_left);
804 (*South_boundary_fn_pt)(
s[0] + 0.5 * h,
x_N_right);
831 (*dWest_boundary_fn_pt)(
s[0],
dr);
836 const double h = 10
e-8;
838 (*West_boundary_fn_pt)(
s[0] - 0.5 * h,
x_W_down);
840 (*West_boundary_fn_pt)(
s[0] + 0.5 * h,
x_W_up);
867 (*d2North_boundary_fn_pt)(
s[0],
d2r);
875 const double h = 10
e-8;
877 (*dNorth_boundary_fn_pt)(
s[0] - 0.5 * h,
dx_N_left);
879 (*dNorth_boundary_fn_pt)(
s[0] + 0.5 * h,
dx_N_right);
886 const double h = 10
e-8;
888 (*North_boundary_fn_pt)(
s[0] - h,
N_left);
890 (*North_boundary_fn_pt)(
s[0] + h,
N_right);
920 (*d2East_boundary_fn_pt)(
s[0],
d2r);
928 const double h = 10
e-8;
930 (*dEast_boundary_fn_pt)(
s[0] - 0.5 * h,
dx_E_lower);
932 (*dEast_boundary_fn_pt)(
s[0] + 0.5 * h,
dx_E_upper);
939 const double h = 10
e-8;
941 (*East_boundary_fn_pt)(
s[0] - h,
E_left);
943 (*East_boundary_fn_pt)(
s[0] + h,
E_right);
973 (*d2South_boundary_fn_pt)(
s[0],
d2r);
981 const double h = 10
e-8;
983 (*dSouth_boundary_fn_pt)(
s[0] - 0.5 * h,
dx_S_left);
985 (*dSouth_boundary_fn_pt)(
s[0] + 0.5 * h,
dx_S_right);
992 const double h = 10
e-8;
994 (*South_boundary_fn_pt)(
s[0] - h,
S_left);
996 (*South_boundary_fn_pt)(
s[0] + h,
S_right);
1026 (*d2West_boundary_fn_pt)(
s[0],
d2r);
1034 const double h = 10
e-8;
1036 (*dWest_boundary_fn_pt)(
s[0] - 0.5 * h,
dx_W_lower);
1038 (*dWest_boundary_fn_pt)(
s[0] + 0.5 * h,
dx_W_upper);
1045 const double h = 10
e-8;
1047 (*West_boundary_fn_pt)(
s[0] - h,
W_left);
1049 (*West_boundary_fn_pt)(
s[0] + h,
W_right);
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.
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....
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
Topologically Rectangular Domain - a domain dexcribing a topologically rectangular problem - primaril...
void r_E(const Vector< double > &s, Vector< double > &f)
takes the macro element coordinate position along the east boundary and returns the global coordinate...
void d2macro_element_boundary(const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
returns the second derivates of the global coordinate position (f) wrt to the macro element coordinat...
BoundaryFctPt d2North_boundary_fn_pt
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coo...
void dmacro_element_boundary(const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
returns the derivates of the global coordinate position (f) wrt to the macro element coordinate at ma...
void dr_E(const Vector< double > &s, Vector< double > &dr)
takes the macro element coordinate position along the E boundary and returns the derivates of the glo...
void dr_S(const Vector< double > &s, Vector< double > &dr)
takes the macro element coordinate position along the south boundary and returns the derivates of the...
void operator=(const TopologicallyRectangularDomain &)=delete
Broken assignment operator.
Vector< double > x_south_west
coordinate position of south west corner of domain (only used if boundary functions are not used)
BoundaryFctPt d2East_boundary_fn_pt
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coo...
void d2r_W(const Vector< double > &s, Vector< double > &d2r)
takes the macro element coordinate position along the west boundary and returns the second derivates ...
BoundaryFctPt South_boundary_fn_pt
Function pointer to prescribe the north boundary of this topologically rectangular domain.
TopologicallyRectangularDomain(const TopologicallyRectangularDomain &)=delete
Broken copy constructor.
void macro_element_boundary(const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
returns the global coordinate position (f) of macro element position s on boundary i_direct (e....
BoundaryFctPt dEast_boundary_fn_pt
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate...
BoundaryFctPt d2West_boundary_fn_pt
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coo...
void set_boundary_second_derivative_functions(BoundaryFctPt d2_north_pt, BoundaryFctPt d2_east_pt, BoundaryFctPt d2_south_pt, BoundaryFctPt d2_west_pt)
allows the boundary second derivate function pointers to be set. To compute the second derivatives of...
void r_N(const Vector< double > &s, Vector< double > &f)
takes the macro element coordinate position along the north boundary and returns the global coordinat...
void d2r_N(const Vector< double > &s, Vector< double > &d2r)
takes the macro element coordinate position along the north boundary and returns the second derivates...
BoundaryFctPt d2South_boundary_fn_pt
Function pointer to prescribe the second derivates of global coordinates wrt to the macro element coo...
void r_S(const Vector< double > &s, Vector< double > &f)
takes the macro element coordinate position along the south boundary and returns the global coordinat...
BoundaryFctPt North_boundary_fn_pt
Function pointer to prescribe the north boundary of this topologically rectangular domain.
void set_boundary_derivative_functions(BoundaryFctPt d_north_pt, BoundaryFctPt d_east_pt, BoundaryFctPt d_south_pt, BoundaryFctPt d_west_pt)
allows the boundary derivate function pointers to be set. To compute the derivatives of the problem d...
void(* BoundaryFctPt)(const double &s, Vector< double > &r)
boundary function pointer - for a given boundary takes the macro element coordinate position on that ...
BoundaryFctPt dWest_boundary_fn_pt
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate...
void dr_W(const Vector< double > &s, Vector< double > &dr)
takes the macro element coordinate position along the W boundary and returns the derivates of the glo...
void r_W(const Vector< double > &s, Vector< double > &f)
takes the macro element coordinate position along the west boundary and returns the global coordinate...
~TopologicallyRectangularDomain()
Destructor - empty; clean up done in base class.
void d2r_E(const Vector< double > &s, Vector< double > &d2r)
takes the macro element coordinate position along the east boundary and returns the second derivates ...
BoundaryFctPt West_boundary_fn_pt
Function pointer to prescribe the west boundary of this topologically rectangular domain.
BoundaryFctPt East_boundary_fn_pt
Function pointer to prescribe the east boundary of this topologically rectangular domain.
TopologicallyRectangularDomain(BoundaryFctPt north_pt, BoundaryFctPt east_pt, BoundaryFctPt south_pt, BoundaryFctPt west_pt)
Constructor - domain boundaries are described with four boundary function pointers describing the top...
void dr_N(const Vector< double > &s, Vector< double > &dr)
takes the macro element coordinate position along the north boundary and returns the derivates of the...
void d2r_S(const Vector< double > &s, Vector< double > &d2r)
takes the macro element coordinate position along the south boundary and returns the second derivates...
Vector< double > x_north_east
coordinate position of north east corner of domain (only used if boundary functions are not used)
BoundaryFctPt dSouth_boundary_fn_pt
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate...
BoundaryFctPt dNorth_boundary_fn_pt
Function pointer to prescribe the derivates of global coordinates wrt to the macro element coordinate...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).