Skip to content

Commit 2554ca7

Browse files
committed
Update Celeris to be easier to add random variables to
1 parent 0a3dc77 commit 2554ca7

File tree

1 file changed

+29
-19
lines changed

1 file changed

+29
-19
lines changed

modules/createEVENT/Celeris/Celeris.py

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -354,24 +354,24 @@ def main():
354354
floorsCount = GetFloorsCount(arguments.filenameAIM) # noqa: N816
355355
filenameEVENT = arguments.filenameEVENT # noqa: N816
356356

357-
result = subprocess.run( # noqa: S603
358-
[ # noqa: S607
359-
sys.executable,
360-
scriptName,
361-
'-d',
362-
caseDirectory,
363-
'-f',
364-
configFilename,
365-
'-b',
366-
bathymetryFilename,
367-
'-w',
368-
waveFilename,
369-
# f'{os.path.realpath(os.path.dirname(__file__))}'
370-
# + '/taichi_script.py',
371-
],
372-
stdout=subprocess.PIPE,
373-
check=False,
374-
)
357+
# result = subprocess.run( # noqa: S603
358+
# [ # noqa: S607
359+
# sys.executable,
360+
# scriptName,
361+
# '-d',
362+
# caseDirectory,
363+
# '-f',
364+
# configFilename,
365+
# '-b',
366+
# bathymetryFilename,
367+
# '-w',
368+
# waveFilename,
369+
# # f'{os.path.realpath(os.path.dirname(__file__))}'
370+
# # + '/taichi_script.py',
371+
# ],
372+
# stdout=subprocess.PIPE,
373+
# check=False,
374+
# )
375375

376376
forces = []
377377
for i in range(floorsCount):
@@ -382,6 +382,16 @@ def main():
382382

383383
else:
384384
print('No RVs requested') # noqa: T201
385+
386+
# filenameAIM = arguments.filenameAIM # noqa: N816
387+
# Read in Events[0]["config"]
388+
configObj = evt['Events'][0]['config'] # noqa: N806
389+
# Write configObj to config_rv.json
390+
configRVFilename = 'config_rv.json' # noqa: N816
391+
with open(caseDirectory + '/' + configRVFilename, 'w', encoding='utf-8') as file:
392+
json.dump(configObj, file)
393+
file.close
394+
385395
filenameEVENT = arguments.filenameEVENT # noqa: N816
386396
result = subprocess.run( # noqa: S603
387397
[ # noqa: S607
@@ -390,7 +400,7 @@ def main():
390400
'-d',
391401
caseDirectory,
392402
'-f',
393-
configFilename,
403+
configRVFilename,
394404
'-b',
395405
bathymetryFilename,
396406
'-w',

0 commit comments

Comments
 (0)