libMesh
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
DivGradExactSolution Class Reference

#include <div_grad_exact_solution.h>

Public Member Functions

 DivGradExactSolution ()=default
 
 ~DivGradExactSolution ()=default
 
Real scalar (Real x, Real y)
 
Real scalar (Real x, Real y, Real z)
 
RealGradient operator() (Real x, Real y)
 
RealGradient operator() (Real x, Real y, Real z)
 
RealTensor grad (Real x, Real y)
 
RealTensor grad (Real x, Real y, Real z)
 
Real div (Real x, Real y)
 
Real div (Real x, Real y, Real z)
 
Real forcing (Real x, Real y)
 
Real forcing (Real x, Real y, Real z)
 
 DivGradExactSolution ()=default
 
 ~DivGradExactSolution ()=default
 
Real scalar (Real x, Real y)
 
Real scalar (Real x, Real y, Real z)
 
RealGradient operator() (Real x, Real y)
 
RealGradient operator() (Real x, Real y, Real z)
 
RealTensor grad (Real x, Real y)
 
RealTensor grad (Real x, Real y, Real z)
 
Real div (Real x, Real y)
 
Real div (Real x, Real y, Real z)
 
Real forcing (Real x, Real y)
 
Real forcing (Real x, Real y, Real z)
 

Private Attributes

const Real k = .5*pi
 

Detailed Description

Definition at line 26 of file div_grad_exact_solution.h.

Constructor & Destructor Documentation

◆ DivGradExactSolution() [1/2]

DivGradExactSolution::DivGradExactSolution ( )
default

◆ ~DivGradExactSolution() [1/2]

DivGradExactSolution::~DivGradExactSolution ( )
default

◆ DivGradExactSolution() [2/2]

DivGradExactSolution::DivGradExactSolution ( )
default

◆ ~DivGradExactSolution() [2/2]

DivGradExactSolution::~DivGradExactSolution ( )
default

Member Function Documentation

◆ div() [1/4]

Real DivGradExactSolution::div ( Real  x,
Real  y 
)
inline

Definition at line 84 of file div_grad_exact_solution.h.

85 {
86 const Real dux_dx = grad(x, y)(0, 0);
87 const Real duy_dy = grad(x, y)(1, 1);
88
89 return dux_dx + duy_dy;
90 }
RealTensor grad(Real x, Real y)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

References grad(), and libMesh::Real.

Referenced by forcing(), and forcing().

◆ div() [2/4]

Real DivGradExactSolution::div ( Real  x,
Real  y 
)
inline

Definition at line 84 of file div_grad_exact_solution.h.

85 {
86 const Real dux_dx = grad(x, y)(0, 0);
87 const Real duy_dy = grad(x, y)(1, 1);
88
89 return dux_dx + duy_dy;
90 }

References grad(), and libMesh::Real.

◆ div() [3/4]

Real DivGradExactSolution::div ( Real  x,
Real  y,
Real  z 
)
inline

Definition at line 92 of file div_grad_exact_solution.h.

93 {
94 const Real dux_dx = grad(x, y, z)(0, 0);
95 const Real duy_dy = grad(x, y, z)(1, 1);
96 const Real duz_dz = grad(x, y, z)(2, 2);
97
98 return dux_dx + duy_dy + duz_dz;
99 }

References grad(), and libMesh::Real.

◆ div() [4/4]

Real DivGradExactSolution::div ( Real  x,
Real  y,
Real  z 
)
inline

Definition at line 92 of file div_grad_exact_solution.h.

93 {
94 const Real dux_dx = grad(x, y, z)(0, 0);
95 const Real duy_dy = grad(x, y, z)(1, 1);
96 const Real duz_dz = grad(x, y, z)(2, 2);
97
98 return dux_dx + duy_dy + duz_dz;
99 }

References grad(), and libMesh::Real.

◆ forcing() [1/4]

Real DivGradExactSolution::forcing ( Real  x,
Real  y 
)
inline

Definition at line 101 of file div_grad_exact_solution.h.

102 {
103 return div(x, y);
104 }

References div().

Referenced by assemble_divgrad(), and fe_assembly().

◆ forcing() [2/4]

Real DivGradExactSolution::forcing ( Real  x,
Real  y 
)
inline

