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

#include <laplace_exact_solution.h>

Public Member Functions

 LaplaceExactGradient ()=default
 
 ~LaplaceExactGradient ()=default
 
RealGradient operator() (unsigned int component, Real x, Real y, Real z=0.0)
 

Detailed Description

Definition at line 56 of file laplace_exact_solution.h.

Constructor & Destructor Documentation

◆ LaplaceExactGradient()

LaplaceExactGradient::LaplaceExactGradient ( )
default

◆ ~LaplaceExactGradient()

LaplaceExactGradient::~LaplaceExactGradient ( )
default

Member Function Documentation

◆ operator()()

RealGradient LaplaceExactGradient::operator() ( unsigned int  component,
Real  x,
Real  y,
Real  z = 0.0 
)
inline

Definition at line 62 of file laplace_exact_solution.h.

66 {
67 const Real hp = 0.5*pi;
68
69 switch(component)
70 {
71 case 0:
72 return RealGradient(-hp*sin(hp*x)*sin(hp*y)*cos(hp*z),
73 cos(hp*x)*(hp)*cos(hp*y)*cos(hp*z),
74 cos(hp*x)*sin(hp*y)*(-hp)*sin(hp*z));
75
76 case 1:
77 return RealGradient(hp*cos(hp*x)*cos(hp*y)*cos(hp*z),
78 sin(hp*x)*(-hp)*sin(hp*y)*cos(hp*z),
79 sin(hp*x)*cos(hp*y)*(-hp)*sin(hp*z));
80
81 case 2:
82 return RealGradient(hp*cos(hp*x)*cos(hp*y)*sin(hp*z),
83 sin(hp*x)*(-hp)*sin(hp*y)*sin(hp*z),
84 sin(hp*x)*cos(hp*y)*(hp)*cos(hp*z));
85
86 default:
87 libmesh_error_msg("Invalid component = " << component);
88 }
89 }
const Real pi
.
Definition libmesh.h:292
RealVectorValue RealGradient
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

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


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