Implements the mean ratio quality metric. More...
#include <SimplexModMeanRatio.h>
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. | |
SimplexModMeanRatio & | operator= (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 . | |
Number | computeFunctionGivenS2 (Number minDeterminant, Number s2) const |
Return the modified mean ratio quality metric given . |
Implements the mean ratio quality metric.
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()
.
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.
Let be the Jacobian matrix, be the Jacobian determinant, be the minimum Jacobian determinant, be the value of epsilon() and be the Frobenius norm. If then the eta quality metric is
Otherwise the modified eta quality metric is
void SimplexModMeanRatio< N, T >::computeGradient | ( | Vertex * | gradient | ) | const [inline] |
Calculate the gradient of the modified mean ratio (eta) quality metric.
Let be the Jacobian matrix, be the Jacobian determinant and be the Frobenius norm. The modified eta function is
Reimplemented from SimplexMeanRatio< N, T >.
References SimplexJacQF< N, T >::getDeterminant().
Number SimplexModMeanRatio< N, T >::operator() | ( | Number | minDeterminant | ) | const |
Return 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. |
Otherwise return the modified eta quality metric:
Number SimplexModMeanRatio< N, T >::operator() | ( | const Simplex & | simplex | ) | const [inline] |
Return the modified mean ratio (eta) quality metric.
Reimplemented from SimplexMeanRatio< N, T >.
References SimplexJacQF< N, T >::getDeterminant(), SimplexModMeanRatio< N, T >::operator()(), and SimplexJacQF< N, T >::setFunction().
Number SimplexModMeanRatio< N, T >::operator() | ( | ) | const [inline] |
Return the modified mean ratio (eta) quality metric.
Reimplemented from SimplexMeanRatio< N, T >.
References SimplexJacQF< N, T >::getDeterminant().
Referenced by SimplexModMeanRatio< N, T >::operator()().