MOAB: Mesh Oriented datABase  (version 5.4.1)
HessTestMetricAbs Class Reference
+ Inheritance diagram for HessTestMetricAbs:
+ Collaboration diagram for HessTestMetricAbs:

Public Member Functions

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

Detailed Description

Definition at line 110 of file AWMetricTest.cpp.


Member Function Documentation

bool HessTestMetricAbs::evaluate ( const MsqMatrix< 2, 2 > &  A,
const MsqMatrix< 2, 2 > &  W,
double &  result,
MsqError err 
) [inline, virtual]

Evaluate \(\mu(A,W)\).

Parameters:
A2x2 active matrix
W2x2 target matrix
resultOutput: value of function
Returns:
false if function cannot be evaluated for given A and W (e.g. division by zero, etc.), true otherwise.

Reimplemented from MBMesquite::AWMetric.

Definition at line 118 of file AWMetricTest.cpp.

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

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

Evaluate \(\mu(A,W)\).

Parameters:
A3x3 active matrix
W3x3 target matrix
resultOutput: value of function
Returns:
false if function cannot be evaluated for given A and W (e.g. division by zero, etc.), true otherwise.

Reimplemented from MBMesquite::AWMetric.

Definition at line 134 of file AWMetricTest.cpp.

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

    {
        result = sqr_Frobenius( 2 * A - transpose( A ) - W );
        return true;
    }
bool HessTestMetricAbs::evaluate_with_grad ( const MsqMatrix< 2, 2 > &  A,
const MsqMatrix< 2, 2 > &  W,
double &  result,
MsqMatrix< 2, 2 > &  deriv_wrt_A,
MsqError err 
) [inline, virtual]

Gradient of \(\mu(A,W)\) with respect to components of A.

Parameters:
A2x2 active matrix
W2x2 target matrix
resultOutput: value of function
deriv_wrt_AOutput: partial deriviatve of \(\mu\) wrt each term of A, evaluated at passed A.

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

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

Reimplemented from MBMesquite::AWMetric.

Definition at line 123 of file AWMetricTest.cpp.

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

Referenced by AWMetricTest::test_numerical_hessian_2D(), and AWMetricTest::test_numerical_hessian_3D().

    {
        result = sqr_Frobenius( 2 * A - transpose( A ) - W );
        wrt_A  = 10 * A - 8 * transpose( A ) - 4 * W + 2 * transpose( W );
        return true;
    }
bool HessTestMetricAbs::evaluate_with_grad ( const MsqMatrix< 3, 3 > &  A,
const MsqMatrix< 3, 3 > &  W,
double &  result,
MsqMatrix< 3, 3 > &  deriv_wrt_A,
MsqError err 
) [inline, virtual]

Gradient of \(\mu(A,W)\) with respect to components of A.

Parameters:
A3x3 active matrix
W3x3 target matrix
resultOutput: value of function
deriv_wrt_AOutput: partial deriviatve of \(\mu\) wrt each term of A, evaluated at passed A.

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

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

Reimplemented from MBMesquite::AWMetric.

Definition at line 139 of file AWMetricTest.cpp.

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

    {
        result = sqr_Frobenius( 2 * A - transpose( A ) - W );
        wrt_A  = 10 * A - 8 * transpose( A ) - 4 * W + 2 * transpose( W );
        return true;
    }
std::string HessTestMetricAbs::get_name ( ) const [inline, virtual]

Implements MBMesquite::AWMetric.

Definition at line 113 of file AWMetricTest.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