本文整理汇总了C++中NodeSet::set_all_corner_nodes方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeSet::set_all_corner_nodes方法的具体用法?C++ NodeSet::set_all_corner_nodes怎么用?C++ NodeSet::set_all_corner_nodes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeSet
的用法示例。
在下文中一共展示了NodeSet::set_all_corner_nodes方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sample_points
NodeSet LinearPyramid::sample_points( NodeSet ) const
{
NodeSet result;
result.set_all_corner_nodes(PYRAMID);
result.clear_corner_node(4);
return result;
}
示例2: test_num_before
void NodeSetTest::test_num_before()
{
const EntityTopology type = HEXAHEDRON;
NodeSet set;
set.clear();
set.set_mid_face_node( 2 );
CPPUNIT_ASSERT_EQUAL( 0u, set.num_before_mid_face( 2 ) );
CPPUNIT_ASSERT_EQUAL( 1u, set.num_before_mid_face( 3 ) );
set.set_corner_node( 0 );
CPPUNIT_ASSERT_EQUAL( 1u, set.num_before_mid_face( 2 ) );
CPPUNIT_ASSERT_EQUAL( 2u, set.num_before_mid_face( 3 ) );
CPPUNIT_ASSERT_EQUAL( 0u, set.num_before_corner( 0 ) );
CPPUNIT_ASSERT_EQUAL( 1u, set.num_before_corner( 1 ) );
set.set_all_corner_nodes( type );
CPPUNIT_ASSERT_EQUAL( TopologyInfo::corners(type), set.num_before_mid_edge(0) );
CPPUNIT_ASSERT_EQUAL( TopologyInfo::corners(type)-1, set.num_before_corner(TopologyInfo::corners(type)-1) );
CPPUNIT_ASSERT_EQUAL( 0u, set.num_before_corner(0) );
CPPUNIT_ASSERT_EQUAL( 1u, set.num_before_corner(1) );
CPPUNIT_ASSERT_EQUAL( 2u, set.num_before_corner(2) );
CPPUNIT_ASSERT_EQUAL( 3u, set.num_before_corner(3) );
CPPUNIT_ASSERT_EQUAL( 4u, set.num_before_corner(4) );
const unsigned total_nodes = 27;
set.set_all_nodes( type );
CPPUNIT_ASSERT_EQUAL( total_nodes - 1, set.num_before_mid_region( 0 ) );
set.clear_mid_edge_node( 0 );
CPPUNIT_ASSERT_EQUAL( total_nodes - 2, set.num_before_mid_region( 0 ) );
set.clear_mid_edge_node( 1 );
CPPUNIT_ASSERT_EQUAL( total_nodes - 3, set.num_before_mid_region( 0 ) );
}
示例3: sample_points
NodeSet TriLagrangeShape::sample_points( NodeSet ns ) const
{
if (ns.have_any_mid_node()) {
ns.set_all_corner_nodes(TRIANGLE);
}
else {
ns.clear();
ns.set_mid_face_node(0);
}
return ns;
}
示例4: get_samples
MESQUITE_EXPORT
NodeSet get_samples( size_t element, NodeSet non_slave_nodes ) const
{
// If we have a mapping function, use it
const EntityTopology type = element_by_index(element).get_element_type();
const MappingFunction* f;
if (mSettings && (f = mSettings->get_mapping_function(type)))
return f->sample_points( non_slave_nodes );
// Otherwise default to sampling at all non-slave nodes
non_slave_nodes.set_all_corner_nodes(type);
return non_slave_nodes;
}
示例5: test_set_all
void NodeSetTest::test_set_all()
{
const EntityTopology types[] = { TRIANGLE, QUADRILATERAL,
TETRAHEDRON, HEXAHEDRON,
PRISM, PYRAMID };
const int num_types = sizeof(types)/sizeof(types[0]);
for (int i = 0; i < num_types; ++i) {
NodeSet set;
set.set_all_corner_nodes( types[i] );
check_range_set( types[i], set, 0 );
set.clear();
set.set_all_mid_edge_nodes( types[i] );
check_range_set( types[i], set, 1 );
set.clear();
set.set_all_mid_face_nodes( types[i] );
check_range_set( types[i], set, 2 );
set.clear();
set.set_all_mid_region_nodes( types[i] );
check_range_set( types[i], set, 3 );
}
}
示例6:
NodeSet
MappingFunction::sample_points( NodeSet higher_order ) const
{
higher_order.set_all_corner_nodes( element_topology() );
return higher_order;
}