libMesh
Classes | Functions
fe_test.h File Reference

Go to the source code of this file.

Classes

class  FETest< order, family, elem_type >
 

Functions

Number linear_test (const Point &p, const Parameters &, const std::string &, const std::string &)
 
Gradient linear_test_grad (const Point &, const Parameters &, const std::string &, const std::string &)
 

Function Documentation

Number linear_test ( const Point p,
const Parameters ,
const std::string &  ,
const std::string &   
)

Definition at line 32 of file fe_test.h.

References libMesh::Real, and libMesh::x.

Referenced by FETest< order, family, elem_type >::setUp().

36 {
37  const Real & x = p(0);
38  const Real & y = (LIBMESH_DIM > 1) ? p(1) : 0;
39  const Real & z = (LIBMESH_DIM > 2) ? p(2) : 0;
40 
41  return x + 0.25*y + 0.0625*z;
42 }
PetscErrorCode Vec x
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Gradient linear_test_grad ( const Point ,
const Parameters ,
const std::string &  ,
const std::string &   
)

Definition at line 45 of file fe_test.h.

Referenced by FETest< order, family, elem_type >::setUp().

49 {
50  Gradient grad = 1;
51  if (LIBMESH_DIM > 1)
52  grad(1) = 0.25;
53  if (LIBMESH_DIM > 2)
54  grad(2) = 0.0625;
55 
56  return grad;
57 }