oomph::WarpedCubeDomain Class Reference

#include <domain.h>

+ Inheritance diagram for oomph::WarpedCubeDomain:

Public Member Functions

 WarpedCubeDomain ()
 Constructor: More...
 
 WarpedCubeDomain (const WarpedCubeDomain &)=delete
 Broken copy constructor. More...
 
void operator= (const WarpedCubeDomain &)=delete
 Broken assignment operator. More...
 
 ~WarpedCubeDomain ()
 Destructor (empty; clean up handled in base class) More...
 
void warp_it (Vector< double > &f)
 Warp the unit cube. More...
 
void macro_element_boundary (const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, 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_L (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_R (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_D (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_U (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_B (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 
void r_F (const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
 

Additional Inherited Members

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

Detailed Description

////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// Warped cube as domain which is parametrised by a single macro element

Constructor & Destructor Documentation

◆ WarpedCubeDomain() [1/2]

oomph::WarpedCubeDomain::WarpedCubeDomain ( )
inline

Constructor:

321  {
322  // Resize
323  Macro_element_pt.resize(1);
324 
325  // Create macro element
326  Macro_element_pt[0] = new QMacroElement<3>(this, 0);
327  }
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
Definition: domain.h:301

References oomph::Domain::Macro_element_pt.

◆ WarpedCubeDomain() [2/2]

oomph::WarpedCubeDomain::WarpedCubeDomain ( const WarpedCubeDomain )
delete

Broken copy constructor.

◆ ~WarpedCubeDomain()

oomph::WarpedCubeDomain::~WarpedCubeDomain ( )
inline

Destructor (empty; clean up handled in base class)

336 {}

Member Function Documentation

◆ macro_element_boundary()

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

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

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

Implements oomph::Domain.

52  {
53  using namespace OcTreeNames;
54 
55 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
56  // Warn about time argument being moved to the front
57  OomphLibWarning(
58  "Order of function arguments has changed between versions 0.8 and 0.85",
59  "WarpedCubeDomain::macro_element_boundary(...)",
61 #endif
62 
63  // Which direction?
64  if (idirect == L)
65  {
66  r_L(t, s, f);
67  }
68  else if (idirect == R)
69  {
70  r_R(t, s, f);
71  }
72  else if (idirect == D)
73  {
74  r_D(t, s, f);
75  }
76  else if (idirect == U)
77  {
78  r_U(t, s, f);
79  }
80  else if (idirect == B)
81  {
82  r_B(t, s, f);
83  }
84  else if (idirect == F)
85  {
86  r_F(t, s, f);
87  }
88  else
89  {
90  std::ostringstream error_stream;
91  error_stream << "idirect is " << idirect << " not one of U, D, L, R, B, F"
92  << std::endl;
93 
94  throw OomphLibError(
96  }
97  }
dominoes D
Definition: Domino.cpp:55
MatrixXd L
Definition: LLT_example.cpp:6
@ R
Definition: StatisticsVector.h:21
Definition: matrices.h:74
void r_U(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: domain.cc:159
void r_R(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: domain.cc:125
void r_F(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: domain.cc:194
void r_L(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: domain.cc:107
void r_D(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: domain.cc:142
void r_B(const unsigned &t, const Vector< double > &zeta, Vector< double > &f)
Definition: domain.cc:177
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, f(), oomph::OcTreeNames::F, L, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, R, r_B(), r_D(), r_F(), r_L(), r_R(), r_U(), s, plotPSD::t, and RachelsAdvectionDiffusion::U.

◆ operator=()

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

Broken assignment operator.

◆ r_B()

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

Back boundary face zeta \( \in [-1,1]^2 \)

180  {
181  f[0] = zeta[0];
182  f[1] = zeta[1];
183  f[2] = -1.0;
184 
185  // Warp it
186  warp_it(f);
187  }
void warp_it(Vector< double > &f)
Warp the unit cube.
Definition: domain.cc:210
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(), warp_it(), and Eigen::zeta().

Referenced by macro_element_boundary().

◆ r_D()

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

Down boundary face zeta \( \in [-1,1]^2 \)

145  {
146  f[0] = zeta[0];
147  f[1] = -1.0;
148  f[2] = zeta[1];
149 
150  // Warp it
151  warp_it(f);
152  }

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

Referenced by macro_element_boundary().

◆ r_F()

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

Front boundary face zeta \( \in [-1,1]^2 \)

197  {
198  f[0] = zeta[0];
199  f[1] = zeta[1];
200  f[2] = 1.0;
201 
202  // Warp it
203  warp_it(f);
204  }

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

Referenced by macro_element_boundary().

◆ r_L()

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

Left boundary face zeta \( \in [-1,1]^2 \)

110  {
111  f[0] = -1.0;
112  f[1] = zeta[0];
113  f[2] = zeta[1];
114 
115 
116  // Warp it
117  warp_it(f);
118  }

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

Referenced by macro_element_boundary().

◆ r_R()

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

Right boundary face zeta \( \in [-1,1]^2 \)

128  {
129  f[0] = 1.0;
130  f[1] = zeta[0];
131  f[2] = zeta[1];
132 
133  // Warp it
134  warp_it(f);
135  }

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

Referenced by macro_element_boundary().

◆ r_U()

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

Up boundary face zeta \( \in [-1,1]^2 \)

162  {
163  f[0] = zeta[0];
164  f[1] = 1.0;
165  f[2] = zeta[1];
166 
167 
168  // Warp it
169  warp_it(f);
170  }

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

Referenced by macro_element_boundary().

◆ warp_it()

void oomph::WarpedCubeDomain::warp_it ( Vector< double > &  f)

Warp the unit cube.

211  {
212  Vector<double> f_aux(f);
213  double x = 0.5 * (1.0 + f_aux[0]);
214  double y = 0.5 * (1.0 + f_aux[1]);
215  double z = 0.5 * (1.0 + f_aux[2]);
216  f[0] = (1.0 + x) * cos(y + 0.5 * z);
217  f[1] = (2.0 + 3 * x) * sin(y + 0.5 * z);
218  f[2] = sin(z) + 0.1 * (x * x + y * y);
219  }
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
Scalar * y
Definition: level1_cplx_impl.h:128
list x
Definition: plotDoE.py:28

References cos(), f(), sin(), plotDoE::x, and y.

Referenced by r_B(), r_D(), r_F(), r_L(), r_R(), and r_U().


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