39 #include "SmartLaplacianSmoother.hpp"
40 #include "LaplacianSmoother.hpp"
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");
103 MsqVertex* verts=pd.get_vertex_array(err);
MSQ_ERRRTN(err);
110 MsqFreeVertexIndexIterator free_iter(&pd, err);
MSQ_ERRRTN(err);
114 size_t m=free_iter.value();
115 vector<size_t> vert_indices;
116 vert_indices.reserve(25);
118 pd.get_adjacent_vertex_indices(m,vert_indices,err);
MSQ_ERRRTN(err);
126 pd.snap_vertex_to_domain(m,err);
MSQ_ERRRTN(err);
135 if(!valid_flag || mod_val>orig_val){
137 verts[m]=orig_position;
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.
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).
virtual void initialize(PatchData &pd, MsqError &err)
NVec< 3, double > Vector3D
ObjectiveFunction * objFunc
virtual void initialize_mesh_iteration(PatchData &pd, MsqError &err)
virtual void terminate_mesh_iteration(PatchData &pd, MsqError &err)
virtual void optimize_vertex_positions(PatchData &pd, MsqError &err)
#define MSQ_ERRRTN(err)
If passed error is true, return from a void function.
~SmartLaplacianSmoother()
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