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

Scale a target matrix. More...

#include <LambdaConstant.hpp>

+ Inheritance diagram for MBMesquite::LambdaConstant:
+ Collaboration diagram for MBMesquite::LambdaConstant:

Public Member Functions

 LambdaConstant (double lambda, TargetCalculator *target)
 ~LambdaConstant ()
bool get_3D_target (PatchData &pd, size_t element, Sample sample, MsqMatrix< 3, 3 > &W_out, MsqError &err)
 Get a target matrix.
bool get_2D_target (PatchData &pd, size_t element, Sample sample, MsqMatrix< 2, 2 > &W_out, MsqError &err)
 Get a target matrix.
bool get_surface_target (PatchData &pd, size_t element, Sample sample, MsqMatrix< 3, 2 > &W_out, MsqError &err)
 Get a target matrix.
bool have_surface_orient () const
 Use 3x2 W for surface elements if true, 2x2 W if false.

Private Attributes

double mLambda
TargetCalculatormTarget

Detailed Description

Scale a target matrix.

Use the specified target calculator to determine the shape and orientation portions of the target matrix, but make the size component (lambda) a constant.

Definition at line 47 of file LambdaConstant.hpp.


Constructor & Destructor Documentation

Parameters:
lambdaTarget size.
targetTarget calcualtor from which to obtain a target that will be scaled by lambda.

Definition at line 40 of file LambdaConstant.cpp.

: mLambda( lambda ), mTarget( W ) {}

Member Function Documentation

bool MBMesquite::LambdaConstant::get_2D_target ( PatchData pd,
size_t  element,
Sample  sample,
MsqMatrix< 2, 2 > &  W_out,
MsqError err 
) [virtual]

Get a target matrix.

Parameters:
pdThe current PatchData
elementThe index an element within the patch data.
sampleThe sample point in the element.
W_outThe resulting target matrix.

Implements MBMesquite::TargetCalculator.

Definition at line 72 of file LambdaConstant.cpp.

References MBMesquite::TargetCalculator::get_2D_target(), mLambda, MSQ_CHKERR, mTarget, and MBMesquite::TargetCalculator::size().

{
    bool valid = mTarget->get_2D_target( pd, element, sample, W_out, err );
    if( MSQ_CHKERR( err ) || !valid ) return false;
    double lambda = this->size( W_out );
    if( lambda < 1e-50 ) return false;
    W_out *= mLambda / lambda;
    return true;
}
bool MBMesquite::LambdaConstant::get_3D_target ( PatchData pd,
size_t  element,
Sample  sample,
MsqMatrix< 3, 3 > &  W_out,
MsqError err 
) [virtual]

Get a target matrix.

Parameters:
pdThe current PatchData
elementThe index an element within the patch data.
sampleThe sample point in the element.
W_outThe resulting target matrix.

Implements MBMesquite::TargetCalculator.

Definition at line 44 of file LambdaConstant.cpp.

References MBMesquite::TargetCalculator::get_3D_target(), mLambda, MSQ_CHKERR, mTarget, and MBMesquite::TargetCalculator::size().

{
    bool valid = mTarget->get_3D_target( pd, element, sample, W_out, err );
    if( MSQ_CHKERR( err ) || !valid ) return false;
    double lambda = this->size( W_out );
    if( lambda < 1e-50 ) return false;
    W_out *= mLambda / lambda;
    return true;
}
bool MBMesquite::LambdaConstant::get_surface_target ( PatchData pd,
size_t  element,
Sample  sample,
MsqMatrix< 3, 2 > &  W_out,
MsqError err 
) [virtual]

Get a target matrix.

Parameters:
pdThe current PatchData
elementThe index an element within the patch data.
sampleThe sample point in the element.
W_outThe resulting target matrix.

Implements MBMesquite::TargetCalculator.

Definition at line 58 of file LambdaConstant.cpp.

References MBMesquite::TargetCalculator::get_surface_target(), mLambda, MSQ_CHKERR, mTarget, and MBMesquite::TargetCalculator::size().

{
    bool valid = mTarget->get_surface_target( pd, element, sample, W_out, err );
    if( MSQ_CHKERR( err ) || !valid ) return false;
    double lambda = this->size( W_out );
    if( lambda < 1e-50 ) return false;
    W_out *= mLambda / lambda;
    return true;
}
bool MBMesquite::LambdaConstant::have_surface_orient ( ) const [inline, virtual]

Use 3x2 W for surface elements if true, 2x2 W if false.

If true, then the targets for surface elements attempt some control of orientation and therefore get_surface_target must be used to get the targets. If false, then the target contains no orientation data and is therefore the same as the corresponding 2D target for surface elements. In this case, get_2D_target should be used.

Implements MBMesquite::TargetCalculator.

Definition at line 65 of file LambdaConstant.hpp.

References MBMesquite::TargetCalculator::have_surface_orient(), and mTarget.

    {
        return mTarget->have_surface_orient();
    }

Member Data Documentation

Definition at line 71 of file LambdaConstant.hpp.

Referenced by get_2D_target(), get_3D_target(), and get_surface_target().

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