MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <InvTransBarrier.hpp>
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 | |
TMetric * | metricPtr |
Make a non-barrier metric into a barrier metric by passing it T^-t
Definition at line 42 of file InvTransBarrier.hpp.
MBMesquite::InvTransBarrier::InvTransBarrier | ( | TMetric * | metric | ) | [inline] |
Definition at line 45 of file InvTransBarrier.hpp.
: metricPtr( metric ) {}
MBMesquite::InvTransBarrier::~InvTransBarrier | ( | ) | [virtual] |
Definition at line 45 of file InvTransBarrier.cpp.
{}
bool MBMesquite::InvTransBarrier::evaluate | ( | const MsqMatrix< 2, 2 > & | T, |
double & | result, | ||
MsqError & | err | ||
) | [virtual] |
Evaluate \(\mu(T)\).
T | 2x2 relative measure matrix (typically A W^-1) |
result | Output: value of function |
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)\).
T | 3x3 relative measure matrix (typically A W^-1) |
result | Output: value of function |
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"; }
TMetric* MBMesquite::InvTransBarrier::metricPtr [private] |
Definition at line 56 of file InvTransBarrier.hpp.
Referenced by evaluate().