38 #ifndef Mesquite_LaplacianSmoother_hpp
39 #define Mesquite_LaplacianSmoother_hpp
45 #ifdef MSQ_USE_OLD_STD_HEADERS
77 msq_std::vector<size_t> adj_vtx_ind,
82 msq_std::vector<size_t>::iterator iter;
91 scale_val=1.0/((double) num_adj_vtx);
94 for(j=0;j<dimension;++
j) {
96 iter=adj_vtx_ind.begin();
98 while(iter != adj_vtx_ind.end()){
99 avg[
j]+=verts[*iter][
j];
103 verts[free_ind][
j] = avg[
j]*scale_val;
Used to hold the error state and return it to the application.
virtual void initialize(PatchData &pd, MsqError &err)
Base class for concrete quality metrics.
invalid function argument passed
LaplacianSmoother(MsqError &err)
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
virtual void initialize_mesh_iteration(PatchData &pd, MsqError &err)
const MsqVertex * get_vertex_array(MsqError &err) const
Returns a pointer to the start of the vertex array.
virtual void optimize_vertex_positions(PatchData &pd, MsqError &err)
virtual void terminate_mesh_iteration(PatchData &pd, MsqError &err)
MsqVertex is the Mesquite object that stores information about the vertices in the mesh...
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)