forked from fortmeier/CUDA-FE-With-Haptics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TLEDSolver.h
28 lines (24 loc) · 1.77 KB
/
TLEDSolver.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
/***************************************************************************/
/* CUDA based TLED Solver */
/* {c} 2008-2010 Karsten Noe */
/* The Alexandra Institute */
/* See our blog on cg.alexandra.dk */
/***************************************************************************/
#include "TetrahedralMesh.h"
namespace TLED {
void precompute(TetrahedralMesh* mesh, TetrahedralTLEDState *state,
float density, float smallestAllowedVolume, float smallestAllowedLength,
float mu, float lambda, float timeStepFactor, float damping);
void doTimeStep(TetrahedralMesh* mesh, TetrahedralTLEDState *state);
TetrahedralMesh* allocAndCopyMesh(Tetrahedron* hTets, int numTetrahedra, Point* hPoints, int numVertices);
TetrahedralMesh* loadMesh(const char* filename);
void copyStateToHost(TetrahedralTLEDState* state, TetrahedralMesh* mesh, Point* hPoints);
void copyStateToDevice(TetrahedralTLEDState* state, TetrahedralMesh* mesh, Point* hPoints);
void display(unsigned int object_number, TetrahedralMesh* mesh, TetrahedralTLEDState *state, TriangleSurface* surface);
TriangleSurface* loadSurfaceOBJ(const char* filename);
void calculateGravityForces(TetrahedralMesh* mesh, TetrahedralTLEDState *state);
void applyFloorConstraint(TetrahedralMesh* mesh, TetrahedralTLEDState *state, float floorZPosition);
void cleanupDisplay(void);
float CPUPrecalculation(TetrahedralMesh *mesh, int blockSize, int& return_maxNumForces, float density, float smallestAllowedVolume, float smallestAllowedLength);
void calculateInternalForces(TetrahedralMesh* mesh, TetrahedralTLEDState *state);
}