Definition at line 101 of file div_grad_exact_solution.h.

102 {
103 return div(x, y);
104 }

References div().

◆ forcing() [3/4]

Real DivGradExactSolution::forcing ( Real  x,
Real  y,
Real  z 
)
inline

Definition at line 106 of file div_grad_exact_solution.h.

107 {
108 return div(x, y, z);
109 }

References div().

◆ forcing() [4/4]

Real DivGradExactSolution::forcing ( Real  x,
Real  y,
Real  z 
)
inline

Definition at line 106 of file div_grad_exact_solution.h.

107 {
108 return div(x, y, z);
109 }

References div().

◆ grad() [1/4]

RealTensor DivGradExactSolution::grad ( Real  x,
Real  y 
)
inline

Definition at line 59 of file div_grad_exact_solution.h.

60 {
61 const Real dux_dx = k*k*cos(k*x)*sin(k*y);
62 const Real dux_dy = k*k*sin(k*x)*cos(k*y);
63 const Real duy_dx = k*k*sin(k*x)*cos(k*y);
64 const Real duy_dy = k*k*cos(k*x)*sin(k*y);
65
66 return RealTensor(dux_dx, dux_dy, Real(0), duy_dx, duy_dy);
67 }
RealTensorValue RealTensor

References k, and libMesh::Real.

Referenced by div(), and div().

◆ grad() [2/4]

RealTensor DivGradExactSolution::grad ( Real  x,
Real  y 
)
inline

Definition at line 59 of file div_grad_exact_solution.h.

60 {
61 const Real dux_dx = .5*pi*.5*pi*cos(.5*pi*x)*sin(.5*pi*y);
62 const Real dux_dy = .5*pi*.5*pi*sin(.5*pi*x)*cos(.5*pi*y);
63 const Real duy_dx = .5*pi*.5*pi*sin(.5*pi*x)*cos(.5*pi*y);
64 const Real duy_dy = .5*pi*.5*pi*cos(.5*pi*x)*sin(.5*pi*y);
65
66 return RealTensor(dux_dx, dux_dy, Real(0), duy_dx, duy_dy);
67 }
const Real pi
.
Definition libmesh.h:292

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

◆ grad() [3/4]

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

Definition at line 69 of file div_grad_exact_solution.h.

70 {
71 const Real dux_dx = k*k*cos(k*x)*sin(k*y)*cos(k*z);
72 const Real dux_dy = k*k*sin(k*x)*cos(k*y)*cos(k*z);
73 const Real dux_dz = -k*k*sin(k*x)*sin(k*y)*sin(k*z);
74 const Real duy_dx = k*k*sin(k*x)*cos(k*y)*cos(k*z);
75 const Real duy_dy = k*k*cos(k*x)*sin(k*y)*cos(k*z);
76 const Real duy_dz = k*k*cos(k*x)*cos(k*y)*sin(k*z);
77 const Real duz_dx = -k*k*sin(k*x)*sin(k*y)*sin(k*z);
78 const Real duz_dy = k*k*cos(k*x)*cos(k*y)*sin(k*z);
79 const Real duz_dz = k*k*cos(k*x)*sin(k*y)*cos(k*z);
80
81 return RealTensor(dux_dx, dux_dy, dux_dz, duy_dx, duy_dy, duy_dz, duz_dx, duz_dy, duz_dz);
82 }

References k, and libMesh::Real.

◆ grad() [4/4]

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

Definition at line 69 of file div_grad_exact_solution.h.

