MOAB: Mesh Oriented datABase
(version 5.4.1)
|
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 (const MsqMatrix< 3, 3 > &A, const MsqMatrix< 3, 3 > &W, double &result, MsqError &) |
Evaluate \(\mu(A,W)\). | |
Static Public Member Functions | |
static double | grad (int r, int c) |
Definition at line 61 of file AWMetricTest.cpp.
bool GradTestMetricAbs::evaluate | ( | const MsqMatrix< 2, 2 > & | A, |
const MsqMatrix< 2, 2 > & | W, | ||
double & | result, | ||
MsqError & | err | ||
) | [inline, virtual] |
Evaluate \(\mu(A,W)\).
A | 2x2 active matrix |
W | 2x2 target matrix |
result | Output: value of function |
Reimplemented from MBMesquite::AWMetric.
Definition at line 74 of file AWMetricTest.cpp.
References MBMesquite::grad().
Referenced by AWMetricTest::test_numerical_gradient_2D(), and AWMetricTest::test_numerical_gradient_3D().
{ result = 0; for( int r = 0; r < 2; ++r ) for( int c = 0; c < 2; ++c ) result += grad( r, c ) * ( A( r, c ) - W( r, c ) ); return true; }
bool GradTestMetricAbs::evaluate | ( | const MsqMatrix< 3, 3 > & | A, |
const MsqMatrix< 3, 3 > & | W, | ||
double & | result, | ||
MsqError & | err | ||
) | [inline, virtual] |
Evaluate \(\mu(A,W)\).
A | 3x3 active matrix |
W | 3x3 target matrix |
result | Output: value of function |
Reimplemented from MBMesquite::AWMetric.
Definition at line 83 of file AWMetricTest.cpp.
References MBMesquite::grad().
{ result = 0; for( int r = 0; r < 3; ++r ) for( int c = 0; c < 3; ++c ) result += grad( r, c ) * ( A( r, c ) - W( r, c ) ); return true; }
std::string GradTestMetricAbs::get_name | ( | ) | const [inline, virtual] |
Implements MBMesquite::AWMetric.
Definition at line 64 of file AWMetricTest.cpp.
{ return "GradTest"; }
static double GradTestMetricAbs::grad | ( | int | r, |
int | c | ||
) | [inline, static] |
Definition at line 69 of file AWMetricTest.cpp.
Referenced by AWMetricTest::test_numerical_gradient_2D(), and AWMetricTest::test_numerical_gradient_3D().
{
return 3 * r + c + 1;
}