-
Notifications
You must be signed in to change notification settings - Fork 3
/
TetrahedralMesh.h
56 lines (45 loc) · 1.38 KB
/
TetrahedralMesh.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
/***************************************************************************/
/* CUDA based TLED Solver */
/* {c} 2008-2010 Karsten Noe */
/* The Alexandra Institute */
/* See out blog on cg.alexandra.dk */
/***************************************************************************/
#ifndef TETRAHEDRALMESH
#define TETRAHEDRALMESH
#include <vector_types.h>
typedef float4 Point;
typedef int4 Tetrahedron;
typedef uint3 Triangle;
struct TriangleSurface
{
Triangle* faces;
int numFaces;
};
struct TetrahedralMesh
{
Point * points;
int numPoints;
Tetrahedron * tetrahedra;
int numTetrahedra;
int4 *writeIndices;
int numWriteIndices;
float *volume;
float *mass;
};
struct ShapeFunctionDerivatives
{
float3 h1; // derivatives at node 1 w.r.t. (x,y,z)
float3 h2; // derivatives at node 2 w.r.t. (x,y,z)
float3 h3; // derivatives at node 3 w.r.t. (x,y,z)
float3 h4; // derivatives at node 4 w.r.t. (x,y,z)
};
struct TetrahedralTLEDState
{
float4 *sumCollisionForces;
float4 *ABC, *Ui_t, *Ui_tminusdt, *pointForces, *externalForces;
ShapeFunctionDerivatives *shape_function_deriv;
int maxNumForces;
float mu, lambda;
float timeStep;
};
#endif