-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcuda_simulation.cuh
More file actions
77 lines (64 loc) · 1.68 KB
/
cuda_simulation.cuh
File metadata and controls
77 lines (64 loc) · 1.68 KB
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
#ifndef _CUDA_SIMULATION_CUH_
#define _CUDA_SIMULATION_CUH_
#include <cuda_runtime.h>
#include "Particle.h"
#include "SimParams.h"
#include "SceneParams.h"
#include "NeighborSearch.h"
//#include <helper_math.h>
#define MAX_THREAD_NUM 512
void allocate_array(void** devPtr, size_t size);
void set_sim_params(SimParams& param_in);
void integrate_pbd(
ParticleSet* particles,
float deltaTime,
uint numParticles,
bool cd_on
);
void compute_grid_size(uint n, uint block_size, uint& num_blocks, uint& num_threads);
void calculate_hash(
CellData cell_data,
float3* pos,
uint num_particles
);
void sort_particles(
CellData cell_data,
uint numParticles
);
void reorder_data(
CellData cell_data,
float3* oldPos,
uint numParticles,
uint numCells
);
void compute_boundary_volume(
CellData data,
float* mass,
float* volume, // output: volume of particle
uint numParticles
);
void snow_simulation(
ParticleSet* sph_particles,
ParticleSet* dem_particles,
ParticleSet* boundary_particles,
ParticleDeviceData* phase_change_buffer,
CellData sph_cell_data,
CellData dem_cell_data,
CellData b_cell_data,
SceneParams& scene_params,
float dt,
int iterations,
bool sph_dem_correction,
bool sph_sph_correction,
bool dem_friction,
bool compute_temperature,
bool change_phase,
bool simulate_freezing,
bool simulate_melting,
bool dem_viscosity,
bool use_interlink,
bool dynamic_max_connections,
bool cd_on,
float temperature_variation
);
#endif