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

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)\).

Static Public Member Functions

static double grad (int r, int c)

Detailed Description

Definition at line 60 of file TMetricTest.cpp.


Member Function Documentation

bool GradTestMetricRel::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 73 of file TMetricTest.cpp.

References MBMesquite::grad(), and T.

Referenced by TMetricTest< Metric, DIM >::test_numerical_gradient_2D(), and TMetricTest< Metric, DIM >::test_numerical_gradient_3D().

    {
        result = 0;
        for( int r = 0; r < 2; ++r )
            for( int c = 0; c < 2; ++c )
                result += grad( r, c ) * T( r, c );
        return true;
    }
bool GradTestMetricRel::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 82 of file TMetricTest.cpp.

References MBMesquite::grad(), and T.

    {
        result = 0;
        for( int r = 0; r < 3; ++r )
            for( int c = 0; c < 3; ++c )
                result += grad( r, c ) * T( r, c );
        return true;
    }
std::string GradTestMetricRel::get_name ( ) const [inline, virtual]

Implements MBMesquite::TMetric.

Definition at line 63 of file TMetricTest.cpp.

    {
        return "GradTest";
    }
static double GradTestMetricRel::grad ( int  r,
int  c 
) [inline, static]

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