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

#include <laplace_exact_solution.h>

Public Member Functions

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

Detailed Description

Definition at line 25 of file laplace_exact_solution.h.

Constructor & Destructor Documentation

LaplaceExactSolution::LaplaceExactSolution ( )

Definition at line 28 of file laplace_exact_solution.h.

28 {}
LaplaceExactSolution::~LaplaceExactSolution ( )

Definition at line 30 of file laplace_exact_solution.h.

30 {}

Member Function Documentation

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

Definition at line 32 of file laplace_exact_solution.h.

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

36  {
37  const Real hp = 0.5*pi;
38 
39  switch(component)
40  {
41  case 0:
42  return cos(hp*x)*sin(hp*y)*cos(hp*z);
43 
44  case 1:
45  return sin(hp*x)*cos(hp*y)*cos(hp*z);
46 
47  case 2:
48  return sin(hp*x)*cos(hp*y)*sin(hp*z);
49 
50  default:
51  libmesh_error_msg("Invalid component = " << component);
52  }
53  }
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: