1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef Mesquite_SmartLaplacianSmoother_hpp
#define Mesquite_SmartLaplacianSmoother_hpp

#include "Mesquite.hpp"
#include "RelaxationSmoother.hpp"

#include <vector>

namespace MBMesquite
{
/*\brief Do laplacian smooth, but don't invert elements.
 */
class SmartLaplacianSmoother : public RelaxationSmoother
{
  public:
    /**
     *\param OF ObjectiveFunction used by some termination criteria
     */
    MESQUITE_EXPORT
    SmartLaplacianSmoother( ObjectiveFunction* OF = NULL ) : RelaxationSmoother( OF ) {}

    MESQUITE_EXPORT
    ~SmartLaplacianSmoother();

    MESQUITE_EXPORT
    virtual std::string get_name() const;

    MESQUITE_EXPORT
    static size_t num_inverted( PatchData& pd, MsqError& err );

  protected:
    MESQUITE_EXPORT
    virtual void optimize_vertex_positions( PatchData& pd, MsqError& err );<--- Function in derived class

  private:
    std::vector< size_t > adjVtxList;
};

}  // namespace MBMesquite

#endif