-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHodgeDecomposition.h
90 lines (71 loc) · 1.96 KB
/
HodgeDecomposition.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef _HODGE_DECOMPOSITION_H_
#define _HODGE_DECOMPOSITION_H_
#include "HodgeDecompositionMesh.h"
namespace MeshLib
{
/*! \brief CHodgeDecomposition class
*
* Hodge Decomposition
*/
class CHodgeDecomposition
{
public:
/*!
* CHodgeDecomposition constructor
*/
CHodgeDecomposition();
void set_mesh(CHodgeDecompositionMesh* pMesh);
/*!
* compute a random holomorphic form
*/
void random_harmonic_form();
/*!
* compute exact harmonic form
*/
void exact_harmonic_form( int bnd_id );
void integration(CHodgeDecompositionMesh* pForm, CHodgeDecompositionMesh* pDomain);
protected:
/*!
* Compute angle using cosine law
* \param a first edge length
* \param b second edge length
* \param c third edge length
* \return angle between 1st and 2nd edges
*/
double _inverse_cosine_law(double a, double b, double c);
/*! exterior differentiation operator */
void _d(int dimension);
/*! delta operator */
void _delta(int dimension);
/*!
* Compute edge weight
*/
void _calculate_edge_weight(bool using_geometry);
/*! find the exact form */
void _compute_exact_form();
/*! find the coexact form */
void _compute_coexact_form();
/*! compute the harmonic form */
void _normalize();
/*! random 1-form */
void _random_form();
/*! verify if the 1-form is closed */
void _test_closedness();
/*! verify if the 1-form is closed */
void _test_coclosedness();
/*! remove df from \omega */
void _remove_exact_form();
/*! remove \delta \eta from \omega */
void _remove_coexact_form();
/*! exact harmonic form */
void _exact_harmonic_form();
/*! set boundary conditions for exact harmonic forms */
void _set_boundary_condition(int boundary_id);
protected:
/*!
* The input surface mesh
*/
CHodgeDecompositionMesh* m_pMesh;
};
}
#endif // !_HODGE_DECOMPOSITION_H_