libMesh
Classes | Functions
default_coupling_test.C File Reference

Go to the source code of this file.

Classes

class  DefaultCouplingTest
 

Functions

Number cubic_default_coupling_test (const Point &p, const Parameters &, const std::string &, const std::string &)
 
 CPPUNIT_TEST_SUITE_REGISTRATION (DefaultCouplingTest)
 

Function Documentation

◆ CPPUNIT_TEST_SUITE_REGISTRATION()

CPPUNIT_TEST_SUITE_REGISTRATION ( DefaultCouplingTest  )

◆ cubic_default_coupling_test()

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

Definition at line 17 of file default_coupling_test.C.

References libMesh::Real.

Referenced by DefaultCouplingTest::testCoupling().

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