libMesh
Classes | Functions
point_neighbor_coupling_test.C File Reference

Go to the source code of this file.

Classes

class  PointNeighborCouplingTest
 

Functions

Number cubic_point_neighbor_coupling_test (const Point &p, const Parameters &, const std::string &, const std::string &)
 
 CPPUNIT_TEST_SUITE_REGISTRATION (PointNeighborCouplingTest)
 

Function Documentation

◆ CPPUNIT_TEST_SUITE_REGISTRATION()

CPPUNIT_TEST_SUITE_REGISTRATION ( PointNeighborCouplingTest  )

◆ cubic_point_neighbor_coupling_test()

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

Definition at line 18 of file point_neighbor_coupling_test.C.

References libMesh::Real.

Referenced by PointNeighborCouplingTest::testCoupling().

22 {
23  const Real & x = p(0);
24  const Real & y = LIBMESH_DIM > 1 ? p(1) : 0;
25  const Real & z = LIBMESH_DIM > 2 ? p(2) : 0;
26 
27  return x*(1-x)*(1-x) + x*x*(1-y) + x*(1-y)*(1-z) + y*(1-y)*z + z*(1-z)*(1-z);
28 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real