MOAB: Mesh Oriented datABase  (version 5.4.1)
MBMesquite::TMetric Class Reference

#include <TMetric.hpp>

+ Inheritance diagram for MBMesquite::TMetric:

Public Member Functions

virtual MESQUITE_EXPORT ~TMetric ()
virtual MESQUITE_EXPORT std::string get_name () const =0
virtual MESQUITE_EXPORT bool evaluate (const MsqMatrix< 2, 2 > &T, double &result, MsqError &err)
 Evaluate \(\mu(T)\).
virtual MESQUITE_EXPORT bool evaluate (const MsqMatrix< 3, 3 > &T, double &result, MsqError &err)
 Evaluate \(\mu(T)\).
virtual MESQUITE_EXPORT bool evaluate_with_grad (const MsqMatrix< 2, 2 > &T, double &result, MsqMatrix< 2, 2 > &deriv_wrt_T, MsqError &err)
 Gradient of \(\mu(T)\) with respect to components of T.
virtual MESQUITE_EXPORT bool evaluate_with_grad (const MsqMatrix< 3, 3 > &T, double &result, MsqMatrix< 3, 3 > &deriv_wrt_T, MsqError &err)
 Gradient of \(\mu(T)\) with respect to components of T.
virtual MESQUITE_EXPORT bool evaluate_with_hess (const MsqMatrix< 2, 2 > &T, double &result, MsqMatrix< 2, 2 > &deriv_wrt_T, MsqMatrix< 2, 2 > second_wrt_T[3], MsqError &err)
 Hessian of \(\mu(T)\) with respect to components of T.
virtual MESQUITE_EXPORT bool evaluate_with_hess (const MsqMatrix< 3, 3 > &T, double &result, MsqMatrix< 3, 3 > &deriv_wrt_T, MsqMatrix< 3, 3 > second_wrt_T[6], MsqError &err)
 Hessian of \(\mu(T)\) with respect to components of T.

Static Public Member Functions

static bool invalid_determinant (double d)

Detailed Description

Definition at line 45 of file TMetric.hpp.


Constructor & Destructor Documentation

Definition at line 203 of file TMetric.cpp.

{}

Member Function Documentation

bool MBMesquite::TMetric::evaluate ( const MsqMatrix< 2, 2 > &  T,
double &  result,
MsqError err 
) [virtual]

Evaluate \(\mu(T)\).

Parameters:
T2x2 relative measure matrix (typically A W^-1)
resultOutput: value of function
Returns:
false if function cannot be evaluated for given T (e.g. division by zero, etc.), true otherwise.

Reimplemented in MBMesquite::TMetric3D, HessTestMetricRel_2, HessTestMetricRel, MBMesquite::TMetricBarrier3D, MBMesquite::TMetricNonBarrier3D, GradTestMetricRel, MBMesquite::TUntangleMu, MBMesquite::TMixed, MBMesquite::TUntangle1, MBMesquite::TUntangleBeta, MBMesquite::TOffset, MBMesquite::TScale, MBMesquite::TShapeB1, MBMesquite::TShapeNB1, MBMesquite::TPower2, MBMesquite::TSum, MBMesquite::TShapeSizeNB3, MBMesquite::TTau, MBMesquite::TShapeOrientB2, MBMesquite::TShapeSizeOrientB2, MBMesquite::InvTransBarrier, MBMesquite::TInverseMeanRatio, MBMesquite::TShapeSizeB3, MBMesquite::TSquared, MBMesquite::TShape2DNB2, MBMesquite::TShapeOrientB1, MBMesquite::TShapeOrientNB1, MBMesquite::TShapeOrientNB2, MBMesquite::TShapeSize2DB2, MBMesquite::TShapeSize2DNB1, MBMesquite::TShapeSize2DNB2, MBMesquite::TShapeSizeB1, MBMesquite::TShapeSizeOrientB1, MBMesquite::TShapeSizeOrientNB1, MBMesquite::TSizeB1, and MBMesquite::TSizeNB1.

Definition at line 205 of file TMetric.cpp.

Referenced by MBMesquite::do_finite_difference(), MBMesquite::do_numerical_gradient(), MBMesquite::TPower2::eval(), MBMesquite::TSum::eval(), MBMesquite::TUntangleMu::eval(), TMetricTest< Metric, DIM >::eval(), MBMesquite::InvTransBarrier::evaluate(), MBMesquite::TScale::evaluate(), MBMesquite::TOffset::evaluate(), MBMesquite::TMixed::evaluate(), MBMesquite::AffineMapMetric::evaluate(), and MBMesquite::TQualityMetric::evaluate_internal().

