Randomly perftubs the (un-culled) vertices. More...
#include <Randomize.hpp>
Public Member Functions | |
Randomize () | |
Constructor defaulting mPercent to .05. More... | |
Randomize (double percent) | |
Constructor allowing user to set mPercent. More... | |
virtual | ~Randomize () |
Randomize () | |
Constructor defaulting mPercent to .05. More... | |
Randomize (double percent) | |
Constructor allowing user to set mPercent. More... | |
virtual | ~Randomize () |
Public Member Functions inherited from VertexMover | |
virtual | ~VertexMover () |
virtual double | loop_over_mesh (MeshSet &ms, MsqError &err) |
Improves the quality of the MeshSet, calling some methods specified in a class derived from VertexMover. More... | |
virtual | ~VertexMover () |
virtual double | loop_over_mesh (MeshSet &ms, MsqError &err) |
This is the "run" function of PatchDataUser. It can do anything really. More... | |
Public Member Functions inherited from QualityImprover | |
virtual | ~QualityImprover () |
void | set_name (msq_std::string name) |
provides a name to the QualityImprover (use it in constructor). More... | |
virtual msq_std::string | get_name () |
retrieves the QualityImprover name. A default name should be set in the constructor. More... | |
virtual AlgorithmType | get_algorithm_type () |
Return the algorithm type (to avoid RTTI use). More... | |
void | set_inner_termination_criterion (TerminationCriterion *crit) |
Sets in the termination criterion for the concrete solver's optimization. More... | |
void | set_outer_termination_criterion (TerminationCriterion *crit) |
Sets in the termination criterion for the outer loop over patches. More... | |
virtual | ~QualityImprover () |
void | set_name (msq_std::string name) |
provides a name to the QualityImprover (use it in constructor). More... | |
virtual msq_std::string | get_name () |
retrieves the QualityImprover name. A default name should be set in the constructor. More... | |
virtual AlgorithmType | get_algorithm_type () |
Return the algorithm type (to avoid RTTI use). More... | |
void | set_inner_termination_criterion (TerminationCriterion *crit) |
Sets in the termination criterion for the concrete solver's optimization. More... | |
void | set_outer_termination_criterion (TerminationCriterion *crit) |
Sets in the termination criterion for the outer loop over patches. More... | |
Public Member Functions inherited from PatchDataUser | |
virtual | ~PatchDataUser () |
virtual void | set_patch_type (PatchData::PatchType patch_type, MsqError &err, int param1=0, int param2=0) |
Sets the Patch Type. More... | |
PatchData::PatchType | get_patch_type () |
Returns the Patch Type. More... | |
int | get_nb_layers (MsqError &err) |
Returns number of layers (if relevant for partition algorythm). More... | |
void | add_culling_method (enum PatchData::culling_method cm) |
Sets on the culling method passed as argument. More... | |
void | no_culling_method () |
Sets off all culling methods. More... | |
void | remove_culling_method (enum PatchData::culling_method cm) |
Sets off the culling method passed as argument. More... | |
long unsigned int | get_culling_method_bits () |
Returns the bitset containing culling methods flags. More... | |
void | set_all_parameters (PatchDataParameters ¶ms) |
PatchDataParameters & | get_all_parameters () |
Returns the PatchDataParameters object. More... | |
void | set_global_patch (PatchData *pd, MsqError &err) |
Sets the Global Patch, so that it can be use by contiguoug PatchDataUser. More... | |
PatchData * | get_global_patch () |
Returns the Global Patch. More... | |
void | no_global_patch () |
Sets the Global Patch pointer to NULL. More... | |
virtual | ~PatchDataUser () |
virtual void | set_patch_type (PatchData::PatchType patch_type, MsqError &err, int param1=0, int param2=0) |
Sets the Patch Type. More... | |
PatchData::PatchType | get_patch_type () |
Returns the Patch Type. More... | |
int | get_nb_layers (MsqError &err) |
Returns number of layers (if relevant for partition algorythm). More... | |
void | add_culling_method (enum PatchData::culling_method cm) |
Sets on the culling method passed as argument. More... | |
void | no_culling_method () |
Sets off all culling methods. More... | |
void | remove_culling_method (enum PatchData::culling_method cm) |
Sets off the culling method passed as argument. More... | |
long unsigned int | get_culling_method_bits () |
Returns the bitset containing culling methods flags. More... | |
void | set_all_parameters (PatchDataParameters ¶ms) |
PatchDataParameters & | get_all_parameters () |
Returns the PatchDataParameters object. More... | |
void | set_global_patch (PatchData *pd, MsqError &err) |
Sets the Global Patch, so that it can be use by contiguoug PatchDataUser. More... | |
PatchData * | get_global_patch () |
Returns the Global Patch. More... | |
void | no_global_patch () |
Sets the Global Patch pointer to NULL. More... | |
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 () |
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 () |
Protected Member Functions inherited from VertexMover | |
VertexMover () | |
size_t | check_feasible (PatchData &pd, MsqError &err) |
CHECK FEASIBLE IS NOT YET IMPLEMENTED. More... | |
VertexMover () | |
size_t | check_feasible (PatchData &pd, MsqError &err) |
CHECK FEASIBLE IS NOT YET IMPLEMENTED. More... | |
Protected Member Functions inherited from QualityImprover | |
QualityImprover () | |
const MeshSet * | get_mesh_set () const |
MeshSet * | get_mesh_set () |
void | set_mesh_set (MeshSet *ms) |
TerminationCriterion * | get_outer_termination_criterion () |
return the outer termination criterion pointer More... | |
TerminationCriterion * | get_inner_termination_criterion () |
return the inner termination criterion pointer More... | |
QualityImprover () | |
const MeshSet * | get_mesh_set () const |
MeshSet * | get_mesh_set () |
void | set_mesh_set (MeshSet *ms) |
TerminationCriterion * | get_outer_termination_criterion () |
return the outer termination criterion pointer More... | |
TerminationCriterion * | get_inner_termination_criterion () |
return the inner termination criterion pointer More... | |
Protected Member Functions inherited from PatchDataUser | |
PatchDataUser () | |
PatchDataUser () | |
Private Member Functions | |
void | randomize_vertex (PatchData &pd, size_t num_vtx, MsqVertex &free_vtx, MsqError &err) |
Perturbs the free vertex randomly. More... | |
void | randomize_vertex (PatchData &pd, size_t num_vtx, MsqVertex &free_vtx, MsqError &err) |
Private Attributes | |
double | mPercent |
Additional Inherited Members | |
Public Types inherited from PatchDataUser | |
enum | AlgorithmType { QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR, QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR } |
enum | AlgorithmType { QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR, QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR } |
Protected Attributes inherited from VertexMover | |
ObjectiveFunction * | objFunc |
Randomly perftubs the (un-culled) vertices.
Definition at line 52 of file includeLinks/Randomize.hpp.
Randomize | ( | ) |
Constructor defaulting mPercent to .05.
Definition at line 44 of file QualityImprover/VertexMover/Randomize/Randomize.cpp.
References Randomize::mPercent, and QualityImprover::set_name().
Randomize | ( | double | percent | ) |
Constructor allowing user to set mPercent.
Definition at line 50 of file QualityImprover/VertexMover/Randomize/Randomize.cpp.
References Randomize::mPercent, and QualityImprover::set_name().
|
inlinevirtual |
Definition at line 60 of file includeLinks/Randomize.hpp.
Randomize | ( | ) |
Constructor defaulting mPercent to .05.
Randomize | ( | double | percent | ) |
Constructor allowing user to set mPercent.
|
inlinevirtual |
Definition at line 60 of file src/QualityImprover/VertexMover/Randomize/Randomize.hpp.
|
protectedvirtual |
Implements VertexMover.
Definition at line 90 of file QualityImprover/VertexMover/Randomize/Randomize.cpp.
|
protectedvirtual |
Implements VertexMover.
Implements VertexMover.
Definition at line 56 of file QualityImprover/VertexMover/Randomize/Randomize.cpp.
References PatchData::ELEMENTS_ON_VERTEX_PATCH, and PatchDataUser::set_patch_type().
Implements VertexMover.
Implements VertexMover.
Implements VertexMover.
Definition at line 61 of file QualityImprover/VertexMover/Randomize/Randomize.cpp.
Implements VertexMover.
Implements VertexMover.
Definition at line 66 of file QualityImprover/VertexMover/Randomize/Randomize.cpp.
References PatchData::get_vertex_array(), MSQ_ERRRTN, MsqFreeVertexIndexIterator::next(), PatchData::num_vertices(), Randomize::randomize_vertex(), MsqFreeVertexIndexIterator::reset(), PatchData::snap_vertex_to_domain(), and MsqFreeVertexIndexIterator::value().
|
inlineprivate |
Function calculates a scale factor for the patch, then moves the incident vertex randomly in each of the three coordinate directions (relative to the scale factor multiplied by mPercent).
|
inlineprivate |
Perturbs the free vertex randomly.
Function calculates a scale factor for the patch, then moves the incident vertex randomly in each of the three coordinate directions (relative to the scale factor multiplied by mPercent).
Definition at line 83 of file includeLinks/Randomize.hpp.
References PatchData::get_vertex_array(), PatchData::get_vertex_index(), i, j, Mesquite::length(), Randomize::mPercent, MSQ_ERRRTN, MSQ_PRINT, and cimg_library::cimg::rand().
Referenced by Randomize::optimize_vertex_positions().
Implements VertexMover.
Definition at line 85 of file QualityImprover/VertexMover/Randomize/Randomize.cpp.
Implements VertexMover.
|
private |
The | percentage of the scale factor each vertex will be moved. |
Definition at line 71 of file includeLinks/Randomize.hpp.
Referenced by Randomize::Randomize(), and Randomize::randomize_vertex().