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

#include <laplace_exact_solution.h>

Public Member Functions

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

Detailed Description

Definition at line 57 of file laplace_exact_solution.h.

Constructor & Destructor Documentation

LaplaceExactGradient::LaplaceExactGradient ( )

Definition at line 60 of file laplace_exact_solution.h.

60 {}
LaplaceExactGradient::~LaplaceExactGradient ( )

Definition at line 62 of file laplace_exact_solution.h.

62 {}

Member Function Documentation

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

Definition at line 64 of file laplace_exact_solution.h.

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

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

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