{
    return false;
}
bool MBMesquite::TMetric::evaluate_with_grad ( const MsqMatrix< 2, 2 > &  T,
double &  result,
MsqMatrix< 2, 2 > &  deriv_wrt_T,
MsqError err 
) [virtual]

Gradient of \(\mu(T)\) with respect to components of T.

Parameters:
T2x2 relative measure matrix (typically A W^-1)
resultOutput: value of function
deriv_wrt_TOutput: partial deriviatve of \(\mu\) wrt each term of T, evaluated at passed T.

\[\left[\begin{array}{cc} \frac{\partial\mu}{\partial T_{0,0}} & \frac{\partial\mu}{\partial T_{0,1}} \\ \frac{\partial\mu}{\partial T_{1,0}} & \frac{\partial\mu}{\partial T_{1,1}} \\ \end{array}\right]\]

Returns:
false if function cannot be evaluated for given T (e.g. division by zero, etc.), true otherwise.

Reimplemented in HessTestMetricRel_2, HessTestMetricRel, MBMesquite::TUntangleMu, MBMesquite::TMixed, MBMesquite::TUntangle1, MBMesquite::TUntangleBeta, MBMesquite::TOffset, MBMesquite::TScale, MBMesquite::TShapeB1, MBMesquite::TShapeNB1, MBMesquite::TPower2, MBMesquite::TSum, MBMesquite::TShapeSizeNB3, MBMesquite::TShapeOrientB2, MBMesquite::TShapeSizeOrientB2, MBMesquite::TInverseMeanRatio, MBMesquite::TShapeSizeB3, MBMesquite::TSquared, MBMesquite::TShape2DNB2, MBMesquite::TShapeOrientB1, MBMesquite::TShapeOrientNB1, MBMesquite::TShapeOrientNB2, MBMesquite::TShapeSize2DB2, MBMesquite::TShapeSize2DNB1, MBMesquite::TShapeSize2DNB2, MBMesquite::TShapeSizeB1, MBMesquite::TShapeSizeOrientB1, MBMesquite::TShapeSizeOrientNB1, MBMesquite::TSizeB1, and MBMesquite::TSizeNB1.

Definition at line 215 of file TMetric.cpp.

References MBMesquite::do_numerical_gradient().

Referenced by MBMesquite::do_numerical_hessian(), MBMesquite::TScale::evaluate_with_grad(), MBMesquite::TOffset::evaluate_with_grad(), MBMesquite::TMixed::evaluate_with_grad(), MBMesquite::TQualityMetric::evaluate_with_gradient(), MBMesquite::TPower2::grad(), MBMesquite::TSum::grad(), MBMesquite::TUntangleMu::grad(), TMetricTest< Metric, DIM >::grad(), TMetricTest< Metric, DIM >::num_grad(), TMetricTest< Metric, DIM >::test_numerical_gradient_2D(), and TMetricTest< Metric, DIM >::test_numerical_gradient_3D().

{
    return do_numerical_gradient( this, T, result, wrt_T, err );
}
bool MBMesquite::TMetric::evaluate_with_grad ( const MsqMatrix< 3, 3 > &  T,
double &  result,
MsqMatrix< 3, 3 > &  deriv_wrt_T,
MsqError err 
) [virtual]

Gradient of \(\mu(T)\) with respect to components of T.

Parameters:
T3x3 relative measure matrix (typically A W^-1)
resultOutput: value of function
deriv_wrt_TOutput: partial deriviatve of \(\mu\) wrt each term of T, evaluated at passed T.

\[\left[\begin{array}{ccc} \frac{\partial\mu}{\partial T_{0,0}} & \frac{\partial\mu}{\partial T_{0,1}} & \frac{\partial\mu}{\partial T_{0,2}} \\ \frac{\partial\mu}{\partial T_{1,0}} & \frac{\partial\mu}{\partial T_{1,1}} & \frac{\partial\mu}{\partial T_{1,2}} \\ \frac{\partial\mu}{\partial T_{2,0}} & \frac{\partial\mu}{\partial T_{2,1}} & \frac{\partial\mu}{\partial T_{2,2}} \end{array}\right]\]

Returns:
false if function cannot be evaluated for given T (e.g. division by zero, etc.), true otherwise.

Reimplemented in HessTestMetricRel_2, HessTestMetricRel, MBMesquite::TUntangleMu, MBMesquite::TMixed, MBMesquite::TUntangle1, MBMesquite::TUntangleBeta, MBMesquite::TOffset, MBMesquite::TScale, MBMesquite::TShapeB1, MBMesquite::TShapeNB1, MBMesquite::TPower2, MBMesquite::TSum, MBMesquite::TShapeSizeNB3, MBMesquite::TShapeOrientB2, MBMesquite::TShapeSizeOrientB2, MBMesquite::TInverseMeanRatio, MBMesquite::TShapeSizeB3, MBMesquite::TSquared, MBMesquite::TShapeOrientB1, MBMesquite::TShapeOrientNB1, MBMesquite::TShapeOrientNB2, MBMesquite::TShapeSizeB1, MBMesquite::TShapeSizeOrientB1, MBMesquite::TShapeSizeOrientNB1, MBMesquite::TSizeB1, MBMesquite::TSizeNB1, MBMesquite::TShapeSize3DNB1, MBMesquite::TShapeSize3DB4, MBMesquite::TShape3DB2, and MBMesquite::TShapeSize3DB2.

Definition at line 220 of file TMetric.cpp.

References MBMesquite::do_numerical_gradient().

{
    return do_numerical_gradient( this, T, result, wrt_T, err );
}
bool MBMesquite::TMetric::evaluate_with_hess ( const MsqMatrix< 2, 2 > &  T,
double &  result,
MsqMatrix< 2, 2 > &  deriv_wrt_T,
MsqMatrix< 2, 2 >  second_wrt_T[3],
MsqError err 
) [virtual]

Hessian of \(\mu(T)\) with respect to components of T.

Parameters:
T3x3 relative measure matrix (typically A W^-1)
resultOutput: value of function
deriv_wrt_TOutput: partial deriviatve of \(\mu\) wrt each term of T, evaluated at passed T.
second_wrt_TOutput: 9x9 matrix of second partial deriviatve of \(\mu\) wrt each term of T, in row-major order. The symmetric matrix is decomposed into 3x3 blocks and only the upper diagonal blocks, in row-major order, are returned.

\[\left[\begin{array}{cc|cc} \frac{\partial^{2}\mu}{\partial T_{0,0}^2} & \frac{\partial^{2}\mu}{\partial T_{0,0}\partial A_{0,1}} & \frac{\partial^{2}\mu}{\partial T_{0,0}\partial A_{1,0}} & \frac{\partial^{2}\mu}{\partial T_{0,0}\partial A_{1,1}} \\ \frac{\partial^{2}\mu}{\partial T_{0,0}\partial A_{0,1}} & \frac{\partial^{2}\mu}{\partial T_{0,1}^2} & \frac{\partial^{2}\mu}{\partial T_{0,1}\partial A_{1,0}} & \frac{\partial^{2}\mu}{\partial T_{0,1}\partial A_{1,1}} \\ \hline & & \frac{\partial^{2}\mu}{\partial T_{1,0}^2} & \frac{\partial^{2}\mu}{\partial T_{1,0}\partial A_{1,1}} \\ & & \frac{\partial^{2}\mu}{\partial T_{1,0}\partial A_{1,1}} & \frac{\partial^{2}\mu}{\partial T_{1,1}^2} \\ \end{array}\right]\]

Returns:
false if function cannot be evaluated for given T (e.g. division by zero, etc.), true otherwise.

Reimplemented in HessTestMetricRel_2, MBMesquite::TUntangleMu, MBMesquite::TMixed, MBMesquite::TUntangle1, MBMesquite::TUntangleBeta, MBMesquite::TOffset, MBMesquite::TScale, MBMesquite::TShapeB1, MBMesquite::TShapeNB1, MBMesquite::TPower2, MBMesquite::TSum, MBMesquite::TShapeSizeNB3, MBMesquite::TShapeOrientB2, MBMesquite::TShapeSizeOrientB2, MBMesquite::TInverseMeanRatio, MBMesquite::TShapeSizeB3, MBMesquite::TSquared, MBMesquite::TShape2DNB2, MBMesquite::TShapeOrientB1, MBMesquite::TShapeOrientNB1, MBMesquite::TShapeOrientNB2, MBMesquite::TShapeSize2DB2, MBMesquite::TShapeSize2DNB1, MBMesquite::TShapeSize2DNB2, MBMesquite::TShapeSizeB1, MBMesquite::TShapeSizeOrientB1, MBMesquite::TShapeSizeOrientNB1, MBMesquite::TSizeB1, and MBMesquite::TSizeNB1.

