MOAB: Mesh Oriented datABase  (version 5.2.1)
TestGradTargetMetric< Base > Class Template Reference

#include <TMPQualityMetricTest.hpp>

Public Member Functions

std::string get_name () const
bool evaluate (const MsqMatrix< 2, 2 > &T, double &result, MsqError &err)
bool evaluate (const MsqMatrix< 2, 2 > &A, const MsqMatrix< 2, 2 > &, double &result, MsqError &err)
bool evaluate_with_grad (const MsqMatrix< 2, 2 > &T, double &result, MsqMatrix< 2, 2 > &d, MsqError &err)
bool evaluate_with_grad (const MsqMatrix< 2, 2 > &A, const MsqMatrix< 2, 2 > &, double &result, MsqMatrix< 2, 2 > &d, MsqError &err)
bool evaluate (const MsqMatrix< 3, 3 > &T, double &result, MsqError &err)
bool evaluate (const MsqMatrix< 3, 3 > &A, const MsqMatrix< 3, 3 > &, double &result, MsqError &err)
bool evaluate_with_grad (const MsqMatrix< 3, 3 > &T, double &result, MsqMatrix< 3, 3 > &d, MsqError &err)
bool evaluate_with_grad (const MsqMatrix< 3, 3 > &A, const MsqMatrix< 3, 3 > &, double &result, MsqMatrix< 3, 3 > &d, MsqError &err)

Detailed Description

template<class Base>
class TestGradTargetMetric< Base >

Simple target metric for testing first partial derivatives. \(\mu(A,W) = |A|^2\) \(\frac{\partial\mu}{\partial \A} = 2 A \)

Definition at line 160 of file TMPQualityMetricTest.hpp.


Member Function Documentation

template<class Base>
bool TestGradTargetMetric< Base >::evaluate ( const MsqMatrix< 2, 2 > &  T,
double &  result,
MsqError err 
) [inline]

Definition at line 168 of file TMPQualityMetricTest.hpp.

References MBMesquite::sqr_Frobenius().

    {
        result = sqr_Frobenius( T );
        return true;
    }
template<class Base>
bool TestGradTargetMetric< Base >::evaluate ( const MsqMatrix< 2, 2 > &  A,
const MsqMatrix< 2, 2 > &  ,
double &  result,
MsqError err 
) [inline]

Definition at line 174 of file TMPQualityMetricTest.hpp.

    {
        return evaluate( A, result, err );
    }
template<class Base>
bool TestGradTargetMetric< Base >::evaluate ( const MsqMatrix< 3, 3 > &  T,
double &  result,
MsqError err 
) [inline]

Definition at line 192 of file TMPQualityMetricTest.hpp.

References MBMesquite::sqr_Frobenius().

    {
        result = sqr_Frobenius( T );
        return true;
    }
template<class Base>
bool TestGradTargetMetric< Base >::evaluate ( const MsqMatrix< 3, 3 > &  A,
const MsqMatrix< 3, 3 > &  ,
double &  result,
MsqError err 
) [inline]

Definition at line 198 of file TMPQualityMetricTest.hpp.

    {
        return evaluate( A, result, err );
    }
template<class Base>
bool TestGradTargetMetric< Base >::evaluate_with_grad ( const MsqMatrix< 2, 2 > &  T,
double &  result,
MsqMatrix< 2, 2 > &  d,
MsqError err 
) [inline]

Definition at line 179 of file TMPQualityMetricTest.hpp.

References MBMesquite::sqr_Frobenius(), and T.

    {
        result = sqr_Frobenius( T );
        d      = 2 * T;
        return true;
    }
template<class Base>
bool TestGradTargetMetric< Base >::evaluate_with_grad ( const MsqMatrix< 2, 2 > &  A,
const MsqMatrix< 2, 2 > &  ,
double &  result,
MsqMatrix< 2, 2 > &  d,
MsqError err 
) [inline]

Definition at line 186 of file TMPQualityMetricTest.hpp.

    {
        return evaluate_with_grad( A, result, d, err );
    }
template<class Base>
bool TestGradTargetMetric< Base >::evaluate_with_grad ( const MsqMatrix< 3, 3 > &  T,
double &  result,
MsqMatrix< 3, 3 > &  d,
MsqError err 
) [inline]

Definition at line 203 of file TMPQualityMetricTest.hpp.

References MBMesquite::sqr_Frobenius(), and T.

    {
        result = sqr_Frobenius( T );
        d      = 2 * T;
        return true;
    }
template<class Base>
bool TestGradTargetMetric< Base >::evaluate_with_grad ( const MsqMatrix< 3, 3 > &  A,
const MsqMatrix< 3, 3 > &  ,
double &  result,
MsqMatrix< 3, 3 > &  d,
MsqError err 
) [inline]

Definition at line 210 of file TMPQualityMetricTest.hpp.

    {
        return evaluate_with_grad( A, result, d, err );
    }
template<class Base>
std::string TestGradTargetMetric< Base >::get_name ( ) const [inline]

Definition at line 163 of file TMPQualityMetricTest.hpp.

    {
        return "TestGrad";
    }

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