Wildmeshing Toolkit
Loading...
Searching...
No Matches
VertexSmoother.h
1// This file is part of TetWild, a software for generating tetrahedral meshes.
2//
3// Copyright (C) 2018 Yixin Hu <yixin.hu@nyu.edu>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8//
9// Created by Yixin Hu on 4/11/17.
10//
11
12#ifndef NEW_GTET_VERTEXSMOOTHER_H
13#define NEW_GTET_VERTEXSMOOTHER_H
14
15#include "LocalOperations.h"
16
17namespace wmtk::components::tetwild::orig {
18
20{
21public:
23 : LocalOperations(lo)
24 {}
25
26 void smooth();
30 void smoothSingle();
31 bool smoothSingleVertex(int v_id, bool is_cal_energy);
35 void smoothSurface();
36
37 bool NewtonsMethod(
38 const std::vector<int>& t_ids,
39 const std::vector<std::array<int, 4>>& new_tets,
40 int v_id,
41 Vector3d& p);
42 bool NewtonsUpdate(
43 const std::vector<int>& t_ids,
44 int v_id,
45 double& energy,
46 Eigen::Vector3d& J,
47 Eigen::Matrix3d& H,
48 Eigen::Vector3d& X0);
49 double getNewEnergy(const std::vector<int>& t_ids);
50
51 int ts;
52 std::vector<int> tets_tss;
53 std::vector<int> tet_vertices_tss;
54
55 int id_value_e = 0;
56 int id_value_j = 1;
57 int id_value_h = 2;
58 int id_solve = 3;
59 int id_aabb = 4;
60 int id_project = 5;
61 int id_round = 6;
62 std::array<double, 7> breakdown_timing = {{0, 0, 0, 0, 0, 0, 0}};
63 std::array<std::string, 7> breakdown_name = {
64 {"Computing E",
65 "Computing J",
66 "Computing H",
67 "Solving linear system",
68 "AABB",
69 "Project",
70 "Rounding"}};
71 igl::Timer igl_timer;
72};
73
74} // namespace wmtk::components::tetwild::orig
75
76#endif // NEW_GTET_VERTEXSMOOTHER_H
void smoothSurface()
Smooth all surface vertices except for deleted, and locked vertices.
Definition VertexSmoother.cpp:234
void smoothSingle()
Smooth all vertices except for deleted, locked, bbox, and surface vertices.
Definition VertexSmoother.cpp:120
bool smoothSingleVertex(int v_id, bool is_cal_energy)
Definition VertexSmoother.cpp:50