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

(chore) Added dartflo in python path

dart module is added to the python path and can be imported when running test cases
parent 1d2ac8b5
No related branches found
No related tags found
1 merge request!1BLASTER v1.0
Pipeline #19671 passed with warnings
......@@ -26,9 +26,9 @@ SET_PROPERTY(TARGET blastw PROPERTY SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON)
MACRO_DebugPostfix(blastw)
TARGET_INCLUDE_DIRECTORIES(blastw PRIVATE ${PROJECT_SOURCE_DIR}/blast/_src
${PROJECT_SOURCE_DIR}/modules/dartflo/dart/_src
${PROJECT_SOURCE_DIR}/modules/dartflo/ext/amfe/tbox/_src
${PROJECT_SOURCE_DIR}/modules/dartflo/ext/amfe/fwk/_src
${PROJECT_SOURCE_DIR}/modules/dartflo/dart/_src
${PYTHON_INCLUDE_PATH})
TARGET_LINK_LIBRARIES(blastw PRIVATE blast dart tbox fwk ${PYTHON_LIBRARIES})
......
......@@ -27,7 +27,7 @@ from blast.interfaces.DSolversInterface import SolversInterface
class DartInterface(SolversInterface):
def __init__(self, dartCfg, vSolver, _cfg):
try:
from dartflo.dart.api.core import initDart
from modules.dartflo.dart.api.core import initDart
argOut = initDart(dartCfg, viscous=True)
self.solver = argOut.get('sol') # Solver
self.wrt = argOut.get('wrt') # Writer
......
......@@ -22,10 +22,14 @@ def main():
import os.path, sys
# adds fwk/tbox to the python path
thisdir = os.path.split(os.path.abspath(__file__))[0]
fwkdir = os.path.abspath(os.path.join(thisdir, 'modules/dartflo/ext/amfe'))
fwkdir = os.path.abspath(os.path.join(thisdir, 'modules', 'dartflo', 'ext', 'amfe'))
dartflodir = os.path.abspath(os.path.join(thisdir, 'modules', 'dartflo'))
if not os.path.isdir(fwkdir):
raise Exception('blaster/modules/dartflo/amfe not found!\n')
if not os.path.isdir(dartflodir):
raise Exception('blaster/modules/dartflo not found!\n')
sys.path.append(fwkdir)
sys.path.append(dartflodir)
# adds "." to the pythonpath
sys.path.append(thisdir)
......
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