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

#include <curl_curl_exact_solution.h>

Public Member Functions

 CurlCurlExactSolution ()
 
 ~CurlCurlExactSolution ()
 
RealGradient operator() (Real x, Real y)
 
RealTensor grad (Real x, Real y)
 
RealGradient curl (Real x, Real y)
 
RealGradient forcing (Real x, Real y)
 
 CurlCurlExactSolution ()
 
 ~CurlCurlExactSolution ()
 
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)
 

Detailed Description

Definition at line 26 of file curl_curl_exact_solution.h.

Constructor & Destructor Documentation

◆ CurlCurlExactSolution() [1/2]

CurlCurlExactSolution::CurlCurlExactSolution ( )

Definition at line 29 of file curl_curl_exact_solution.h.

29 {}

◆ ~CurlCurlExactSolution() [1/2]

CurlCurlExactSolution::~CurlCurlExactSolution ( )

Definition at line 31 of file curl_curl_exact_solution.h.

31 {}

◆ CurlCurlExactSolution() [2/2]

CurlCurlExactSolution::CurlCurlExactSolution ( )

Definition at line 29 of file curl_curl_exact_solution.h.

29 {}

◆ ~CurlCurlExactSolution() [2/2]

CurlCurlExactSolution::~CurlCurlExactSolution ( )

Definition at line 31 of file curl_curl_exact_solution.h.

31 {}

Member Function Documentation

◆ curl() [1/2]

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

Definition at line 51 of file curl_curl_exact_solution.h.

References libMesh::pi, and libMesh::Real.

52  {
53  const Real dux_dy = pi*cos(pi*x)*cos(pi*y);
54  const Real duy_dx = -pi*cos(pi*x)*cos(pi*y);
55 
56  return RealGradient(Real(0), Real(0), duy_dx - dux_dy);
57  }
RealVectorValue RealGradient
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real pi
.
Definition: libmesh.h:233

◆ curl() [2/2]

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

Definition at line 59 of file curl_curl_exact_solution.h.

References libMesh::Real.

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

◆ forcing() [1/2]

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

Definition at line 59 of file curl_curl_exact_solution.h.

References libMesh::pi, and libMesh::Real.

60  {
61  const Real fx = (2*pi*pi + 1)*cos(pi*x)*sin(pi*y);
62  const Real fy = -(2*pi*pi + 1)*sin(pi*x)*cos(pi*y);
63 
64  return RealGradient(fx, fy);
65  }
RealVectorValue RealGradient
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real pi
.
Definition: libmesh.h:233

◆ forcing() [2/2]

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

Definition at line 73 of file curl_curl_exact_solution.h.

References libMesh::Real.

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

◆ grad() [1/2]

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

Definition at line 41 of file curl_curl_exact_solution.h.

References libMesh::pi, and libMesh::Real.

42  {
43  const Real dux_dx = -pi*sin(pi*x)*sin(pi*y);
44  const Real dux_dy = pi*cos(pi*x)*cos(pi*y);
45  const Real duy_dx = -pi*cos(pi*x)*cos(pi*y);
46  const Real duy_dy = pi*sin(pi*x)*sin(pi*y);
47 
48  return RealTensor(dux_dx, dux_dy, Real(0), duy_dx, duy_dy);
49  }
RealTensorValue RealTensor
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real pi
.
Definition: libmesh.h:233

◆ grad() [2/2]

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

Definition at line 42 of file curl_curl_exact_solution.h.

References libMesh::Real.

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

◆ operator()() [1/2]

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

Definition at line 33 of file curl_curl_exact_solution.h.

References libMesh::Real.

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

◆ operator()() [2/2]

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

Definition at line 33 of file curl_curl_exact_solution.h.

References libMesh::pi, and libMesh::Real.

34  {
35  const Real ux = cos(pi*x)*sin(pi*y);
36  const Real uy = -sin(pi*x)*cos(pi*y);
37 
38  return RealGradient(ux, uy);
39  }
RealVectorValue RealGradient
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real pi
.
Definition: libmesh.h:233

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