Definition at line 225 of file TMetric.cpp.

References MBMesquite::do_numerical_hessian().

Referenced by MBMesquite::TOffset::evaluate_with_hess(), MBMesquite::TScale::evaluate_with_hess(), MBMesquite::TMixed::evaluate_with_hess(), MBMesquite::TQualityMetric::evaluate_with_Hessian(), MBMesquite::TQualityMetric::evaluate_with_Hessian_diagonal(), MBMesquite::TSum::hess(), MBMesquite::TPower2::hess(), MBMesquite::TUntangleMu::hess(), TMetricTest< Metric, DIM >::hess(), TMetricTest< Metric, DIM >::num_hess(), TMetricTest< Metric, DIM >::test_numerical_hessian_2D(), and TMetricTest< Metric, DIM >::test_numerical_hessian_3D().

{
    return do_numerical_hessian( this, T, result, deriv_wrt_T, hess_wrt_T, err );
}
bool MBMesquite::TMetric::evaluate_with_hess ( const MsqMatrix< 3, 3 > &  T,
double &  result,
MsqMatrix< 3, 3 > &  deriv_wrt_T,
MsqMatrix< 3, 3 >  second_wrt_T[6],
MsqError err 
) [virtual]

Hessian of \(\mu(T)\) with respect to components of T.

Parameters:
T3x3 relative measure matrix (typically A W^-1)
resultOutput: value of function
deriv_wrt_TOutput: partial deriviatve of \(\mu\) wrt each term of T, evaluated at passed T.
second_wrt_TOutput: 9x9 matrix of second partial deriviatve of \(\mu\) wrt each term of T, in row-major order. The symmetric matrix is decomposed into 3x3 blocks and only the upper diagonal blocks, in row-major order, are returned.

