No modif_resolution_from_dir in 3d pseudospectral
Trying to use the function util.util.modif_resolution_from_dir
on a directory from a 3d pseudospectral solver (typically solver.ns3d.strat
) gives the following error:
Traceback (most recent call last):
File "test.py", line 10, in <module>
modif_resolution_from_dir(name_dir=sim_dir, coef_modif_resol=coef_res, PLOT=True)
File "/home/users/reneuve3ja/Dev/fluidsim/fluidsim/util/util.py", line 418, in modif_resolution_from_dir
sim2.init_fields.get_state_from_simul(sim)
File "/home/users/reneuve3ja/Dev/fluidsim/fluidsim/base/init_fields.py", line 348, in _get_state_from_simul
[nk0_seq, nk1_seq] = field_fft_seq_new_res.shape
ValueError: too many values to unpack (expected 2)
Looking into base.init_fields
at line 348 I found a warning:
def _get_state_from_simul(self, sim_in):
# Warning: this function is for 2d pseudo-spectral solver!
# We have to write something more general.
# It should be done directly in the operators.
So the problem seems to be that this function is not implemented for 3d pseudospectral solvers.