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

#include <laplace_exact_solution.h>

Public Member Functions

 LaplaceExactSolution ()=default
 
 ~LaplaceExactSolution ()=default
 
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::LaplaceExactSolution ( )
default

◆ ~LaplaceExactSolution()

LaplaceExactSolution::~LaplaceExactSolution ( )
default

Member Function Documentation

◆ operator()()

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

Definition at line 31 of file laplace_exact_solution.h.

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

35  {
36  const Real hp = 0.5*pi;
37 
38  switch(component)
39  {
40  case 0:
41  return cos(hp*x)*sin(hp*y)*cos(hp*z);
42 
43  case 1:
44  return sin(hp*x)*cos(hp*y)*cos(hp*z);
45 
46  case 2:
47  return sin(hp*x)*cos(hp*y)*sin(hp*z);
48 
49  default:
50  libmesh_error_msg("Invalid component = " << component);
51  }
52  }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real pi
.
Definition: libmesh.h:274

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