fix save_wake savedata
@@ -5,11 +5,9 @@ import sharpy.utils.cout_utils as cout
from sharpy.utils.solver_interface import solver, BaseSolver
import sharpy.utils.settings as settings
import sharpy.utils.h5utils as h5utils
+from sharpy.presharpy.presharpy import PreSharpy
-# Define basic numerical types
-# BasicNumTypes=(float,float32,float64,int,int32,int64,complex)
-
@solver
class SaveData(BaseSolver):
"""
@@ -96,7 +94,6 @@ class SaveData(BaseSolver):
settings_options=settings_options)
def __init__(self):
- import sharpy
self.settings = None
self.data = None
@@ -109,7 +106,7 @@ class SaveData(BaseSolver):
### specify which classes are saved as hdf5 group
# see initialise and add_as_grp
- self.ClassesToSave = (sharpy.presharpy.presharpy.PreSharpy,)
+ self.ClassesToSave = (PreSharpy,)
def initialise(self, data, custom_settings=None, caller=None):
@@ -135,6 +132,7 @@ class SaveData(BaseSolver):
self.settings = data.settings[self.solver_id]
else:
self.settings = custom_settings
+
settings.to_custom_types(self.settings,
self.settings_types, self.settings_default, options=self.settings_options)
self.ts_max = self.data.ts + 1
@@ -168,11 +166,11 @@ class SaveData(BaseSolver):
self.ClassesToSave += (sharpy.aero.models.aerogrid.Aerogrid,
sharpy.utils.datastructures.AeroTimeStepInfo,)
if not self.settings['save_wake']:
- self.settings['skip_attr'].append(['zeta_star',
- 'u_ext_star',
- 'gamma_star',
- 'dist_to_orig',
- 'wake_conv_vel'])
+ self.settings['skip_attr'].append('zeta_star')
+ self.settings['skip_attr'].append('u_ext_star')
+ self.settings['skip_attr'].append('gamma_star')
+ self.settings['skip_attr'].append('dist_to_orig')
+ self.settings['skip_attr'].append('wake_conv_vel')
if self.settings['save_struct']:
self.ClassesToSave += (
