libMesh
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
CurlCurlExactSolution Class Reference

#include <curl_curl_exact_solution.h>

Public Member Functions

 CurlCurlExactSolution ()=default
 
 ~CurlCurlExactSolution ()=default
 
RealGradient operator() (Point p)
 
RealTensor grad (Point p)
 
RealGradient forcing (Point p)
 
 CurlCurlExactSolution ()=default
 
 ~CurlCurlExactSolution ()=default
 
RealGradient operator() (Real x, Real y, Real z)
 
RealTensor grad (Real x, Real y, Real z)
 
RealGradient curl (Real x, Real y, Real z)
 
RealGradient forcing (Real x, Real y, Real z)
 

Static Public Member Functions

static void RM (RealTensor T)
 

Private Attributes

const Real k = pi
 

Static Private Attributes

static RealTensor R
 

Detailed Description

Definition at line 26 of file curl_curl_exact_solution.h.

Constructor & Destructor Documentation

◆ CurlCurlExactSolution() [1/2]

CurlCurlExactSolution::CurlCurlExactSolution ( )
default

◆ ~CurlCurlExactSolution() [1/2]

CurlCurlExactSolution::~CurlCurlExactSolution ( )
default

◆ CurlCurlExactSolution() [2/2]

CurlCurlExactSolution::CurlCurlExactSolution ( )
default

◆ ~CurlCurlExactSolution() [2/2]

CurlCurlExactSolution::~CurlCurlExactSolution ( )
default

Member Function Documentation

◆ curl()

RealGradient CurlCurlExactSolution::curl ( Real  x,
Real  y,
Real  z 
)
inline

Definition at line 58 of file curl_curl_exact_solution.h.

References libMesh::Real.

59  {
60  const Real duz_dy = (1.0 - x*x)*(-2.0*y);
61  const Real duy_dz = (1.0 - x*x)*(-2.0*z);
62 
63  const Real dux_dz = (1.0 - y*y)*(-2.0*z);
64  const Real duz_dx = (1.0 - y*y)*(-2.0*x);
65 
66  const Real dux_dy = (1.0 - z*z)*(-2.0*y);
67  const Real duy_dx = (1.0 - z*z)*(-2.0*x);
68 
69  return RealGradient(duz_dy - duy_dz, dux_dz - duz_dx, duy_dx - dux_dy);
70  }
RealVectorValue RealGradient
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ forcing() [1/2]

RealGradient CurlCurlExactSolution::forcing ( Point  p)
inline

Definition at line 56 of file curl_curl_exact_solution.h.

Referenced by CurlCurlSystem::element_time_derivative(), and CurlCurlSystem::forcing().

57  {
58  return (2*k*k + 1)*operator()(p);
59  }
RealGradient operator()(Point p)

◆ forcing() [2/2]

RealGradient CurlCurlExactSolution::forcing ( Real  x,
Real  y,
Real  z 
)
inline

Definition at line 72 of file curl_curl_exact_solution.h.

References libMesh::Real.

73  {
74  const Real fx = 2.0*(1.0 - y*y) + 2.0*(1.0 - z*z) + (1.0 - y*y)*(1.0 - z*z);
75  const Real fy = 2.0*(1.0 - x*x) + 2.0*(1.0 - z*z) + (1.0 - x*x)*(1.0 - z*z);
76  const Real fz = 2.0*(1.0 - x*x) + 2.0*(1.0 - y*y) + (1.0 - x*x)*(1.0 - y*y);
77 
78  return RealGradient(fx, fy, fz);
79  }
RealVectorValue RealGradient
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ grad() [1/2]

RealTensor CurlCurlExactSolution::grad ( Real  x,
Real  y,
Real  z 
)
inline

Definition at line 41 of file curl_curl_exact_solution.h.

References libMesh::Real.

42  {
43  const Real dux_dx = 0.0;
44  const Real dux_dy = (1.0 - z*z)*(-2.0*y);
45  const Real dux_dz = (1.0 - y*y)*(-2.0*z);
46 
47  const Real duy_dx = (1.0 - z*z)*(-2.0*x);
48  const Real duy_dy = 0.0;
49  const Real duy_dz = (1.0 - x*x)*(-2.0*z);
50 
51  const Real duz_dx = (1.0 - y*y)*(-2.0*x);
52  const Real duz_dy = (1.0 - x*x)*(-2.0*y);
53  const Real duz_dz = 0.0;
54 
55  return RealTensor(dux_dx, dux_dy, dux_dz, duy_dx, duy_dy, duy_dz, duz_dx, duz_dy, duz_dz);
56  }
RealTensorValue RealTensor
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ grad() [2/2]

RealTensor CurlCurlExactSolution::grad ( Point  p)
inline

Definition at line 43 of file curl_curl_exact_solution.h.

References libMesh::Real, and libMesh::TypeTensor< T >::transpose().

44  {
45  Point pp = R.transpose()*p;
46  Real x = pp(0), y = pp(1);
47 
48  const Real dux_dx = -k*sin(k*x)*sin(k*y);
49  const Real dux_dy = k*cos(k*x)*cos(k*y);
50  const Real duy_dx = -k*cos(k*x)*cos(k*y);
51  const Real duy_dy = k*sin(k*x)*sin(k*y);
52 
53  return R*RealTensor(dux_dx, dux_dy, Real(0), duy_dx, duy_dy)*R.transpose();
54  }
TypeTensor< T > transpose() const
Definition: type_tensor.h:1050
RealTensorValue RealTensor
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39

◆ operator()() [1/2]

RealGradient CurlCurlExactSolution::operator() ( Point  p)
inline

Definition at line 32 of file curl_curl_exact_solution.h.

References libMesh::Real.

33  {
34  Point pp = R.transpose()*p;
35  Real x = pp(0), y = pp(1);
36 
37  const Real ux = cos(k*x)*sin(k*y);
38  const Real uy = -sin(k*x)*cos(k*y);
39 
40  return R*RealGradient(ux, uy);
41  }
RealVectorValue RealGradient
TypeTensor< T > transpose() const
Definition: type_tensor.h:1050
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39

◆ operator()() [2/2]

RealGradient CurlCurlExactSolution::operator() ( Real  x,
Real  y,
Real  z 
)
inline

Definition at line 32 of file curl_curl_exact_solution.h.

References libMesh::Real.

33  {
34  const Real ux = (1.0 - y*y)*(1.0 - z*z);
35  const Real uy = (1.0 - x*x)*(1.0 - z*z);
36  const Real uz = (1.0 - x*x)*(1.0 - y*y);
37 
38  return RealGradient(ux, uy, uz);
39  }
RealVectorValue RealGradient
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ RM()

static void CurlCurlExactSolution::RM ( RealTensor  T)
inlinestatic

Definition at line 61 of file curl_curl_exact_solution.h.

Referenced by main().

62  {
63  R = T;
64  }

Member Data Documentation

◆ k

const Real CurlCurlExactSolution::k = pi
private

Definition at line 68 of file curl_curl_exact_solution.h.

◆ R

RealTensor CurlCurlExactSolution::R
staticprivate

Definition at line 67 of file curl_curl_exact_solution.h.


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