Commit cea91d30 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

fix infinity issue

parent d129eb9b
Pipeline #21869 passed with stage
in 6 minutes and 20 seconds
......@@ -236,6 +236,9 @@ class DNS(_code):
ii0 = iter0 // self.parameters['niter_stat']
ii1 = iter1 // self.parameters['niter_stat']
self.statistics['kshell'] = data_file['kspace/kshell'].value
for kk in [-1, -2]:
if (self.statistics['kshell'][kk] == 0):
self.statistics['kshell'][kk] = np.nan
self.statistics['kM'] = data_file['kspace/kM'].value
self.statistics['dk'] = data_file['kspace/dk'].value
computation_needed = True
......
......@@ -598,6 +598,9 @@ class NavierStokes(_fluid_particle_base):
ii0 = iter0 // self.parameters['niter_stat']
ii1 = iter1 // self.parameters['niter_stat']
self.statistics['kshell'] = data_file['kspace/kshell'].value
for kk in [-1, -2]:
if (self.statistics['kshell'][kk] == 0):
self.statistics['kshell'][kk] = np.nan
self.statistics['kM'] = data_file['kspace/kM'].value
self.statistics['dk'] = data_file['kspace/dk'].value
computation_needed = True
......
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