diff options
author | Adrian Kummerlaender | 2020-03-26 21:30:05 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2020-03-26 21:30:05 +0100 |
commit | 18c27ca60bc364d5e6cb811f56ec8c4f72867ac9 (patch) | |
tree | 1ad7ba010272b9d04c822e33a00a28d48be19274 /random_velocities.py | |
parent | 2af16451f5119398c34ef9bd8626791e0498b9ab (diff) | |
download | boltzgas-18c27ca60bc364d5e6cb811f56ec8c4f72867ac9.tar boltzgas-18c27ca60bc364d5e6cb811f56ec8c4f72867ac9.tar.gz boltzgas-18c27ca60bc364d5e6cb811f56ec8c4f72867ac9.tar.bz2 boltzgas-18c27ca60bc364d5e6cb811f56ec8c4f72867ac9.tar.lz boltzgas-18c27ca60bc364d5e6cb811f56ec8c4f72867ac9.tar.xz boltzgas-18c27ca60bc364d5e6cb811f56ec8c4f72867ac9.tar.zst boltzgas-18c27ca60bc364d5e6cb811f56ec8c4f72867ac9.zip |
Prototype port to 3D
What is it with OpenCL @ GPU and arrays of 3-dimensional vectors?!
Luckily I vaguely remembered encountering this problem before when
implementing my OpenCL LBM code but why on earth is the compiler not
warning about this? I guess the underlying reason has to do with the
data alignment requirements on the GPU but still...
Diffstat (limited to 'random_velocities.py')
-rw-r--r-- | random_velocities.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/random_velocities.py b/random_velocities.py index cf7a503..2d60f3b 100644 --- a/random_velocities.py +++ b/random_velocities.py @@ -4,20 +4,20 @@ from boltzgas import HardSphereSetup, HardSphereSimulation from boltzgas.initial_condition import grid_of_random_velocity_particles from boltzgas.visual import VelocityHistogram, ColoredBox, Tracer -grid_width = 50 -radius = 0.002 +grid_width = 10 +radius = 0.005 char_u = 1120 position, velocity = grid_of_random_velocity_particles(grid_width, radius, char_u) config = HardSphereSetup(radius, char_u, position, velocity) -gas = HardSphereSimulation(config, opengl = True) +gas = HardSphereSimulation(config, opengl = True, t_scale=1) -tracer = Tracer(gas, int((grid_width**2)/2+grid_width/2)) +#tracer = Tracer(gas, int((grid_width**2)/2+grid_width/2)) histogram = VelocityHistogram(gas, [1.1,0], [1,1]) -decorations = [ ColoredBox([0,0], [1,1], (0.2,0.2,0.2)), tracer ] -instruments = [ histogram, tracer ] +decorations = [ ] +instruments = [ histogram ] windows = [ histogram ] boltzgas.visualizer.simulate(config, gas, instruments, decorations, windows) |