MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Randomly perftubs the (un-culled) vertices. More...
#include <Randomize.hpp>
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 PatchSet * | get_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 |
Randomly perftubs the (un-culled) vertices.
Definition at line 52 of file Randomize.hpp.
Constructor defaulting mPercent to .05.
Definition at line 57 of file Randomize.cpp.
Randomize::Randomize | ( | double | percent | ) |
Constructor allowing user to set mPercent.
Definition at line 59 of file Randomize.cpp.
Randomize::~Randomize | ( | ) | [virtual] |
Definition at line 45 of file Randomize.cpp.
{}
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"; }
PatchSet * Randomize::get_patch_set | ( | ) | [virtual] |
Implements MBMesquite::QualityImprover.
Definition at line 52 of file Randomize.cpp.
References patchSet.
{ return &patchSet; }
void Randomize::initialize | ( | PatchData & | pd, |
MsqError & | err | ||
) | [protected, virtual] |
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";
}
std::vector< size_t > MBMesquite::Randomize::adjVtxList [private] |
Definition at line 76 of file Randomize.hpp.
double MBMesquite::Randomize::mPercent [private] |
The | percentage of the scale factor each vertex will be moved. |
Definition at line 75 of file Randomize.hpp.
Referenced by optimize_vertex_positions().
VertexPatches MBMesquite::Randomize::patchSet [private] |
Definition at line 77 of file Randomize.hpp.
Referenced by get_patch_set().