MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <TOffset.hpp>
Public Member Functions | |
TOffset (double alpha, TMetric *metric) | |
virtual MESQUITE_EXPORT | ~TOffset () |
virtual MESQUITE_EXPORT std::string | get_name () const |
virtual MESQUITE_EXPORT bool | evaluate (const MsqMatrix< 2, 2 > &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_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 (const MsqMatrix< 3, 3 > &T, double &result, MsqError &err) |
Evaluate \(\mu(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< 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. | |
Private Attributes | |
double | mAlpha |
TMetric * | mMetric |
\( \mu\prime = \mu + \alpha\)
Definition at line 42 of file TOffset.hpp.
MBMesquite::TOffset::TOffset | ( | double | alpha, |
TMetric * | metric | ||
) | [inline] |
Definition at line 48 of file TOffset.hpp.
MBMesquite::TOffset::~TOffset | ( | ) | [virtual] |
Definition at line 46 of file TOffset.cpp.
{}
bool MBMesquite::TOffset::evaluate | ( | const MsqMatrix< 2, 2 > & | T, |
double & | result, | ||
MsqError & | err | ||
) | [virtual] |
Evaluate \(\mu(T)\).
T | 2x2 relative measure matrix (typically A W^-1) |
result | Output: value of function |
Reimplemented from MBMesquite::TMetric.
Definition at line 48 of file TOffset.cpp.
References MBMesquite::TMetric::evaluate(), mAlpha, mMetric, and MSQ_ERRZERO.
{ bool rval = mMetric->evaluate( T, result, err ); MSQ_ERRZERO( err ); result += mAlpha; return rval; }
bool MBMesquite::TOffset::evaluate | ( | const MsqMatrix< 3, 3 > & | T, |
double & | result, | ||
MsqError & | err | ||
) | [virtual] |
Evaluate \(\mu(T)\).
T | 3x3 relative measure matrix (typically A W^-1) |
result | Output: value of function |
Reimplemented from MBMesquite::TMetric.
Definition at line 79 of file TOffset.cpp.
References MBMesquite::TMetric::evaluate(), mAlpha, mMetric, and MSQ_ERRZERO.
{ bool rval = mMetric->evaluate( T, result, err ); MSQ_ERRZERO( err ); result += mAlpha; return rval; }
bool MBMesquite::TOffset::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.
T | 2x2 relative measure matrix (typically A W^-1) |
result | Output: value of function |
deriv_wrt_T | Output: 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]\] |
Reimplemented from MBMesquite::TMetric.
Definition at line 56 of file TOffset.cpp.
References MBMesquite::TMetric::evaluate_with_grad(), mAlpha, mMetric, and MSQ_ERRZERO.
{ bool rval = mMetric->evaluate_with_grad( T, result, deriv_wrt_T, err ); MSQ_ERRZERO( err ); result += mAlpha; return rval; }
bool MBMesquite::TOffset::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.
T | 3x3 relative measure matrix (typically A W^-1) |
result | Output: value of function |
deriv_wrt_T | Output: 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]\] |
Reimplemented from MBMesquite::TMetric.
Definition at line 87 of file TOffset.cpp.
References MBMesquite::TMetric::evaluate_with_grad(), mAlpha, mMetric, and MSQ_ERRZERO.
{ bool rval = mMetric->evaluate_with_grad( T, result, deriv_wrt_T, err ); MSQ_ERRZERO( err ); result += mAlpha; return rval; }
bool MBMesquite::TOffset::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.
T | 3x3 relative measure matrix (typically A W^-1) |
result | Output: value of function |
deriv_wrt_T | Output: partial deriviatve of \(\mu\) wrt each term of T, evaluated at passed T. |
second_wrt_T | Output: 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]\] |
Reimplemented from MBMesquite::TMetric.
Definition at line 67 of file TOffset.cpp.
References MBMesquite::TMetric::evaluate_with_hess(), mAlpha, mMetric, and MSQ_ERRZERO.
{ bool rval = mMetric->evaluate_with_hess( T, result, deriv_wrt_T, second_wrt_T, err ); MSQ_ERRZERO( err ); result += mAlpha; return rval; }
bool MBMesquite::TOffset::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.
T | 3x3 relative measure matrix (typically A W^-1) |
result | Output: value of function |
deriv_wrt_T | Output: partial deriviatve of \(\mu\) wrt each term of T, evaluated at passed T. |
second_wrt_T | Output: 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]\] |
Reimplemented from MBMesquite::TMetric.
Definition at line 98 of file TOffset.cpp.
References MBMesquite::TMetric::evaluate_with_hess(), mAlpha, mMetric, and MSQ_ERRZERO.
{ bool rval = mMetric->evaluate_with_hess( T, result, deriv_wrt_T, second_wrt_T, err ); MSQ_ERRZERO( err ); result += mAlpha; return rval; }
std::string MBMesquite::TOffset::get_name | ( | ) | const [virtual] |
Implements MBMesquite::TMetric.
Definition at line 41 of file TOffset.cpp.
References MBMesquite::TMetric::get_name(), and mMetric.
double MBMesquite::TOffset::mAlpha [private] |
Definition at line 44 of file TOffset.hpp.
Referenced by evaluate(), evaluate_with_grad(), and evaluate_with_hess().
TMetric* MBMesquite::TOffset::mMetric [private] |
Definition at line 45 of file TOffset.hpp.
Referenced by evaluate(), evaluate_with_grad(), evaluate_with_hess(), and get_name().