41 #include "MsqDebug.hpp"
42 #include "LInfTemplate.hpp"
43 #include "IdealWeightInverseMeanRatio.hpp"
45 #ifdef MSQ_USE_OLD_STD_HEADERS
58 : edgeQM(0), defaultObjFunc(0)
60 this->
set_name(
"SmartLaplacianSmoother");
114 size_t m=free_iter.
value();
115 vector<size_t> vert_indices;
116 vert_indices.reserve(25);
135 if(!valid_flag || mod_val>orig_val){
137 verts[m]=orig_position;
size_t value()
Returns an index corresponding to a free vertex.
SmartLaplacianSmoother(ObjectiveFunction *obj_func, MsqError &err)
virtual void set_patch_type(PatchData::PatchType patch_type, MsqError &err, int param1=0, int param2=0)
Sets the Patch Type.
Used to hold the error state and return it to the application.
Computes the inverse mean ratio of given element.
bool evaluate(PatchData &patch, double &fval, MsqError &err)
void set_name(msq_std::string name)
provides a name to the QualityImprover (use it in constructor).
Vector3D is the object that effeciently stores information about about three-deminsional vectors...
virtual void initialize(PatchData &pd, MsqError &err)
void reset()
Resets the iterator.
bool next()
Increments the iterator. returns false if there is no more free vertex.
ObjectiveFunction * objFunc
void snap_vertex_to_domain(size_t vertex_index, MsqError &err)
Adjust the position of the specified vertex so that it lies on its constraining domain.
virtual void initialize_mesh_iteration(PatchData &pd, MsqError &err)
void get_adjacent_vertex_indices(size_t vertex_index, msq_std::vector< size_t > &vert_indices, MsqError &err)
virtual void terminate_mesh_iteration(PatchData &pd, MsqError &err)
virtual void optimize_vertex_positions(PatchData &pd, MsqError &err)
const MsqVertex * get_vertex_array(MsqError &err) const
Returns a pointer to the start of the vertex array.
Computes the L_infinity objective function for a given patch, i.e., LInfTemplate::concrete_evaluate r...
iterates over indexes of free vetices in a PatchData.
MsqVertex is the Mesquite object that stores information about the vertices in the mesh...
#define MSQ_ERRRTN(err)
If passed error is true, return from a void function.
~SmartLaplacianSmoother()
Base class for concrete Objective Functions ObjectiveFunction contains a pointer to a QualityMetric...
void centroid_smooth_mesh(PatchData &pd, size_t num_adj_vtx, msq_std::vector< size_t > adj_vtx_ind, size_t free_ind, size_t dimension, MsqError &err)
ObjectiveFunction * defaultObjFunc