Wildmeshing Toolkit
Loading...
Searching...
No Matches
components
tetwild
wmtk
components
tetwild
orig
State.h
1
// This file is part of TetWild, a software for generating tetrahedral meshes.
2
//
3
// Copyright (C) 2018 Jeremie Dumas <jeremie.dumas@ens-lyon.org>
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 Jeremie Dumas on 09/04/18.
10
//
11
12
#pragma once
13
14
#include <Eigen/Dense>
15
#include <limits>
16
#include <string>
17
18
#include "ForwardDecls.h"
19
20
namespace
wmtk::components::tetwild::orig {
21
22
// Global values computed from the user input
23
struct
State
24
{
25
const
int
EPSILON_INFINITE = -2;
26
const
double
MAX_ENERGY = 1e50;
27
const
int
NOT_SURFACE = std::numeric_limits<int>::max();
28
29
double
bbox_diag = 0;
// bbox diagonal
30
double
eps = 0;
// effective epsilon at the current stage (see \hat{\epsilon} in the paper)
31
double
eps_2 = 0;
32
double
initial_edge_len =
33
0;
// initial target edge-length defined by the user (the final lengths can be lower,
34
// depending on mesh quality and feature size)
35
bool
is_mesh_closed = 0;
// open mesh or closed mesh?
36
37
const
double
eps_input = 0;
// target epsilon entered by the user
38
const
double
eps_delta = 0;
// increment for the envelope at each sub-stage of the mesh
39
// optimization (see (3) p.8 of the paper)
40
int
sub_stage = 1;
// sub-stage within the stage that tetwild was called with
41
42
double
bbox_dis = 0.05;
// relative bbox distance to the input
43
45
// [testing] //
47
48
// Project vertices to the plane of their one-ring instead of the original surface during vertex
49
// smoothing
50
const
bool
use_onering_projection =
false
;
51
52
// Set program constants given user parameters and input mesh
53
State
(
const
Args
& args,
const
double
& bbox_diagonal);
54
};
55
56
57
struct
MeshRecord
58
{
59
enum
OpType {
60
OP_INIT = 0,
61
OP_PREPROCESSING,
62
OP_DELAUNEY_TETRA,
63
OP_DIVFACE_MATCH,
64
OP_BSP,
65
OP_SIMPLE_TETRA,
66
67
OP_OPT_INIT,
68
OP_SPLIT,
69
OP_COLLAPSE,
70
OP_SWAP,
71
OP_SMOOTH,
72
OP_ADAP_UPDATE,
73
OP_WN,
74
OP_UNROUNDED
75
};
76
77
int
op;
78
double
timing;
79
int
n_v;
80
int
n_t;
81
double
max_energy = -1;
82
double
avg_energy = -1;
83
84
MeshRecord
(
int
op_,
double
timing_,
int
n_v_,
int
n_t_)
85
{
86
this->op = op_;
87
this->timing = timing_;
88
this->n_v = n_v_;
89
this->n_t = n_t_;
90
}
91
};
92
93
}
// namespace wmtk::components::tetwild::orig
wmtk::components::tetwild::orig::Args
Definition
Args.h:20
wmtk::components::tetwild::orig::MeshRecord
Definition
State.h:58
wmtk::components::tetwild::orig::State
Definition
State.h:24
Generated by
1.9.8