31 #ifndef OOMPH_EIGHTH_SPHERE_DOMAIN_HEADER 32 #define OOMPH_EIGHTH_SPHERE_DOMAIN_HEADER 35 #include "../generic/quadtree.h" 36 #include "../generic/domain.h" 37 #include "../generic/geom_objects.h" 62 for (
unsigned i=0;
i<nmacro;
i++)
84 for (
unsigned i=0;
i<4;
i++)
96 const unsigned& imacro,
97 const unsigned& idirect,
102 using namespace OcTreeNames;
104 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES 107 "Order of function arguments has changed between versions 0.8 and 0.85",
108 "EighthSphereDomain::macro_element_boundary(...)",
109 OOMPH_EXCEPTION_LOCATION);
124 else if (idirect ==
R)
128 else if (idirect ==
D)
132 else if (idirect ==
U)
136 else if (idirect ==
B)
140 else if (idirect ==
F)
146 std::ostringstream error_message;
147 error_message <<
"idirect is " 149 <<
"not one of L, R, U, D, B, F" << std::endl;
152 OOMPH_CURRENT_FUNCTION,
153 OOMPH_EXCEPTION_LOCATION);
189 std::ostringstream error_message;
190 error_message <<
"idirect is " 192 <<
"not one of L, R, U, D, B, F" << std::endl;
195 OOMPH_CURRENT_FUNCTION,
196 OOMPH_EXCEPTION_LOCATION);
231 std::ostringstream error_message;
232 error_message <<
"idirect is " 234 <<
"not one of L, R, U, D, B, F" << std::endl;
237 OOMPH_CURRENT_FUNCTION,
238 OOMPH_EXCEPTION_LOCATION);
272 std::ostringstream error_message;
273 error_message <<
"idirect is " 275 <<
"not one of L, R, U, D, B, F" << std::endl;
278 OOMPH_CURRENT_FUNCTION,
279 OOMPH_EXCEPTION_LOCATION);
286 std::ostringstream error_message;
287 error_message <<
"imacro is " 289 <<
", but should be in the range 0-3" << std::endl;
292 OOMPH_CURRENT_FUNCTION,
293 OOMPH_EXCEPTION_LOCATION);
441 f[1]=
Radius*0.25*(1.0+zeta[0]);
442 f[2]=
Radius*0.25*(1.0+zeta[1]);
455 f[1]=
Radius*0.25*(1.0+zeta[0]);
456 f[2]=
Radius*0.25*(1.0+zeta[1]);
470 f[0]=
Radius*0.25*(1.0+zeta[0]);
472 f[2]=
Radius*0.25*(1.0+zeta[1]);
484 f[0]=
Radius*0.25*(1.0+zeta[0]);
486 f[2]=
Radius*0.25*(1.0+zeta[1]);
499 f[0]=
Radius*0.25*(1.0+zeta[0]);
500 f[1]=
Radius*0.25*(1.0+zeta[1]);
512 f[0]=
Radius*0.25*(1.0+zeta[0]);
513 f[1]=
Radius*0.25*(1.0+zeta[1]);
539 double k0=0.5*(1.0+zeta[0]);
540 double k1=0.5*(1.0+zeta[1]);
552 for(
unsigned i=0;
i<3;
i++)
554 p[
i]=point1[
i]+k1*(point2[
i]-point1[
i]);
556 double alpha=
Radius/std::sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);
558 for(
unsigned i=0;
i<3;
i++)
577 temp_zeta[1]=zeta[1];
584 on_center[2]=0.5*
Radius*0.5*(zeta[1]+1.0);
586 for(
unsigned i=0;
i<3;
i++)
588 f[
i]=on_center[
i]+0.5*(zeta[0]+1.0)*(on_sphere[
i]-on_center[
i]);
605 temp_zeta[1]=zeta[1];
612 on_center[2]=0.5*
Radius*0.5*(zeta[1]+1.0);
614 for(
unsigned i=0;
i<3;
i++)
616 f[
i]=on_center[
i]+0.5*(zeta[0]+1.0)*(on_sphere[
i]-on_center[
i]);
631 temp_zeta[0]=zeta[1];
638 on_center[1]=0.5*
Radius*0.5*(zeta[1]+1.0);
641 for(
unsigned i=0;
i<3;
i++)
643 f[
i]=on_center[
i]+0.5*(zeta[0]+1.0)*(on_sphere[
i]-on_center[
i]);
660 temp_zeta[0]=zeta[1];
667 on_center[1]=0.5*
Radius*0.5*(zeta[1]+1.0);
670 for(
unsigned i=0;
i<3;
i++)
672 f[
i]=on_center[
i]+0.5*(zeta[0]+1.0)*(on_sphere[
i]-on_center[
i]);
688 temp_zeta[1]=zeta[1];
689 r_up_U(t,temp_zeta,on_sphere);
695 on_center[2]=0.5*
Radius*0.5*(zeta[1]+1.0);
697 for(
unsigned i=0;
i<3;
i++)
699 f[
i]=on_center[
i]+0.5*(zeta[0]+1.0)*(on_sphere[
i]-on_center[
i]);
736 double k0=0.5*(1.0+zeta[0]);
737 double k1=0.5*(1.0+zeta[1]);
749 for(
unsigned i=0;
i<3;
i++)
751 p[
i]=point1[
i]+k1*(point2[
i]-point1[
i]);
753 double alpha=
Radius/std::sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);
755 for(
unsigned i=0;
i<3;
i++)
773 temp_zeta[0]=zeta[0];
775 r_up_U(t,temp_zeta,on_sphere);
779 on_center[0]=0.5*
Radius*0.5*(zeta[0]+1.0);
783 for(
unsigned i=0;
i<3;
i++)
785 f[
i]=on_center[
i]+0.5*(zeta[1]+1.0)*(on_sphere[
i]-on_center[
i]);
802 temp_zeta[0]=zeta[0];
804 r_up_U(t,temp_zeta,on_sphere);
808 on_center[0]=0.5*
Radius*0.5*(zeta[0]+1.0);
812 for(
unsigned i=0;
i<3;
i++)
814 f[
i]=on_center[
i]+0.5*(zeta[1]+1.0)*(on_sphere[
i]-on_center[
i]);
832 temp_zeta[1]=zeta[0];
838 on_center[1]=0.5*
Radius*0.5*(zeta[0]+1.0);
841 for(
unsigned i=0;
i<3;
i++)
843 f[
i]=on_center[
i]+0.5*(zeta[1]+1.0)*(on_sphere[
i]-on_center[
i]);
875 temp_zeta[0]=zeta[0];
881 on_center[0]=0.5*
Radius*0.5*(zeta[0]+1.0);
885 for(
unsigned i=0;
i<3;
i++)
887 f[
i]=on_center[
i]+0.5*(zeta[1]+1.0)*(on_sphere[
i]-on_center[
i]);
924 double k0=0.5*(1.0+zeta[0]);
925 double k1=0.5*(1.0+zeta[1]);
937 for(
unsigned i=0;
i<3;
i++)
939 p[
i]=point1[
i]+k1*(point2[
i]-point1[
i]);
941 double alpha=
Radius/std::sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);
943 for(
unsigned i=0;
i<3;
i++)
EighthSphereDomain(const EighthSphereDomain &)
Broken copy constructor.
void r_centr_D(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of central box macro element zeta .
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
void r_centr_B(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of central box macro element zeta .
void r_right_B(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of right box macro element zeta .
void r_up_L(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .
void r_up_D(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .
void r_right_R(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of right box macro element zeta .
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
void r_front_F(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .
void r_front_L(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .
void r_right_U(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of right box macro element zeta .
void r_centr_L(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of central box macro element zeta .
void operator=(const EighthSphereDomain &)
Broken assignment operator.
void r_right_F(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of right box macro element zeta .
~EighthSphereDomain()
Destructor: Kill macro elements.
void r_up_R(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .
static Vector< std::string > Direct_string
Translate (enumerated) directions into strings.
void r_front_U(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .
void r_centr_R(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of central box macro element zeta .
void r_centr_F(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of central box macro element zeta .
void r_up_B(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
Eighth sphere as domain. Domain is parametrised by four macro elements.
void r_up_U(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .
void r_front_B(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .
void r_right_L(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of right box macro element zeta .
void r_up_F(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .
void r_centr_U(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of central box macro element zeta .
void r_right_D(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of right box macro element zeta .
void r_front_D(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .
Base class for Domains with curvilinear and/or time-dependent boundaries. Domain boundaries are typic...
EighthSphereDomain(const double &radius)
Constructor: Pass the radius of the sphere.
void macro_element_boundary(const unsigned &t, const unsigned &imacro, const unsigned &idirect, const Vector< double > &s, Vector< double > &f)
Vector representation of the imacro-th macro element boundary idirect (L/R/D/U/B/F) at time level t (...
void r_front_R(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Boundary of top left box macro element zeta .