MOAB: Mesh Oriented datABase  (version 5.3.0)
MBMesquite::Randomize Class Reference

Randomly perftubs the (un-culled) vertices. More...

#include <Randomize.hpp>

+ Inheritance diagram for MBMesquite::Randomize:
+ Collaboration diagram for MBMesquite::Randomize:

Public Member Functions

MESQUITE_EXPORT Randomize ()
 Constructor defaulting mPercent to .05.
MESQUITE_EXPORT Randomize (double percent)
 Constructor allowing user to set mPercent.
virtual MESQUITE_EXPORT ~Randomize ()
virtual MESQUITE_EXPORT std::string get_name () const
 Get string name for use in diagnostic and status output.
virtual MESQUITE_EXPORT PatchSetget_patch_set ()

Protected Member Functions

virtual void initialize (PatchData &pd, MsqError &err)
virtual void optimize_vertex_positions (PatchData &pd, MsqError &err)
virtual void initialize_mesh_iteration (PatchData &pd, MsqError &err)
virtual void terminate_mesh_iteration (PatchData &pd, MsqError &err)
virtual void cleanup ()

Private Attributes

double mPercent
std::vector< size_t > adjVtxList
VertexPatches patchSet

Detailed Description

Randomly perftubs the (un-culled) vertices.

Definition at line 52 of file Randomize.hpp.


Constructor & Destructor Documentation

Constructor defaulting mPercent to .05.

Definition at line 57 of file Randomize.cpp.

: mPercent( 0.5 ), patchSet( 1, true ) {}
Randomize::Randomize ( double  percent)

Constructor allowing user to set mPercent.

Definition at line 59 of file Randomize.cpp.

: mPercent( percent ), patchSet( 1, true ) {}
Randomize::~Randomize ( ) [virtual]

Definition at line 45 of file Randomize.cpp.

{}

Member Function Documentation

void Randomize::cleanup ( ) [protected, virtual]

Implements MBMesquite::VertexMover.

Definition at line 130 of file Randomize.cpp.

{
    //  cout << "- Executing Randomize::iteration_end()\n";
}
std::string Randomize::get_name ( ) const [virtual]

Get string name for use in diagnostic and status output.

Implements MBMesquite::Instruction.

Definition at line 47 of file Randomize.cpp.

{
    return "Randomize";
}

Implements MBMesquite::QualityImprover.

Definition at line 52 of file Randomize.cpp.

References patchSet.

{
    return &patchSet;
}
void Randomize::initialize ( PatchData pd,
MsqError err 
) [protected, virtual]

Implements MBMesquite::VertexMover.

Definition at line 61 of file Randomize.cpp.

{}
void Randomize::initialize_mesh_iteration ( PatchData pd,
MsqError err 
) [protected, virtual]

Implements MBMesquite::VertexMover.

Definition at line 63 of file Randomize.cpp.

{
    //  cout << "- Executing Randomize::iteration_complete()\n";
}
void Randomize::optimize_vertex_positions ( PatchData pd,
MsqError err 
) [protected, virtual]

Implements MBMesquite::VertexMover.

Definition at line 110 of file Randomize.cpp.

References mPercent, MSQ_ERRRTN, MBMesquite::MsqFreeVertexIndexIterator::next(), randomize_vertex(), MBMesquite::MsqFreeVertexIndexIterator::reset(), MBMesquite::PatchData::snap_vertex_to_domain(), and MBMesquite::MsqFreeVertexIndexIterator::value().

{
    // cout << "- Executing Randomize::optimize_vertex_position()\n";

    // gets the array of coordinates for the patch and print it
    // does the randomize smooth
    MsqFreeVertexIndexIterator free_iter( pd, err );MSQ_ERRRTN( err );
    free_iter.reset();
    free_iter.next();
    // find the free vertex.
    int m = free_iter.value();
    randomize_vertex( pd, m, mPercent, err );MSQ_ERRRTN( err );
    pd.snap_vertex_to_domain( m, err );MSQ_ERRRTN( err );
}
void Randomize::terminate_mesh_iteration ( PatchData pd,
MsqError err 
) [protected, virtual]

Implements MBMesquite::VertexMover.

Definition at line 125 of file Randomize.cpp.

{
    //  cout << "- Executing Randomize::iteration_complete()\n";
}

Member Data Documentation

std::vector< size_t > MBMesquite::Randomize::adjVtxList [private]

Definition at line 76 of file Randomize.hpp.

Parameters:
Thepercentage of the scale factor each vertex will be moved.

Definition at line 75 of file Randomize.hpp.

Referenced by optimize_vertex_positions().

Definition at line 77 of file Randomize.hpp.

Referenced by get_patch_set().

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