libMesh
Classes | Functions
systems_test.C File Reference

Go to the source code of this file.

Classes

class  SystemsTest
 

Functions

Number cubic_test (const Point &p, const Parameters &, const std::string &, const std::string &)
 
 CPPUNIT_TEST_SUITE_REGISTRATION (SystemsTest)
 

Function Documentation

CPPUNIT_TEST_SUITE_REGISTRATION ( SystemsTest  )
Number cubic_test ( const Point p,
const Parameters ,
const std::string &  ,
const std::string &   
)

Definition at line 28 of file systems_test.C.

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

Referenced by SystemsTest::testProjectCube(), SystemsTest::testProjectCubeWithMeshFunction(), SystemsTest::testProjectLine(), and SystemsTest::testProjectSquare().

32 {
33  const Real & x = p(0);
34  const Real & y = p(1);
35  const Real & z = p(2);
36 
37  return x*(1-x)*(1-x) + x*x*(1-y) + x*(1-y)*(1-z) + y*(1-y)*z + z*(1-z)*(1-z);
38 }
PetscErrorCode Vec x
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real