SimplexModCondNum< N, T > Class Template Reference

Implements the modified condition number quality metric. More...

#include <SimplexModCondNum.h>

Inheritance diagram for SimplexModCondNum< N, T >:
SimplexCondNum< N, T > SimplexAdjJacQF< 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.

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

Number operator() () const
 Return the modified condition number (kappa) quality metric.
Number operator() (const Simplex &simplex) const
 Return the modified condition number (kappa) quality metric.
Number operator() (Number minDeterminant) const
 Return the modified condition number (kappa) quality metric.
void computeGradient (Vertex *gradient) const
 Calculate the gradient of the modified condition number (kappa) quality metric.
void computeGradient (Number minDeterminant, Vertex *gradient) const
 Calculate the gradient of the modified condition number (kappa) quality metric.

Protected Member Functions

Number computeFunction (const Number snj, const Number sna) const
 Return the modified quality metric given $ |S|^2 $ and $ |\Sigma|^2 $.
Number computeFunction (Number minDeterminant, Number snj, Number sna) const
 Return the modified quality metric given $ |S|^2 $ and $ |\Sigma|^2 $.

Detailed Description

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

Implements the modified condition number quality metric.

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

This class implements the modified condition number 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 SimplexModCondNum< N, T >::computeGradient ( Number  minDeterminant,
Vertex gradient 
) const

Calculate the gradient of the modified condition number (kappa) quality metric.

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

Precondition:
The Jacobian determinant need not be positive.

Let $ S $ be the Jacobian matrix, $ \Sigma $ be its scaled inverse, $ \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 kappa quality metric is

\[ \frac{ |S| |\Sigma| }{ N \sigma }. \]

Otherwise the modified kappa quality metric is

\[ \frac{ |S| |\Sigma| }{ N h(\sigma_m) }. \]

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

Calculate the gradient of the modified condition number (kappa) quality metric.

Precondition:
The Jacobian determinant need not be positive.

Let $ S $ be the Jacobian matrix, $ \Sigma $ be its scaled inverse, $ \sigma $ be the Jacobian determinant and $ | \cdot | $ be the Frobenius norm. The modified kappa function is

\[ \frac{ |S| |\Sigma| }{ N h(\sigma) }. \]

Reimplemented from SimplexCondNum< N, T >.

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

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

Return the modified condition number (kappa) 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 min_determinant should be the Jacobian determinant of this simplex. If the quality of the simplices adjacent to a vertex is being considered, then min_determinant 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 its scaled inverse, $ \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 kappa quality metric:

\[ \frac{ |S| |\Sigma| }{ N \sigma }. \]

Otherwise return the modified kappa quality metric:

\[ \frac{ |S| |\Sigma| }{ N h(\sigma_m) }. \]

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

Return the modified condition number (kappa) quality metric.

Precondition:
The Jacobian determinant need not be positive.
Returns:
Let $ S $ be the Jacobian matrix, $ \Sigma $ be its scaled inverse, $ \sigma $ be the Jacobian determinant and $ | \cdot | $ be the Frobenius norm. Return

\[ \frac{ |S| |\Sigma| }{ N h(\sigma) }. \]

Reimplemented from SimplexCondNum< N, T >.

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

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

Return the modified condition number (kappa) quality metric.

Precondition:
The Jacobian determinant need not be positive.
Returns:
Let $ S $ be the Jacobian matrix, $ \Sigma $ be its scaled inverse, $ \sigma $ be the Jacobian determinant and $ | \cdot | $ be the Frobenius norm. Return

\[ \frac{ |S| |\Sigma| }{ N h(\sigma) }. \]

Reimplemented from SimplexCondNum< N, T >.

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

Referenced by SimplexModCondNum< 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