From: Yoann AUDOUIN Date: Tue, 13 Jun 2017 05:57:01 +0000 (+0200) Subject: Cleanup X-Git-Tag: Salome_8_3_Hydro_2_0rc1~14^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4fe9554e65e8a87fce1d81bebbb2f18c63d8af99;p=modules%2Fhydrosolver.git Cleanup --- diff --git a/src/salome_hydro/study.py b/src/salome_hydro/study.py index b4cecc5..f045f9b 100644 --- a/src/salome_hydro/study.py +++ b/src/salome_hydro/study.py @@ -181,12 +181,15 @@ class HydroStudyEditor: jdc = jdcfile.read() params = jdc_to_dict(jdc, ["TELEMAC2D", "_F"]) - yacs_scheme = generate_yacs_study(params) + # Generation script string + python_script = generate_study_script(params) + + # Computing name of the file (same as filePath) file_dir, filename = os.path.split(filePath) root, sfx = os.path.splitext(filename) - python_file = os.path.join(file_dir,root+".xml") + python_file = os.path.join(file_dir,root+".py") - python_script = generate_study_script(params) + # Writting to file with open(python_file,'w') as pfile: pfile.write(python_script) @@ -200,13 +203,16 @@ class HydroStudyEditor: jdc = jdcfile.read() params = jdc_to_dict(jdc, ["TELEMAC2D", "_F"]) - yacs_scheme = generate_yacs_study(params) + # Generation YACS scheme + yacs_scheme = generate_study_yacs(params) + + # Computing name of the file (same as filePath) file_dir, filename = os.path.split(filePath) root, sfx = os.path.splitext(filename) yacs_file = os.path.join(file_dir,root+".xml") - yacs_scheme = generate_study_yacs(params) - yacs_scheme.saveScheme(yacs_file) + # Writting to file + yacs_scheme.saveSchema(yacs_file) def find_or_create_coupling1d2d_case(self, filePath): self.find_or_create_hydro_component()