70 {
71 const Real dux_dx = .5*pi*.5*pi*cos(.5*pi*x)*sin(.5*pi*y)*cos(.5*pi*z);
72 const Real dux_dy = .5*pi*.5*pi*sin(.5*pi*x)*cos(.5*pi*y)*cos(.5*pi*z);
73 const Real dux_dz = -.5*pi*.5*pi*sin(.5*pi*x)*sin(.5*pi*y)*sin(.5*pi*z);
74 const Real duy_dx = .5*pi*.5*pi*sin(.5*pi*x)*cos(.5*pi*y)*cos(.5*pi*z);
75 const Real duy_dy = .5*pi*.5*pi*cos(.5*pi*x)*sin(.5*pi*y)*cos(.5*pi*z);
76 const Real duy_dz = .5*pi*.5*pi*cos(.5*pi*x)*cos(.5*pi*y)*sin(.5*pi*z);
77 const Real duz_dx = -.5*pi*.5*pi*sin(.5*pi*x)*sin(.5*pi*y)*sin(.5*pi*z);
78 const Real duz_dy = .5*pi*.5*pi*cos(.5*pi*x)*cos(.5*pi*y)*sin(.5*pi*z);
79 const Real duz_dz = .5*pi*.5*pi*cos(.5*pi*x)*sin(.5*pi*y)*cos(.5*pi*z);
80
81 return RealTensor(dux_dx, dux_dy, dux_dz, duy_dx, duy_dy, duy_dz, duz_dx, duz_dy, duz_dz);
82 }

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

◆ operator()() [1/4]

RealGradient DivGradExactSolution::operator() ( Real  x,
Real  y 
)
inline

Definition at line 42 of file div_grad_exact_solution.h.

43 {
44 const Real ux = k*sin(k*x)*sin(k*y);
45 const Real uy = -k*cos(k*x)*cos(k*y);
46
47 return RealGradient(ux, uy);
48 }
RealVectorValue RealGradient

References k, and libMesh::Real.

◆ operator()() [2/4]

RealGradient DivGradExactSolution::operator() ( Real  x,
Real  y 
)
inline

Definition at line 42 of file div_grad_exact_solution.h.

43 {
44 const Real ux = .5*pi*sin(.5*pi*x)*sin(.5*pi*y);
45 const Real uy = -.5*pi*cos(.5*pi*x)*cos(.5*pi*y);
46
47 return RealGradient(ux, uy);
48 }

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

◆ operator()() [3/4]

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

Definition at line 50 of file div_grad_exact_solution.h.

51 {
52 const Real ux = k*sin(k*x)*sin(k*y)*cos(k*z);
53 const Real uy = -k*cos(k*x)*cos(k*y)*cos(k*z);
54 const Real uz = k*cos(k*x)*sin(k*y)*sin(k*z);
55
56 return RealGradient(ux, uy, uz);
57 }

References k, and libMesh::Real.

◆ operator()() [4/4]

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

Definition at line 50 of file div_grad_exact_solution.h.

51 {
52 const Real ux = .5*pi*sin(.5*pi*x)*sin(.5*pi*y)*cos(.5*pi*z);
53 const Real uy = -.5*pi*cos(.5*pi*x)*cos(.5*pi*y)*cos(.5*pi*z);
54 const Real uz = .5*pi*cos(.5*pi*x)*sin(.5*pi*y)*sin(.5*pi*z);
55
56 return RealGradient(ux, uy, uz);
57 }

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

◆ scalar() [1/4]

Real DivGradExactSolution::scalar ( Real  x,
Real  y 
)
inline

Definition at line 32 of file div_grad_exact_solution.h.

33 {
34 return cos(k*x)*sin(k*y);
35 }

References k.

Referenced by assemble_divgrad(), and fe_assembly().

◆ scalar() [2/4]

Real DivGradExactSolution::scalar ( Real  x,
Real  y 
)
inline

Definition at line 32 of file div_grad_exact_solution.h.

33 {
34 return cos(.5*pi*x)*sin(.5*pi*y);
35 }

References libMesh::pi.

◆ scalar() [3/4]

Real DivGradExactSolution::scalar ( Real  x,
Real  y,
Real  z 
)
inline

Definition at line 37 of file div_grad_exact_solution.h.

38 {
39 return cos(k*x)*sin(k*y)*cos(k*z);
40 }

References k.

◆ scalar() [4/4]

Real DivGradExactSolution::scalar ( Real  x,
Real  y,
Real  z 
)
inline

Definition at line 37 of file div_grad_exact_solution.h.

38 {
39 return cos(.5*pi*x)*sin(.5*pi*y)*cos(.5*pi*z);
40 }

References libMesh::pi.

Member Data Documentation

◆ k

const Real DivGradExactSolution::k = .5*pi
private

Definition at line 112 of file div_grad_exact_solution.h.

Referenced by grad(), grad(), operator()(), operator()(), scalar(), and scalar().


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