Skip to content
Snippets Groups Projects
Verified Commit 82361010 authored by Paul Dechamps's avatar Paul Dechamps :speech_balloon:
Browse files

(fix) Fixed Dart interface error raise

parent 90b9c606
No related branches found
No related tags found
No related merge requests found
Pipeline #53045 failed
......@@ -57,22 +57,22 @@ class DartInterface(SolversInterface):
# First try imposed path
try:
init_dart = __import__(dartCfg['dart_path'], fromlist=['init_dart']).init_dart
print(f'DART loaded from specified path {dartCfg["dart_path"]} for {dartCfg["task"]}.')
print(f'DART loaded from specified path {dartCfg["dart_path"]} for {task}.')
except ImportError:
raise ImportError(f'{ccolors.ANSI_RED}Could not load DART from specified path: {dartCfg["dart_path"]}.{ccolors.ANSI_RESET}')
raise ImportError(f'{ccolors.ANSI_RED}Could not load DART from specified path: {task}.{ccolors.ANSI_RESET}')
else:
# Load from known paths
for name, path in dartflo_import_paths.items():
try:
init_dart = __import__(path, fromlist=['init_dart']).init_dart
print(f'DART loaded from {name} path for {dartCfg["task"]}.')
print(f'DART loaded from {name} path for {task}.')
break
except ImportError:
continue
else:
raise ImportError(f'{ccolors.ANSI_RED}Could not load DART.{ccolors.ANSI_RESET}')
self.iobj = init_dart(dartCfg, task=dartCfg['task'], viscous=True)
self.iobj = init_dart(dartCfg, task=task, viscous=True)
self.solver = self.iobj.get('sol') # Solver
self.blw = self.iobj.get('blw') # Blowing boundaries
self.adjointSolver = self.iobj.get('adj')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment