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

#include <LaplaceWrapper.hpp>

+ Inheritance diagram for MBMesquite::LaplaceWrapper:
+ Collaboration diagram for MBMesquite::LaplaceWrapper:

Public Member Functions

MESQUITE_EXPORT LaplaceWrapper ()
void set_cpu_time_limit (double seconds)
 Specify timeout after which untangler will exit.
double get_cpu_time_limit () const
void set_vertex_movement_limit_factor (double f)
 Specify factor by which to minimum distance a vertex must move in an iteration to avoid termination of the untangler.
double get_vertex_movement_limit_factor () const
void set_iteration_limit (int limit)
 Specify maximum number of iterations.
int get_iteration_limit () const
void enable_culling (bool yesno)
 Cull vertices based on movement limit.
bool is_culling_enabled () const
MESQUITE_EXPORT ~LaplaceWrapper ()

Protected Member Functions

MESQUITE_EXPORT void run_wrapper (MeshDomainAssoc *mesh_and_domain, ParallelMesh *pmesh, Settings *settings, QualityAssessor *qa, MsqError &err)

Private Attributes

double maxTime
double movementFactor
int iterationLimit
bool doCulling

Detailed Description

Definition at line 40 of file LaplaceWrapper.hpp.


Constructor & Destructor Documentation


Member Function Documentation

void MBMesquite::LaplaceWrapper::enable_culling ( bool  yesno) [inline]

Cull vertices based on movement limit.

Definition at line 88 of file LaplaceWrapper.hpp.

References doCulling.

Referenced by main().

    {
        doCulling = yesno;
    }

Definition at line 54 of file LaplaceWrapper.hpp.

References maxTime.

    {
        return maxTime;
    }

Definition at line 82 of file LaplaceWrapper.hpp.

References iterationLimit.

    {
        return iterationLimit;
    }

Definition at line 69 of file LaplaceWrapper.hpp.

References movementFactor.

    {
        return movementFactor;
    }

Definition at line 92 of file LaplaceWrapper.hpp.

References doCulling.

    {
        return doCulling;
    }
void MBMesquite::LaplaceWrapper::run_wrapper ( MeshDomainAssoc mesh_and_domain,
ParallelMesh pmesh,
Settings settings,
QualityAssessor quality_assessor,
MsqError err 
) [protected, virtual]

Function that each wrapper must implement

Implements MBMesquite::Wrapper.

Definition at line 55 of file LaplaceWrapper.cpp.

References MBMesquite::QualityAssessor::add_quality_assessment(), MBMesquite::InstructionQueue::add_quality_assessor(), MBMesquite::TerminationCriterion::cull_on_absolute_vertex_movement_edge_length(), doCulling, MBMesquite::inner(), MBMesquite::MsqError::INVALID_STATE, iterationLimit, maxTime, movementFactor, MSQ_ERRRTN, MSQ_SETERR, MBMesquite::outer(), MBMesquite::InstructionQueue::run_common(), MBMesquite::QualityImprover::set_inner_termination_criterion(), MBMesquite::InstructionQueue::set_master_quality_improver(), and MBMesquite::QualityImprover::set_outer_termination_criterion().

{
    if( maxTime <= 0.0 && movementFactor <= 0.0 && iterationLimit <= 0 )
    {
        MSQ_SETERR( err )
        ( "No termination criterion set.  "
          "LaplaceWrapper will run forever.",
          MsqError::INVALID_STATE );
        return;
    }

    IdealWeightInverseMeanRatio qa_metric;
    qa->add_quality_assessment( &qa_metric );

    LaplacianSmoother smoother;
    TerminationCriterion outer( "<type:laplace_outer>" ), inner( "<type:laplace_inner>" );
    if( maxTime > 0.0 ) outer.add_cpu_time( maxTime );
    if( iterationLimit > 0 ) outer.add_iteration_limit( iterationLimit );
    if( doCulling && movementFactor > 0.0 )
    {
        inner.cull_on_absolute_vertex_movement_edge_length( movementFactor );
        smoother.set_inner_termination_criterion( &inner );
    }
    else if( movementFactor > 0.0 )
    {
        outer.add_absolute_vertex_movement_edge_length( movementFactor );
    }
    smoother.set_outer_termination_criterion( &outer );

    InstructionQueue q;
    q.add_quality_assessor( qa, err );MSQ_ERRRTN( err );
    q.set_master_quality_improver( &smoother, err );MSQ_ERRRTN( err );
    q.add_quality_assessor( qa, err );MSQ_ERRRTN( err );
    q.run_common( mesh_and_domain, pmesh, settings, err );MSQ_ERRRTN( err );
}
void MBMesquite::LaplaceWrapper::set_cpu_time_limit ( double  seconds) [inline]

Specify timeout after which untangler will exit.

Specify a value less than or equal to zero for no limit

Definition at line 50 of file LaplaceWrapper.hpp.

References maxTime.

    {
        maxTime = seconds;
    }

Specify maximum number of iterations.

Specify a value less than or equal to zero for no limit

Definition at line 78 of file LaplaceWrapper.hpp.

References iterationLimit.

Referenced by main().

    {
        iterationLimit = limit;
    }

Specify factor by which to minimum distance a vertex must move in an iteration to avoid termination of the untangler.

Specify a value less than or equal to zero for no limit. Culling cannot be done w/out a limit on vertex movement

Definition at line 65 of file LaplaceWrapper.hpp.

References movementFactor.

Referenced by main().

    {
        movementFactor = f;
    }

Member Data Documentation

Definition at line 109 of file LaplaceWrapper.hpp.

Referenced by get_cpu_time_limit(), run_wrapper(), and set_cpu_time_limit().

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