MOAB: Mesh Oriented datABase  (version 5.3.1)
MBMesquite::AWShapeSizeB1 Class Reference

#include <AWShapeSizeB1.hpp>

+ Inheritance diagram for MBMesquite::AWShapeSizeB1:
+ Collaboration diagram for MBMesquite::AWShapeSizeB1:

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

Detailed Description

\( | A - A^{-t} W^t W |^2 \)

Definition at line 43 of file AWShapeSizeB1.hpp.


Constructor & Destructor Documentation

Definition at line 47 of file AWShapeSizeB1.cpp.

{}

Member Function Documentation

bool MBMesquite::AWShapeSizeB1::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 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)\).

Parameters:
A3x3 active matrix
W3x3 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 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";
}

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