MOAB: Mesh Oriented datABase  (version 5.3.1)
HessTestMetricRel Class Reference
+ Inheritance diagram for HessTestMetricRel:
+ Collaboration diagram for HessTestMetricRel:

Public Member Functions

std::string get_name () const
bool evaluate (const MsqMatrix< 2, 2 > &T, double &result, MsqError &)
 Evaluate \(\mu(T)\).
bool evaluate (const MsqMatrix< 3, 3 > &T, double &result, MsqError &)
 Evaluate \(\mu(T)\).
bool evaluate_with_grad (const MsqMatrix< 2, 2 > &T, double &result, MsqMatrix< 2, 2 > &wrt_T, MsqError &)
 Gradient of \(\mu(T)\) with respect to components of T.
bool evaluate_with_grad (const MsqMatrix< 3, 3 > &T, double &result, MsqMatrix< 3, 3 > &wrt_T, MsqError &)
 Gradient of \(\mu(T)\) with respect to components of T.

Detailed Description

Definition at line 109 of file TMetricTest.cpp.


Member Function Documentation

bool HessTestMetricRel::evaluate ( const MsqMatrix< 2, 2 > &  T,
double &  result,
MsqError err 
) [inline, 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 from MBMesquite::TMetric.

Definition at line 117 of file TMetricTest.cpp.

References MBMesquite::sqr_Frobenius(), and MBMesquite::transpose().

    {
        result = sqr_Frobenius( 2 * T - transpose( T ) );
        return true;
    }
bool HessTestMetricRel::evaluate ( const MsqMatrix< 3, 3 > &  T,
double &  result,
MsqError err 
) [inline, virtual]

Evaluate \(\mu(T)\).

Parameters:
T3x3 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 from MBMesquite::TMetric.

Definition at line 122 of file TMetricTest.cpp.

References MBMesquite::sqr_Frobenius(), and MBMesquite::transpose().

    {
        result = sqr_Frobenius( 2 * T - transpose( T ) );
        return true;
    }
bool HessTestMetricRel::evaluate_with_grad ( const MsqMatrix< 2, 2 > &  T,
double &  result,
MsqMatrix< 2, 2 > &  deriv_wrt_T,
MsqError err 
) [inline, 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 from MBMesquite::TMetric.

Definition at line 127 of file TMetricTest.cpp.

References MBMesquite::sqr_Frobenius(), and MBMesquite::transpose().

Referenced by TMetricTest< Metric, DIM >::test_numerical_hessian_2D(), and TMetricTest< Metric, DIM >::test_numerical_hessian_3D().

    {
        result = sqr_Frobenius( 2 * T - transpose( T ) );
        wrt_T  = 10 * T - 8 * transpose( T );
        return true;
    }
bool HessTestMetricRel::evaluate_with_grad ( const MsqMatrix< 3, 3 > &  T,
double &  result,
MsqMatrix< 3, 3 > &  deriv_wrt_T,
MsqError err 
) [inline, 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 from MBMesquite::TMetric.

Definition at line 133 of file TMetricTest.cpp.

References MBMesquite::sqr_Frobenius(), and MBMesquite::transpose().

    {
        result = sqr_Frobenius( 2 * T - transpose( T ) );
        wrt_T  = 10 * T - 8 * transpose( T );
        return true;
    }
std::string HessTestMetricRel::get_name ( ) const [inline, virtual]

Implements MBMesquite::TMetric.

Definition at line 112 of file TMetricTest.cpp.

    {
        return "HessTest";
    }

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines