MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Go to the source code of this file.
Classes | |
class | NodeSetTest |
Functions | |
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION (NodeSetTest,"NodeSetTest") | |
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION (NodeSetTest,"Unit") | |
static bool | check_all (EntityTopology type, NodeSet set, unsigned dim, bool value) |
static bool | check_range_set (EntityTopology type, NodeSet set, unsigned dim, bool value=true) |
Definition in file NodeSetTest.cpp.
static bool check_all | ( | EntityTopology | type, |
NodeSet | set, | ||
unsigned | dim, | ||
bool | value | ||
) | [static] |
Definition at line 312 of file NodeSetTest.cpp.
Referenced by NodeSetTest::test_clear_all().
static bool check_range_set | ( | EntityTopology | type, |
NodeSet | set, | ||
unsigned | dim, | ||
bool | value = true |
||
) | [static] |
Definition at line 320 of file NodeSetTest.cpp.
References dim, MBMesquite::NodeSet::NUM_CORNER_BITS, MBMesquite::NodeSet::NUM_EDGE_BITS, MBMesquite::NodeSet::NUM_FACE_BITS, MBMesquite::NodeSet::NUM_REGION_BITS, and value().
Referenced by NodeSetTest::test_set_all().
{ const unsigned max_count[] = { NodeSet::NUM_CORNER_BITS, NodeSet::NUM_EDGE_BITS, NodeSet::NUM_FACE_BITS, NodeSet::NUM_REGION_BITS }; // test that any bits corresponding to some other dimension are not set. for( unsigned d = 0; d <= 3; ++d ) { if( d == dim ) continue; for( unsigned i = 0; i < max_count[d]; ++i ) if( !set.node( Sample( d, i ) ) != value ) return false; } // test that any bits for this dimension beyond the number for this // type are not set for( unsigned i = TopologyInfo::adjacent( type, dim ); i < max_count[dim]; ++i ) if( !set.node( Sample( dim, i ) ) != value ) return false; // test that any bits for the type and dimension are set for( unsigned i = 0; i < TopologyInfo::adjacent( type, dim ); ++i ) if( set.node( Sample( dim, i ) ) == value ) return false; return true; }
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION | ( | NodeSetTest | , |
"NodeSetTest" | |||
) |
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION | ( | NodeSetTest | , |
"Unit" | |||
) |