oomph::EighthSphereDomain Class Reference

#include <eighth_sphere_domain.h>

+ Inheritance diagram for oomph::EighthSphereDomain:

Public Member Functions

 EighthSphereDomain (const double &radius)
 Constructor: Pass the radius of the sphere. More...
 
 EighthSphereDomain (const EighthSphereDomain &)=delete
 Broken copy constructor. More...
 
void operator= (const EighthSphereDomain &)=delete
 Broken assignment operator. More...
 
 ~EighthSphereDomain ()
 Destructor: Empty; cleanup done in base class. More...
 
void macro_element_boundary (const unsigned &t, const unsigned &imacro, const unsigned &idirect, const Vector< double > &s, Vector< double > &f)
 
- Public Member Functions inherited from oomph::Domain
 Domain ()
 Constructor. More...
 
 Domain (const Domain &)=delete
 Broken copy constructor. More...
 
void operator= (const Domain &)=delete
 Broken assignment operator. More...
 
virtual ~Domain ()
 
MacroElementmacro_element_pt (const unsigned &i)
 Access to i-th macro element. More...
 
unsigned nmacro_element ()
 Number of macro elements in domain. More...
 
void output (const std::string &filename, const unsigned &nplot)
 Output macro elements. More...
 
void output (std::ostream &outfile, const unsigned &nplot)
 Output macro elements. More...
 
