int superMi::update_mesh(Solid* mesh, double deltaT) { for (SolidVertexIterator sviter(mesh); !sviter.end(); ++sviter){ Vertex* sv = *sviter; sv->point() -= sv->absolute_derivative()*deltaT; sv->point() /= sv->point().norm(); } return 0; }
int superMi::absolute_derivative(Solid* mesh) { for (SolidVertexIterator sviter(mesh); !sviter.end(); ++sviter){ Vertex* sv = *sviter; Point hi = sv->normal() * (sv->gradient()*sv->normal()); sv->absolute_derivative() = sv->gradient() - hi; } return 0; }