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

#include <RefMeshTargetCalculator.hpp>

+ Inheritance diagram for MBMesquite::RefMeshTargetCalculator:
+ Collaboration diagram for MBMesquite::RefMeshTargetCalculator:

Public Member Functions

MESQUITE_EXPORT RefMeshTargetCalculator (ReferenceMeshInterface *ref_mesh, bool orient_2d=false)
virtual MESQUITE_EXPORT ~RefMeshTargetCalculator ()
virtual MESQUITE_EXPORT bool get_3D_target (PatchData &pd, size_t element, Sample sample, MsqMatrix< 3, 3 > &W_out, MsqError &err)
 Get a target matrix.
virtual MESQUITE_EXPORT bool get_2D_target (PatchData &pd, size_t element, Sample sample, MsqMatrix< 2, 2 > &W_out, MsqError &err)
 Get a target matrix.
virtual MESQUITE_EXPORT bool get_surface_target (PatchData &pd, size_t element, Sample sample, MsqMatrix< 3, 2 > &W_out, MsqError &err)
 Get a target matrix.
virtual bool have_surface_orient () const
 Use 3x2 W for surface elements if true, 2x2 W if false.

Private Attributes

ReferenceMeshInterfacerefMesh
bool orient2D

Detailed Description

Definition at line 47 of file RefMeshTargetCalculator.hpp.


Constructor & Destructor Documentation

Definition at line 50 of file RefMeshTargetCalculator.hpp.

        : refMesh( ref_mesh ), orient2D( orient_2d )
    {
    }

Member Function Documentation

bool MBMesquite::RefMeshTargetCalculator::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 64 of file RefMeshTargetCalculator.cpp.

References MBMesquite::TargetCalculator::factor_surface(), get_surface_target(), and MSQ_CHKERR.

{
    MsqMatrix< 3, 2 > W_orient;
    bool valid = get_surface_target( pd, element, sample, W_orient, err );
    if( MSQ_CHKERR( err ) || !valid ) return false;

    MsqMatrix< 3, 2 > V;
    MsqMatrix< 2, 2 > Q, delta;
    double lambda;
    valid = factor_surface( W_orient, lambda, V, Q, delta, err );
    W_out = lambda * Q * delta;
    return !MSQ_CHKERR( err ) && valid;
}
bool MBMesquite::RefMeshTargetCalculator::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 RefMeshTargetCalculator.cpp.

References MBMesquite::TargetCalculator::get_refmesh_Jacobian_3D(), MSQ_CHKERR, and refMesh.

{
    get_refmesh_Jacobian_3D( refMesh, pd, element, sample, W_out, err );
    return !MSQ_CHKERR( err );
}
bool MBMesquite::RefMeshTargetCalculator::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 54 of file RefMeshTargetCalculator.cpp.

References MBMesquite::TargetCalculator::get_refmesh_Jacobian_2D(), MSQ_CHKERR, and refMesh.

Referenced by get_2D_target().

{
    get_refmesh_Jacobian_2D( refMesh, pd, element, sample, W_out, err );
    return !MSQ_CHKERR( err );
}
virtual bool MBMesquite::RefMeshTargetCalculator::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 96 of file RefMeshTargetCalculator.hpp.

References orient2D.

    {
        return orient2D;
    }

Member Data Documentation

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