MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <NodeSet.hpp>
Public Types | |
typedef unsigned | BitSet |
Public Member Functions | |
NodeSet () | |
void | clear () |
Clear all values. | |
void | set_all_nodes (EntityTopology type) |
Set all marks/flags. | |
unsigned | num_nodes () const |
Number of marked/flagged nodes. | |
BitSet | have_any_mid_node () const |
Check if any mid-nodes (higher-order nodes) are flaged. | |
BitSet | have_any_corner_node () const |
Check if any corner nodes are present. | |
BitSet | have_any_mid_edge_node () const |
Check if any mid-edge nodes are present. | |
BitSet | have_any_mid_face_node () const |
Check if any mid-face nodes are present. | |
BitSet | have_any_mid_region_node () const |
Check if any mid-region nodes are present. | |
void | set_corner_node (unsigned num) |
Mark/flag corner node. | |
void | set_mid_edge_node (unsigned num) |
Mark/flag mid-edge node. | |
void | set_mid_face_node (unsigned num) |
Mark/flag mid-face node. | |
void | set_mid_region_node (unsigned num=0) |
Mark/flag mid-region node. | |
void | set_node (Sample sample) |
Mark/flag node. | |
void | clear_corner_node (unsigned num) |
un-mark (clear flag for) corner node | |
void | clear_mid_edge_node (unsigned num) |
un-mark (clear flag for) mid-edge node | |
void | clear_mid_face_node (unsigned num) |
un-mark (clear flag for) mid-face node | |
void | clear_mid_region_node (unsigned num=0) |
un-mark (clear flag for) mid-region node | |
void | clear_node (Sample sample) |
un-mark (clear flag for) node | |
bool | corner_node (unsigned num) const |
Get mark/flag for corner node. | |
bool | mid_edge_node (unsigned num) const |
Get mark/flag for mid-edge node. | |
bool | both_edge_nodes (unsigned num1, unsigned num2) const |
Test if two mid-edge nodes are both present. | |
bool | mid_face_node (unsigned num) const |
Get mark/flag for mid-face node. | |
bool | mid_region_node (unsigned num=0) const |
Get mark/flag for mid-region node. | |
bool | node (Sample sample) const |
Get mark/flag for node. | |
void | set_all_corner_nodes (EntityTopology type) |
Set all corner nodes. | |
void | set_all_mid_edge_nodes (EntityTopology type) |
Set all mid-edge nodes. | |
void | set_all_mid_face_nodes (EntityTopology type) |
Set all mid-face nodes. | |
void | set_all_mid_region_nodes (EntityTopology type) |
Set all mid-region nodes. | |
void | clear_all_mid_nodes () |
Clear all mid-nodes. | |
void | clear_all_corner_nodes () |
Clear all corner nodes. | |
void | clear_all_mid_edge_nodes () |
Clear all mid-edge nodes. | |
void | clear_all_mid_face_nodes () |
Clear all mid-face nodes. | |
void | clear_all_mid_region_nodes () |
Clear all mid-region nodes. | |
unsigned | num_before_corner (unsigned num) const |
Get number of marked/flagged nodes preceeding a specified corner node in the list. | |
unsigned | num_before_mid_edge (unsigned num) const |
Get number of marked/flagged nodes preceeding a specified mid-edge node in the list. | |
unsigned | num_before_mid_face (unsigned num) const |
Get number of marked/flagged nodes preceeding a specified mid-face node in the list. | |
unsigned | num_before_mid_region (unsigned num) const |
Get number of marked/flagged nodes preceeding a specified mid-region node in the list. | |
unsigned | num_before (Sample sample) const |
Get number of marked/flagged nodes preceeding a specified node in the list. | |
unsigned | get_bits () const |
Static Public Member Functions | |
static unsigned | corner_node_position (unsigned num) |
Position of a corner node in the list. | |
static unsigned | mid_edge_node_position (unsigned num) |
Position of a mid-edge node in the list. | |
static unsigned | mid_face_node_position (unsigned num) |
Position of a mid-face node in the list. | |
static unsigned | mid_region_node_position (unsigned num=0) |
Position of a mid-region node in the list. | |
static unsigned | position (Sample sample) |
Position of a node in the list. | |
Static Public Attributes | |
static const BitSet | NUM_TOTAL_BITS = 8 * sizeof( BitSet ) |
static const BitSet | MSB_POS = NUM_TOTAL_BITS - 1 |
static const BitSet | NUM_CORNER_BITS = 8 |
Maximum number of corner nodes. | |
static const BitSet | NUM_EDGE_BITS = 16 |
Maximum number of mid-edge nodes. | |
static const BitSet | NUM_REGION_BITS = 1 |
Maximum number of mid-volume nodes. | |
static const BitSet | NUM_FACE_BITS = NUM_TOTAL_BITS - ( NUM_CORNER_BITS + NUM_EDGE_BITS + NUM_REGION_BITS ) |
Maximum number of mid-face nodes. | |
static const BitSet | CORNER_OFFSET = 0 |
LSB of corner node storage. | |
static const BitSet | EDGE_OFFSET = CORNER_OFFSET + NUM_CORNER_BITS |
LSB of mid-edgee storage. | |
static const BitSet | FACE_OFFSET = EDGE_OFFSET + NUM_EDGE_BITS |
LSB of mid-face storage. | |
static const BitSet | REGION_OFFSET = FACE_OFFSET + NUM_FACE_BITS |
LSB of mid-region storage. | |
static const BitSet | MID_NODE_MASK = ( ~0u ) << NUM_CORNER_BITS |
Bit mask for all non-corner bits. | |
static const BitSet | CORNER_MASK = ~MID_NODE_MASK |
Bit mask for all corner bits. | |
static const BitSet | REGION_MASK = ~( ( ~0u ) >> NUM_REGION_BITS ) |
Mid-region mask. | |
static const BitSet | EDGE_MASK |
Bit mask for all mid-edge nodes. | |
static const BitSet | FACE_MASK = ~( CORNER_MASK | EDGE_MASK | REGION_MASK ) |
Bit mask for all mid-face nodes. | |
Private Member Functions | |
bool | bit_to_bool (unsigned num) const |
Return a bool value indicating the state of the specified bit. | |
void | set_bit (unsigned num) |
Set the specified bit to 1. | |
void | set_bits (unsigned start_bit, unsigned count) |
void | clear_bit (unsigned num) |
Clear the specified bit (set it to zero) | |
unsigned | num_before_bit (unsigned p_position) const |
Private Attributes | |
BitSet | bits |
The data, one bit for each possible node location. |
Utility class for storing one boolean mark/flag for each node in an element
Definition at line 51 of file NodeSet.hpp.
typedef unsigned MBMesquite::NodeSet::BitSet |
Definition at line 54 of file NodeSet.hpp.
MBMesquite::NodeSet::NodeSet | ( | ) | [inline] |
Definition at line 128 of file NodeSet.hpp.
bool MBMesquite::NodeSet::bit_to_bool | ( | unsigned | num | ) | const [inline, private] |
Return a bool value indicating the state of the specified bit.
Definition at line 97 of file NodeSet.hpp.
References u.
bool MBMesquite::NodeSet::both_edge_nodes | ( | unsigned | num1, |
unsigned | num2 | ||
) | const [inline] |
Test if two mid-edge nodes are both present.
Definition at line 308 of file NodeSet.hpp.
References b.
Referenced by MBMesquite::derivatives_at_mid_elem().
{ BitSet b = ( 1 << mid_edge_node_position( num1 ) ) | ( 1 << mid_edge_node_position( num2 ) ); return ( bits & b ) == b; }
void MBMesquite::NodeSet::clear | ( | ) | [inline] |
Clear all values.
Definition at line 131 of file NodeSet.hpp.
References u.
Referenced by MBMesquite::TriLagrangeShape::sample_points(), MBMesquite::TetLagrangeShape::sample_points(), TriLagrangeShapeTest::test_coeff_center(), TriLagrangeShapeTest::test_coeff_corners(), TriLagrangeShapeTest::test_coeff_edges(), TriLagrangeShapeTest::test_deriv_center(), TriLagrangeShapeTest::test_deriv_corners(), TriLagrangeShapeTest::test_deriv_edges(), NodeSetTest::test_have_any(), NodeSetTest::test_num_before(), and NodeSetTest::test_num_nodes().
void MBMesquite::NodeSet::clear_all_corner_nodes | ( | ) | [inline] |
void MBMesquite::NodeSet::clear_all_mid_edge_nodes | ( | ) | [inline] |
void MBMesquite::NodeSet::clear_all_mid_face_nodes | ( | ) | [inline] |
void MBMesquite::NodeSet::clear_all_mid_nodes | ( | ) | [inline] |
void MBMesquite::NodeSet::clear_all_mid_region_nodes | ( | ) | [inline] |
void MBMesquite::NodeSet::clear_bit | ( | unsigned | num | ) | [inline, private] |
void MBMesquite::NodeSet::clear_corner_node | ( | unsigned | num | ) | [inline] |
un-mark (clear flag for) corner node
Definition at line 256 of file NodeSet.hpp.
Referenced by MBMesquite::LinearPyramid::sample_points().
{ clear_bit( corner_node_position( num ) ); }
void MBMesquite::NodeSet::clear_mid_edge_node | ( | unsigned | num | ) | [inline] |
un-mark (clear flag for) mid-edge node
Definition at line 261 of file NodeSet.hpp.
Referenced by TriLagrangeShapeTest::test_coeff_center(), TriLagrangeShapeTest::test_coeff_corners(), TriLagrangeShapeTest::test_coeff_edges(), TriLagrangeShapeTest::test_deriv_center(), TriLagrangeShapeTest::test_deriv_corners(), and TriLagrangeShapeTest::test_deriv_edges().
{ clear_bit( mid_edge_node_position( num ) ); }
void MBMesquite::NodeSet::clear_mid_face_node | ( | unsigned | num | ) | [inline] |
un-mark (clear flag for) mid-face node
Definition at line 266 of file NodeSet.hpp.
{ clear_bit( mid_face_node_position( num ) ); }
void MBMesquite::NodeSet::clear_mid_region_node | ( | unsigned | num = 0 | ) | [inline] |
un-mark (clear flag for) mid-region node
Definition at line 271 of file NodeSet.hpp.
{ clear_bit( mid_region_node_position( num ) ); }
void MBMesquite::NodeSet::clear_node | ( | Sample | sample | ) | [inline] |
un-mark (clear flag for) node
Definition at line 276 of file NodeSet.hpp.
References MBMesquite::Sample::dimension, and MBMesquite::Sample::number.
{ switch( sample.dimension ) { case 0: clear_corner_node( sample.number ); break; case 1: clear_mid_edge_node( sample.number ); break; case 2: clear_mid_face_node( sample.number ); break; case 3: clear_mid_region_node( sample.number ); break; default: assert( 0 ); } }
bool MBMesquite::NodeSet::corner_node | ( | unsigned | num | ) | const [inline] |
Get mark/flag for corner node.
Definition at line 298 of file NodeSet.hpp.
Referenced by MBMesquite::append_elem_samples(), MBMesquite::MsqMeshEntity::check_element_orientation(), MBMesquite::PatchData::get_samples(), and MBMesquite::populate_data().
{ return bit_to_bool( corner_node_position( num ) ); }
static unsigned MBMesquite::NodeSet::corner_node_position | ( | unsigned | num | ) | [inline, static] |
Position of a corner node in the list.
Definition at line 172 of file NodeSet.hpp.
{ assert( num < NUM_CORNER_BITS ); return num + CORNER_OFFSET; }
unsigned MBMesquite::NodeSet::get_bits | ( | ) | const [inline] |
Definition at line 424 of file NodeSet.hpp.
{ return bits; }
BitSet MBMesquite::NodeSet::have_any_corner_node | ( | ) | const [inline] |
Check if any corner nodes are present.
Definition at line 151 of file NodeSet.hpp.
Referenced by MBMesquite::MsqMeshEntity::check_element_orientation(), and MsqMeshEntityTest::test_all_nodes().
{ return bits & CORNER_MASK; }
BitSet MBMesquite::NodeSet::have_any_mid_edge_node | ( | ) | const [inline] |
Check if any mid-edge nodes are present.
Definition at line 156 of file NodeSet.hpp.
Referenced by MBMesquite::MsqMeshEntity::check_element_orientation(), and MsqMeshEntityTest::test_all_nodes().
BitSet MBMesquite::NodeSet::have_any_mid_face_node | ( | ) | const [inline] |
Check if any mid-face nodes are present.
Definition at line 161 of file NodeSet.hpp.
Referenced by MBMesquite::MsqMeshEntity::check_element_orientation(), MBMesquite::TriLagrangeShape::coefficients(), MBMesquite::TetLagrangeShape::coefficients(), MBMesquite::TriLagrangeShape::derivatives(), MBMesquite::TetLagrangeShape::derivatives(), and MsqMeshEntityTest::test_all_nodes().
BitSet MBMesquite::NodeSet::have_any_mid_node | ( | ) | const [inline] |
Check if any mid-nodes (higher-order nodes) are flaged.
Definition at line 146 of file NodeSet.hpp.
Referenced by MBMesquite::LinearTriangle::coefficients(), MBMesquite::LinearTetrahedron::coefficients(), MBMesquite::LinearPrism::coefficients(), MBMesquite::LinearQuadrilateral::coefficients(), MBMesquite::LinearHexahedron::coefficients(), MBMesquite::QuadLagrangeShape::coefficients(), MBMesquite::LinearPyramid::coefficients(), MBMesquite::LinearTriangle::derivatives(), MBMesquite::LinearTetrahedron::derivatives(), MBMesquite::LinearPrism::derivatives(), MBMesquite::LinearHexahedron::derivatives(), MBMesquite::LinearQuadrilateral::derivatives(), MBMesquite::TriLagrangeShape::derivatives(), MBMesquite::QuadLagrangeShape::derivatives(), MBMesquite::TetLagrangeShape::derivatives(), MBMesquite::LinearPyramid::derivatives(), MBMesquite::derivatives_at_mid_edge(), MBMesquite::derivatives_at_mid_elem(), MBMesquite::TriLagrangeShape::sample_points(), and MBMesquite::TetLagrangeShape::sample_points().
{ return bits & MID_NODE_MASK; }
BitSet MBMesquite::NodeSet::have_any_mid_region_node | ( | ) | const [inline] |
Check if any mid-region nodes are present.
Definition at line 166 of file NodeSet.hpp.
Referenced by MBMesquite::MsqMeshEntity::check_element_orientation(), MBMesquite::TetLagrangeShape::coefficients(), MBMesquite::TetLagrangeShape::derivatives(), and MsqMeshEntityTest::test_all_nodes().
{ return bits & REGION_MASK; }
bool MBMesquite::NodeSet::mid_edge_node | ( | unsigned | num | ) | const [inline] |
Get mark/flag for mid-edge node.
Definition at line 303 of file NodeSet.hpp.
Referenced by MBMesquite::append_elem_samples(), MBMesquite::MsqMeshEntity::check_element_orientation(), check_valid_indices(), MBMesquite::TriLagrangeShape::coefficients(), MBMesquite::QuadLagrangeShape::coefficients(), MBMesquite::coefficients_at_mid_edge(), MBMesquite::coefficients_at_mid_elem(), MBMesquite::coefficients_at_mid_face(), compare_coefficients(), MBMesquite::derivatives_at_corner(), MBMesquite::derivatives_at_mid_edge(), MBMesquite::derivatives_at_mid_elem(), MBMesquite::derivatives_at_mid_face(), eval(), get_coeff(), get_derivs(), MBMesquite::PatchData::get_samples(), and MBMesquite::populate_data().
{ return bit_to_bool( mid_edge_node_position( num ) ); }
static unsigned MBMesquite::NodeSet::mid_edge_node_position | ( | unsigned | num | ) | [inline, static] |
Position of a mid-edge node in the list.
Definition at line 178 of file NodeSet.hpp.
{ assert( num < NUM_EDGE_BITS ); return num + EDGE_OFFSET; }
bool MBMesquite::NodeSet::mid_face_node | ( | unsigned | num | ) | const [inline] |
Get mark/flag for mid-face node.
Definition at line 314 of file NodeSet.hpp.
Referenced by MBMesquite::append_elem_samples(), MBMesquite::MsqMeshEntity::check_element_orientation(), check_valid_indices(), MBMesquite::QuadLagrangeShape::coefficients(), compare_coefficients(), MBMesquite::derivatives_at_mid_edge(), eval(), MBMesquite::PatchData::get_samples(), and MBMesquite::populate_data().
{ return bit_to_bool( mid_face_node_position( num ) ); }
static unsigned MBMesquite::NodeSet::mid_face_node_position | ( | unsigned | num | ) | [inline, static] |
Position of a mid-face node in the list.
Definition at line 184 of file NodeSet.hpp.
{ assert( num < NUM_FACE_BITS ); return num + FACE_OFFSET; }
bool MBMesquite::NodeSet::mid_region_node | ( | unsigned | num = 0 | ) | const [inline] |
Get mark/flag for mid-region node.
Definition at line 319 of file NodeSet.hpp.
Referenced by MBMesquite::append_elem_samples(), MBMesquite::PatchData::get_samples(), and MBMesquite::populate_data().
{ return bit_to_bool( mid_region_node_position( num ) ); }
static unsigned MBMesquite::NodeSet::mid_region_node_position | ( | unsigned | num = 0 | ) | [inline, static] |
Position of a mid-region node in the list.
Definition at line 190 of file NodeSet.hpp.
{ assert( num < NUM_REGION_BITS ); return num + REGION_OFFSET; }
bool MBMesquite::NodeSet::node | ( | Sample | sample | ) | const [inline] |
Get mark/flag for node.
Definition at line 324 of file NodeSet.hpp.
References MBMesquite::Sample::dimension, and MBMesquite::Sample::number.
{ switch( sample.dimension ) { case 0: return corner_node( sample.number ); break; case 1: return mid_edge_node( sample.number ); break; case 2: return mid_face_node( sample.number ); break; case 3: return mid_region_node( sample.number ); break; default: assert( 0 ); return false; } }
unsigned MBMesquite::NodeSet::num_before | ( | Sample | sample | ) | const [inline] |
Get number of marked/flagged nodes preceeding a specified node in the list.
Definition at line 402 of file NodeSet.hpp.
References MBMesquite::Sample::dimension, MBMesquite::Sample::number, and u.
Referenced by MBMesquite::TargetReader::get_2D_target(), MBMesquite::CachingTargetCalculator::get_2D_target(), MBMesquite::TargetReader::get_3D_target(), MBMesquite::CachingTargetCalculator::get_3D_target(), MBMesquite::TargetReader::get_surface_target(), MBMesquite::CachingTargetCalculator::get_surface_target(), and MBMesquite::WeightReader::get_weight().
{ switch( sample.dimension ) { case 0: return num_before_corner( sample.number ); break; case 1: return num_before_mid_edge( sample.number ); break; case 2: return num_before_mid_face( sample.number ); break; case 3: return num_before_mid_region( sample.number ); break; default: assert( 0 ); return ~0u; } }
unsigned MBMesquite::NodeSet::num_before_bit | ( | unsigned | p_position | ) | const [inline, private] |
Count the number of non-zero bits with less significance than the specified bit. (Mask out all bits except those of before the specified position and then count the remaining bits.)
Definition at line 122 of file NodeSet.hpp.
References MBMesquite::popcount(), and u.
unsigned MBMesquite::NodeSet::num_before_corner | ( | unsigned | num | ) | const [inline] |
Get number of marked/flagged nodes preceeding a specified corner node in the list.
Definition at line 382 of file NodeSet.hpp.
{ return num_before_bit( corner_node_position( num ) ); }
unsigned MBMesquite::NodeSet::num_before_mid_edge | ( | unsigned | num | ) | const [inline] |
Get number of marked/flagged nodes preceeding a specified mid-edge node in the list.
Definition at line 387 of file NodeSet.hpp.
{ return num_before_bit( mid_edge_node_position( num ) ); }
unsigned MBMesquite::NodeSet::num_before_mid_face | ( | unsigned | num | ) | const [inline] |
Get number of marked/flagged nodes preceeding a specified mid-face node in the list.
Definition at line 392 of file NodeSet.hpp.
{ return num_before_bit( mid_face_node_position( num ) ); }
unsigned MBMesquite::NodeSet::num_before_mid_region | ( | unsigned | num | ) | const [inline] |
Get number of marked/flagged nodes preceeding a specified mid-region node in the list.
Definition at line 397 of file NodeSet.hpp.
{ return num_before_bit( mid_region_node_position( num ) ); }
unsigned MBMesquite::NodeSet::num_nodes | ( | ) | const [inline] |
Number of marked/flagged nodes.
Definition at line 140 of file NodeSet.hpp.
References MBMesquite::popcount().
Referenced by MBMesquite::append_elem_samples(), MBMesquite::MsqMeshEntity::check_element_orientation(), MBMesquite::HexLagrangeShape::coefficients(), MBMesquite::HexLagrangeShape::derivatives(), MBMesquite::TargetReader::get_2D_target(), MBMesquite::TargetReader::get_3D_target(), MBMesquite::PatchData::get_samples(), MBMesquite::TargetReader::get_surface_target(), MBMesquite::WeightReader::get_weight(), MBMesquite::CachingTargetCalculator::notify_sub_patch(), MBMesquite::populate_data(), MsqMeshEntityTest::test_all_nodes(), QualityAssessorTest::test_basic_stats_sample(), QualityMetricTester::test_get_sample_evaluations(), and QualityMetricTester::test_get_sample_indices().
static unsigned MBMesquite::NodeSet::position | ( | Sample | sample | ) | [inline, static] |
Position of a node in the list.
Definition at line 196 of file NodeSet.hpp.
References MBMesquite::Sample::dimension, MBMesquite::Sample::number, and u.
{ switch( sample.dimension ) { case 0: return corner_node_position( sample.number ); case 1: return mid_edge_node_position( sample.number ); case 2: return mid_face_node_position( sample.number ); case 3: return mid_region_node_position( sample.number ); } assert( 0 ); return ~0u; }
void MBMesquite::NodeSet::set_all_corner_nodes | ( | EntityTopology | type | ) | [inline] |
Set all corner nodes.
Definition at line 435 of file NodeSet.hpp.
References CORNER_OFFSET, corners, and set_bits().
Referenced by MBMesquite::MsqMeshEntity::all_nodes(), MBMesquite::get_nodeset(), MBMesquite::PatchData::get_samples(), MBMesquite::PatchData::non_slave_node_set(), MBMesquite::TriLagrangeShape::sample_points(), MBMesquite::TetLagrangeShape::sample_points(), MBMesquite::LinearPyramid::sample_points(), MBMesquite::MappingFunction::sample_points(), set_all_nodes(), and NodeSetTest::test_set_all().
{ set_bits( CORNER_OFFSET, TopologyInfo::corners( p_type ) ); }
void MBMesquite::NodeSet::set_all_mid_edge_nodes | ( | EntityTopology | type | ) | [inline] |
Set all mid-edge nodes.
Definition at line 440 of file NodeSet.hpp.
References EDGE_OFFSET, edges, and set_bits().
Referenced by MBMesquite::MsqMeshEntity::all_nodes(), MBMesquite::get_nodeset(), and set_all_nodes().
{ set_bits( EDGE_OFFSET, TopologyInfo::edges( p_type ) ); }
void MBMesquite::NodeSet::set_all_mid_face_nodes | ( | EntityTopology | type | ) | [inline] |
Set all mid-face nodes.
Definition at line 445 of file NodeSet.hpp.
References FACE_OFFSET, MBMesquite::faces, and set_bits().
Referenced by MBMesquite::MsqMeshEntity::all_nodes(), MBMesquite::get_nodeset(), and set_all_nodes().
{ set_bits( FACE_OFFSET, TopologyInfo::faces( p_type ) ); }
void MBMesquite::NodeSet::set_all_mid_region_nodes | ( | EntityTopology | type | ) | [inline] |
Set all mid-region nodes.
Definition at line 450 of file NodeSet.hpp.
References set_mid_region_node().
Referenced by MBMesquite::MsqMeshEntity::all_nodes().
{ set_mid_region_node(); }
void MBMesquite::NodeSet::set_all_nodes | ( | EntityTopology | type | ) | [inline] |
Set all marks/flags.
Definition at line 455 of file NodeSet.hpp.
References set_all_corner_nodes(), set_all_mid_edge_nodes(), set_all_mid_face_nodes(), and set_mid_region_node().
Referenced by HexLagrangeShapeTest::setUp(), NodeSetTest::test_clear_all(), and NodeSetTest::test_clear_node().
{ switch( TopologyInfo::dimension( p_type ) ) { case 3: set_mid_region_node(); case 2: set_all_mid_face_nodes( p_type ); case 1: set_all_mid_edge_nodes( p_type ); case 0: set_all_corner_nodes( p_type ); } }
void MBMesquite::NodeSet::set_bit | ( | unsigned | num | ) | [inline, private] |
void MBMesquite::NodeSet::set_bits | ( | unsigned | start_bit, |
unsigned | count | ||
) | [inline, private] |
Definition at line 108 of file NodeSet.hpp.
Referenced by set_all_corner_nodes(), set_all_mid_edge_nodes(), and set_all_mid_face_nodes().
{ bits |= ( ~( (BitSet)0 ) >> ( NUM_TOTAL_BITS - count ) ) << start_bit; }
void MBMesquite::NodeSet::set_corner_node | ( | unsigned | num | ) | [inline] |
Mark/flag corner node.
Definition at line 214 of file NodeSet.hpp.
References moab::set_bit().
Referenced by NodeSetTest::test_clear(), and NodeSetTest::test_set_node().
{ set_bit( corner_node_position( num ) ); }
void MBMesquite::NodeSet::set_mid_edge_node | ( | unsigned | num | ) | [inline] |
Mark/flag mid-edge node.
Definition at line 219 of file NodeSet.hpp.
References moab::set_bit().
Referenced by LinearMappingFunctionTest::do_coeff_test(), LinearMappingFunctionTest::do_deriv_test(), nodeset_from_bits(), MBMesquite::PatchData::non_slave_node_set(), TriLagrangeShapeTest::test_coeff_center(), TriLagrangeShapeTest::test_coeff_corners(), TriLagrangeShapeTest::test_coeff_edges(), TriLagrangeShapeTest::test_deriv_center(), TriLagrangeShapeTest::test_deriv_corners(), and TriLagrangeShapeTest::test_deriv_edges().
{ set_bit( mid_edge_node_position( num ) ); }
void MBMesquite::NodeSet::set_mid_face_node | ( | unsigned | num | ) | [inline] |
Mark/flag mid-face node.
Definition at line 224 of file NodeSet.hpp.
References moab::set_bit().
Referenced by nodeset_from_bits(), MBMesquite::PatchData::non_slave_node_set(), MBMesquite::LinearTriangle::sample_points(), MBMesquite::TriLagrangeShape::sample_points(), CenterMF2D::sample_points(), TetLagrangeShapeTest::test_mid_face_node_coeff(), and TetLagrangeShapeTest::test_mid_face_node_deriv().
{ set_bit( mid_face_node_position( num ) ); }
void MBMesquite::NodeSet::set_mid_region_node | ( | unsigned | num = 0 | ) | [inline] |
Mark/flag mid-region node.
Definition at line 229 of file NodeSet.hpp.
References moab::set_bit().
Referenced by MBMesquite::get_nodeset(), nodeset_from_bits(), MBMesquite::PatchData::non_slave_node_set(), MBMesquite::LinearTetrahedron::sample_points(), MBMesquite::TetLagrangeShape::sample_points(), CenterMF3D::sample_points(), set_all_mid_region_nodes(), set_all_nodes(), TetLagrangeShapeTest::test_mid_elem_node_coeff(), and TetLagrangeShapeTest::test_mid_elem_node_deriv().
{ set_bit( mid_region_node_position( num ) ); }
void MBMesquite::NodeSet::set_node | ( | Sample | sample | ) | [inline] |
Mark/flag node.
Definition at line 234 of file NodeSet.hpp.
References MBMesquite::Sample::dimension, and MBMesquite::Sample::number.
{ switch( sample.dimension ) { case 0: set_corner_node( sample.number ); break; case 1: set_mid_edge_node( sample.number ); break; case 2: set_mid_face_node( sample.number ); break; case 3: set_mid_region_node( sample.number ); break; default: assert( 0 ); } }
BitSet MBMesquite::NodeSet::bits [private] |
The data, one bit for each possible node location.
Definition at line 94 of file NodeSet.hpp.
const BitSet MBMesquite::NodeSet::CORNER_MASK = ~MID_NODE_MASK [static] |
Bit mask for all corner bits.
Definition at line 83 of file NodeSet.hpp.
const BitSet MBMesquite::NodeSet::CORNER_OFFSET = 0 [static] |
LSB of corner node storage.
Definition at line 72 of file NodeSet.hpp.
Referenced by set_all_corner_nodes(), NodeSetTest::test_clear_node(), and NodeSetTest::test_set_node().
const BitSet MBMesquite::NodeSet::EDGE_MASK [static] |
( MID_NODE_MASK << ( NUM_TOTAL_BITS - EDGE_OFFSET - NUM_EDGE_BITS ) ) >> ( NUM_TOTAL_BITS - EDGE_OFFSET - NUM_EDGE_BITS )
Bit mask for all mid-edge nodes.
Definition at line 87 of file NodeSet.hpp.
const BitSet MBMesquite::NodeSet::EDGE_OFFSET = CORNER_OFFSET + NUM_CORNER_BITS [static] |
LSB of mid-edgee storage.
Definition at line 74 of file NodeSet.hpp.
Referenced by set_all_mid_edge_nodes(), NodeSetTest::test_clear_node(), and NodeSetTest::test_set_node().
const BitSet MBMesquite::NodeSet::FACE_MASK = ~( CORNER_MASK | EDGE_MASK | REGION_MASK ) [static] |
Bit mask for all mid-face nodes.
Definition at line 90 of file NodeSet.hpp.
const BitSet MBMesquite::NodeSet::FACE_OFFSET = EDGE_OFFSET + NUM_EDGE_BITS [static] |
LSB of mid-face storage.
Definition at line 76 of file NodeSet.hpp.
Referenced by set_all_mid_face_nodes(), NodeSetTest::test_clear_node(), and NodeSetTest::test_set_node().
const BitSet MBMesquite::NodeSet::MID_NODE_MASK = ( ~0u ) << NUM_CORNER_BITS [static] |
Bit mask for all non-corner bits.
Definition at line 81 of file NodeSet.hpp.
const BitSet MBMesquite::NodeSet::MSB_POS = NUM_TOTAL_BITS - 1 [static] |
Definition at line 61 of file NodeSet.hpp.
const BitSet MBMesquite::NodeSet::NUM_CORNER_BITS = 8 [static] |
Maximum number of corner nodes.
Definition at line 63 of file NodeSet.hpp.
Referenced by check_range_set(), MBMesquite::operator<<(), NodeSetTest::test_have_any(), NodeSetTest::test_set_get_clear_dim(), NodeSetTest::test_set_get_clear_simple(), and NodeSetTest::test_set_node().
const BitSet MBMesquite::NodeSet::NUM_EDGE_BITS = 16 [static] |
Maximum number of mid-edge nodes.
Definition at line 65 of file NodeSet.hpp.
Referenced by check_range_set(), MBMesquite::operator<<(), NodeSetTest::test_have_any(), NodeSetTest::test_set_get_clear_dim(), NodeSetTest::test_set_get_clear_simple(), and NodeSetTest::test_set_node().
const BitSet MBMesquite::NodeSet::NUM_FACE_BITS = NUM_TOTAL_BITS - ( NUM_CORNER_BITS + NUM_EDGE_BITS + NUM_REGION_BITS ) [static] |
Maximum number of mid-face nodes.
Definition at line 69 of file NodeSet.hpp.
Referenced by check_range_set(), MBMesquite::operator<<(), NodeSetTest::test_have_any(), NodeSetTest::test_set_get_clear_dim(), NodeSetTest::test_set_get_clear_simple(), and NodeSetTest::test_set_node().
const BitSet MBMesquite::NodeSet::NUM_REGION_BITS = 1 [static] |
Maximum number of mid-volume nodes.
Definition at line 67 of file NodeSet.hpp.
Referenced by check_range_set(), MBMesquite::operator<<(), NodeSetTest::test_have_any(), NodeSetTest::test_set_get_clear_dim(), NodeSetTest::test_set_get_clear_simple(), and NodeSetTest::test_set_node().
const BitSet MBMesquite::NodeSet::NUM_TOTAL_BITS = 8 * sizeof( BitSet ) [static] |
Misc constants. Only NUM_CORNER_BITS, NUM_EDGE_BITS, and NUM_REGION_BITS should be modified. All other contants are a function of those three values and the size of the bit storage.
Definition at line 60 of file NodeSet.hpp.
const BitSet MBMesquite::NodeSet::REGION_MASK = ~( ( ~0u ) >> NUM_REGION_BITS ) [static] |
Mid-region mask.
Definition at line 85 of file NodeSet.hpp.
const BitSet MBMesquite::NodeSet::REGION_OFFSET = FACE_OFFSET + NUM_FACE_BITS [static] |
LSB of mid-region storage.
Definition at line 78 of file NodeSet.hpp.
Referenced by NodeSetTest::test_clear_node(), and NodeSetTest::test_set_node().