27 #ifndef OOMPH_EIGHTH_SPHERE_DOMAIN_HEADER
28 #define OOMPH_EIGHTH_SPHERE_DOMAIN_HEADER
31 #include "../generic/quadtree.h"
32 #include "../generic/domain.h"
33 #include "../generic/geom_objects.h"
54 for (
unsigned i = 0;
i < nmacro;
i++)
75 const unsigned& imacro,
76 const unsigned& idirect,
80 using namespace OcTreeNames;
82 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
85 "Order of function arguments has changed between versions 0.8 and 0.85",
86 "EighthSphereDomain::macro_element_boundary(...)",
101 else if (idirect ==
R)
105 else if (idirect ==
D)
109 else if (idirect ==
U)
113 else if (idirect ==
B)
117 else if (idirect ==
F)
123 std::ostringstream error_message;
125 <<
"not one of L, R, U, D, B, F" << std::endl;
143 else if (idirect ==
R)
147 else if (idirect ==
D)
151 else if (idirect ==
U)
155 else if (idirect ==
B)
159 else if (idirect ==
F)
165 std::ostringstream error_message;
167 <<
"not one of L, R, U, D, B, F" << std::endl;
184 else if (idirect ==
R)
188 else if (idirect ==
D)
192 else if (idirect ==
U)
196 else if (idirect ==
B)
200 else if (idirect ==
F)
206 std::ostringstream error_message;
208 <<
"not one of L, R, U, D, B, F" << std::endl;
224 else if (idirect ==
R)
228 else if (idirect ==
D)
232 else if (idirect ==
U)
236 else if (idirect ==
B)
240 else if (idirect ==
F)
246 std::ostringstream error_message;
248 <<
"not one of L, R, U, D, B, F" << std::endl;
259 std::ostringstream error_message;
261 <<
", but should be in the range 0-3" << std::endl;
527 double k0 = 0.5 * (1.0 +
zeta[0]);
528 double k1 = 0.5 * (1.0 +
zeta[1]);
534 point1[1] = 0.5 *
Radius * k0;
537 point2[1] = k0 *
Radius / 3.0;
540 for (
unsigned i = 0;
i < 3;
i++)
542 p[
i] = point1[
i] + k1 * (point2[
i] - point1[
i]);
546 for (
unsigned i = 0;
i < 3;
i++)
564 temp_zeta[1] =
zeta[1];
569 on_center[0] = 0.5 *
Radius;
571 on_center[2] = 0.5 *
Radius * 0.5 * (
zeta[1] + 1.0);
573 for (
unsigned i = 0;
i < 3;
i++)
576 on_center[
i] + 0.5 * (
zeta[0] + 1.0) * (on_sphere[
i] - on_center[
i]);
593 temp_zeta[1] =
zeta[1];
598 on_center[0] = 0.5 *
Radius;
599 on_center[1] = 0.5 *
Radius;
600 on_center[2] = 0.5 *
Radius * 0.5 * (
zeta[1] + 1.0);
602 for (
unsigned i = 0;
i < 3;
i++)
605 on_center[
i] + 0.5 * (
zeta[0] + 1.0) * (on_sphere[
i] - on_center[
i]);
620 temp_zeta[0] =
zeta[1];
626 on_center[0] = 0.5 *
Radius;
627 on_center[1] = 0.5 *
Radius * 0.5 * (
zeta[1] + 1.0);
630 for (
unsigned i = 0;
i < 3;
i++)
633 on_center[
i] + 0.5 * (
zeta[0] + 1.0) * (on_sphere[
i] - on_center[
i]);
649 temp_zeta[0] =
zeta[1];
655 on_center[0] = 0.5 *
Radius;
656 on_center[1] = 0.5 *
Radius * 0.5 * (
zeta[1] + 1.0);
657 on_center[2] = 0.5 *
Radius;
659 for (
unsigned i = 0;
i < 3;
i++)
662 on_center[
i] + 0.5 * (
zeta[0] + 1.0) * (on_sphere[
i] - on_center[
i]);
678 temp_zeta[1] =
zeta[1];
679 r_up_U(
t, temp_zeta, on_sphere);
684 on_center[1] = 0.5 *
Radius;
685 on_center[2] = 0.5 *
Radius * 0.5 * (
zeta[1] + 1.0);
687 for (
unsigned i = 0;
i < 3;
i++)
690 on_center[
i] + 0.5 * (
zeta[0] + 1.0) * (on_sphere[
i] - on_center[
i]);
726 double k0 = 0.5 * (1.0 +
zeta[0]);
727 double k1 = 0.5 * (1.0 +
zeta[1]);
732 point1[0] = 0.5 *
Radius * k0;
735 point2[0] = k0 *
Radius / 3.0;
739 for (
unsigned i = 0;
i < 3;
i++)
741 p[
i] = point1[
i] + k1 * (point2[
i] - point1[
i]);
745 for (
unsigned i = 0;
i < 3;
i++)
762 temp_zeta[0] =
zeta[0];
764 r_up_U(
t, temp_zeta, on_sphere);
768 on_center[0] = 0.5 *
Radius * 0.5 * (
zeta[0] + 1.0);
769 on_center[1] = 0.5 *
Radius;
772 for (
unsigned i = 0;
i < 3;
i++)
775 on_center[
i] + 0.5 * (
zeta[1] + 1.0) * (on_sphere[
i] - on_center[
i]);
791 temp_zeta[0] =
zeta[0];
793 r_up_U(
t, temp_zeta, on_sphere);
797 on_center[0] = 0.5 *
Radius * 0.5 * (
zeta[0] + 1.0);
798 on_center[1] = 0.5 *
Radius;
799 on_center[2] = 0.5 *
Radius;
801 for (
unsigned i = 0;
i < 3;
i++)
804 on_center[
i] + 0.5 * (
zeta[1] + 1.0) * (on_sphere[
i] - on_center[
i]);
821 temp_zeta[1] =
zeta[0];
827 on_center[1] = 0.5 *
Radius * 0.5 * (
zeta[0] + 1.0);
828 on_center[2] = 0.5 *
Radius;
830 for (
unsigned i = 0;
i < 3;
i++)
833 on_center[
i] + 0.5 * (
zeta[1] + 1.0) * (on_sphere[
i] - on_center[
i]);
864 temp_zeta[0] =
zeta[0];
870 on_center[0] = 0.5 *
Radius * 0.5 * (
zeta[0] + 1.0);
872 on_center[2] = 0.5 *
Radius;
874 for (
unsigned i = 0;
i < 3;
i++)
877 on_center[
i] + 0.5 * (
zeta[1] + 1.0) * (on_sphere[
i] - on_center[
i]);
914 double k0 = 0.5 * (1.0 +
zeta[0]);
915 double k1 = 0.5 * (1.0 +
zeta[1]);
920 point1[0] = 0.5 *
Radius * k0;
923 point2[0] = k0 *
Radius / 3.0;
927 for (
unsigned i = 0;
i < 3;
i++)
929 p[
i] = point1[
i] + k1 * (point2[
i] - point1[
i]);
933 for (
unsigned i = 0;
i < 3;
i++)
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
dominoes D
Definition: Domino.cpp:55
MatrixXd L
Definition: LLT_example.cpp:6
@ R
Definition: StatisticsVector.h:21
float * p
Definition: Tutorial_Map_using.cpp:9
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
Definition: domain.h:301
Definition: eighth_sphere_domain.h:42
void r_right_U(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:585
void r_centr_F(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:497
void r_front_L(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:813
void r_centr_R(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:442
void macro_element_boundary(const unsigned &t, const unsigned &imacro, const unsigned &idirect, const Vector< double > &s, Vector< double > &f)
Definition: eighth_sphere_domain.h:74
void r_up_U(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:722
void r_centr_B(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:484
void r_front_D(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:857
void r_right_R(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:523
void r_front_R(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:842
EighthSphereDomain(const EighthSphereDomain &)=delete
Broken copy constructor.
void r_front_F(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:910
void r_right_D(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:556
EighthSphereDomain(const double &radius)
Constructor: Pass the radius of the sphere.
Definition: eighth_sphere_domain.h:45
void operator=(const EighthSphereDomain &)=delete
Broken assignment operator.
void r_up_F(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:784
double Radius
Definition: eighth_sphere_domain.h:272
void r_right_F(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:642
void r_front_B(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:898
void r_centr_D(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:456
void r_up_B(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:755
~EighthSphereDomain()
Destructor: Empty; cleanup done in base class.
Definition: eighth_sphere_domain.h:67
void r_right_B(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:613
void r_right_L(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:511
void r_up_R(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:699
void r_up_D(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:711
void r_centr_L(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:428
void r_front_U(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:886
void r_up_L(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:670
void r_centr_U(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:470
Definition: matrices.h:74
static Vector< std::string > Direct_string
Translate (enumerated) directions into strings.
Definition: octree.h:329
Definition: oomph_definitions.h:222
Definition: oomph_definitions.h:267
Definition: macro_element.h:373
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
RealScalar s
Definition: level1_cplx_impl.h:130
RealScalar alpha
Definition: level1_cplx_impl.h:151
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
double U
Swimming speed.
Definition: two_d_variable_diff_adapt.cc:53
@ F
Definition: octree.h:74
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86