MOAB: Mesh Oriented datABase  (version 5.4.1)
MBMesquite::InvTransBarrier Class Reference

#include <InvTransBarrier.hpp>

+ Inheritance diagram for MBMesquite::InvTransBarrier:
+ Collaboration diagram for MBMesquite::InvTransBarrier:

Public Member Functions

 InvTransBarrier (TMetric *metric)
virtual MESQUITE_EXPORT ~InvTransBarrier ()
virtual MESQUITE_EXPORT std::string get_name () const
virtual MESQUITE_EXPORT bool evaluate (const MsqMatrix< 2, 2 > &T, double &result, MsqError &err)
 Evaluate \(\mu(T)\).
virtual MESQUITE_EXPORT bool evaluate (const MsqMatrix< 3, 3 > &T, double &result, MsqError &err)
 Evaluate \(\mu(T)\).

Private Attributes

TMetricmetricPtr

Detailed Description

Make a non-barrier metric into a barrier metric by passing it T^-t

Definition at line 42 of file InvTransBarrier.hpp.


Constructor & Destructor Documentation

Definition at line 45 of file InvTransBarrier.hpp.

: metricPtr( metric ) {}

Definition at line 45 of file InvTransBarrier.cpp.

{}

Member Function Documentation

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

References MBMesquite::MsqError::BARRIER_VIOLATED, MBMesquite::barrier_violated_msg, MBMesquite::det(), MBMesquite::TMetric::evaluate(), MBMesquite::TMetricBarrier::invalid_determinant(), metricPtr, MSQ_CHKERR, MSQ_SETERR, and MBMesquite::transpose_adj().

{
    double tau = det( T );
    if( invalid_determinant( tau ) )
    {
        MSQ_SETERR( err )( barrier_violated_msg, MsqError::BARRIER_VIOLATED );
        return false;
    }
    MsqMatrix< 2, 2 > Tp = transpose_adj( T );
    Tp *= 1.0 / tau;
    bool rval = metricPtr->evaluate( Tp, result, err );
    return !MSQ_CHKERR( err ) && rval;
}
bool MBMesquite::InvTransBarrier::evaluate ( const MsqMatrix< 3, 3 > &  T,
double &  result,
MsqError err 
) [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 61 of file InvTransBarrier.cpp.

References MBMesquite::MsqError::BARRIER_VIOLATED, MBMesquite::barrier_violated_msg, MBMesquite::det(), MBMesquite::TMetric::evaluate(), MBMesquite::TMetricBarrier::invalid_determinant(), metricPtr, MSQ_CHKERR, MSQ_SETERR, and MBMesquite::transpose_adj().

{
    double tau = det( T );
    if( invalid_determinant( tau ) )
    {
        MSQ_SETERR( err )( barrier_violated_msg, MsqError::BARRIER_VIOLATED );
        return false;
    }
    MsqMatrix< 3, 3 > Tp = transpose_adj( T );
    Tp *= 1.0 / tau;
    bool rval = metricPtr->evaluate( Tp, result, err );
    return !MSQ_CHKERR( err ) && rval;
}
std::string MBMesquite::InvTransBarrier::get_name ( ) const [virtual]

Reimplemented from MBMesquite::TMetricBarrier.

Definition at line 40 of file InvTransBarrier.cpp.

{
    return "InvTransBarrier";
}

Member Data Documentation

Definition at line 56 of file InvTransBarrier.hpp.

Referenced by evaluate().

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