virtual void macro_element_boundary (const double &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
void macro_element_boundary (const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
void output_macro_element_boundaries (const std::string &filename, const unsigned &nplot)
 Output all macro element boundaries as tecplot zones. More...
 
void output_macro_element_boundaries (std::ostream &outfile, const unsigned &nplot)
 Output all macro element boundaries as tecplot zones. More...
 
virtual void dmacro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
virtual void dmacro_element_boundary (const double &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
void dmacro_element_boundary (const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
virtual void d2macro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
virtual void d2macro_element_boundary (const double &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 
void d2macro_element_boundary (const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
 

Private Member Functions

void r_centr_L (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_centr_R (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_centr_D (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_centr_U (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_centr_B (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_centr_F (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_right_L (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_right_R (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_right_D (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_right_U (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_right_B (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_right_F (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_up_L (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_up_R (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_up_D (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_up_U (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_up_B (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_up_F (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_front_L (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_front_R (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_front_D (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_front_U (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_front_B (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_front_F (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 

Private Attributes

double Radius
 

Additional Inherited Members

- Protected Attributes inherited from oomph::Domain
Vector< MacroElement * > Macro_element_pt
 Vector of pointers to macro elements. More...
 

Detailed Description

Eighth sphere as domain. Domain is parametrised by four macro elements

Constructor & Destructor Documentation

◆ EighthSphereDomain() [1/2]

oomph::EighthSphereDomain::EighthSphereDomain ( const double radius)
inline

Constructor: Pass the radius of the sphere.

45  : Radius(radius)
46  {
47  // There are four macro elements
48  unsigned nmacro = 4;
49 
50  // Resize
51  Macro_element_pt.resize(nmacro);
52 
53  // Create the 3D Q macro elements
54  for (unsigned i = 0; i < nmacro; i++)
55  {
56  Macro_element_pt[i] = new QMacroElement<3>(this, i);
57  }
58  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
Definition: domain.h:301
double Radius
Definition: eighth_sphere_domain.h:272
radius
Definition: UniformPSDSelfTest.py:15

References i, and oomph::Domain::Macro_element_pt.

◆ EighthSphereDomain() [2/2]

oomph::EighthSphereDomain::EighthSphereDomain ( const EighthSphereDomain )
delete

Broken copy constructor.

◆ ~EighthSphereDomain()

oomph::EighthSphereDomain::~EighthSphereDomain ( )
inline

Destructor: Empty; cleanup done in base class.

67 {}

Member Function Documentation

◆ macro_element_boundary()

void oomph::EighthSphereDomain::macro_element_boundary ( const unsigned t,
const unsigned imacro,
const unsigned idirect,
const Vector< double > &  s,
Vector< double > &  f 
)
inlinevirtual

Vector representation of the imacro-th macro element boundary idirect (L/R/D/U/B/F) at time level t (t=0: present; t>0: previous): f(s).

Implements oomph::Domain.

79  {
80  using namespace OcTreeNames;
81 
82 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
83  // Warn about time argument being moved to the front
84  OomphLibWarning(
85  "Order of function arguments has changed between versions 0.8 and 0.85",
86  "EighthSphereDomain::macro_element_boundary(...)",
88 #endif
89 
90  // Which macro element?
91  // --------------------
92  switch (imacro)
93  {
94  // Macro element 0: Central box
95  case 0:
96 
97  if (idirect == L)
98  {
99  r_centr_L(t, s, f);
100  }
101  else if (idirect == R)
102  {
103  r_centr_R(t, s, f);
104  }
105  else if (idirect == D)
106  {
107  r_centr_D(t, s, f);
108  }
109  else if (idirect == U)
110  {
111  r_centr_U(t, s, f);
112  }
113  else if (idirect == B)
114  {
115  r_centr_B(t, s, f);
116  }
117  else if (idirect == F)
118  {
119  r_centr_F(t, s, f);
120  }
121  else
122  {
123  std::ostringstream error_message;
124  error_message << "idirect is " << OcTree::Direct_string[idirect]
125  << "not one of L, R, U, D, B, F" << std::endl;
126 
127  throw OomphLibError(error_message.str(),
130  }
131 
132  break;
133 
134 
135  // Macro element 1:right
136  case 1:
137 
138  // Which direction?
139  if (idirect == L)
140  {
141  r_right_L(t, s, f);
142  }
143  else if (idirect == R)
144  {
145  r_right_R(t, s, f);
146  }
147  else if (idirect == D)
148  {
149  r_right_D(t, s, f);
150  }
151  else if (idirect == U)
152  {
153  r_right_U(t, s, f);
154  }
155  else if (idirect == B)
156  {
157  r_right_B(t, s, f);
158  }
159  else if (idirect == F)
160  {
161  r_right_F(t, s, f);
162  }
163  else
164  {
165  std::ostringstream error_message;
166  error_message << "idirect is " << OcTree::Direct_string[idirect]
167  << "not one of L, R, U, D, B, F" << std::endl;
168 
169  throw OomphLibError(error_message.str(),
172  }
173 
174  break;
175 
176  // Macro element 2: Up
177  case 2:
178 
179  // Which direction?
180  if (idirect == L)
181  {
182  r_up_L(t, s, f);
183  }
184  else if (idirect == R)
185  {
186  r_up_R(t, s, f);
187  }
188  else if (idirect == D)
189  {
190  r_up_D(t, s, f);
191  }
192  else if (idirect == U)
193  {
194  r_up_U(t, s, f);
195  }
196  else if (idirect == B)
197  {
198  r_up_B(t, s, f);
199  }
200  else if (idirect == F)
201  {
202  r_up_F(t, s, f);
203  }
204  else
205  {
206  std::ostringstream error_message;
207  error_message << "idirect is " << OcTree::Direct_string[idirect]
208  << "not one of L, R, U, D, B, F" << std::endl;
209 
210  throw OomphLibError(error_message.str(),
213  }
214 
215  break;
216 
217  // Macro element 3: Front
218  case 3:
219  // Which direction?
220  if (idirect == L)
221  {
222  r_front_L(t, s, f);
223  }
224  else if (idirect == R)
225  {
226  r_front_R(t, s, f);
227  }
228  else if (idirect == D)
229  {
230  r_front_D(t, s, f);
231  }
232  else if (idirect == U)
233  {
234  r_front_U(t, s, f);
235  }
236  else if (idirect == B)
237  {
238  r_front_B(t, s, f);
239  }
240  else if (idirect == F)
241  {
242  r_front_F(t, s, f);
243  }
244  else
245  {
246  std::ostringstream error_message;
247  error_message << "idirect is " << OcTree::Direct_string[idirect]
248  << "not one of L, R, U, D, B, F" << std::endl;
249 
250  throw OomphLibError(error_message.str(),
253  }
254 
255  break;
256 
257  default:
258 
259  std::ostringstream error_message;
260  error_message << "imacro is " << OcTree::Direct_string[idirect]
261  << ", but should be in the range 0-3" << std::endl;
262 
263  throw OomphLibError(error_message.str(),
266  }
267  }
dominoes D
Definition: Domino.cpp:55
MatrixXd L
Definition: LLT_example.cpp:6
@ R
Definition: StatisticsVector.h:21
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 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
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
void r_up_F(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: eighth_sphere_domain.h:784
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
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
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
RealScalar s
Definition: level1_cplx_impl.h:130
double U
Swimming speed.
Definition: two_d_variable_diff_adapt.cc:53
@ F
Definition: octree.h:74
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References D, oomph::OcTree::Direct_string, f(), oomph::OcTreeNames::F, L, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, R, r_centr_B(), r_centr_D(), r_centr_F(), r_centr_L(), r_centr_R(), r_centr_U(), r_front_B(), r_front_D(), r_front_F(), r_front_L(), r_front_R(), r_front_U(), r_right_B(), r_right_D(), r_right_F(), r_right_L(), r_right_R(), r_right_U(), r_up_B(), r_up_D(), r_up_F(), r_up_L(), r_up_R(), r_up_U(), s, plotPSD::t, and RachelsAdvectionDiffusion::U.

◆ operator=()

void oomph::EighthSphereDomain::operator= ( const EighthSphereDomain )
delete

Broken assignment operator.

◆ r_centr_B()

void oomph::EighthSphereDomain::r_centr_B ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of central box macro element zeta \( \in [-1,1]^2 \)

487  {
488  f[0] = Radius * 0.25 * (1.0 + zeta[0]);
489  f[1] = Radius * 0.25 * (1.0 + zeta[1]);
490  f[2] = 0.0;
491  }
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

References f(), Radius, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_centr_D()

void oomph::EighthSphereDomain::r_centr_D ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of central box macro element zeta \( \in [-1,1]^2 \)

459  {
460  f[0] = Radius * 0.25 * (1.0 + zeta[0]);
461  f[1] = 0;
462  f[2] = Radius * 0.25 * (1.0 + zeta[1]);
463  }

References f(), Radius, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_centr_F()

void oomph::EighthSphereDomain::r_centr_F ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of central box macro element zeta \( \in [-1,1]^2 \)

500  {
501  f[0] = Radius * 0.25 * (1.0 + zeta[0]);
502  f[1] = Radius * 0.25 * (1.0 + zeta[1]);
503  f[2] = Radius * 0.5;
504  }

References f(), Radius, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_front_B().

◆ r_centr_L()

void oomph::EighthSphereDomain::r_centr_L ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of central box macro element zeta \( \in [-1,1]^2 \)

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// Boundary of central box macro element zeta \( \in [-1,1]^2 \)

431  {
432  f[0] = 0;
433  f[1] = Radius * 0.25 * (1.0 + zeta[0]);
434  f[2] = Radius * 0.25 * (1.0 + zeta[1]);
435  }

References f(), Radius, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_centr_R()

void oomph::EighthSphereDomain::r_centr_R ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of central box macro element zeta \( \in [-1,1]^2 \)

445  {
446  f[0] = Radius * 0.5;
447  f[1] = Radius * 0.25 * (1.0 + zeta[0]);
448  f[2] = Radius * 0.25 * (1.0 + zeta[1]);
449  }

References f(), Radius, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_right_L().

◆ r_centr_U()

void oomph::EighthSphereDomain::r_centr_U ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of central box macro element zeta \( \in [-1,1]^2 \)

473  {
474  f[0] = Radius * 0.25 * (1.0 + zeta[0]);
475  f[1] = Radius * 0.5;
476  f[2] = Radius * 0.25 * (1.0 + zeta[1]);
477  }

References f(), Radius, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_up_D().

◆ r_front_B()

void oomph::EighthSphereDomain::r_front_B ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

901  {
902  r_centr_F(t, zeta, f);
903  }

References f(), r_centr_F(), plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_front_D()

void oomph::EighthSphereDomain::r_front_D ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

860  {
861  // position vector on sphere
862  Vector<double> on_sphere(3);
863  Vector<double> temp_zeta(2);
864  temp_zeta[0] = zeta[0];
865  temp_zeta[1] = -1.0;
866  r_front_F(t, temp_zeta, on_sphere);
867 
868  // position vector on center box
869  Vector<double> on_center(3);
870  on_center[0] = 0.5 * Radius * 0.5 * (zeta[0] + 1.0);
871  on_center[1] = 0.0;
872  on_center[2] = 0.5 * Radius;
873  // straight line across
874  for (unsigned i = 0; i < 3; i++)
875  {
876  f[i] =
877  on_center[i] + 0.5 * (zeta[1] + 1.0) * (on_sphere[i] - on_center[i]);
878  }
879  }

References f(), i, r_front_F(), Radius, plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_front_F()

void oomph::EighthSphereDomain::r_front_F ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

913  {
914  double k0 = 0.5 * (1.0 + zeta[0]);
915  double k1 = 0.5 * (1.0 + zeta[1]);
916  Vector<double> p(3);
917  Vector<double> point1(3);
918  Vector<double> point2(3);
919 
920  point1[0] = 0.5 * Radius * k0;
921  point1[1] = 0.0;
922  point1[2] = Radius - k0 * 0.5 * Radius;
923  point2[0] = k0 * Radius / 3.0;
924  point2[1] = 0.5 * Radius - k0 * Radius / 6.0;
925  point2[2] = 0.5 * Radius - k0 * Radius / 6.0;
926 
927  for (unsigned i = 0; i < 3; i++)
928  {
929  p[i] = point1[i] + k1 * (point2[i] - point1[i]);
930  }
931  double alpha = Radius / std::sqrt(p[0] * p[0] + p[1] * p[1] + p[2] * p[2]);
932 
933  for (unsigned i = 0; i < 3; i++)
934  {
935  f[i] = alpha * p[i];
936  }
937  }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
float * p
Definition: Tutorial_Map_using.cpp:9
RealScalar alpha
Definition: level1_cplx_impl.h:151

References alpha, f(), i, p, Radius, sqrt(), and Eigen::zeta().

Referenced by macro_element_boundary(), r_front_D(), and r_front_L().

◆ r_front_L()

void oomph::EighthSphereDomain::r_front_L ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

816  {
817  // position vector on sphere
818  Vector<double> on_sphere(3);
819  Vector<double> temp_zeta(2);
820  temp_zeta[0] = -1.0;
821  temp_zeta[1] = zeta[0];
822  r_front_F(t, temp_zeta, on_sphere);
823 
824  // position vector on center box
825  Vector<double> on_center(3);
826  on_center[0] = 0.0;
827  on_center[1] = 0.5 * Radius * 0.5 * (zeta[0] + 1.0);
828  on_center[2] = 0.5 * Radius;
829  // straight line across
830  for (unsigned i = 0; i < 3; i++)
831  {
832  f[i] =
833  on_center[i] + 0.5 * (zeta[1] + 1.0) * (on_sphere[i] - on_center[i]);
834  }
835  }

References f(), i, r_front_F(), Radius, plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_front_R()

void oomph::EighthSphereDomain::r_front_R ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

845  {
846  Vector<double> zeta2(2);
847  zeta2[0] = zeta[1];
848  zeta2[1] = zeta[0];
849  r_right_F(t, zeta2, f);
850  }

References f(), r_right_F(), plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_front_U()

void oomph::EighthSphereDomain::r_front_U ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

889  {
890  r_up_F(t, zeta, f);
891  }

References f(), r_up_F(), plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_right_B()

void oomph::EighthSphereDomain::r_right_B ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of right box macro element zeta \( \in [-1,1]^2 \)

616  {
617  // position vector on sphere
618  Vector<double> on_sphere(3);
619  Vector<double> temp_zeta(2);
620  temp_zeta[0] = zeta[1];
621  temp_zeta[1] = -1.0;
622  r_right_R(t, temp_zeta, on_sphere);
623 
624  // position vector on center box
625  Vector<double> on_center(3);
626  on_center[0] = 0.5 * Radius;
627  on_center[1] = 0.5 * Radius * 0.5 * (zeta[1] + 1.0);
628  on_center[2] = 0.0;
629  // strait line across
630  for (unsigned i = 0; i < 3; i++)
631  {
632  f[i] =
633  on_center[i] + 0.5 * (zeta[0] + 1.0) * (on_sphere[i] - on_center[i]);
634  }
635  }

References f(), i, r_right_R(), Radius, plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_right_D()

void oomph::EighthSphereDomain::r_right_D ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of right box macro element zeta \( \in [-1,1]^2 \)

559  {
560  // position vector on sphere
561  Vector<double> on_sphere(3);
562  Vector<double> temp_zeta(2);
563  temp_zeta[0] = -1.0;
564  temp_zeta[1] = zeta[1];
565  r_right_R(t, temp_zeta, on_sphere);
566 
567  // position vector on center box
568  Vector<double> on_center(3);
569  on_center[0] = 0.5 * Radius;
570  on_center[1] = 0.0;
571  on_center[2] = 0.5 * Radius * 0.5 * (zeta[1] + 1.0);
572  // strait line across
573  for (unsigned i = 0; i < 3; i++)
574  {
575  f[i] =
576  on_center[i] + 0.5 * (zeta[0] + 1.0) * (on_sphere[i] - on_center[i]);
577  }
578  }

References f(), i, r_right_R(), Radius, plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_right_F()

void oomph::EighthSphereDomain::r_right_F ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of right box macro element zeta \( \in [-1,1]^2 \)

645  {
646  // position vector on sphere
647  Vector<double> on_sphere(3);
648  Vector<double> temp_zeta(2);
649  temp_zeta[0] = zeta[1];
650  temp_zeta[1] = 1.0;
651  r_right_R(t, temp_zeta, on_sphere);
652 
653  // position vector on center box
654  Vector<double> on_center(3);
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;
658  // strait line across
659  for (unsigned i = 0; i < 3; i++)
660  {
661  f[i] =
662  on_center[i] + 0.5 * (zeta[0] + 1.0) * (on_sphere[i] - on_center[i]);
663  }
664  }

References f(), i, r_right_R(), Radius, plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_front_R().

◆ r_right_L()

void oomph::EighthSphereDomain::r_right_L ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of right box macro element zeta \( \in [-1,1]^2 \)

514  {
515  r_centr_R(t, zeta, f);
516  }

References f(), r_centr_R(), plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_right_R()

void oomph::EighthSphereDomain::r_right_R ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of right box macro element zeta \( \in [-1,1]^2 \)

526  {
527  double k0 = 0.5 * (1.0 + zeta[0]);
528  double k1 = 0.5 * (1.0 + zeta[1]);
529  Vector<double> p(3);
530  Vector<double> point1(3);
531  Vector<double> point2(3);
532 
533  point1[0] = Radius - 0.5 * Radius * k0;
534  point1[1] = 0.5 * Radius * k0;
535  point1[2] = 0.0;
536  point2[0] = 0.5 * Radius - k0 * Radius / 6.0;
537  point2[1] = k0 * Radius / 3.0;
538  point2[2] = 0.5 * Radius - k0 * Radius / 6.0;
539 
540  for (unsigned i = 0; i < 3; i++)
541  {
542  p[i] = point1[i] + k1 * (point2[i] - point1[i]);
543  }
544  double alpha = Radius / std::sqrt(p[0] * p[0] + p[1] * p[1] + p[2] * p[2]);
545 
546  for (unsigned i = 0; i < 3; i++)
547  {
548  f[i] = alpha * p[i];
549  }
550  }

References alpha, f(), i, p, Radius, sqrt(), and Eigen::zeta().

Referenced by macro_element_boundary(), r_right_B(), r_right_D(), r_right_F(), and r_right_U().

◆ r_right_U()

void oomph::EighthSphereDomain::r_right_U ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of right box macro element zeta \( \in [-1,1]^2 \)

588  {
589  // position vector on sphere
590  Vector<double> on_sphere(3);
591  Vector<double> temp_zeta(2);
592  temp_zeta[0] = 1.0;
593  temp_zeta[1] = zeta[1];
594  r_right_R(t, temp_zeta, on_sphere);
595 
596  // position vector on center box
597  Vector<double> on_center(3);
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);
601  // strait line across
602  for (unsigned i = 0; i < 3; i++)
603  {
604  f[i] =
605  on_center[i] + 0.5 * (zeta[0] + 1.0) * (on_sphere[i] - on_center[i]);
606  }
607  }

References f(), i, r_right_R(), Radius, plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_up_R().

◆ r_up_B()

void oomph::EighthSphereDomain::r_up_B ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

758  {
759  // position vector on sphere
760  Vector<double> on_sphere(3);
761  Vector<double> temp_zeta(2);
762  temp_zeta[0] = zeta[0];
763  temp_zeta[1] = -1.0;
764  r_up_U(t, temp_zeta, on_sphere);
765 
766  // position vector on center box
767  Vector<double> on_center(3);
768  on_center[0] = 0.5 * Radius * 0.5 * (zeta[0] + 1.0);
769  on_center[1] = 0.5 * Radius;
770  on_center[2] = 0.0;
771  // strait line across
772  for (unsigned i = 0; i < 3; i++)
773  {
774  f[i] =
775  on_center[i] + 0.5 * (zeta[1] + 1.0) * (on_sphere[i] - on_center[i]);
776  }
777  }

References f(), i, r_up_U(), Radius, plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_up_D()

void oomph::EighthSphereDomain::r_up_D ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

714  {
715  r_centr_U(t, zeta, f);
716  }

References f(), r_centr_U(), plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_up_F()

void oomph::EighthSphereDomain::r_up_F ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

787  {
788  // position vector on sphere
789  Vector<double> on_sphere(3);
790  Vector<double> temp_zeta(2);
791  temp_zeta[0] = zeta[0];
792  temp_zeta[1] = 1.0;
793  r_up_U(t, temp_zeta, on_sphere);
794 
795  // position vector on center box
796  Vector<double> on_center(3);
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;
800  // straight line across
801  for (unsigned i = 0; i < 3; i++)
802  {
803  f[i] =
804  on_center[i] + 0.5 * (zeta[1] + 1.0) * (on_sphere[i] - on_center[i]);
805  }
806  }

References f(), i, r_up_U(), Radius, plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary(), and r_front_U().

◆ r_up_L()

void oomph::EighthSphereDomain::r_up_L ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

673  {
674  // position vector on sphere
675  Vector<double> on_sphere(3);
676  Vector<double> temp_zeta(2);
677  temp_zeta[0] = -1.0;
678  temp_zeta[1] = zeta[1];
679  r_up_U(t, temp_zeta, on_sphere);
680 
681  // position vector on center box
682  Vector<double> on_center(3);
683  on_center[0] = 0.0;
684  on_center[1] = 0.5 * Radius;
685  on_center[2] = 0.5 * Radius * 0.5 * (zeta[1] + 1.0);
686  // strait line across
687  for (unsigned i = 0; i < 3; i++)
688  {
689  f[i] =
690  on_center[i] + 0.5 * (zeta[0] + 1.0) * (on_sphere[i] - on_center[i]);
691  }
692  }

References f(), i, r_up_U(), Radius, plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_up_R()

void oomph::EighthSphereDomain::r_up_R ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

702  {
703  r_right_U(t, zeta, f);
704  }

References f(), r_right_U(), plotPSD::t, and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_up_U()

void oomph::EighthSphereDomain::r_up_U ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  f 
)
private

Boundary of top left box macro element zeta \( \in [-1,1]^2 \)

725  {
726  double k0 = 0.5 * (1.0 + zeta[0]);
727  double k1 = 0.5 * (1.0 + zeta[1]);
728  Vector<double> p(3);
729  Vector<double> point1(3);
730  Vector<double> point2(3);
731 
732  point1[0] = 0.5 * Radius * k0;
733  point1[1] = Radius - 0.5 * Radius * k0;
734  point1[2] = 0;
735  point2[0] = k0 * Radius / 3.0;
736  point2[1] = 0.5 * Radius - k0 * Radius / 6.0;
737  point2[2] = 0.5 * Radius - k0 * Radius / 6.0;
738 
739  for (unsigned i = 0; i < 3; i++)
740  {
741  p[i] = point1[i] + k1 * (point2[i] - point1[i]);
742  }
743  double alpha = Radius / std::sqrt(p[0] * p[0] + p[1] * p[1] + p[2] * p[2]);
744 
745  for (unsigned i = 0; i < 3; i++)
746  {
747  f[i] = alpha * p[i];
748  }
749  }

References alpha, f(), i, p, Radius, sqrt(), and Eigen::zeta().

Referenced by macro_element_boundary(), r_up_B(), r_up_F(), and r_up_L().

Member Data Documentation

◆ Radius


The documentation for this class was generated from the following file: