MOAB: Mesh Oriented datABase  (version 5.2.1)
MBMesquite::AWShape2DB1 Class Reference

#include <AWShape2DB1.hpp>

+ Inheritance diagram for MBMesquite::AWShape2DB1:
+ Collaboration diagram for MBMesquite::AWShape2DB1:

Public Member Functions

virtual MESQUITE_EXPORT ~AWShape2DB1 ()
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)\).

Detailed Description

\( \frac{1}{4 \alpha \omega}|A(adj\,W)-[W(adj\,A)]^t|^2 \)

Definition at line 42 of file AWShape2DB1.hpp.


Constructor & Destructor Documentation

Definition at line 46 of file AWShape2DB1.cpp.

{}

Member Function Documentation

bool MBMesquite::AWShape2DB1::evaluate ( const MsqMatrix< 2, 2 > &  A,
const MsqMatrix< 2, 2 > &  W,
double &  result,
MsqError err 
) [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 48 of file AWShape2DB1.cpp.

References MBMesquite::adj(), MBMesquite::MsqError::BARRIER_VIOLATED, MBMesquite::barrier_violated_msg_aw, MBMesquite::det(), MBMesquite::AWMetric::invalid_determinant(), MSQ_SETERR, and MBMesquite::sqr_Frobenius().

{
    const double alpha = det( A );
    const double omega = det( W );
    const double prod  = alpha * omega;
    if( AWMetric::invalid_determinant( prod ) )
    {
        MSQ_SETERR( err )( barrier_violated_msg_aw, MsqError::BARRIER_VIOLATED );
        return false;
    }

    result = sqr_Frobenius( A * adj( W ) );
    result += sqr_Frobenius( W * adj( A ) );
    result *= 0.25 / prod;
    result -= 1.0;
    return true;
}
std::string MBMesquite::AWShape2DB1::get_name ( ) const [virtual]

Reimplemented from MBMesquite::AWMetricBarrier.

Definition at line 41 of file AWShape2DB1.cpp.

{
    return "AWShape2DB1";
}

List of all members.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines