Skip to content

Commit

Permalink
Remove folder settings. First post-proc without settings.
Browse files Browse the repository at this point in the history
Still requires an empty dictionary to be defined in the config file
  • Loading branch information
ngoiz committed Mar 29, 2021
1 parent ef9c86d commit 29b4e2c
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions sharpy/postproc/pickledata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,25 @@ class PickleData(BaseSolver):
This postprocessor writes the SHARPy ``data`` structure in a pickle file, such that classes and
methods from SHARPy are retained for restarted solutions or further post-processing.
A pickle is saved to the SHARPy output folder, specified in the settings for SHARPy as ``log_folder``.
This solver does not have settings, yet it still needs to be included in the `.sharpy` file as an
empty dictionary.
"""
solver_id = 'PickleData'
solver_classification = 'post-processor'

settings_types = dict()
settings_default = dict()
settings_description = dict()

settings_table = settings.SettingsTable()
__doc__ += settings_table.generate(settings_types, settings_default, settings_description)

def __init__(self):
import sharpy

self.settings = None
self.data = None
self.filename = None
self.folder = None
self.caller = None

def initialise(self, data, custom_settings=None, caller=None):
self.data = data
if custom_settings is None:
self.settings = data.settings[self.solver_id]
else:
self.settings = custom_settings
settings.to_custom_types(self.settings,
self.settings_types, self.settings_default)

# create folder for containing files if necessary
self.folder = data.output_folder
self.filename = self.folder + self.data.settings['SHARPy']['case']+'.pkl'
self.caller = caller
Expand Down

0 comments on commit 29b4e2c

Please sign in to comment.