Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TSBK03 project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adam Nyberg
TSBK03 project
Commits
66536cce
Commit
66536cce
authored
8 months ago
by
Adam Nyberg
Browse files
Options
Downloads
Patches
Plain Diff
Better parametrs + constant gravity. Constants still neeed fine tuning
parent
c8d2f48f
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/constants.h
+3
-3
3 additions, 3 deletions
src/constants.h
src/kernels_cuda.cu
+3
-3
3 additions, 3 deletions
src/kernels_cuda.cu
src/main.cpp
+3
-3
3 additions, 3 deletions
src/main.cpp
with
9 additions
and
9 deletions
src/constants.h
+
3
−
3
View file @
66536cce
...
...
@@ -9,10 +9,10 @@ const float h_BOUND_Y_MAX = 12.0f;
const
float
h_BOUND_Z_MIN
=
-
4
.
0
f
;
const
float
h_BOUND_Z_MAX
=
4
.
0
f
;
const
float
h_GAS_CONSTANT
=
30
0
.
0
f
;
const
float
h_VISCOSITY
=
0
.
8
f
;
const
float
h_GAS_CONSTANT
=
1
0
.
0
f
;
const
float
h_VISCOSITY
=
0
.
2
f
;
const
float
h_PI
=
3
.
14159265358979323846
f
;
const
float
h_H
=
0
.
4
f
;
// Smoothing radius
const
float
h_H
=
0
.
5
f
;
// Smoothing radius
#endif // CONSTANTS_H
This diff is collapsed.
Click to expand it.
src/kernels_cuda.cu
+
3
−
3
View file @
66536cce
...
...
@@ -23,8 +23,8 @@ __constant__ float POLY6_CONST;
__constant__
float
SPIKY_GRAD_CONST
;
__constant__
float
VISC_LAP_CONST
;
__constant__
float
PARTICLE_MASS
=
8
.0
f
;
__constant__
float
REST_DENSITY
=
100
0.0
f
;
__constant__
float
PARTICLE_MASS
=
1
.0
f
;
__constant__
float
REST_DENSITY
=
6
0.0
f
;
__constant__
float
GAS_CONSTANT
;
__constant__
float
VISCOSITY
;
...
...
@@ -250,7 +250,7 @@ __global__ void computeForces(
float3
fPressure
=
make_float3
(
0.0
f
,
0.0
f
,
0.0
f
);
float3
fViscosity
=
make_float3
(
0.0
f
,
0.0
f
,
0.0
f
);
float3
fGravity
=
make_float3
(
0.0
f
,
-
16
.0
f
*
density_i
,
0.0
f
);
float3
fGravity
=
make_float3
(
0.0
f
,
-
2
.0
f
,
0.0
f
);
unsigned
int
cellIndex
=
cellIndices
[
idx
];
...
...
This diff is collapsed.
Click to expand it.
src/main.cpp
+
3
−
3
View file @
66536cce
...
...
@@ -23,10 +23,10 @@
#include
"GL_utilities.h"
// Number of particles
const
int
NUM_PARTICLES
=
8
000
;
// Should match a cubic grid for simplicity
const
float
GRID_SPACING
=
0.5
f
;
// Spacing between particles in the grid
const
int
NUM_PARTICLES
=
64
000
;
// Should match a cubic grid for simplicity
const
float
GRID_SPACING
=
0.
2
5
f
;
// Spacing between particles in the grid
const
float
pointRadius
=
8
.0
f
;
// Point size in world space
const
float
pointRadius
=
6
.0
f
;
// Point size in world space
const
float
pointScale
=
16.0
f
;
auto
previousTime
=
std
::
chrono
::
high_resolution_clock
::
now
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment