MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <Sample.hpp>
Public Types | |
enum | { SIDE_DIMENSION_BITS = 2, SIDE_NUMBER_BITS = 4, NUMBER_PACKED_BITS = SIDE_DIMENSION_BITS + SIDE_NUMBER_BITS, NUM_SAMPLE_SIDE_DIM = 1u << SIDE_DIMENSION_BITS, NUM_SAMPLE_SIDE_NUM = 1u << SIDE_NUMBER_BITS, SIDE_NUMBER_MASK = NUM_SAMPLE_SIDE_NUM - 1, SIDE_DIMENSON_MASK = NUM_SAMPLE_SIDE_DIM - 1 } |
Public Member Functions | |
size_t | pack () const |
Return packed representation of this sample. | |
void | unpack (size_t packed) |
Set this sample to the values encoded in a packed sample representation. | |
Sample (unsigned dim, unsigned num) | |
Initialization constructor. | |
Sample (size_t packed) | |
Initialize from packed representation. | |
Sample () | |
bool | operator== (const Sample &other) const |
bool | operator!= (const Sample &other) const |
bool | operator< (const Sample &other) const |
bool | operator> (const Sample &other) const |
bool | operator<= (const Sample &other) const |
bool | operator>= (const Sample &other) const |
Public Attributes | |
unsigned short | dimension |
The "dimension" of the sub-entity. | |
unsigned short | number |
Canonical number in ITAPS ordering for element corners/sides. |
Define a logical location within an element at which the element will be "sampled" for the purpose of evaluating a quality metric. For example, specify a location at which to calculate the Jacobian of the mapping function and use it to evaluate a TMP quality metric.
Logical sample points are currently limited to corners, mid-sides (region elements have both face and edge "sides") and mid-element.
Definition at line 50 of file Sample.hpp.
anonymous enum |
Constants used for a packed (minimum number of bits) representation of a sample.
Definition at line 77 of file Sample.hpp.
{ /** Number of bits used to store the dimension of an element 'side' */ SIDE_DIMENSION_BITS = 2, /** Number of bits used to store the index of an element 'side' of a specific dimension */ SIDE_NUMBER_BITS = 4, NUMBER_PACKED_BITS = SIDE_DIMENSION_BITS + SIDE_NUMBER_BITS, /** Number of distinct side dimension values that will fit * in a sample value (one greater than the largest dimension) */ NUM_SAMPLE_SIDE_DIM = 1u << SIDE_DIMENSION_BITS, /** Number of distinct side index values that will fit * in a sample value (one greater than the largest side number) */ NUM_SAMPLE_SIDE_NUM = 1u << SIDE_NUMBER_BITS, /** Mask to remove side dimension bits from sample number */ SIDE_NUMBER_MASK = NUM_SAMPLE_SIDE_NUM - 1, /** Mask to remove side dimension bits from sample number */ SIDE_DIMENSON_MASK = NUM_SAMPLE_SIDE_DIM - 1 };
MBMesquite::Sample::Sample | ( | unsigned | dim, |
unsigned | num | ||
) | [inline] |
Initialization constructor.
Definition at line 108 of file Sample.hpp.
MBMesquite::Sample::Sample | ( | size_t | packed | ) | [inline, explicit] |
Initialize from packed representation.
Definition at line 110 of file Sample.hpp.
{ unpack( packed ); }
MBMesquite::Sample::Sample | ( | ) | [inline] |
Default constructor must be explicitly included if we provide other constructors Do nothing (don't waste time initilazing to zero or something, I'd rather be able to catch the use of uninitialized values using a memory checker anyway if I make such a mistake.)
Definition at line 118 of file Sample.hpp.
{}
bool MBMesquite::Sample::operator!= | ( | const Sample & | other | ) | const [inline] |
bool MBMesquite::Sample::operator< | ( | const Sample & | other | ) | const [inline] |
bool MBMesquite::Sample::operator<= | ( | const Sample & | other | ) | const [inline] |
bool MBMesquite::Sample::operator== | ( | const Sample & | other | ) | const [inline] |
bool MBMesquite::Sample::operator> | ( | const Sample & | other | ) | const [inline] |
bool MBMesquite::Sample::operator>= | ( | const Sample & | other | ) | const [inline] |
size_t MBMesquite::Sample::pack | ( | ) | const [inline] |
Return packed representation of this sample.
Definition at line 97 of file Sample.hpp.
Referenced by MBMesquite::ElemSampleQM::handle(), operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
{ return ( ( (size_t)dimension ) << SIDE_NUMBER_BITS ) | number; }
void MBMesquite::Sample::unpack | ( | size_t | packed | ) | [inline] |
Set this sample to the values encoded in a packed sample representation.
Definition at line 102 of file Sample.hpp.
{ dimension = ( packed >> SIDE_NUMBER_BITS ) & SIDE_DIMENSON_MASK; number = packed & SIDE_NUMBER_MASK; }
unsigned short MBMesquite::Sample::dimension |
The "dimension" of the sub-entity.
Possible values are [0-3]:
Definition at line 60 of file Sample.hpp.
Referenced by MBMesquite::NodeSet::clear_node(), MBMesquite::LinearTriangle::coefficients(), MBMesquite::LinearTetrahedron::coefficients(), MBMesquite::LinearPrism::coefficients(), MBMesquite::LinearHexahedron::coefficients(), MBMesquite::LinearQuadrilateral::coefficients(), MBMesquite::TriLagrangeShape::coefficients(), MBMesquite::QuadLagrangeShape::coefficients(), MBMesquite::TetLagrangeShape::coefficients(), MBMesquite::LinearPyramid::coefficients(), MBMesquite::HexLagrangeShape::coefficients(), MBMesquite::LinearPrism::derivatives(), MBMesquite::LinearHexahedron::derivatives(), MBMesquite::TriLagrangeShape::derivatives(), MBMesquite::LinearQuadrilateral::derivatives(), MBMesquite::QuadLagrangeShape::derivatives(), MBMesquite::TetLagrangeShape::derivatives(), MBMesquite::LinearPyramid::derivatives(), MBMesquite::HexLagrangeShape::derivatives(), MBMesquite::AffineMapMetric::evaluate(), FauxMetric< B >::evaluate(), MBMesquite::AffineMapMetric::evaluate_with_indices(), FauxMetric< B >::evaluate_with_indices(), MBMesquite::PatchData::get_domain_normal_at_sample(), MBMesquite::LinearPyramid::ideal(), CachedTargetCalculator::make_2d(), CachedTargetCalculator::make_3d(), CachedTargetCalculator::make_surf(), FakeTargetCalc::make_value(), MBMesquite::NodeSet::node(), MBMesquite::NodeSet::num_before(), MBMesquite::operator<<(), MBMesquite::NodeSet::position(), MBMesquite::NodeSet::set_node(), and test_handle().
unsigned short MBMesquite::Sample::number |
Canonical number in ITAPS ordering for element corners/sides.
The dimension specifies which set of sub-entities that the sample my be on. The number specifies which entity within that subset. For example, if dimension == 1 then the sample point is at the center of one of the element edges. The number then specifies which edge of the element, where edges are ordered according to the ITAPS ordering.
For mid-region or mid-face of a surface element, the number should be zero.
Definition at line 73 of file Sample.hpp.
Referenced by MBMesquite::NodeSet::clear_node(), MBMesquite::LinearTriangle::coefficients(), MBMesquite::LinearTetrahedron::coefficients(), MBMesquite::LinearPrism::coefficients(), MBMesquite::LinearHexahedron::coefficients(), MBMesquite::LinearQuadrilateral::coefficients(), MBMesquite::TriLagrangeShape::coefficients(), MBMesquite::QuadLagrangeShape::coefficients(), MBMesquite::TetLagrangeShape::coefficients(), MBMesquite::LinearPyramid::coefficients(), MBMesquite::HexLagrangeShape::coefficients(), MBMesquite::LinearPrism::derivatives(), MBMesquite::LinearHexahedron::derivatives(), MBMesquite::TriLagrangeShape::derivatives(), MBMesquite::LinearQuadrilateral::derivatives(), MBMesquite::QuadLagrangeShape::derivatives(), MBMesquite::TetLagrangeShape::derivatives(), MBMesquite::LinearPyramid::derivatives(), MBMesquite::HexLagrangeShape::derivatives(), MBMesquite::AffineMapMetric::evaluate(), FauxMetric< B >::evaluate(), MBMesquite::AffineMapMetric::evaluate_with_indices(), FauxMetric< B >::evaluate_with_indices(), MBMesquite::PatchData::get_domain_normal_at_sample(), MBMesquite::LinearPyramid::ideal(), CachedTargetCalculator::make_2d(), CachedTargetCalculator::make_3d(), CachedTargetCalculator::make_surf(), FakeTargetCalc::make_value(), MBMesquite::NodeSet::node(), MBMesquite::NodeSet::num_before(), MBMesquite::operator<<(), MBMesquite::NodeSet::position(), MBMesquite::NodeSet::set_node(), and test_handle().