diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d4c2bbc9589456e6086b0cc63433fa238ec28627..95539fc2ff9df6838143616df39cc1424c88478f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,21 +20,6 @@ stages: - build - test -format: - <<: *global_tag_def - stage: build - script: - - clang-format --version # we use clang-format-10 exclusively - - ./scripts/format_code.py - - mkdir -p patches - - if git diff --patch --exit-code > patches/clang-format.patch; then echo "Clang format changed nothing"; else echo "Clang format found changes to make!"; false; fi - artifacts: - paths: - - patches/ - expire_in: 1 day - when: on_failure - allow_failure: true - build: <<: *global_tag_def stage: build diff --git a/.gitmodules b/.gitmodules index 4d29aa8d1f52457fd62876289a294b5885f2445a..a16a5136d830731074dc344e96e2eda295d1032d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "amfe"] - path = amfe - url = git@gitlab.uliege.be:am-dept/amfe.git +[submodule "modules/dartflo"] + path = modules/dartflo + url = ../dartflo.git diff --git a/CMakeLists.txt b/CMakeLists.txt index a21aa56432d9e06b0250334b334f9c210f295455..a96cb1b4e3db575e0b33102409a33a372d1121a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,25 +71,6 @@ ELSE() SET(CMAKE_SWIG_OUTDIR "${EXECUTABLE_OUTPUT_PATH}") ENDIF() -# Doxygen (https://vicrucann.github.io/tutorials/quick-cmake-doxygen/) -FIND_PACKAGE(Doxygen) # check if Doxygen is installed -IF(DOXYGEN_FOUND) - # set input and output files - SET(DOXYGEN_IN ${PROJECT_SOURCE_DIR}/Doxyfile.in) - SET(DOXYGEN_OUT ${PROJECT_BINARY_DIR}/Doxyfile) - # request to configure the file - CONFIGURE_FILE(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY) - # note the option ALL which allows to build the docs together with the application - # "make dox" rebuilds the doc - ADD_CUSTOM_TARGET( dox #ALL - COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Generating API documentation with Doxygen" - VERBATIM ) -ELSE() - MESSAGE("Doxygen needs to be installed to generate the doxygen documentation") -ENDIF() - # -- DEFINE (for SWIG to detect definitions) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) # to find "amfe_def.h" @@ -117,7 +98,7 @@ IF(UNIX) ENDIF() # -- Sub directories -ADD_SUBDIRECTORY( amfe ) +ADD_SUBDIRECTORY( modules ) ADD_SUBDIRECTORY( blast ) # -- FINAL diff --git a/amfe b/amfe deleted file mode 160000 index 4bcec9c604d927933d2d74fdc837f85cb642032e..0000000000000000000000000000000000000000 --- a/amfe +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4bcec9c604d927933d2d74fdc837f85cb642032e diff --git a/blast/_src/CMakeLists.txt b/blast/_src/CMakeLists.txt index 0fdd32e1d2f31b2ff7151dab938b486794f8c493..1f7d54b90565fc6c4f1184ebf34e47e08e565de0 100644 --- a/blast/_src/CMakeLists.txt +++ b/blast/_src/CMakeLists.txt @@ -26,10 +26,11 @@ 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}/amfe/tbox/_src - ${PROJECT_SOURCE_DIR}/amfe/fwk/_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 tbox fwk ${PYTHON_LIBRARIES}) +TARGET_LINK_LIBRARIES(blastw PRIVATE blast dart tbox fwk ${PYTHON_LIBRARIES}) INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE}/blastw.py DESTINATION ${CMAKE_INSTALL_PREFIX}) INSTALL(TARGETS blastw DESTINATION ${CMAKE_INSTALL_PREFIX}) diff --git a/blast/interfaces/dart/DartInterface.py b/blast/interfaces/dart/DartInterface.py index 10c0f11e3ce2d6c5cd2144f3c9452b875d860f35..92c7919afdff7b9478245e10bf995fdf90d215ef 100644 --- a/blast/interfaces/dart/DartInterface.py +++ b/blast/interfaces/dart/DartInterface.py @@ -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 diff --git a/blast/validation/oneraM6/onera_lfs.msh b/blast/models/dart/onera_lfs.msh similarity index 100% rename from blast/validation/oneraM6/onera_lfs.msh rename to blast/models/dart/onera_lfs.msh diff --git a/blast/validation/oneraM6/onera_visc.geo b/blast/models/dart/onera_visc.geo similarity index 100% rename from blast/validation/oneraM6/onera_visc.geo rename to blast/models/dart/onera_visc.geo diff --git a/blast/validation/oneraM6/oneraValidation.py b/blast/validation/oneraValidation.py similarity index 95% rename from blast/validation/oneraM6/oneraValidation.py rename to blast/validation/oneraValidation.py index e31ff13cb40339fb2141c78284de6488bf0b8ef6..1fb9785cd9880f33a64067151f8c3bc799d86747 100644 --- a/blast/validation/oneraM6/oneraValidation.py +++ b/blast/validation/oneraValidation.py @@ -54,7 +54,7 @@ def cfgInviscid(nthrds, verb): 'Threads' : nthrds, # number of threads 'Verb' : verb, # verbosity # Model (geometry or mesh) - 'File' : os.path.dirname(os.path.abspath(__file__)) + '/onera_lfs.msh', # Input file containing the model + 'File' : os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + '/models/dart/onera_lfs.msh', # Input file containing the model 'Pars' : {}, # parameters for input file model 'Dim' : 3, # problem dimension 'Format' : 'gmsh', # save format (vtk or gmsh) @@ -120,7 +120,7 @@ def main(): vcfg = cfgBlast(args.verb) parsViscous = {'nLe': 20, 'nTe': 8, 'nMid': 40, 'nSpan': 60, 'nWake': 20} - vMsh = viscUtils.mesh(os.path.dirname(os.path.abspath(__file__))+'/onera_visc.geo', parsViscous) + vMsh = viscUtils.mesh(os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + '/models/dart/onera_visc.geo', parsViscous) vcfg['vMsh'] = vMsh tms['pre'].start() diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..9a558a800ffc02b375b37f2772e250fe7e0995b3 --- /dev/null +++ b/modules/CMakeLists.txt @@ -0,0 +1 @@ +ADD_SUBDIRECTORY( dartflo ) \ No newline at end of file diff --git a/modules/dartflo b/modules/dartflo new file mode 160000 index 0000000000000000000000000000000000000000..52a4059c97365dd23e7dba39fb4623623be5769d --- /dev/null +++ b/modules/dartflo @@ -0,0 +1 @@ +Subproject commit 52a4059c97365dd23e7dba39fb4623623be5769d diff --git a/run.py b/run.py index ab76a3c4eebeaab7d22832161cb7cc389119e96a..c78653cf3c823996abc7703d44ce90293d12453b 100755 --- a/run.py +++ b/run.py @@ -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, '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/amfe not found!\n') + 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)