MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <AWShapeSizeB1.hpp>
Public Member Functions | |
virtual MESQUITE_EXPORT | ~AWShapeSizeB1 () |
virtual MESQUITE_EXPORT std::string | get_name () const |
virtual MESQUITE_EXPORT bool | evaluate (const MsqMatrix< 2, 2 > &A, const MsqMatrix< 2, 2 > &W, double &result, MsqError &err) |
Evaluate \(\mu(A,W)\). | |
virtual MESQUITE_EXPORT bool | evaluate (const MsqMatrix< 3, 3 > &A, const MsqMatrix< 3, 3 > &W, double &result, MsqError &err) |
Evaluate \(\mu(A,W)\). |
\( | A - A^{-t} W^t W |^2 \)
Definition at line 43 of file AWShapeSizeB1.hpp.
MBMesquite::AWShapeSizeB1::~AWShapeSizeB1 | ( | ) | [virtual] |
Definition at line 47 of file AWShapeSizeB1.cpp.
{}
bool MBMesquite::AWShapeSizeB1::evaluate | ( | const MsqMatrix< 2, 2 > & | A, |
const MsqMatrix< 2, 2 > & | W, | ||
double & | result, | ||
MsqError & | err | ||
) | [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 49 of file AWShapeSizeB1.cpp.
References MBMesquite::MsqError::BARRIER_VIOLATED, MBMesquite::barrier_violated_msg_aw, MBMesquite::det(), MBMesquite::AWMetric::invalid_determinant(), MSQ_SETERR, MBMesquite::sqr_Frobenius(), MBMesquite::transpose(), and MBMesquite::transpose_adj().
{ const double alpha = det( A ); if( AWMetric::invalid_determinant( alpha ) ) { MSQ_SETERR( err )( barrier_violated_msg_aw, MsqError::BARRIER_VIOLATED ); return false; } result = sqr_Frobenius( A - 1 / alpha * transpose_adj( A ) * transpose( W ) * W ); return true; }
bool MBMesquite::AWShapeSizeB1::evaluate | ( | const MsqMatrix< 3, 3 > & | A, |
const MsqMatrix< 3, 3 > & | W, | ||
double & | result, | ||
MsqError & | err | ||
) | [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 62 of file AWShapeSizeB1.cpp.
References MBMesquite::MsqError::BARRIER_VIOLATED, MBMesquite::barrier_violated_msg_aw, MBMesquite::det(), MBMesquite::AWMetric::invalid_determinant(), MSQ_SETERR, MBMesquite::sqr_Frobenius(), MBMesquite::transpose(), and MBMesquite::transpose_adj().
{ const double alpha = det( A ); if( AWMetric::invalid_determinant( alpha ) ) { MSQ_SETERR( err )( barrier_violated_msg_aw, MsqError::BARRIER_VIOLATED ); return false; } result = sqr_Frobenius( A - 1 / alpha * transpose_adj( A ) * transpose( W ) * W ); return true; }
std::string MBMesquite::AWShapeSizeB1::get_name | ( | ) | const [virtual] |
Reimplemented from MBMesquite::AWMetricBarrier.
Definition at line 42 of file AWShapeSizeB1.cpp.
{ return "AWShapeSizeB1"; }