Implements the modified condition number quality metric. More...
#include <SimplexModCondNum.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. | |
SimplexModCondNum () | |
Default constructor. Un-initialized memory. | |
SimplexModCondNum (const SimplexModCondNum &other) | |
Copy constructor. | |
SimplexModCondNum (const Simplex &s) | |
Construct from a simplex. | |
SimplexModCondNum & | operator= (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 and . | |
Number | computeFunction (Number minDeterminant, Number snj, Number sna) const |
Return the modified quality metric given and . |
Implements the modified condition number quality metric.
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()
.
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.
Let be the Jacobian matrix, be its scaled inverse, be the Jacobian determinant, be the minimum Jacobian determinant, be the value of epsilon() and be the Frobenius norm. If then the kappa quality metric is
Otherwise the modified kappa quality metric is
void SimplexModCondNum< N, T >::computeGradient | ( | Vertex * | gradient | ) | const [inline] |
Calculate the gradient of the modified condition number (kappa) quality metric.
Let be the Jacobian matrix, be its scaled inverse, be the Jacobian determinant and be the Frobenius norm. The modified kappa function is
Reimplemented from SimplexCondNum< N, T >.
References SimplexJacQF< N, T >::getDeterminant().
Number SimplexModCondNum< N, T >::operator() | ( | Number | minDeterminant | ) | const |
Return the modified condition number (kappa) quality metric.
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. |
Otherwise return the modified kappa quality metric:
Number SimplexModCondNum< N, T >::operator() | ( | const Simplex & | simplex | ) | const [inline] |
Return the modified condition number (kappa) quality metric.
Reimplemented from SimplexCondNum< N, T >.
References SimplexJacQF< N, T >::getDeterminant(), SimplexModCondNum< N, T >::operator()(), and SimplexAdjJacQF< N, T >::setFunction().
Number SimplexModCondNum< N, T >::operator() | ( | ) | const [inline] |
Return the modified condition number (kappa) quality metric.
Reimplemented from SimplexCondNum< N, T >.
References SimplexJacQF< N, T >::getDeterminant().
Referenced by SimplexModCondNum< N, T >::operator()().