From 18c27ca60bc364d5e6cb811f56ec8c4f72867ac9 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 26 Mar 2020 21:30:05 +0100 Subject: 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... --- random_velocities.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'random_velocities.py') 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) -- cgit v1.2.3