MOAB: Mesh Oriented datABase  (version 5.3.0)
MBMesquite::ElemSampleQM Class Reference

Base type for metrics evaluated at several sample points within each element. More...

#include <ElemSampleQM.hpp>

+ Inheritance diagram for MBMesquite::ElemSampleQM:
+ Collaboration diagram for MBMesquite::ElemSampleQM:

Public Types

enum  { ELEM_INDEX_BITS = sizeof( size_t ) * 8 - Sample::NUMBER_PACKED_BITS, MAX_ELEM_PER_PATCH = ( (size_t)1 ) << ELEM_INDEX_BITS, ELEM_SAMPLE_MASK = MAX_ELEM_PER_PATCH - 1 }

Public Member Functions

virtual MESQUITE_EXPORT ~ElemSampleQM ()
virtual MESQUITE_EXPORT MetricType get_metric_type () const
virtual MESQUITE_EXPORT void get_element_evaluations (PatchData &pd, size_t elem_index, std::vector< size_t > &handles, MsqError &err)=0
 Get evaluation point handles for a given element.

Static Public Member Functions

static size_t handle (Sample sample, size_t index)
static Sample sample (size_t handle)
static size_t elem (size_t handle)

Detailed Description

Base type for metrics evaluated at several sample points within each element.

This class defines an interface for metrics that are evaluated at multiple sample points within each element. This interface is used by ElemAverageQM and is the base for ElemCornerQM and ElemTargetQM.

Definition at line 50 of file ElemSampleQM.hpp.


Member Enumeration Documentation

anonymous enum

Misc constants used in defining how element index, side dimension, and side number are packed into a single handle describing a logical location in the patch at which a sample-based metric is to be evaluated.

Enumerator:
ELEM_INDEX_BITS 

the number of bits in a handle that are used to store element index

MAX_ELEM_PER_PATCH 

the maximum number of elements in a PatchData without overflowing handle space

ELEM_SAMPLE_MASK 

Mask to remove sample bits from handle

Definition at line 77 of file ElemSampleQM.hpp.

         { /** the number of bits in a handle that are used to store element index */
           ELEM_INDEX_BITS = sizeof( size_t ) * 8 - Sample::NUMBER_PACKED_BITS,
           /** the maximum number of elements in a PatchData without overflowing handle space */
           MAX_ELEM_PER_PATCH = ( (size_t)1 ) << ELEM_INDEX_BITS,
           /** Mask to remove sample bits from handle */
           ELEM_SAMPLE_MASK = MAX_ELEM_PER_PATCH - 1
    };

Constructor & Destructor Documentation

Definition at line 37 of file ElemSampleQM.cpp.

{}

Member Function Documentation

virtual MESQUITE_EXPORT void MBMesquite::ElemSampleQM::get_element_evaluations ( PatchData pd,
size_t  elem_index,
std::vector< size_t > &  handles,
MsqError err 
) [pure virtual]

Get evaluation point handles for a given element.

Similar to QualityMetric::get_evaluations, this method returns a list of handles corresponding to sample points at which the metric may be evaluated. While QualityMetric::get_evaluations returns sample points for all elements in a PatchData, this method returns only the subset corresponding to a single element.

Implemented in FauxMetric< B >, MBMesquite::TMPQualityMetric, and MBMesquite::AffineMapMetric.

Referenced by MBMesquite::ElementAvgQM::evaluate(), MBMesquite::ElementMaxQM::evaluate(), MBMesquite::ElementPMeanP::evaluate(), MBMesquite::ElementPMeanP::evaluate_with_gradient(), MBMesquite::ElementPMeanP::evaluate_with_Hessian(), MBMesquite::ElementPMeanP::evaluate_with_Hessian_diagonal(), and QualityMetricTester::test_get_in_element_evaluations().

Implements MBMesquite::QualityMetric.

Reimplemented in FauxMetric< B >.

Definition at line 55 of file ElemSampleQM.hpp.

References MBMesquite::QualityMetric::ELEMENT_BASED.

    {
        return ELEMENT_BASED;
    }

List of all members.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines