SimplexModMeanRatio< N, T > Class Template Reference

Implements the mean ratio quality metric. More...

#include <SimplexModMeanRatio.h>

Inheritance diagram for SimplexModMeanRatio< N, T >:
SimplexMeanRatio< N, T > SimplexJacQF< N, T >

List of all members.

Public Types

typedef T Number
 The number type.
typedef Base::Vertex Vertex
 The class for a vertex.
typedef Base::Simplex Simplex
 The simplex type.
typedef Base::Matrix Matrix
 An NxN matrix.

Public Member Functions

Constructors etc.

 SimplexModMeanRatio ()
 Default constructor. Un-initialized memory.
 SimplexModMeanRatio (const SimplexModMeanRatio &other)
 Copy constructor.
 SimplexModMeanRatio (const Simplex &s)
 Construct from a simplex.
SimplexModMeanRatiooperator= (const SimplexModMeanRatio &other)
 Assignment operator.
 ~SimplexModMeanRatio ()
 Trivial destructor.
Mathematical functions

Number operator() () const
 Return the modified mean ratio (eta) quality metric.
Number operator() (const Simplex &simplex) const
 Return the modified mean ratio (eta) quality metric.
Number operator() (Number minDeterminant) const
 Return the modified mean ratio (eta) quality metric.
void computeGradient (Vertex *gradient) const
 Calculate the gradient of the modified mean ratio (eta) quality metric.
void computeGradient (Number minDeterminant, Vertex *gradient) const
 Calculate the gradient of the modified mean ratio (eta) quality metric.

Protected Member Functions

Number computeFunctionGivenS2 (const Number s2) const
 Return the modified mean ratio quality metric given $ |S|^2 $.
Number computeFunctionGivenS2 (Number minDeterminant, Number s2) const
 Return the modified mean ratio quality metric given $ |S|^2 $.

Detailed Description

template<int N, typename T = double>
class SimplexModMeanRatio< N, T >

Implements the mean ratio quality metric.

Parameters:
N is the dimension.
T is the number type. By default it is double.

This class implements the modified mean ratio quality metric.

Before evaluating the metric, you must set the Jacobian matrix with setFunction() or set(). Before evaluating the gradient of the metric, you must set the Jacobian matrix and its gradient with set().


Member Function Documentation

template<int N, typename T = double>
void SimplexModMeanRatio< N, T >::computeGradient ( Number  minDeterminant,
Vertex gradient 
) const

Calculate the gradient of the modified mean ratio (eta) quality metric.

minDeterminant is the minimum determinant of the simplices currently being considered. If the quality of a single simplex is being computed, then minDeterminant should be the Jacobian determinant of this simplex. If the quality of the simplices adjacent to a vertex is being considered, then minDeterminant should be the minimum determinant among these simplices.

Precondition:
The Jacobian determinant need not be positive.

Let $ S $ be the Jacobian matrix, $ \sigma $ be the Jacobian determinant, $ \sigma_m $ be the minimum Jacobian determinant, $ \epsilon $ be the value of epsilon() and $ | \cdot | $ be the Frobenius norm. If $ \sigma_m \geq \epsilon $ then the eta quality metric is

\[ \frac{ |S|^2 }{ N \sigma^{2/N} }. \]

Otherwise the modified eta quality metric is

\[ \frac{ |S|^2 }{ N (h(\sigma_m))^{2/N} }. \]

template<int N, typename T = double>
void SimplexModMeanRatio< N, T >::computeGradient ( Vertex gradient  )  const [inline]

Calculate the gradient of the modified mean ratio (eta) quality metric.

Precondition:
The Jacobian determinant need not be positive.

Let $ S $ be the Jacobian matrix, $ \sigma $ be the Jacobian determinant and $ | \cdot | $ be the Frobenius norm. The modified eta function is

\[ \frac{ |S|^2 }{ N (h(\sigma))^{2/N} }. \]

Reimplemented from SimplexMeanRatio< N, T >.

References SimplexJacQF< N, T >::getDeterminant().

template<int N, typename T = double>
Number SimplexModMeanRatio< N, T >::operator() ( Number  minDeterminant  )  const

Return the modified mean ratio (eta) quality metric.

Parameters:
minDeterminant is the minimum determinant of the simplices currently being considered. If the quality of a single simplex is being computed, then minDeterminant should be the Jacobian determinant of this simplex. If the quality of the simplices adjacent to a vertex is being considered, then minDeterminant should be the minimum determinant among these simplices.
Precondition:
The Jacobian determinant need not be positive.
Returns:
Let $ S $ be the Jacobian matrix, $ \sigma $ be the Jacobian determinant, $ \sigma_m $ be the minimum Jacobian determinant, $ \epsilon $ be the value of epsilon() and $ | \cdot | $ be the Frobenius norm. If $ \sigma_m \geq \epsilon $ then return the eta quality metric:

\[ \frac{ |S|^2 }{ N \sigma^{2/N} }. \]

Otherwise return the modified eta quality metric:

\[ \frac{ |S|^2 }{ N (h(\sigma_m))^{2/N} }. \]

template<int N, typename T = double>
Number SimplexModMeanRatio< N, T >::operator() ( const Simplex simplex  )  const [inline]

Return the modified mean ratio (eta) quality metric.

Precondition:
The Jacobian determinant must be positive.
Returns:
Let $ S $ be the Jacobian matrix, $ \sigma $ be the Jacobian determinant and $ | \cdot | $ be the Frobenius norm. Return

\[ \frac{ |S|^2 }{ N \sigma^{2/N} }. \]

Reimplemented from SimplexMeanRatio< N, T >.

References SimplexJacQF< N, T >::getDeterminant(), SimplexModMeanRatio< N, T >::operator()(), and SimplexJacQF< N, T >::setFunction().

template<int N, typename T = double>
Number SimplexModMeanRatio< N, T >::operator() (  )  const [inline]

Return the modified mean ratio (eta) quality metric.

Precondition:
The Jacobian determinant must be positive.
Returns:
Let $ S $ be the Jacobian matrix, $ \sigma $ be the Jacobian determinant and $ | \cdot | $ be the Frobenius norm. Return

\[ \frac{ |S|^2 }{ N \sigma^{2/N} }. \]

Reimplemented from SimplexMeanRatio< N, T >.

References SimplexJacQF< N, T >::getDeterminant().

Referenced by SimplexModMeanRatio< N, T >::operator()().


The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:14:58 2016 for Computational Geometry Package by  doxygen 1.6.3