\[\left[\begin{array}{ccc|ccc|ccc} \frac{\partial^{2}\mu}{\partial T_{0,0}^2} & \frac{\partial^{2}\mu}{\partial T_{0,0}\partial T_{0,1}} & \frac{\partial^{2}\mu}{\partial T_{0,0}\partial T_{0,2}} & \frac{\partial^{2}\mu}{\partial T_{0,0}\partial T_{1,0}} & \frac{\partial^{2}\mu}{\partial T_{0,0}\partial T_{1,1}} & \frac{\partial^{2}\mu}{\partial T_{0,0}\partial T_{1,2}} & \frac{\partial^{2}\mu}{\partial T_{0,0}\partial T_{2,0}} & \frac{\partial^{2}\mu}{\partial T_{0,0}\partial T_{2,1}} & \frac{\partial^{2}\mu}{\partial T_{0,0}\partial T_{2,2}} \\ \frac{\partial^{2}\mu}{\partial T_{0,0}\partial T_{0,1}} & \frac{\partial^{2}\mu}{\partial T_{0,1}^2} & \frac{\partial^{2}\mu}{\partial T_{0,1}\partial T_{0,2}} & \frac{\partial^{2}\mu}{\partial T_{0,1}\partial T_{1,0}} & \frac{\partial^{2}\mu}{\partial T_{0,1}\partial T_{1,1}} & \frac{\partial^{2}\mu}{\partial T_{0,1}\partial T_{1,2}} & \frac{\partial^{2}\mu}{\partial T_{0,1}\partial T_{2,0}} & \frac{\partial^{2}\mu}{\partial T_{0,1}\partial T_{2,1}} & \frac{\partial^{2}\mu}{\partial T_{0,1}\partial T_{2,2}} \\ \frac{\partial^{2}\mu}{\partial T_{0,0}\partial T_{0,2}} & \frac{\partial^{2}\mu}{\partial T_{0,1}\partial T_{0,2}} & \frac{\partial^{2}\mu}{\partial T_{0,2}^2} & \frac{\partial^{2}\mu}{\partial T_{0,2}\partial T_{1,0}} & \frac{\partial^{2}\mu}{\partial T_{0,2}\partial T_{1,1}} & \frac{\partial^{2}\mu}{\partial T_{0,2}\partial T_{1,2}} & \frac{\partial^{2}\mu}{\partial T_{0,2}\partial T_{2,0}} & \frac{\partial^{2}\mu}{\partial T_{0,2}\partial T_{2,1}} & \frac{\partial^{2}\mu}{\partial T_{0,2}\partial T_{2,2}} \\ \hline & & & \frac{\partial^{2}\mu}{\partial T_{1,0}^2} & \frac{\partial^{2}\mu}{\partial T_{1,0}\partial T_{1,1}} & \frac{\partial^{2}\mu}{\partial T_{1,0}\partial T_{1,2}} & \frac{\partial^{2}\mu}{\partial T_{1,0}\partial T_{2,0}} & \frac{\partial^{2}\mu}{\partial T_{1,0}\partial T_{2,1}} & \frac{\partial^{2}\mu}{\partial T_{1,0}\partial T_{2,2}} \\ & & & \frac{\partial^{2}\mu}{\partial T_{1,0}\partial T_{1,1}} & \frac{\partial^{2}\mu}{\partial T_{1,1}^2} & \frac{\partial^{2}\mu}{\partial T_{1,1}\partial T_{1,2}} & \frac{\partial^{2}\mu}{\partial T_{1,1}\partial T_{2,0}} & \frac{\partial^{2}\mu}{\partial T_{1,1}\partial T_{2,1}} & \frac{\partial^{2}\mu}{\partial T_{1,1}\partial T_{2,2}} \\ & & & \frac{\partial^{2}\mu}{\partial T_{1,0}\partial T_{1,2}} & \frac{\partial^{2}\mu}{\partial T_{1,1}\partial T_{1,2}} & \frac{\partial^{2}\mu}{\partial T_{1,2}^2} & \frac{\partial^{2}\mu}{\partial T_{1,2}\partial T_{2,0}} & \frac{\partial^{2}\mu}{\partial T_{1,2}\partial T_{2,1}} & \frac{\partial^{2}\mu}{\partial T_{1,2}\partial T_{2,2}} \\ \hline & & & & & & \frac{\partial^{2}\mu}{\partial T_{2,0}^2} & \frac{\partial^{2}\mu}{\partial T_{2,0}\partial T_{2,1}} & \frac{\partial^{2}\mu}{\partial T_{2,0}\partial T_{2,2}} \\ & & & & & & \frac{\partial^{2}\mu}{\partial T_{2,0}\partial T_{2,1}} & \frac{\partial^{2}\mu}{\partial T_{2,1}^2} & \frac{\partial^{2}\mu}{\partial T_{2,1}\partial T_{2,2}} \\ & & & & & & \frac{\partial^{2}\mu}{\partial T_{2,0}\partial T_{2,2}} & \frac{\partial^{2}\mu}{\partial T_{2,1}\partial T_{2,2}} & \frac{\partial^{2}\mu}{\partial T_{2,2}^2} \\ \end{array}\right]\]

Returns:
false if function cannot be evaluated for given T (e.g. division by zero, etc.), true otherwise.

Reimplemented in HessTestMetricRel_2, MBMesquite::TUntangleMu, MBMesquite::TMixed, MBMesquite::TUntangle1, MBMesquite::TUntangleBeta, MBMesquite::TOffset, MBMesquite::TScale, MBMesquite::TShapeB1, MBMesquite::TShapeNB1, MBMesquite::TPower2, MBMesquite::TSum, MBMesquite::TShapeSizeNB3, MBMesquite::TShapeOrientB2, MBMesquite::TShapeSizeOrientB2, MBMesquite::TInverseMeanRatio, MBMesquite::TShapeSizeB3, MBMesquite::TSquared, MBMesquite::TShapeOrientB1, MBMesquite::TShapeOrientNB1, MBMesquite::TShapeOrientNB2, MBMesquite::TShapeSizeB1, MBMesquite::TShapeSizeOrientB1, MBMesquite::TShapeSizeOrientNB1, MBMesquite::TSizeB1, MBMesquite::TSizeNB1, MBMesquite::TShapeSize3DNB1, MBMesquite::TShapeSize3DB4, MBMesquite::TShape3DB2, and MBMesquite::TShapeSize3DB2.

Definition at line 234 of file TMetric.cpp.

References MBMesquite::do_numerical_hessian().

{
    return do_numerical_hessian( this, T, result, deriv_wrt_T, hess_wrt_T, err );
}

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