Commit 114401c4 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

fix initialization of orientations

parent 491e8bec
Pipeline #20691 passed with stage
in 10 minutes and 25 seconds
......@@ -746,7 +746,7 @@ class DNS(_code):
def get_random_versors(npoints):
bla = np.random.normal(
size = (npoints, 3))
bla /= np.sum(bla**2, axis = 1)[:, None]
bla /= np.sum(bla**2, axis = 1)[:, None]**.5
return bla
while nn > 0:
if nn > batch_size:
......@@ -908,6 +908,8 @@ class DNS(_code):
particle_file.create_group('tracers0/position')
particle_file.create_group('tracers0/velocity')
particle_file.create_group('tracers0/acceleration')
if self.dns_type in ['NSVEparticlesP2P']:
particle_file.create_group('tracers0/orientation')
return None
def launch_jobs(
self,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment