From ffa9433394c17c36c6ad7eae1cd8032095b8ea37 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 15:08:27 -0700 Subject: [PATCH 01/25] Rename stuff and enable soot, spray, and radiation in cmake. --- Build/cmake.sh | 18 +-- CMake/BuildExeAndLib.cmake | 12 +- ...ldPeleLMeXExe.cmake => BuildPeleExe.cmake} | 85 +++++-------- ...MeXLib.cmake => BuildPelePhysicsLib.cmake} | 117 +++++++++--------- .../{PeleLMeXUtils.cmake => PeleUtils.cmake} | 4 +- CMake/SetAmrexCompileFlags.cmake | 6 +- CMake/SetAmrexHydroOptions.cmake | 8 +- CMake/SetAmrexOptions.cmake | 34 ++--- ...eFlags.cmake => SetPeleCompileFlags.cmake} | 20 +-- CMake/SetSundialsOptions.cmake | 8 +- CMakeLists.txt | 74 +++++------ Docs/sphinx/manual/LMeXControls.rst | 2 +- Docs/sphinx/manual/Tutorials_SettingUp.rst | 4 +- Docs/sphinx/manual/index.rst | 6 +- Exec/Efield/FlameSheetIons/GNUmakefile | 4 +- Exec/Efield/IonizedAirWave/GNUmakefile | 4 +- Exec/Efield/PremBunsen3DKuhl/GNUmakefile | 4 +- Exec/Make.PeleLMeX | 14 +-- Exec/Production/ChallengeProblem/GNUmakefile | 4 +- .../ChallengeProblem/getLMeXChallengePB.sh | 2 +- .../getLMeXChallengePBHypre.sh | 2 +- Exec/Production/CounterFlow/CMakeLists.txt | 10 +- Exec/Production/CounterFlow/GNUmakefile | 4 +- Exec/Production/CounterFlowSpray/GNUmakefile | 4 +- Exec/Production/DiffBunsen2D/CMakeLists.txt | 10 +- Exec/Production/DiffBunsen2D/GNUmakefile | 4 +- Exec/Production/JetInCrossflow/CMakeLists.txt | 10 +- Exec/Production/JetInCrossflow/GNUmakefile | 4 +- .../NormalJet_OpenDomain/CMakeLists.txt | 10 +- .../NormalJet_OpenDomain/GNUmakefile | 4 +- Exec/Production/PremBunsen2D/CMakeLists.txt | 10 +- Exec/Production/PremBunsen2D/GNUmakefile | 4 +- Exec/Production/PremBunsen3D/CMakeLists.txt | 10 +- Exec/Production/PremBunsen3D/GNUmakefile | 4 +- .../SwirlFlowWallInteractions/CMakeLists.txt | 12 +- .../SwirlFlowWallInteractions/GNUmakefile | 4 +- Exec/Production/TripleFlame/GNUmakefile | 4 +- Exec/RegTests/CMakeLists.txt | 18 +-- .../EB_BackwardStepFlame/CMakeLists.txt | 10 +- .../RegTests/EB_BackwardStepFlame/GNUmakefile | 4 +- Exec/RegTests/EB_EnclosedFlame/CMakeLists.txt | 10 +- Exec/RegTests/EB_EnclosedFlame/GNUmakefile | 4 +- .../RegTests/EB_EnclosedVortex/CMakeLists.txt | 10 +- Exec/RegTests/EB_EnclosedVortex/GNUmakefile | 4 +- .../EB_FlowPastCylinder/CMakeLists.txt | 10 +- Exec/RegTests/EB_FlowPastCylinder/GNUmakefile | 4 +- .../EB_FlowPastCylinder/input.2d-Re500 | 2 +- Exec/RegTests/EB_PipeFlow/CMakeLists.txt | 10 +- Exec/RegTests/EB_PipeFlow/GNUmakefile | 4 +- Exec/RegTests/EnclosedFlame/CMakeLists.txt | 10 +- Exec/RegTests/EnclosedFlame/GNUmakefile | 4 +- .../RegTests/EnclosedInjection/CMakeLists.txt | 10 +- Exec/RegTests/EnclosedInjection/GNUmakefile | 4 +- Exec/RegTests/FlameSheet/CMakeLists.txt | 10 +- Exec/RegTests/FlameSheet/GNUmakefile | 4 +- Exec/RegTests/HITDecay/CMakeLists.txt | 10 +- Exec/RegTests/HITDecay/GNUmakefile | 4 +- Exec/RegTests/HotBubble/CMakeLists.txt | 10 +- Exec/RegTests/HotBubble/GNUmakefile | 4 +- Exec/RegTests/PeriodicCases/CMakeLists.txt | 10 +- Exec/RegTests/PeriodicCases/GNUmakefile | 4 +- Exec/RegTests/SootRadTest/CMakeLists.txt | 10 +- Exec/RegTests/SootRadTest/GNUmakefile | 4 +- Exec/RegTests/SootRadTest/pelelmex_prob.H | 4 +- .../RegTests/SootRadTest/pelelmex_prob_parm.H | 4 +- Exec/RegTests/SprayTest/CMakeLists.txt | 11 +- Exec/RegTests/SprayTest/GNUmakefile | 4 +- Exec/RegTests/TaylorGreen/CMakeLists.txt | 10 +- Exec/RegTests/TaylorGreen/GNUmakefile | 4 +- Exec/RegTests/TripleFlame/CMakeLists.txt | 10 +- Exec/RegTests/TripleFlame/GNUmakefile | 4 +- Exec/RegTests/TurbInflow/CMakeLists.txt | 10 +- Exec/RegTests/TurbInflow/GNUmakefile | 4 +- Exec/RegTests/Unit/CMakeLists.txt | 10 +- Exec/RegTests/Unit/GNUmakefile | 4 +- Exec/UnitTests/DodecaneLu/GNUmakefile | 4 +- Exec/UnitTests/EB_SphericalFlame/GNUmakefile | 4 +- README.md | 18 +-- Source/Efield/PeleLMeX_EFDeriveFunc.H | 4 +- Source/PeleLMeX.H | 18 +-- Source/PeleLMeX.cpp | 6 +- Source/PeleLMeX_Advance.cpp | 12 +- Source/PeleLMeX_BC.cpp | 4 +- Source/PeleLMeX_Derive.H | 4 +- Source/PeleLMeX_DeriveFunc.H | 4 +- Source/PeleLMeX_Evolve.cpp | 8 +- Source/PeleLMeX_Index.H | 6 +- Source/PeleLMeX_Init.cpp | 8 +- Source/PeleLMeX_Plot.cpp | 32 ++--- Source/PeleLMeX_Radiation.cpp | 2 +- Source/PeleLMeX_Setup.cpp | 20 +-- Source/PeleLMeX_Soot.cpp | 2 +- Source/PeleLMeX_SprayParticles.cpp | 2 +- Source/PeleLMeX_Timestep.cpp | 4 +- Source/PeleLMeX_Utils.H | 4 +- Submodules/PelePhysics | 2 +- Tests/CMakeLists.txt | 110 ++++++++-------- Tests/CTestNightlyScript.cmake | 10 +- 98 files changed, 566 insertions(+), 529 deletions(-) rename CMake/{BuildPeleLMeXExe.cmake => BuildPeleExe.cmake} (58%) rename CMake/{BuildPeleLMeXLib.cmake => BuildPelePhysicsLib.cmake} (59%) rename CMake/{PeleLMeXUtils.cmake => PeleUtils.cmake} (97%) rename CMake/{SetPeleLMeXCompileFlags.cmake => SetPeleCompileFlags.cmake} (70%) diff --git a/Build/cmake.sh b/Build/cmake.sh index f6a42ab13..e57e6d00b 100755 --- a/Build/cmake.sh +++ b/Build/cmake.sh @@ -7,17 +7,17 @@ cmake -DCMAKE_INSTALL_PREFIX:PATH=./install \ -DCMAKE_C_COMPILER:STRING=clang \ -DMPIEXEC_PREFLAGS:STRING=--oversubscribe \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DPELELMEX_DIM:STRING=3 \ - -DPELELMEX_ENABLE_MPI:BOOL=OFF \ - -DPELELMEX_ENABLE_FCOMPARE:BOOL=OFF \ - -DPELELMEX_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ - -DPELELMEX_ENABLE_MASA:BOOL=OFF \ - -DPELELMEX_ENABLE_CPPCHECK:BOOL=OFF \ - -DPELELMEX_ENABLE_CLANG_TIDY:BOOL=OFF \ - -DPELELMEX_ENABLE_CUDA:BOOL=OFF \ + -DPELE_DIM:STRING=3 \ + -DPELE_ENABLE_MPI:BOOL=OFF \ + -DPELE_ENABLE_FCOMPARE:BOOL=OFF \ + -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ + -DPELE_ENABLE_MASA:BOOL=OFF \ + -DPELE_ENABLE_CPPCHECK:BOOL=OFF \ + -DPELE_ENABLE_CLANG_TIDY:BOOL=OFF \ + -DPELE_ENABLE_CUDA:BOOL=OFF \ -DAMReX_CUDA_ARCH=Volta \ -DPYTHON_EXECUTABLE=$(which python3) \ - -DPELELMEX_PRECISION:STRING=DOUBLE \ + -DPELE_PRECISION:STRING=DOUBLE \ .. #make cmake --build . --parallel $(sysctl -n hw.ncpu) #&> output.txt diff --git a/CMake/BuildExeAndLib.cmake b/CMake/BuildExeAndLib.cmake index 379d916e7..ed6ed5ac0 100644 --- a/CMake/BuildExeAndLib.cmake +++ b/CMake/BuildExeAndLib.cmake @@ -1,7 +1,7 @@ get_filename_component(DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) -set(pelelmex_lib_name PelePhysics-Lib-${PELELMEX_EOS_MODEL}-${PELELMEX_CHEMISTRY_MODEL}-${PELELMEX_TRANSPORT_MODEL}) -set(pelelmex_exe_name ${PROJECT_NAME}-${DIR_NAME}) -include(BuildPeleLMeXLib) -include(BuildPeleLMeXExe) -build_pelelmex_lib(${pelelmex_lib_name}) -build_pelelmex_exe(${pelelmex_exe_name} ${pelelmex_lib_name}) +set(pele_physics_lib_name "PelePhysicsLib-${PELE_PHYSICS_EOS_MODEL}-${PELE_PHYSICS_CHEMISTRY_MODEL}-${PELE_PHYSICS_TRANSPORT_MODEL}-Spray${PELE_PHYSICS_ENABLE_SPRAY}-Soot${PELE_PHYSICS_ENABLE_SOOT}-Radiation${PELE_PHYSICS_ENABLE_RADIATION}") +set(pele_exe_name "${PROJECT_NAME}-${DIR_NAME}") +include(BuildPelePhysicsLib) +include(BuildPeleExe) +build_pele_physics_lib(${pele_physics_lib_name}) +build_pele_exe(${pele_exe_name} ${pele_physics_lib_name}) diff --git a/CMake/BuildPeleLMeXExe.cmake b/CMake/BuildPeleExe.cmake similarity index 58% rename from CMake/BuildPeleLMeXExe.cmake rename to CMake/BuildPeleExe.cmake index b5ec94994..9836751a9 100644 --- a/CMake/BuildPeleLMeXExe.cmake +++ b/CMake/BuildPeleExe.cmake @@ -1,15 +1,15 @@ -function(build_pelelmex_exe pelelmex_exe_name pelelmex_lib_name) +function(build_pele_exe pele_exe_name pele_physics_lib_name) set(SRC_DIR ${CMAKE_SOURCE_DIR}/Source) - add_executable(${pelelmex_exe_name} "") + add_executable(${pele_exe_name} "") if(CLANG_TIDY_EXE) - set_target_properties(${pelelmex_exe_name} PROPERTIES CXX_CLANG_TIDY + set_target_properties(${pele_exe_name} PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXE};--config-file=${CMAKE_SOURCE_DIR}/.clang-tidy") endif() - target_sources(${pelelmex_exe_name} + target_sources(${pele_exe_name} PRIVATE pelelmex_prob_parm.H pelelmex_prob.H @@ -17,18 +17,18 @@ function(build_pelelmex_exe pelelmex_exe_name pelelmex_lib_name) ) #PeleLMeX include directories - target_include_directories(${pelelmex_exe_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) - target_include_directories(${pelelmex_exe_name} PRIVATE ${SRC_DIR}) - target_include_directories(${pelelmex_exe_name} PRIVATE ${CMAKE_BINARY_DIR}) - #target_include_directories(${pelelmex_exe_name} PRIVATE ${CMAKE_SOURCE_DIR}/Source/Params/param_includes) + target_include_directories(${pele_exe_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) + target_include_directories(${pele_exe_name} PRIVATE ${SRC_DIR}) + target_include_directories(${pele_exe_name} PRIVATE ${CMAKE_BINARY_DIR}) + #target_include_directories(${pele_exe_name} PRIVATE ${CMAKE_SOURCE_DIR}/Source/Params/param_includes) # Spray set(PELE_PHYSICS_SPRAY_DIR ${CMAKE_SOURCE_DIR}/Submodules/PelePhysics/Source/Spray) - if(PELELMEX_ENABLE_AMREX_PARTICLES AND PELE_SPRAY_FUEL_NUM GREATER 0) - target_compile_definitions(${pelelmex_exe_name} PRIVATE PELELMEX_USE_SPRAY) - target_compile_definitions(${pelelmex_exe_name} PRIVATE SPRAY_FUEL_NUM=${PELE_SPRAY_FUEL_NUM}) - target_sources(${pelelmex_exe_name} PRIVATE + if(PELE_ENABLE_AMREX_PARTICLES AND PELE_SPRAY_FUEL_NUM GREATER 0) + target_compile_definitions(${pele_exe_name} PRIVATE PELE_USE_SPRAY) + target_compile_definitions(${pele_exe_name} PRIVATE SPRAY_FUEL_NUM=${PELE_SPRAY_FUEL_NUM}) + target_sources(${pele_exe_name} PRIVATE SprayParticlesInitInsert.cpp ${SRC_DIR}/Particle.cpp ${PELE_PHYSICS_SPRAY_DIR}/Drag.H @@ -52,12 +52,12 @@ function(build_pelelmex_exe pelelmex_exe_name pelelmex_lib_name) ${PELE_PHYSICS_SPRAY_DIR}/Distribution/DistBase.H ${PELE_PHYSICS_SPRAY_DIR}/Distribution/Distributions.H ${PELE_PHYSICS_SPRAY_DIR}/Distribution/Distributions.cpp) - target_include_directories(${pelelmex_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}) - target_include_directories(${pelelmex_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/Distribution) - target_include_directories(${pelelmex_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash) + target_include_directories(${pele_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}) + target_include_directories(${pele_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/Distribution) + target_include_directories(${pele_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash) endif() - target_sources(${pelelmex_exe_name} + target_sources(${pele_exe_name} PRIVATE ${SRC_DIR}/PeleLMeX_DeriveUserDefined.cpp ${SRC_DIR}/PeleLMeX_DiffusionOp.H @@ -102,57 +102,40 @@ function(build_pelelmex_exe pelelmex_exe_name pelelmex_lib_name) ${SRC_DIR}/main.cpp ) - # Soot - if(PELELMEX_ENABLE_SOOT) - target_sources(${pelelmex_exe_name} + if(PELE_PHYSICS_ENABLE_SOOT) + target_sources(${pele_exe_name} PRIVATE ${SRC_DIR}/PeleLMeX_Soot.cpp) - if(PELELMEX_ENABLE_RADIATION) - target_sources(${pelelmex_exe_name} - PRIVATE - ${SRC_DIR}/PeleLMeX_Radiation.cpp) - endif() endif() - #if(PELELMEX_ENABLE_ASCENT) - # target_sources(${pelelmex_exe_name} - # PRIVATE - # ${SRC_DIR}/PeleAscent.H - # ${SRC_DIR}/PeleAscent.cpp - # ) - #endif() - - #if(PELELMEX_ENABLE_MASA) - # target_compile_definitions(${pelelmex_exe_name} PRIVATE PELELMEX_USE_MASA) - # target_sources(${pelelmex_exe_name} PRIVATE ${SRC_DIR}/MMS.cpp) - # target_link_libraries(${pelelmex_exe_name} PRIVATE MASA::MASA) - # if(PELELMEX_ENABLE_FPE_TRAP_FOR_TESTS) - # set_source_files_properties(${SRC_DIR}/PeleLMeX.cpp PROPERTIES COMPILE_DEFINITIONS PELELMEX_ENABLE_FPE_TRAP) - # endif() - #endif() + if(PELE_PHYSICS_ENABLE_RADIATION) + target_sources(${pele_exe_name} + PRIVATE + ${SRC_DIR}/PeleLMeX_Radiation.cpp) + endif() - if(NOT "${pelelmex_exe_name}" STREQUAL "PeleLMeX-UnitTests") - target_sources(${pelelmex_exe_name} + if(NOT "${pele_exe_name}" STREQUAL "${PROJECT_NAME}-UnitTests") + target_sources(${pele_exe_name} PRIVATE ${CMAKE_SOURCE_DIR}/Source/main.cpp ) endif() - if(PELELMEX_ENABLE_CUDA) - set(pctargets "${pelelmex_exe_name};${pelelmex_lib_name}") + if(PELE_ENABLE_CUDA) + set(pctargets "${pele_exe_name};${pele_physics_lib_name}") foreach(tgt IN LISTS pctargets) - get_target_property(PELELMEX_SOURCES ${tgt} SOURCES) - list(FILTER PELELMEX_SOURCES INCLUDE REGEX "\\.cpp") - set_source_files_properties(${PELELMEX_SOURCES} PROPERTIES LANGUAGE CUDA) + get_target_property(PELE_SOURCES ${tgt} SOURCES) + list(FILTER PELE_SOURCES INCLUDE REGEX "\\.cpp") + set_source_files_properties(${PELE_SOURCES} PROPERTIES LANGUAGE CUDA) endforeach() - set_target_properties(${pelelmex_exe_name} PROPERTIES CUDA_SEPARABLE_COMPILATION ON) - target_compile_options(${pelelmex_exe_name} PRIVATE $<$:-Xptxas --disable-optimizer-constants>) + set_target_properties(${pele_exe_name} PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + target_compile_options(${pele_exe_name} PRIVATE $<$:-Xptxas --disable-optimizer-constants>) endif() - target_link_libraries(${pelelmex_exe_name} PRIVATE ${pelelmex_lib_name} AMReX-Hydro::amrex_hydro_api AMReX::amrex) + target_link_libraries(${pele_exe_name} PRIVATE ${pele_physics_lib_name} AMReX-Hydro::amrex_hydro_api AMReX::amrex) #Define what we want to be installed during a make install - install(TARGETS ${pelelmex_exe_name} + install(TARGETS ${pele_exe_name} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) diff --git a/CMake/BuildPeleLMeXLib.cmake b/CMake/BuildPelePhysicsLib.cmake similarity index 59% rename from CMake/BuildPeleLMeXLib.cmake rename to CMake/BuildPelePhysicsLib.cmake index 88a34a601..9731db4f2 100644 --- a/CMake/BuildPeleLMeXLib.cmake +++ b/CMake/BuildPelePhysicsLib.cmake @@ -1,11 +1,11 @@ -function(build_pelelmex_lib pelelmex_lib_name) - if (NOT (TARGET ${pelelmex_lib_name})) - add_library(${pelelmex_lib_name} OBJECT) +function(build_pele_physics_lib pele_physics_lib_name) + if (NOT (TARGET ${pele_physics_lib_name})) + add_library(${pele_physics_lib_name} OBJECT) set(PELE_PHYSICS_SRC_DIR "${CMAKE_SOURCE_DIR}/Submodules/PelePhysics") set(PELE_PHYSICS_TRANSPORT_DIR "${PELE_PHYSICS_SRC_DIR}/Source/Transport") set(PELE_PHYSICS_EOS_DIR "${PELE_PHYSICS_SRC_DIR}/Source/Eos") - set(PELE_PHYSICS_MECHANISM_DIR "${PELE_PHYSICS_SRC_DIR}/Mechanisms/${PELELMEX_CHEMISTRY_MODEL}") + set(PELE_PHYSICS_MECHANISM_DIR "${PELE_PHYSICS_SRC_DIR}/Mechanisms/${PELE_PHYSICS_CHEMISTRY_MODEL}") set(PELE_PHYSICS_UTILITY_DIR "${PELE_PHYSICS_SRC_DIR}/Source/Utility") set(PELE_PHYSICS_REACTIONS_DIR "${PELE_PHYSICS_SRC_DIR}/Source/Reactions") set(PELE_PHYSICS_SOOT_DIR "${PELE_PHYSICS_SRC_DIR}/Source/Soot") @@ -13,20 +13,20 @@ function(build_pelelmex_lib pelelmex_lib_name) set(AMREX_SUNDIALS_DIR "${AMREX_SUBMOD_LOCATION}/Src/Extern/SUNDIALS") if(CLANG_TIDY_EXE) - set_target_properties(${pelelmex_lib_name} PROPERTIES CXX_CLANG_TIDY + set_target_properties(${pele_physics_lib_name} PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXE};--config-file=${CMAKE_SOURCE_DIR}/.clang-tidy") endif() - include(SetPeleLMeXCompileFlags) + include(SetPeleCompileFlags) - target_sources(${pelelmex_lib_name} + target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_UTILITY_DIR}/TurbInflow/turbinflow.cpp ${PELE_PHYSICS_UTILITY_DIR}/TurbInflow/turbinflow.H ) - target_include_directories(${pelelmex_lib_name} PUBLIC ${PELE_PHYSICS_UTILITY_DIR}/TurbInflow) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_UTILITY_DIR}/TurbInflow) - target_sources(${pelelmex_lib_name} + target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_UTILITY_DIR}/Diagnostics/DiagBase.H ${PELE_PHYSICS_UTILITY_DIR}/Diagnostics/DiagBase.cpp @@ -39,25 +39,25 @@ function(build_pelelmex_lib pelelmex_lib_name) ${PELE_PHYSICS_UTILITY_DIR}/Diagnostics/DiagPDF.H ${PELE_PHYSICS_UTILITY_DIR}/Diagnostics/DiagPDF.cpp ) - target_include_directories(${pelelmex_lib_name} PUBLIC ${PELE_PHYSICS_UTILITY_DIR}/Diagnostics) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_UTILITY_DIR}/Diagnostics) - target_sources(${pelelmex_lib_name} + target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_UTILITY_DIR}/PltFileManager/PltFileManager.cpp ${PELE_PHYSICS_UTILITY_DIR}/PltFileManager/PltFileManager.H ${PELE_PHYSICS_UTILITY_DIR}/PltFileManager/PltFileManagerBCFill.H ) - target_include_directories(${pelelmex_lib_name} PUBLIC ${PELE_PHYSICS_UTILITY_DIR}/PltFileManager) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_UTILITY_DIR}/PltFileManager) - target_sources(${pelelmex_lib_name} + target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_UTILITY_DIR}/PMF/PMF.H ${PELE_PHYSICS_UTILITY_DIR}/PMF/PMFData.cpp ${PELE_PHYSICS_UTILITY_DIR}/PMF/PMFData.H ) - target_include_directories(${pelelmex_lib_name} PUBLIC ${PELE_PHYSICS_UTILITY_DIR}/PMF) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_UTILITY_DIR}/PMF) - target_sources(${pelelmex_lib_name} + target_sources(${pele_physics_lib_name} PRIVATE ${AMREX_SUNDIALS_DIR}/AMReX_Sundials.H ${AMREX_SUNDIALS_DIR}/AMReX_Sundials_Core.cpp @@ -67,11 +67,11 @@ function(build_pelelmex_lib pelelmex_lib_name) ${AMREX_SUNDIALS_DIR}/AMReX_SUNMemory.cpp ${AMREX_SUNDIALS_DIR}/AMReX_SUNMemory.H ) - target_include_directories(${pelelmex_lib_name} SYSTEM PUBLIC ${AMREX_SUNDIALS_DIR}) + target_include_directories(${pele_physics_lib_name} SYSTEM PUBLIC ${AMREX_SUNDIALS_DIR}) - target_include_directories(${pelelmex_lib_name} PUBLIC "${PELE_PHYSICS_SRC_DIR}/Source") + target_include_directories(${pele_physics_lib_name} PUBLIC "${PELE_PHYSICS_SRC_DIR}/Source") - target_sources(${pelelmex_lib_name} + target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_TRANSPORT_DIR}/Transport.H ${PELE_PHYSICS_TRANSPORT_DIR}/Transport.cpp @@ -81,18 +81,18 @@ function(build_pelelmex_lib pelelmex_lib_name) ${PELE_PHYSICS_TRANSPORT_DIR}/Simple.H ${PELE_PHYSICS_TRANSPORT_DIR}/Sutherland.H ) - target_include_directories(${pelelmex_lib_name} PUBLIC ${PELE_PHYSICS_TRANSPORT_DIR}) - if("${PELELMEX_TRANSPORT_MODEL}" STREQUAL "Constant") - target_compile_definitions(${pelelmex_lib_name} PUBLIC USE_CONSTANT_TRANSPORT) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_TRANSPORT_DIR}) + if("${PELE_PHYSICS_TRANSPORT_MODEL}" STREQUAL "Constant") + target_compile_definitions(${pele_physics_lib_name} PUBLIC USE_CONSTANT_TRANSPORT) endif() - if("${PELELMEX_TRANSPORT_MODEL}" STREQUAL "Simple") - target_compile_definitions(${pelelmex_lib_name} PUBLIC USE_SIMPLE_TRANSPORT) + if("${PELE_PHYSICS_TRANSPORT_MODEL}" STREQUAL "Simple") + target_compile_definitions(${pele_physics_lib_name} PUBLIC USE_SIMPLE_TRANSPORT) endif() - if("${PELELMEX_TRANSPORT_MODEL}" STREQUAL "Sutherland") - target_compile_definitions(${pelelmex_lib_name} PUBLIC USE_SUTHERLAND_TRANSPORT) + if("${PELE_PHYSICS_TRANSPORT_MODEL}" STREQUAL "Sutherland") + target_compile_definitions(${pele_physics_lib_name} PUBLIC USE_SUTHERLAND_TRANSPORT) endif() - target_sources(${pelelmex_lib_name} + target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_EOS_DIR}/EOS.cpp ${PELE_PHYSICS_EOS_DIR}/EOS.H @@ -100,25 +100,25 @@ function(build_pelelmex_lib pelelmex_lib_name) ${PELE_PHYSICS_EOS_DIR}/Fuego.H ${PELE_PHYSICS_EOS_DIR}/SRK.H ) - target_include_directories(${pelelmex_lib_name} PUBLIC ${PELE_PHYSICS_EOS_DIR}) - if("${PELELMEX_EOS_MODEL}" STREQUAL "GammaLaw") - target_compile_definitions(${pelelmex_lib_name} PUBLIC USE_GAMMALAW_EOS) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_EOS_DIR}) + if("${PELE_PHYSICS_EOS_MODEL}" STREQUAL "GammaLaw") + target_compile_definitions(${pele_physics_lib_name} PUBLIC USE_GAMMALAW_EOS) endif() - if("${PELELMEX_EOS_MODEL}" STREQUAL "Fuego") - target_compile_definitions(${pelelmex_lib_name} PUBLIC USE_FUEGO_EOS) + if("${PELE_PHYSICS_EOS_MODEL}" STREQUAL "Fuego") + target_compile_definitions(${pele_physics_lib_name} PUBLIC USE_FUEGO_EOS) endif() - if("${PELELMEX_EOS_MODEL}" STREQUAL "Soave-Redlich-Kwong") - target_compile_definitions(${pelelmex_lib_name} PUBLIC USE_SRK_EOS) + if("${PELE_PHYSICS_EOS_MODEL}" STREQUAL "Soave-Redlich-Kwong") + target_compile_definitions(${pele_physics_lib_name} PUBLIC USE_SRK_EOS) endif() - target_sources(${pelelmex_lib_name} + target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_MECHANISM_DIR}/mechanism.cpp ${PELE_PHYSICS_MECHANISM_DIR}/mechanism.H ) - target_include_directories(${pelelmex_lib_name} SYSTEM PUBLIC ${PELE_PHYSICS_MECHANISM_DIR}) + target_include_directories(${pele_physics_lib_name} SYSTEM PUBLIC ${PELE_PHYSICS_MECHANISM_DIR}) - target_sources(${pelelmex_lib_name} + target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_REACTIONS_DIR}/ReactorArkode.H ${PELE_PHYSICS_REACTIONS_DIR}/ReactorArkode.cpp @@ -142,16 +142,16 @@ function(build_pelelmex_lib pelelmex_lib_name) ${PELE_PHYSICS_REACTIONS_DIR}/ReactorUtils.H ${PELE_PHYSICS_REACTIONS_DIR}/ReactorUtils.cpp ) - target_include_directories(${pelelmex_lib_name} PUBLIC ${PELE_PHYSICS_REACTIONS_DIR}) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_REACTIONS_DIR}) - if(PELELMEX_ENABLE_SOOT) + if(PELE_PHYSICS_ENABLE_SOOT) set(SOOT_MOMENTS_VALUES 3 6) if(NOT PELE_NUM_SOOT_MOMENTS IN_LIST SOOT_MOMENTS_VALUES) message(FATAL_ERROR "NUM_SOOT_MOMENTS must be either 3 or 6") endif() - target_compile_definitions(${pelelmex_lib_name} PUBLIC PELELM_USE_SOOT) - target_compile_definitions(${pelelmex_lib_name} PUBLIC NUM_SOOT_MOMENTS=${PELE_NUM_SOOT_MOMENTS}) - target_sources(${pelelmex_lib_name} PRIVATE + target_compile_definitions(${pele_physics_lib_name} PUBLIC PELELM_USE_SOOT) + target_compile_definitions(${pele_physics_lib_name} PUBLIC NUM_SOOT_MOMENTS=${PELE_NUM_SOOT_MOMENTS}) + target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_SOOT_DIR}/SootModel.H ${PELE_PHYSICS_SOOT_DIR}/SootModel.cpp ${PELE_PHYSICS_SOOT_DIR}/SootModel_react.cpp @@ -160,9 +160,9 @@ function(build_pelelmex_lib pelelmex_lib_name) ${PELE_PHYSICS_SOOT_DIR}/Constants_Soot.H ${PELE_PHYSICS_SOOT_DIR}/SootData.H ${PELE_PHYSICS_SOOT_DIR}/SootReactions.H) - target_include_directories(${pelelmex_lib_name} PUBLIC ${PELE_PHYSICS_SOOT_DIR}) - if(PELELMEX_ENABLE_RADIATION) - target_sources(${pelelmex_lib_name} PRIVATE + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_SOOT_DIR}) + if(PELE_PHYSICS_ENABLE_RADIATION) + target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_RADIATION_DIR}/AMRParam.H ${PELE_PHYSICS_RADIATION_DIR}/Constants.H ${PELE_PHYSICS_RADIATION_DIR}/MLMGParam.H @@ -175,31 +175,30 @@ function(build_pelelmex_lib pelelmex_lib_name) ${PELE_PHYSICS_RADIATION_DIR}/PeleLMRad.H ${PELE_PHYSICS_RADIATION_DIR}/PlanckMean.H ${PELE_PHYSICS_RADIATION_DIR}/SpectralModels.H) - target_include_directories(${pelelmex_lib_name} PUBLIC ${PELE_PHYSICS_RADIATION_DIR}) - target_compile_definitions(${pelelmex_lib_name} PUBLIC PELELM_USE_RADIATION) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_RADIATION_DIR}) + target_compile_definitions(${pele_physics_lib_name} PUBLIC PELELM_USE_RADIATION) endif() endif() include(AMReXBuildInfo) - generate_buildinfo(${pelelmex_lib_name} ${CMAKE_SOURCE_DIR}) - target_include_directories(${pelelmex_lib_name} SYSTEM PUBLIC ${AMREX_SUBMOD_LOCATION}/Tools/C_scripts) + generate_buildinfo(${pele_physics_lib_name} ${CMAKE_SOURCE_DIR}) + target_include_directories(${pele_physics_lib_name} SYSTEM PUBLIC ${AMREX_SUBMOD_LOCATION}/Tools/C_scripts) - target_link_libraries(${pelelmex_lib_name} PUBLIC sundials_arkode sundials_cvode) + target_link_libraries(${pele_physics_lib_name} PUBLIC sundials_arkode sundials_cvode) - if(PELELMEX_ENABLE_CUDA) - target_link_libraries(${pelelmex_lib_name} PUBLIC sundials_nveccuda sundials_sunlinsolcusolversp sundials_sunmatrixcusparse) - elseif(PELELMEX_ENABLE_HIP) - target_link_libraries(${pelelmex_lib_name} PUBLIC sundials_nvechip) - elseif(PELELMEX_ENABLE_SYCL) - target_link_libraries(${pelelmex_lib_name} PUBLIC sundials_nvecsycl) + if(PELE_ENABLE_CUDA) + target_link_libraries(${pele_physics_lib_name} PUBLIC sundials_nveccuda sundials_sunlinsolcusolversp sundials_sunmatrixcusparse) + elseif(PELE_ENABLE_HIP) + target_link_libraries(${pele_physics_lib_name} PUBLIC sundials_nvechip) + elseif(PELE_ENABLE_SYCL) + target_link_libraries(${pele_physics_lib_name} PUBLIC sundials_nvecsycl) endif() - if(PELELMEX_ENABLE_MPI) - target_link_libraries(${pelelmex_lib_name} PUBLIC $<$:MPI::MPI_CXX>) + if(PELE_ENABLE_MPI) + target_link_libraries(${pele_physics_lib_name} PUBLIC $<$:MPI::MPI_CXX>) endif() - #Link to amrex libraries - target_link_libraries(${pelelmex_lib_name} PUBLIC AMReX-Hydro::amrex_hydro_api AMReX::amrex) + target_link_libraries(${pele_physics_lib_name} PUBLIC AMReX-Hydro::amrex_hydro_api AMReX::amrex) endif() endfunction() diff --git a/CMake/PeleLMeXUtils.cmake b/CMake/PeleUtils.cmake similarity index 97% rename from CMake/PeleLMeXUtils.cmake rename to CMake/PeleUtils.cmake index 1c509624e..a9cb0855b 100644 --- a/CMake/PeleLMeXUtils.cmake +++ b/CMake/PeleUtils.cmake @@ -16,7 +16,7 @@ function(target_link_libraries_system target visibility) endfunction(target_link_libraries_system) macro(init_code_checks) - if(PELELMEX_ENABLE_CLANG_TIDY) + if(PELE_ENABLE_CLANG_TIDY) find_program(CLANG_TIDY_EXE NAMES "clang-tidy") if(CLANG_TIDY_EXE) message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}") @@ -25,7 +25,7 @@ macro(init_code_checks) endif() endif() - if(PELELMEX_ENABLE_CPPCHECK) + if(PELE_ENABLE_CPPCHECK) find_program(CPPCHECK_EXE NAMES "cppcheck") if(CPPCHECK_EXE) message(STATUS "cppcheck found: ${CPPCHECK_EXE}") diff --git a/CMake/SetAmrexCompileFlags.cmake b/CMake/SetAmrexCompileFlags.cmake index 87350ccef..9088a1442 100644 --- a/CMake/SetAmrexCompileFlags.cmake +++ b/CMake/SetAmrexCompileFlags.cmake @@ -1,17 +1,17 @@ # Disable loop not vectorized warnings on Clang. This generates a lot of # diagnostic messages when compiling AMReX that we can't do anything about if(CMAKE_CXX_COMPILER_ID MATCHES "^(Clang|AppleClang)$") - if(PELELMEX_DIM EQUAL 3) + if(PELE_DIM EQUAL 3) target_compile_options( amrex_3d PUBLIC $<$:-Wno-pass-failed>) - if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND PELELMEX_ENABLE_FPE_TRAP_FOR_TESTS) + if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND PELE_ENABLE_FPE_TRAP_FOR_TESTS) target_compile_options( amrex_3d PUBLIC $<$:-ffp-exception-behavior=maytrap>) endif() else() target_compile_options( amrex_2d PUBLIC $<$:-Wno-pass-failed>) - if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND PELELMEX_ENABLE_FPE_TRAP_FOR_TESTS) + if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND PELE_ENABLE_FPE_TRAP_FOR_TESTS) target_compile_options( amrex_2d PUBLIC $<$:-ffp-exception-behavior=maytrap>) endif() diff --git a/CMake/SetAmrexHydroOptions.cmake b/CMake/SetAmrexHydroOptions.cmake index 4d0ba5a34..66b8b97d5 100644 --- a/CMake/SetAmrexHydroOptions.cmake +++ b/CMake/SetAmrexHydroOptions.cmake @@ -1,6 +1,6 @@ -set(HYDRO_SPACEDIM ${PELELMEX_DIM} CACHE STRING "Spatial dimensions" FORCE) -set(HYDRO_EB ${PELELMEX_ENABLE_EB}) -set(HYDRO_MPI ${PELELMEX_ENABLE_MPI}) -set(HYDRO_OMP ${PELELMEX_ENABLE_OPENMP}) +set(HYDRO_SPACEDIM ${PELE_DIM} CACHE STRING "Spatial dimensions" FORCE) +set(HYDRO_EB ${PELE_ENABLE_EB}) +set(HYDRO_MPI ${PELE_ENABLE_MPI}) +set(HYDRO_OMP ${PELE_ENABLE_OPENMP}) set(HYDRO_GPU_BACKEND ${AMReX_GPU_BACKEND} CACHE STRING "AMReX GPU type" FORCE) set(HYDRO_PROJECTIONS ON) diff --git a/CMake/SetAmrexOptions.cmake b/CMake/SetAmrexOptions.cmake index 25e13f6e8..6dad28099 100644 --- a/CMake/SetAmrexOptions.cmake +++ b/CMake/SetAmrexOptions.cmake @@ -1,25 +1,25 @@ set(USE_XSDK_DEFAULTS OFF) -set(AMReX_SPACEDIM "${PELELMEX_DIM}" CACHE STRING "Number of physical dimensions" FORCE) -set(AMReX_MPI ${PELELMEX_ENABLE_MPI}) -set(AMReX_OMP ${PELELMEX_ENABLE_OPENMP}) -set(AMReX_EB ${PELELMEX_ENABLE_EB}) -set(AMReX_PARTICLES ${PELELMEX_ENABLE_AMREX_PARTICLES}) -set(AMReX_PLOTFILE_TOOLS ${PELELMEX_ENABLE_FCOMPARE}) +set(AMReX_SPACEDIM "${PELE_DIM}" CACHE STRING "Number of physical dimensions" FORCE) +set(AMReX_MPI ${PELE_ENABLE_MPI}) +set(AMReX_OMP ${PELE_ENABLE_OPENMP}) +set(AMReX_EB ${PELE_ENABLE_EB}) +set(AMReX_PARTICLES ${PELE_ENABLE_AMREX_PARTICLES}) +set(AMReX_PLOTFILE_TOOLS ${PELE_ENABLE_FCOMPARE}) set(AMReX_SUNDIALS OFF) set(AMReX_FORTRAN OFF) set(AMReX_FORTRAN_INTERFACES OFF) set(AMReX_PIC OFF) -set(AMReX_PRECISION "${PELELMEX_PRECISION}" CACHE STRING "Floating point precision" FORCE) +set(AMReX_PRECISION "${PELE_PRECISION}" CACHE STRING "Floating point precision" FORCE) set(AMReX_LINEAR_SOLVERS ON) set(AMReX_AMRDATA OFF) -set(AMReX_ASCENT ${PELELMEX_ENABLE_ASCENT}) +set(AMReX_ASCENT ${PELE_ENABLE_ASCENT}) set(AMReX_SENSEI OFF) -set(AMReX_CONDUIT ${PELELMEX_ENABLE_ASCENT}) -set(AMReX_HYPRE ${PELELMEX_ENABLE_HYPRE}) +set(AMReX_CONDUIT ${PELE_ENABLE_ASCENT}) +set(AMReX_HYPRE ${PELE_ENABLE_HYPRE}) set(AMReX_FPE OFF) set(AMReX_ASSERTIONS OFF) set(AMReX_BASE_PROFILE OFF) -set(AMReX_TINY_PROFILE ${PELELMEX_ENABLE_TINY_PROFILE}) +set(AMReX_TINY_PROFILE ${PELE_ENABLE_TINY_PROFILE}) set(AMReX_TRACE_PROFILE OFF) set(AMReX_MEM_PROFILE OFF) set(AMReX_COMM_PROFILE OFF) @@ -27,16 +27,16 @@ set(AMReX_BACKTRACE OFF) set(AMReX_PROFPARSER OFF) set(AMReX_ACC OFF) set(AMReX_INSTALL ON) -set(AMReX_HDF5 ${PELELMEX_ENABLE_HDF5}) -set(AMReX_HDF5_ZFP ${PELELMEX_ENABLE_HDF5_ZFP}) +set(AMReX_HDF5 ${PELE_ENABLE_HDF5}) +set(AMReX_HDF5_ZFP ${PELE_ENABLE_HDF5_ZFP}) -if(PELELMEX_ENABLE_CUDA) +if(PELE_ENABLE_CUDA) set(AMReX_GPU_BACKEND CUDA CACHE STRING "AMReX GPU type" FORCE) -elseif(PELELMEX_ENABLE_HIP) +elseif(PELE_ENABLE_HIP) set(AMReX_GPU_BACKEND HIP CACHE STRING "AMReX GPU type" FORCE) -elseif(PELELMEX_ENABLE_SYCL) +elseif(PELE_ENABLE_SYCL) set(AMReX_GPU_BACKEND SYCL CACHE STRING "AMReX GPU type" FORCE) - set(AMReX_SYCL_ONEDPL ${PELELMEX_ENABLE_SYCL}) + set(AMReX_SYCL_ONEDPL ${PELE_ENABLE_SYCL}) else() set(AMReX_GPU_BACKEND NONE CACHE STRING "AMReX GPU type" FORCE) endif() diff --git a/CMake/SetPeleLMeXCompileFlags.cmake b/CMake/SetPeleCompileFlags.cmake similarity index 70% rename from CMake/SetPeleLMeXCompileFlags.cmake rename to CMake/SetPeleCompileFlags.cmake index 0f587b20c..b6ada7660 100644 --- a/CMake/SetPeleLMeXCompileFlags.cmake +++ b/CMake/SetPeleCompileFlags.cmake @@ -1,35 +1,35 @@ -list(APPEND PELELMEX_CXX_FLAGS "-Wall" "-Wextra" "-pedantic" "-Wno-unused-function") +list(APPEND PELE_CXX_FLAGS "-Wall" "-Wextra" "-pedantic" "-Wno-unused-function") if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0) - list(APPEND PELELMEX_CXX_FLAGS "-faligned-new" + list(APPEND PELE_CXX_FLAGS "-faligned-new" "-Wunreachable-code" "-Wnull-dereference" "-Wfloat-conversion" "-Wshadow" "-Woverloaded-virtual") if(CMAKE_CXX_COMPILER_ID MATCHES "^(Clang|AppleClang)$") - list(APPEND PELELMEX_CXX_FLAGS "-Wno-pass-failed" "-Wno-c++17-extensions") - if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND PELELMEX_ENABLE_FPE_TRAP_FOR_TESTS) - list(APPEND PELELMEX_CXX_FLAGS "-ffp-exception-behavior=maytrap") + list(APPEND PELE_CXX_FLAGS "-Wno-pass-failed" "-Wno-c++17-extensions") + if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND PELE_ENABLE_FPE_TRAP_FOR_TESTS) + list(APPEND PELE_CXX_FLAGS "-ffp-exception-behavior=maytrap") endif() endif() endif() endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") - list(APPEND PELELMEX_CXX_FLAGS "-diag-disable:11074,11076,10397,15335") + list(APPEND PELE_CXX_FLAGS "-diag-disable:11074,11076,10397,15335") endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") - list(APPEND PELELMEX_CXX_FLAGS "-Wno-sign-compare" + list(APPEND PELE_CXX_FLAGS "-Wno-sign-compare" "-Wno-unused-parameter" "-Wno-unused-variable") endif() -separate_arguments(PELELMEX_CXX_FLAGS) -target_compile_options(${pelelmex_lib_name} PUBLIC $<$:${PELELMEX_CXX_FLAGS}>) +separate_arguments(PELE_CXX_FLAGS) +target_compile_options(${pele_physics_lib_name} PUBLIC $<$:${PELE_CXX_FLAGS}>) # Use flags to avoid warnings from certain files -if((NOT PELELMEX_ENABLE_CUDA) AND (CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")) +if((NOT PELE_ENABLE_CUDA) AND (CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")) set(NO_WARN_CXX_FLAGS "-w") endif() diff --git a/CMake/SetSundialsOptions.cmake b/CMake/SetSundialsOptions.cmake index 5d6107be6..7b3f9c48e 100644 --- a/CMake/SetSundialsOptions.cmake +++ b/CMake/SetSundialsOptions.cmake @@ -1,4 +1,4 @@ -set(SUNDIALS_PRECISION "${PELELMEX_PRECISION}" CACHE STRING "Floating point precision" FORCE) +set(SUNDIALS_PRECISION "${PELE_PRECISION}" CACHE STRING "Floating point precision" FORCE) set(BUILD_ARKODE ON) set(BUILD_CVODE ON) set(SUNDIALS_INDEX_SIZE 32) @@ -10,9 +10,9 @@ set(BUILD_CPODES OFF) set(BUILD_EXAMPLES OFF) set(_BUILD_EXAMPLES OFF) set(BUILD_TESTING OFF) -set(ENABLE_CUDA ${PELELMEX_ENABLE_CUDA}) -set(ENABLE_HIP ${PELELMEX_ENABLE_HIP}) -set(ENABLE_SYCL ${PELELMEX_ENABLE_SYCL}) +set(ENABLE_CUDA ${PELE_ENABLE_CUDA}) +set(ENABLE_HIP ${PELE_ENABLE_HIP}) +set(ENABLE_SYCL ${PELE_ENABLE_SYCL}) set(EXAMPLES_ENABLE_C OFF) set(EXAMPLES_ENABLE_CXX OFF) if(ENABLE_CUDA) diff --git a/CMakeLists.txt b/CMakeLists.txt index d87290e7e..5e93ca8c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,52 +5,52 @@ project(PeleLMeX LANGUAGES CXX) set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake") include(CMakePackageConfigHelpers) -include(PeleLMeXUtils) - -set(PELELMEX_DIM "3" CACHE STRING "Number of physical dimensions") -option(PELELMEX_ENABLE_AMREX_PARTICLES "Enable particles in AMReX library" OFF) -option(PELELMEX_ENABLE_CLANG_TIDY "Enable clang-tidy analysis" OFF) -option(PELELMEX_ENABLE_CPPCHECK "Enable cppcheck analysis" OFF) -option(PELELMEX_ENABLE_MASA "Enable tests that require MASA" OFF) -option(PELELMEX_ENABLE_FCOMPARE "Enable building fcompare when not testing" OFF) -option(PELELMEX_ENABLE_FCOMPARE_FOR_TESTS "Check test plots against gold files" OFF) -option(PELELMEX_SAVE_GOLDS "Enable saving of gold files to a specified directory" OFF) -option(PELELMEX_ENABLE_SANITIZE_FOR_TESTS "Currently only disables certain long running MMS tests if set" OFF) -option(PELELMEX_ENABLE_FPE_TRAP_FOR_TESTS "Enable FPE trapping in tests" ON) -option(PELELMEX_ENABLE_TINY_PROFILE "Enable tiny profiler in AMReX" OFF) -option(PELELMEX_ENABLE_HDF5 "Enable plot file output using HDF5" OFF) -option(PELELMEX_ENABLE_HDF5_ZFP "Enable ZFP compression in HDF5" OFF) -option(PELELMEX_ENABLE_ASCENT "Enable Ascent in-situ visualization" OFF) -option(PELELMEX_ENABLE_HYPRE "Enable Offload to Hypre" OFF) -set(PELELMEX_PRECISION "DOUBLE" CACHE STRING "Floating point precision SINGLE or DOUBLE") +include(PeleUtils) + +set(PELE_DIM "3" CACHE STRING "Number of physical dimensions") +option(PELE_ENABLE_AMREX_PARTICLES "Enable particles in AMReX library" OFF) +option(PELE_ENABLE_CLANG_TIDY "Enable clang-tidy analysis" OFF) +option(PELE_ENABLE_CPPCHECK "Enable cppcheck analysis" OFF) +option(PELE_ENABLE_MASA "Enable tests that require MASA" OFF) +option(PELE_ENABLE_FCOMPARE "Enable building fcompare when not testing" OFF) +option(PELE_ENABLE_FCOMPARE_FOR_TESTS "Check test plots against gold files" OFF) +option(PELE_SAVE_GOLDS "Enable saving of gold files to a specified directory" OFF) +option(PELE_ENABLE_SANITIZE_FOR_TESTS "Currently only disables certain long running MMS tests if set" OFF) +option(PELE_ENABLE_FPE_TRAP_FOR_TESTS "Enable FPE trapping in tests" ON) +option(PELE_ENABLE_TINY_PROFILE "Enable tiny profiler in AMReX" OFF) +option(PELE_ENABLE_HDF5 "Enable plot file output using HDF5" OFF) +option(PELE_ENABLE_HDF5_ZFP "Enable ZFP compression in HDF5" OFF) +option(PELE_ENABLE_ASCENT "Enable Ascent in-situ visualization" OFF) +option(PELE_ENABLE_HYPRE "Enable Offload to Hypre" OFF) +set(PELE_PRECISION "DOUBLE" CACHE STRING "Floating point precision SINGLE or DOUBLE") # Physics options -option(PELELMEX_ENABLE_EB "Enable Embedded Boundary" OFF) -option(PELELMEX_ENABLE_EFIELD "Enable Electric field module" OFF) -option(PELELMEX_ENABLE_SOOT "Enable Soot module" OFF) -option(PELELMEX_ENABLE_PARTICLES "Enable particles" OFF) -option(PELELMEX_ENABLE_RADIATION "Enable radiation" OFF) +option(PELE_ENABLE_EB "Enable Embedded Boundary" OFF) +option(PELE_ENABLE_EFIELD "Enable Electric field module" OFF) +option(PELE_ENABLE_SOOT "Enable Soot module" OFF) +option(PELE_ENABLE_PARTICLES "Enable particles" OFF) +option(PELE_ENABLE_RADIATION "Enable radiation" OFF) set(PELE_NUM_SOOT_MOMENTS "3" CACHE STRING "Number of soot moments: 3 or 6") # HPC options -option(PELELMEX_ENABLE_MPI "Enable MPI" OFF) -option(PELELMEX_ENABLE_OPENMP "Enable OpenMP" OFF) -option(PELELMEX_ENABLE_CUDA "Enable CUDA" OFF) -option(PELELMEX_ENABLE_HIP "Enable HIP" OFF) -option(PELELMEX_ENABLE_SYCL "Enable SyCL" OFF) +option(PELE_ENABLE_MPI "Enable MPI" OFF) +option(PELE_ENABLE_OPENMP "Enable OpenMP" OFF) +option(PELE_ENABLE_CUDA "Enable CUDA" OFF) +option(PELE_ENABLE_HIP "Enable HIP" OFF) +option(PELE_ENABLE_SYCL "Enable SyCL" OFF) # C++ Options set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) -if(PELELMEX_ENABLE_CUDA) +if(PELE_ENABLE_CUDA) enable_language(CUDA) if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS "10.0") message(FATAL_ERROR "Your nvcc version is ${CMAKE_CUDA_COMPILER_VERSION} which is unsupported." "Please use CUDA toolkit version 10.0 or newer.") endif() - if(PELELMEX_ENABLE_MASA) + if(PELE_ENABLE_MASA) message(FATAL_ERROR "MASA enabled with CUDA is unsupported.") endif() if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES) @@ -58,12 +58,12 @@ if(PELELMEX_ENABLE_CUDA) endif() endif() -if(PELELMEX_ENABLE_HIP) +if(PELE_ENABLE_HIP) enable_language(HIP) endif () -if(PELELMEX_DIM EQUAL 1) - message(FATAL_ERROR "PeleLMeX does not support 1D.") +if(PELE_DIM EQUAL 1) + message(FATAL_ERROR "${PROJECT_NAME} does not support 1D.") endif() ########################### AMReX ##################################### @@ -89,20 +89,20 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) add_subdirectory(${SUNDIALS_SUBMOD_LOCATION}) ########################### PeleLMeX ################################## -if(PELELMEX_ENABLE_MPI) +if(PELE_ENABLE_MPI) message(STATUS "MPI Configure Section") find_package(MPI REQUIRED CXX) endif() # General information about machine, compiler, and build type -message(STATUS "PeleLMeX Information:") +message(STATUS "${PROJECT_NAME} Information:") message(STATUS "CMAKE_SYSTEM_NAME = ${CMAKE_SYSTEM_NAME}") message(STATUS "CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}") message(STATUS "CMAKE_CXX_COMPILER_VERSION = ${CMAKE_CXX_COMPILER_VERSION}") message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") -message(STATUS "PELELMEX_PRECISION = ${PELELMEX_PRECISION}") -if("${PELELMEX_PRECISION}" STREQUAL "SINGLE" AND PELELMEX_ENABLE_MASA) +message(STATUS "PELE_PRECISION = ${PELE_PRECISION}") +if("${PELE_PRECISION}" STREQUAL "SINGLE" AND PELE_ENABLE_MASA) message(FATAL_ERROR "Single precision currently not allowed in AMReX with MASA enabled") endif() diff --git a/Docs/sphinx/manual/LMeXControls.rst b/Docs/sphinx/manual/LMeXControls.rst index 6b5563343..d24cbec10 100644 --- a/Docs/sphinx/manual/LMeXControls.rst +++ b/Docs/sphinx/manual/LMeXControls.rst @@ -223,7 +223,7 @@ PeleLMeX algorithm :: - #-----------------------PELELMEX CONTROL----------------------- + #-----------------------PELE CONTROL----------------------- peleLM.v = 1 # [OPT, DEF=0] Verbose peleLM.run_mode = normal # [OPT, DEF=normal] Switch between time-advance mode (normal) or UnitTest (evaluate) peleLM.use_wbar = 1 # [OPT, DEF=1] Enable Wbar correction in diffusion fluxes diff --git a/Docs/sphinx/manual/Tutorials_SettingUp.rst b/Docs/sphinx/manual/Tutorials_SettingUp.rst index 7aeaf98bb..b0398be91 100644 --- a/Docs/sphinx/manual/Tutorials_SettingUp.rst +++ b/Docs/sphinx/manual/Tutorials_SettingUp.rst @@ -29,7 +29,7 @@ You're good to go! submodules obtained with the recursive *git clone*, however advanced users can set their own dependencies in the `GNUmakefile` for each case by updating the top-most lines as follows: :: - PELELMEX_HOME = + PELE_HOME = AMREX_HOME = AMREX_HYDRO_HOME = PELE_PHYSICS_HOME = @@ -37,7 +37,7 @@ You're good to go! or directly through shell environment variables (using *bash* for instance): :: - export PELELMEX_HOME= + export PELE_HOME= export AMREX_HOME= export AMREX_HYDRO_HOME= export PELE_PHYSICS_HOME= diff --git a/Docs/sphinx/manual/index.rst b/Docs/sphinx/manual/index.rst index 271bf1392..cecaa0976 100644 --- a/Docs/sphinx/manual/index.rst +++ b/Docs/sphinx/manual/index.rst @@ -11,11 +11,11 @@ code for reacting flows. If you need help or have questions, please use the `Git The documentation pages appearing here are distributed with the code in the ``Docs`` folder as "restructured text" files. The html is built automatically with certain pushes to the `PeleLMeX` GibHub repository. A local version can also be built as follows :: - cd ${PELELMEX_HOME}/Docs + cd ${PELE_HOME}/Docs make html -where ``PELELMEX_HOME`` is the location of your clone of the `PeleLMeX` repository. To view the local pages, -point your web browser at the file ``${PELELMEX_HOME}/Docs/build/html/index.html``. +where ``PELE_HOME`` is the location of your clone of the `PeleLMeX` repository. To view the local pages, +point your web browser at the file ``${PELE_HOME}/Docs/build/html/index.html``. .. toctree:: :maxdepth: 2 diff --git a/Exec/Efield/FlameSheetIons/GNUmakefile b/Exec/Efield/FlameSheetIons/GNUmakefile index 97de4f670..d970b24db 100644 --- a/Exec/Efield/FlameSheetIons/GNUmakefile +++ b/Exec/Efield/FlameSheetIons/GNUmakefile @@ -33,5 +33,5 @@ Chemistry_Model = methaneIons_diRenzo Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Efield/IonizedAirWave/GNUmakefile b/Exec/Efield/IonizedAirWave/GNUmakefile index 7314e2548..d70f4f1b5 100644 --- a/Exec/Efield/IonizedAirWave/GNUmakefile +++ b/Exec/Efield/IonizedAirWave/GNUmakefile @@ -33,5 +33,5 @@ Chemistry_Model = IonizedAir Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Efield/PremBunsen3DKuhl/GNUmakefile b/Exec/Efield/PremBunsen3DKuhl/GNUmakefile index 93e256bb5..21dff07bc 100644 --- a/Exec/Efield/PremBunsen3DKuhl/GNUmakefile +++ b/Exec/Efield/PremBunsen3DKuhl/GNUmakefile @@ -34,5 +34,5 @@ Chemistry_Model = CH4Ion_LuSk Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Make.PeleLMeX b/Exec/Make.PeleLMeX index 3505d09cb..d4d70a72d 100644 --- a/Exec/Make.PeleLMeX +++ b/Exec/Make.PeleLMeX @@ -1,6 +1,6 @@ -PELELMEX_HOME ?= ../ -AMREX_HYDRO_HOME ?= $(abspath $(lastword ${PELELMEX_HOME}/Submodules/AMReX-Hydro)) -PELE_PHYSICS_HOME ?= $(abspath $(lastword ${PELELMEX_HOME}/Submodules/PelePhysics)) +PELE_HOME ?= ../ +AMREX_HYDRO_HOME ?= $(abspath $(lastword ${PELE_HOME}/Submodules/AMReX-Hydro)) +PELE_PHYSICS_HOME ?= $(abspath $(lastword ${PELE_HOME}/Submodules/PelePhysics)) AMREX_HOME ?= $(abspath $(lastword ${PELE_PHYSICS_HOME}/Submodules/amrex)) SUNDIALS_HOME ?= $(abspath $(lastword ${PELE_PHYSICS_HOME}/Submodules/sundials)) @@ -54,11 +54,11 @@ ifeq ($(USE_SOOT), TRUE) endif ifeq ($(USE_RADIATION), TRUE) - DEFINES += -DPELELM_USE_RADIATION + DEFINES += -DPELE_USE_RADIATION endif -Bpack += $(foreach dir, $(LMdirs), $(PELELMEX_HOME)/$(dir)/Make.package) -Blocs += $(foreach dir, $(LMdirs), $(PELELMEX_HOME)/$(dir)) +Bpack += $(foreach dir, $(LMdirs), $(PELE_HOME)/$(dir)/Make.package) +Blocs += $(foreach dir, $(LMdirs), $(PELE_HOME)/$(dir)) #--------------- # PelePhysics sources @@ -174,7 +174,7 @@ AMReX_buildInfo.cpp: $(AMREX_HOME)/Tools/C_scripts/makebuildinfo_C.py \ --amrex_home "$(AMREX_HOME)" \ --COMP "$(COMP)" --COMP_VERSION "$(COMP_VERSION)" \ - --GIT "$(PELELMEX_HOME) $(AMREX_HOME) $(PELE_PHYSICS_HOME) $(AMREX_HYDRO_HOME) $(SUNDIALS_HOME)" + --GIT "$(PELE_HOME) $(AMREX_HOME) $(PELE_PHYSICS_HOME) $(AMREX_HYDRO_HOME) $(SUNDIALS_HOME)" #--------------- # Rules diff --git a/Exec/Production/ChallengeProblem/GNUmakefile b/Exec/Production/ChallengeProblem/GNUmakefile index f08240958..13e1f6e25 100644 --- a/Exec/Production/ChallengeProblem/GNUmakefile +++ b/Exec/Production/ChallengeProblem/GNUmakefile @@ -34,5 +34,5 @@ Chemistry_Model = dodecane_lu_qss Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Production/ChallengeProblem/getLMeXChallengePB.sh b/Exec/Production/ChallengeProblem/getLMeXChallengePB.sh index e5dc7b362..bfe877b64 100755 --- a/Exec/Production/ChallengeProblem/getLMeXChallengePB.sh +++ b/Exec/Production/ChallengeProblem/getLMeXChallengePB.sh @@ -62,7 +62,7 @@ EOF cd - # Build LMeX KPP2 Challenge Problem case -export PELELMEX_HOME="${MYPWD}/PeleLMeX" +export PELE_HOME="${MYPWD}/PeleLMeX" export AMREX_HOME="${MYPWD}/PeleLMeX/Submodules/amrex" export AMREX_HYDRO_HOME="${MYPWD}/PeleLMeX/Submodules/AMReX-Hydro" export PELE_PHYSICS_HOME="${MYPWD}/PeleLMeX/Submodules/PelePhysics" diff --git a/Exec/Production/ChallengeProblem/getLMeXChallengePBHypre.sh b/Exec/Production/ChallengeProblem/getLMeXChallengePBHypre.sh index 112852d76..dcbf14bc9 100755 --- a/Exec/Production/ChallengeProblem/getLMeXChallengePBHypre.sh +++ b/Exec/Production/ChallengeProblem/getLMeXChallengePBHypre.sh @@ -99,7 +99,7 @@ fi cd - # Build LMeX KPP2 Challenge Problem case -export PELELMEX_HOME="${MYPWD}/PeleLMeX" +export PELE_HOME="${MYPWD}/PeleLMeX" export AMREX_HOME="${MYPWD}/PeleLMeX/Submodules/amrex" export AMREX_HYDRO_HOME="${MYPWD}/PeleLMeX/Submodules/AMReX-Hydro" export PELE_PHYSICS_HOME="${MYPWD}/PeleLMeX/Submodules/PelePhysics" diff --git a/Exec/Production/CounterFlow/CMakeLists.txt b/Exec/Production/CounterFlow/CMakeLists.txt index 2748d9002..d5a676de5 100644 --- a/Exec/Production/CounterFlow/CMakeLists.txt +++ b/Exec/Production/CounterFlow/CMakeLists.txt @@ -1,10 +1,10 @@ target_include_directories(pelelmex PUBLIC $) -set(PELELMEX_CHEMISTRY_MODEL drm19 PARENT_SCOPE) -set(PELELMEX_EOS_MODEL Fuego PARENT_SCOPE) -set(PELELMEX_TRANSPORT_MODEL Simple PARENT_SCOPE) -set(PELELMEX_DIM "2" PARENT_SCOPE) -set(PELELMEX_MPI ON PARENT_SCOPE) +set(PELE_CHEMISTRY_MODEL drm19 PARENT_SCOPE) +set(PELE_EOS_MODEL Fuego PARENT_SCOPE) +set(PELE_TRANSPORT_MODEL Simple PARENT_SCOPE) +set(PELE_DIM "2" PARENT_SCOPE) +set(PELE_MPI ON PARENT_SCOPE) target_sources(pelelmex PRIVATE diff --git a/Exec/Production/CounterFlow/GNUmakefile b/Exec/Production/CounterFlow/GNUmakefile index 1ecd6592d..25af38941 100644 --- a/Exec/Production/CounterFlow/GNUmakefile +++ b/Exec/Production/CounterFlow/GNUmakefile @@ -33,5 +33,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Production/CounterFlowSpray/GNUmakefile b/Exec/Production/CounterFlowSpray/GNUmakefile index 321102d3e..bcfe5ba79 100644 --- a/Exec/Production/CounterFlowSpray/GNUmakefile +++ b/Exec/Production/CounterFlowSpray/GNUmakefile @@ -37,5 +37,5 @@ Chemistry_Model = heptane_fc Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Production/DiffBunsen2D/CMakeLists.txt b/Exec/Production/DiffBunsen2D/CMakeLists.txt index 2748d9002..d5a676de5 100644 --- a/Exec/Production/DiffBunsen2D/CMakeLists.txt +++ b/Exec/Production/DiffBunsen2D/CMakeLists.txt @@ -1,10 +1,10 @@ target_include_directories(pelelmex PUBLIC $) -set(PELELMEX_CHEMISTRY_MODEL drm19 PARENT_SCOPE) -set(PELELMEX_EOS_MODEL Fuego PARENT_SCOPE) -set(PELELMEX_TRANSPORT_MODEL Simple PARENT_SCOPE) -set(PELELMEX_DIM "2" PARENT_SCOPE) -set(PELELMEX_MPI ON PARENT_SCOPE) +set(PELE_CHEMISTRY_MODEL drm19 PARENT_SCOPE) +set(PELE_EOS_MODEL Fuego PARENT_SCOPE) +set(PELE_TRANSPORT_MODEL Simple PARENT_SCOPE) +set(PELE_DIM "2" PARENT_SCOPE) +set(PELE_MPI ON PARENT_SCOPE) target_sources(pelelmex PRIVATE diff --git a/Exec/Production/DiffBunsen2D/GNUmakefile b/Exec/Production/DiffBunsen2D/GNUmakefile index 1ecd6592d..25af38941 100644 --- a/Exec/Production/DiffBunsen2D/GNUmakefile +++ b/Exec/Production/DiffBunsen2D/GNUmakefile @@ -33,5 +33,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Production/JetInCrossflow/CMakeLists.txt b/Exec/Production/JetInCrossflow/CMakeLists.txt index c0b2127c4..355b48a8a 100644 --- a/Exec/Production/JetInCrossflow/CMakeLists.txt +++ b/Exec/Production/JetInCrossflow/CMakeLists.txt @@ -1,10 +1,10 @@ target_include_directories(pelelmex PUBLIC $) -set(PELELMEX_CHEMISTRY_MODEL LiDryer PARENT_SCOPE) -set(PELELMEX_EOS_MODEL Fuego PARENT_SCOPE) -set(PELELMEX_TRANSPORT_MODEL Simple PARENT_SCOPE) -set(PELELMEX_DIM "3" PARENT_SCOPE) -set(PELELMEX_MPI ON PARENT_SCOPE) +set(PELE_CHEMISTRY_MODEL LiDryer PARENT_SCOPE) +set(PELE_EOS_MODEL Fuego PARENT_SCOPE) +set(PELE_TRANSPORT_MODEL Simple PARENT_SCOPE) +set(PELE_DIM "3" PARENT_SCOPE) +set(PELE_MPI ON PARENT_SCOPE) target_sources(pelelmex PRIVATE diff --git a/Exec/Production/JetInCrossflow/GNUmakefile b/Exec/Production/JetInCrossflow/GNUmakefile index 19d067dfc..5eea5ae4d 100644 --- a/Exec/Production/JetInCrossflow/GNUmakefile +++ b/Exec/Production/JetInCrossflow/GNUmakefile @@ -30,5 +30,5 @@ Chemistry_Model = LiDryer Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Production/NormalJet_OpenDomain/CMakeLists.txt b/Exec/Production/NormalJet_OpenDomain/CMakeLists.txt index e0a17c863..fdc975fb9 100644 --- a/Exec/Production/NormalJet_OpenDomain/CMakeLists.txt +++ b/Exec/Production/NormalJet_OpenDomain/CMakeLists.txt @@ -1,10 +1,10 @@ target_include_directories(pelelmex PUBLIC $) -set(PELELMEX_CHEMISTRY_MODEL dodecane_lu PARENT_SCOPE) -set(PELELMEX_EOS_MODEL Fuego PARENT_SCOPE) -set(PELELMEX_TRANSPORT_MODEL Simple PARENT_SCOPE) -set(PELELMEX_DIM "3" PARENT_SCOPE) -set(PELELMEX_MPI ON PARENT_SCOPE) +set(PELE_CHEMISTRY_MODEL dodecane_lu PARENT_SCOPE) +set(PELE_EOS_MODEL Fuego PARENT_SCOPE) +set(PELE_TRANSPORT_MODEL Simple PARENT_SCOPE) +set(PELE_DIM "3" PARENT_SCOPE) +set(PELE_MPI ON PARENT_SCOPE) target_sources(pelelmex PRIVATE diff --git a/Exec/Production/NormalJet_OpenDomain/GNUmakefile b/Exec/Production/NormalJet_OpenDomain/GNUmakefile index e1b161cc6..9242f4424 100644 --- a/Exec/Production/NormalJet_OpenDomain/GNUmakefile +++ b/Exec/Production/NormalJet_OpenDomain/GNUmakefile @@ -34,5 +34,5 @@ Chemistry_Model = dodecane_lu Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Production/PremBunsen2D/CMakeLists.txt b/Exec/Production/PremBunsen2D/CMakeLists.txt index 2748d9002..d5a676de5 100644 --- a/Exec/Production/PremBunsen2D/CMakeLists.txt +++ b/Exec/Production/PremBunsen2D/CMakeLists.txt @@ -1,10 +1,10 @@ target_include_directories(pelelmex PUBLIC $) -set(PELELMEX_CHEMISTRY_MODEL drm19 PARENT_SCOPE) -set(PELELMEX_EOS_MODEL Fuego PARENT_SCOPE) -set(PELELMEX_TRANSPORT_MODEL Simple PARENT_SCOPE) -set(PELELMEX_DIM "2" PARENT_SCOPE) -set(PELELMEX_MPI ON PARENT_SCOPE) +set(PELE_CHEMISTRY_MODEL drm19 PARENT_SCOPE) +set(PELE_EOS_MODEL Fuego PARENT_SCOPE) +set(PELE_TRANSPORT_MODEL Simple PARENT_SCOPE) +set(PELE_DIM "2" PARENT_SCOPE) +set(PELE_MPI ON PARENT_SCOPE) target_sources(pelelmex PRIVATE diff --git a/Exec/Production/PremBunsen2D/GNUmakefile b/Exec/Production/PremBunsen2D/GNUmakefile index 1ecd6592d..25af38941 100644 --- a/Exec/Production/PremBunsen2D/GNUmakefile +++ b/Exec/Production/PremBunsen2D/GNUmakefile @@ -33,5 +33,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Production/PremBunsen3D/CMakeLists.txt b/Exec/Production/PremBunsen3D/CMakeLists.txt index bc6414536..fd982753d 100644 --- a/Exec/Production/PremBunsen3D/CMakeLists.txt +++ b/Exec/Production/PremBunsen3D/CMakeLists.txt @@ -1,10 +1,10 @@ target_include_directories(pelelmex PUBLIC $) -set(PELELMEX_CHEMISTRY_MODEL drm19 PARENT_SCOPE) -set(PELELMEX_EOS_MODEL Fuego PARENT_SCOPE) -set(PELELMEX_TRANSPORT_MODEL Simple PARENT_SCOPE) -set(PELELMEX_DIM "3" PARENT_SCOPE) -set(PELELMEX_MPI ON PARENT_SCOPE) +set(PELE_CHEMISTRY_MODEL drm19 PARENT_SCOPE) +set(PELE_EOS_MODEL Fuego PARENT_SCOPE) +set(PELE_TRANSPORT_MODEL Simple PARENT_SCOPE) +set(PELE_DIM "3" PARENT_SCOPE) +set(PELE_MPI ON PARENT_SCOPE) target_sources(pelelmex PRIVATE diff --git a/Exec/Production/PremBunsen3D/GNUmakefile b/Exec/Production/PremBunsen3D/GNUmakefile index d55d30fe8..2e4a9f023 100644 --- a/Exec/Production/PremBunsen3D/GNUmakefile +++ b/Exec/Production/PremBunsen3D/GNUmakefile @@ -33,5 +33,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Production/SwirlFlowWallInteractions/CMakeLists.txt b/Exec/Production/SwirlFlowWallInteractions/CMakeLists.txt index 0ced351ed..4d4e0d66a 100644 --- a/Exec/Production/SwirlFlowWallInteractions/CMakeLists.txt +++ b/Exec/Production/SwirlFlowWallInteractions/CMakeLists.txt @@ -1,11 +1,11 @@ target_include_directories(pelelmex PUBLIC $) -set(PELELMEX_CHEMISTRY_MODEL drm19 PARENT_SCOPE) -set(PELELMEX_EOS_MODEL Fuego PARENT_SCOPE) -set(PELELMEX_TRANSPORT_MODEL Simple PARENT_SCOPE) -set(PELELMEX_DIM "3" PARENT_SCOPE) -set(PELELMEX_MPI ON PARENT_SCOPE) -set(PELELMEX_USE_EB ON PARENT_SCOPE) +set(PELE_CHEMISTRY_MODEL drm19 PARENT_SCOPE) +set(PELE_EOS_MODEL Fuego PARENT_SCOPE) +set(PELE_TRANSPORT_MODEL Simple PARENT_SCOPE) +set(PELE_DIM "3" PARENT_SCOPE) +set(PELE_MPI ON PARENT_SCOPE) +set(PELE_USE_EB ON PARENT_SCOPE) target_sources(pelelmex PRIVATE diff --git a/Exec/Production/SwirlFlowWallInteractions/GNUmakefile b/Exec/Production/SwirlFlowWallInteractions/GNUmakefile index dd5ced2c7..4d174c682 100644 --- a/Exec/Production/SwirlFlowWallInteractions/GNUmakefile +++ b/Exec/Production/SwirlFlowWallInteractions/GNUmakefile @@ -34,5 +34,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/Production/TripleFlame/GNUmakefile b/Exec/Production/TripleFlame/GNUmakefile index 05be16222..9ca3513bd 100644 --- a/Exec/Production/TripleFlame/GNUmakefile +++ b/Exec/Production/TripleFlame/GNUmakefile @@ -34,5 +34,5 @@ Reactions_Model = Fuego Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/CMakeLists.txt b/Exec/RegTests/CMakeLists.txt index 2cc866db9..0e45c8423 100644 --- a/Exec/RegTests/CMakeLists.txt +++ b/Exec/RegTests/CMakeLists.txt @@ -1,28 +1,28 @@ -if(PELELMEX_ENABLE_EB) +if(PELE_ENABLE_EB) add_subdirectory(EB_BackwardStepFlame) add_subdirectory(EB_EnclosedFlame) add_subdirectory(EB_EnclosedVortex) add_subdirectory(EB_FlowPastCylinder) - if(PELELMEX_DIM EQUAL 3) + if(PELE_DIM EQUAL 3) add_subdirectory(EB_PipeFlow) endif() else() - if(PELELMEX_ENABLE_RADIATION) - add_subdirectory(SootRadTest) - endif() add_subdirectory(EnclosedFlame) add_subdirectory(EnclosedInjection) add_subdirectory(FlameSheet) add_subdirectory(HITDecay) add_subdirectory(HotBubble) add_subdirectory(PeriodicCases) - #add_subdirectory(SprayTest) add_subdirectory(TaylorGreen) - if(PELELMEX_DIM EQUAL 2) + #add_subdirectory(SprayTest) + #add_subdirectory(Unit) + if(PELE_DIM EQUAL 2) add_subdirectory(TripleFlame) endif() - if(PELELMEX_DIM EQUAL 3) + if(PELE_DIM EQUAL 3) add_subdirectory(TurbInflow) endif() - #add_subdirectory(Unit) + if(PELE_ENABLE_RADIATION) + add_subdirectory(SootRadTest) + endif() endif() diff --git a/Exec/RegTests/EB_BackwardStepFlame/CMakeLists.txt b/Exec/RegTests/EB_BackwardStepFlame/CMakeLists.txt index ae48d20f5..cd74295e8 100644 --- a/Exec/RegTests/EB_BackwardStepFlame/CMakeLists.txt +++ b/Exec/RegTests/EB_BackwardStepFlame/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL drm19) -set(PELELMEX_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL drm19) +set(PELE_PHYSICS_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/EB_BackwardStepFlame/GNUmakefile b/Exec/RegTests/EB_BackwardStepFlame/GNUmakefile index 30f70f57e..82d8447e8 100644 --- a/Exec/RegTests/EB_BackwardStepFlame/GNUmakefile +++ b/Exec/RegTests/EB_BackwardStepFlame/GNUmakefile @@ -33,5 +33,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/EB_EnclosedFlame/CMakeLists.txt b/Exec/RegTests/EB_EnclosedFlame/CMakeLists.txt index ae48d20f5..cd74295e8 100644 --- a/Exec/RegTests/EB_EnclosedFlame/CMakeLists.txt +++ b/Exec/RegTests/EB_EnclosedFlame/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL drm19) -set(PELELMEX_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL drm19) +set(PELE_PHYSICS_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/EB_EnclosedFlame/GNUmakefile b/Exec/RegTests/EB_EnclosedFlame/GNUmakefile index 56f90a22d..c39b4b62a 100644 --- a/Exec/RegTests/EB_EnclosedFlame/GNUmakefile +++ b/Exec/RegTests/EB_EnclosedFlame/GNUmakefile @@ -32,5 +32,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/EB_EnclosedVortex/CMakeLists.txt b/Exec/RegTests/EB_EnclosedVortex/CMakeLists.txt index bca608a0b..7169cbdba 100644 --- a/Exec/RegTests/EB_EnclosedVortex/CMakeLists.txt +++ b/Exec/RegTests/EB_EnclosedVortex/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL air) -set(PELELMEX_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL air) +set(PELE_PHYSICS_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/EB_EnclosedVortex/GNUmakefile b/Exec/RegTests/EB_EnclosedVortex/GNUmakefile index f7a9eab74..d66664e85 100644 --- a/Exec/RegTests/EB_EnclosedVortex/GNUmakefile +++ b/Exec/RegTests/EB_EnclosedVortex/GNUmakefile @@ -32,5 +32,5 @@ Chemistry_Model = air Eos_Model = Fuego Transport_Model = Constant -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/EB_FlowPastCylinder/CMakeLists.txt b/Exec/RegTests/EB_FlowPastCylinder/CMakeLists.txt index bca608a0b..7169cbdba 100644 --- a/Exec/RegTests/EB_FlowPastCylinder/CMakeLists.txt +++ b/Exec/RegTests/EB_FlowPastCylinder/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL air) -set(PELELMEX_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL air) +set(PELE_PHYSICS_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/EB_FlowPastCylinder/GNUmakefile b/Exec/RegTests/EB_FlowPastCylinder/GNUmakefile index 739d8967d..0f2bedc97 100644 --- a/Exec/RegTests/EB_FlowPastCylinder/GNUmakefile +++ b/Exec/RegTests/EB_FlowPastCylinder/GNUmakefile @@ -34,5 +34,5 @@ Chemistry_Model = air Eos_Model = Fuego Transport_Model = Constant -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/EB_FlowPastCylinder/input.2d-Re500 b/Exec/RegTests/EB_FlowPastCylinder/input.2d-Re500 index cb8ba3346..f725212e3 100644 --- a/Exec/RegTests/EB_FlowPastCylinder/input.2d-Re500 +++ b/Exec/RegTests/EB_FlowPastCylinder/input.2d-Re500 @@ -41,7 +41,7 @@ amr.dt_shrink = 0.1 amr.dt_change_max = 1.1 amr.cfl = 0.7 -#-------------------------PELELMEX CONTROLS---------------------- +#-------------------------PELE CONTROLS---------------------- peleLM.v = 1 #---------------------------IO CONTROL--------------------------- diff --git a/Exec/RegTests/EB_PipeFlow/CMakeLists.txt b/Exec/RegTests/EB_PipeFlow/CMakeLists.txt index fc4f530cd..66d2fcdbb 100644 --- a/Exec/RegTests/EB_PipeFlow/CMakeLists.txt +++ b/Exec/RegTests/EB_PipeFlow/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL air) -set(PELELMEX_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL air) +set(PELE_PHYSICS_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/EB_PipeFlow/GNUmakefile b/Exec/RegTests/EB_PipeFlow/GNUmakefile index 91bd3e394..94744f32d 100644 --- a/Exec/RegTests/EB_PipeFlow/GNUmakefile +++ b/Exec/RegTests/EB_PipeFlow/GNUmakefile @@ -33,5 +33,5 @@ Chemistry_Model = air Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/EnclosedFlame/CMakeLists.txt b/Exec/RegTests/EnclosedFlame/CMakeLists.txt index ae48d20f5..cd74295e8 100644 --- a/Exec/RegTests/EnclosedFlame/CMakeLists.txt +++ b/Exec/RegTests/EnclosedFlame/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL drm19) -set(PELELMEX_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL drm19) +set(PELE_PHYSICS_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/EnclosedFlame/GNUmakefile b/Exec/RegTests/EnclosedFlame/GNUmakefile index 2e884e142..f9d782a7c 100644 --- a/Exec/RegTests/EnclosedFlame/GNUmakefile +++ b/Exec/RegTests/EnclosedFlame/GNUmakefile @@ -32,5 +32,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/EnclosedInjection/CMakeLists.txt b/Exec/RegTests/EnclosedInjection/CMakeLists.txt index ae48d20f5..cd74295e8 100644 --- a/Exec/RegTests/EnclosedInjection/CMakeLists.txt +++ b/Exec/RegTests/EnclosedInjection/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL drm19) -set(PELELMEX_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL drm19) +set(PELE_PHYSICS_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/EnclosedInjection/GNUmakefile b/Exec/RegTests/EnclosedInjection/GNUmakefile index b6cc2ed18..18c82f3c9 100644 --- a/Exec/RegTests/EnclosedInjection/GNUmakefile +++ b/Exec/RegTests/EnclosedInjection/GNUmakefile @@ -32,5 +32,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/FlameSheet/CMakeLists.txt b/Exec/RegTests/FlameSheet/CMakeLists.txt index ae48d20f5..cd74295e8 100644 --- a/Exec/RegTests/FlameSheet/CMakeLists.txt +++ b/Exec/RegTests/FlameSheet/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL drm19) -set(PELELMEX_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL drm19) +set(PELE_PHYSICS_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/FlameSheet/GNUmakefile b/Exec/RegTests/FlameSheet/GNUmakefile index 1ecd6592d..25af38941 100644 --- a/Exec/RegTests/FlameSheet/GNUmakefile +++ b/Exec/RegTests/FlameSheet/GNUmakefile @@ -33,5 +33,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/HITDecay/CMakeLists.txt b/Exec/RegTests/HITDecay/CMakeLists.txt index fc4f530cd..66d2fcdbb 100644 --- a/Exec/RegTests/HITDecay/CMakeLists.txt +++ b/Exec/RegTests/HITDecay/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL air) -set(PELELMEX_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL air) +set(PELE_PHYSICS_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/HITDecay/GNUmakefile b/Exec/RegTests/HITDecay/GNUmakefile index ba87c6a0c..83f9180e9 100644 --- a/Exec/RegTests/HITDecay/GNUmakefile +++ b/Exec/RegTests/HITDecay/GNUmakefile @@ -32,5 +32,5 @@ Chemistry_Model = air Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/HotBubble/CMakeLists.txt b/Exec/RegTests/HotBubble/CMakeLists.txt index bca608a0b..7169cbdba 100644 --- a/Exec/RegTests/HotBubble/CMakeLists.txt +++ b/Exec/RegTests/HotBubble/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL air) -set(PELELMEX_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL air) +set(PELE_PHYSICS_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/HotBubble/GNUmakefile b/Exec/RegTests/HotBubble/GNUmakefile index c3937dd6f..fa2c35c26 100644 --- a/Exec/RegTests/HotBubble/GNUmakefile +++ b/Exec/RegTests/HotBubble/GNUmakefile @@ -32,5 +32,5 @@ Chemistry_Model = air Eos_Model = Fuego Transport_Model = Constant -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/PeriodicCases/CMakeLists.txt b/Exec/RegTests/PeriodicCases/CMakeLists.txt index bca608a0b..7169cbdba 100644 --- a/Exec/RegTests/PeriodicCases/CMakeLists.txt +++ b/Exec/RegTests/PeriodicCases/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL air) -set(PELELMEX_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL air) +set(PELE_PHYSICS_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/PeriodicCases/GNUmakefile b/Exec/RegTests/PeriodicCases/GNUmakefile index c3937dd6f..fa2c35c26 100644 --- a/Exec/RegTests/PeriodicCases/GNUmakefile +++ b/Exec/RegTests/PeriodicCases/GNUmakefile @@ -32,5 +32,5 @@ Chemistry_Model = air Eos_Model = Fuego Transport_Model = Constant -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/SootRadTest/CMakeLists.txt b/Exec/RegTests/SootRadTest/CMakeLists.txt index 54dde07be..868d8a8f5 100644 --- a/Exec/RegTests/SootRadTest/CMakeLists.txt +++ b/Exec/RegTests/SootRadTest/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL SootReaction) -set(PELELMEX_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL SootReaction) +set(PELE_PHYSICS_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION ON) include(BuildExeAndLib) diff --git a/Exec/RegTests/SootRadTest/GNUmakefile b/Exec/RegTests/SootRadTest/GNUmakefile index 35fc36e96..7c7c7469a 100644 --- a/Exec/RegTests/SootRadTest/GNUmakefile +++ b/Exec/RegTests/SootRadTest/GNUmakefile @@ -24,5 +24,5 @@ USE_RADIATION = TRUE USE_SOOT = TRUE NUM_SOOT_MOMENTS = 3 -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/SootRadTest/pelelmex_prob.H b/Exec/RegTests/SootRadTest/pelelmex_prob.H index 4ad4d8cd7..136adc360 100644 --- a/Exec/RegTests/SootRadTest/pelelmex_prob.H +++ b/Exec/RegTests/SootRadTest/pelelmex_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELMEX_PROB_H -#define PELELMEX_PROB_H +#ifndef PELE_PROB_H +#define PELE_PROB_H #include #include diff --git a/Exec/RegTests/SootRadTest/pelelmex_prob_parm.H b/Exec/RegTests/SootRadTest/pelelmex_prob_parm.H index c28c86501..6ac087b3b 100644 --- a/Exec/RegTests/SootRadTest/pelelmex_prob_parm.H +++ b/Exec/RegTests/SootRadTest/pelelmex_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELMEX_PROB_PARM_H -#define PELELMEX_PROB_PARM_H +#ifndef PELE_PROB_PARM_H +#define PELE_PROB_PARM_H #include #include diff --git a/Exec/RegTests/SprayTest/CMakeLists.txt b/Exec/RegTests/SprayTest/CMakeLists.txt index 9feb1e0cf..4fcdd3dd9 100644 --- a/Exec/RegTests/SprayTest/CMakeLists.txt +++ b/Exec/RegTests/SprayTest/CMakeLists.txt @@ -1,5 +1,8 @@ -set(PELELMEX_ENABLE_PARTICLES ON) -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL decane_3sp) -set(PELELMEX_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL decane_3sp) +set(PELE_PHYSICS_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_ENABLE_SPRAY ON) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 1) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/SprayTest/GNUmakefile b/Exec/RegTests/SprayTest/GNUmakefile index 9b9deca35..74736c954 100644 --- a/Exec/RegTests/SprayTest/GNUmakefile +++ b/Exec/RegTests/SprayTest/GNUmakefile @@ -35,5 +35,5 @@ Chemistry_Model = decane_3sp Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/TaylorGreen/CMakeLists.txt b/Exec/RegTests/TaylorGreen/CMakeLists.txt index bca608a0b..7169cbdba 100644 --- a/Exec/RegTests/TaylorGreen/CMakeLists.txt +++ b/Exec/RegTests/TaylorGreen/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL air) -set(PELELMEX_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL air) +set(PELE_PHYSICS_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/TaylorGreen/GNUmakefile b/Exec/RegTests/TaylorGreen/GNUmakefile index 7baaf14c2..fcd4181b3 100644 --- a/Exec/RegTests/TaylorGreen/GNUmakefile +++ b/Exec/RegTests/TaylorGreen/GNUmakefile @@ -32,5 +32,5 @@ Chemistry_Model = air Eos_Model = Fuego Transport_Model = Constant -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/TripleFlame/CMakeLists.txt b/Exec/RegTests/TripleFlame/CMakeLists.txt index ae48d20f5..cd74295e8 100644 --- a/Exec/RegTests/TripleFlame/CMakeLists.txt +++ b/Exec/RegTests/TripleFlame/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL drm19) -set(PELELMEX_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL drm19) +set(PELE_PHYSICS_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/TripleFlame/GNUmakefile b/Exec/RegTests/TripleFlame/GNUmakefile index 1ecd6592d..25af38941 100644 --- a/Exec/RegTests/TripleFlame/GNUmakefile +++ b/Exec/RegTests/TripleFlame/GNUmakefile @@ -33,5 +33,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/TurbInflow/CMakeLists.txt b/Exec/RegTests/TurbInflow/CMakeLists.txt index fc4f530cd..66d2fcdbb 100644 --- a/Exec/RegTests/TurbInflow/CMakeLists.txt +++ b/Exec/RegTests/TurbInflow/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL air) -set(PELELMEX_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL air) +set(PELE_PHYSICS_TRANSPORT_MODEL Simple) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/TurbInflow/GNUmakefile b/Exec/RegTests/TurbInflow/GNUmakefile index ba87c6a0c..83f9180e9 100644 --- a/Exec/RegTests/TurbInflow/GNUmakefile +++ b/Exec/RegTests/TurbInflow/GNUmakefile @@ -32,5 +32,5 @@ Chemistry_Model = air Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/RegTests/Unit/CMakeLists.txt b/Exec/RegTests/Unit/CMakeLists.txt index bca608a0b..7169cbdba 100644 --- a/Exec/RegTests/Unit/CMakeLists.txt +++ b/Exec/RegTests/Unit/CMakeLists.txt @@ -1,4 +1,8 @@ -set(PELELMEX_EOS_MODEL Fuego) -set(PELELMEX_CHEMISTRY_MODEL air) -set(PELELMEX_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_EOS_MODEL Fuego) +set(PELE_PHYSICS_CHEMISTRY_MODEL air) +set(PELE_PHYSICS_TRANSPORT_MODEL Constant) +set(PELE_PHYSICS_ENABLE_SPRAY OFF) +set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) +set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_RADIATION OFF) include(BuildExeAndLib) diff --git a/Exec/RegTests/Unit/GNUmakefile b/Exec/RegTests/Unit/GNUmakefile index 32cc17aec..c96bcf691 100644 --- a/Exec/RegTests/Unit/GNUmakefile +++ b/Exec/RegTests/Unit/GNUmakefile @@ -33,5 +33,5 @@ Reactions_Model = Null Eos_Model = Fuego Transport_Model = Constant -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/UnitTests/DodecaneLu/GNUmakefile b/Exec/UnitTests/DodecaneLu/GNUmakefile index fb4604e63..71e51817e 100644 --- a/Exec/UnitTests/DodecaneLu/GNUmakefile +++ b/Exec/UnitTests/DodecaneLu/GNUmakefile @@ -33,5 +33,5 @@ Chemistry_Model = dodecane_lu Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/Exec/UnitTests/EB_SphericalFlame/GNUmakefile b/Exec/UnitTests/EB_SphericalFlame/GNUmakefile index b73f2d0a5..a5d413be2 100644 --- a/Exec/UnitTests/EB_SphericalFlame/GNUmakefile +++ b/Exec/UnitTests/EB_SphericalFlame/GNUmakefile @@ -32,5 +32,5 @@ Chemistry_Model = drm19 Eos_Model = Fuego Transport_Model = Simple -PELELMEX_HOME ?= ../../.. -include $(PELELMEX_HOME)/Exec/Make.PeleLMeX +PELE_HOME ?= ../../.. +include $(PELE_HOME)/Exec/Make.PeleLMeX diff --git a/README.md b/README.md index 430d2abdd..c24f53c21 100644 --- a/README.md +++ b/README.md @@ -84,9 +84,9 @@ The default location for *PeleLMeX* dependencies is the `Submodules` folder but setup the following environment variables (e.g. using bash) to any other location: ``` -export PELELMEX_HOME= -export AMREX_HYDRO_HOME=${PELELMEX_HOME}/Submodules/AMReX-Hydro -export PELE_PHYSICS_HOME=${PELELMEX_HOME}/Submodules/PelePhysics +export PELE_HOME= +export AMREX_HYDRO_HOME=${PELE_HOME}/Submodules/AMReX-Hydro +export PELE_PHYSICS_HOME=${PELE_HOME}/Submodules/PelePhysics export AMREX_HOME=${PELE_PHYSICS_HOME}/Submodules/amrex export SUNDIALS_HOME=${PELE_PHYSICS_HOME}/Submodules/sundials ``` @@ -108,18 +108,6 @@ If this is a clean install, you will need to make the third party libraries with Finally, make with: `make -j`, or if on macOS: `make -j COMP=llvm`. To clean the installation, use either `make clean` or `make realclean`. If running into compile errors after changing compile time options in PeleLMeX (e.g., the chemical mechanism), the first thing to try is to clean your build by running `make TPLrealclean && make realclean`, then try to rebuild the third party libraries and PeleLMeX with `make TPL && make -j`. See the [Tutorial](https://amrex-combustion.github.io/PeleLMeX/manual/html/Tutorials_HotBubble.html) for this case for instructions on how to compile with different options (for example, to compile without MPI support or to compile for GPUs) and how to run the code once compiled. -When using CMake (cmake version >= 3.23 is required), first configure CMake directly in *PeleLMeX* root folder: - -``` -cmake -S . -B buildHotBubble -DPELELMEX_MPI=ON -DPELELMEX_CASE=HotBubble -``` - -Then build the executable: - -``` -cmake --build buildHotBubble --parallel 4 -``` - ## Getting help, contributing Do you have a question ? Found an issue ? Please use the [GitHub Discussions](https://github.com/AMReX-Combustion/PeleLMeX/discussions) to engage diff --git a/Source/Efield/PeleLMeX_EFDeriveFunc.H b/Source/Efield/PeleLMeX_EFDeriveFunc.H index 37d9208c4..14344bf93 100644 --- a/Source/Efield/PeleLMeX_EFDeriveFunc.H +++ b/Source/Efield/PeleLMeX_EFDeriveFunc.H @@ -1,5 +1,5 @@ -#ifndef PELELMEF_DERIVEFUNC_H -#define PELELMEF_DERIVEFUNC_H +#ifndef PELEEF_DERIVEFUNC_H +#define PELEEF_DERIVEFUNC_H #include #include diff --git a/Source/PeleLMeX.H b/Source/PeleLMeX.H index 6f708933d..6f50d6b68 100644 --- a/Source/PeleLMeX.H +++ b/Source/PeleLMeX.H @@ -32,16 +32,16 @@ #include #include -#ifdef PELELM_USE_RADIATION +#ifdef PELE_USE_RADIATION #include #endif // Forward declarations -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY class SprayParticleContainer; #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT class SootModel; #endif @@ -118,7 +118,7 @@ public: void readGridFile(std::string grid_file, amrex::Vector& input_ba); -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY // ReadSprayParameters void SprayReadParameters(); @@ -813,7 +813,7 @@ public: amrex::Array4 const& extRho); //----------------------------------------------------------------------------- -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY //----------------------------------------------------------------------------- // Sprays void setupVirtualParticles(const int level); @@ -838,7 +838,7 @@ public: amrex::Vector> m_spraystate; //----------------------------------------------------------------------------- #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT //----------------------------------------------------------------------------- // Soot @@ -861,7 +861,7 @@ public: //----------------------------------------------------------------------------- #endif -#ifdef PELELM_USE_RADIATION +#ifdef PELE_USE_RADIATION // Initialize the radiation module void RadInit(); @@ -1685,13 +1685,13 @@ public: ProbParm* prob_parm = nullptr; ProbParm* prob_parm_d = nullptr; -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT // Soot parameters SootModel* soot_model = nullptr; bool do_soot_solve; #endif -#ifdef PELELM_USE_RADIATION +#ifdef PELE_USE_RADIATION // Radiation parameters std::unique_ptr rad_model; bool do_rad_solve; diff --git a/Source/PeleLMeX.cpp b/Source/PeleLMeX.cpp index aad51753e..59d5cc07b 100644 --- a/Source/PeleLMeX.cpp +++ b/Source/PeleLMeX.cpp @@ -1,7 +1,7 @@ #include #include -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY #include "SprayParticles.H" #endif @@ -27,10 +27,10 @@ PeleLM::~PeleLM() The_Arena()->free(prob_parm_d); m_initial_ba.clear(); m_regrid_ba.clear(); -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY SprayParticleContainer::SprayCleanUp(); #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT cleanupSootModel(); #endif } diff --git a/Source/PeleLMeX_Advance.cpp b/Source/PeleLMeX_Advance.cpp index f1306edd9..5dbd513a5 100644 --- a/Source/PeleLMeX_Advance.cpp +++ b/Source/PeleLMeX_Advance.cpp @@ -43,7 +43,7 @@ PeleLM::Advance(int is_initIter) // Compute time-step size m_dt = computeDt(is_initIter, AmrOldTime); -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY // Create the state MF used for spray interpolation SpraySetState(m_dt); #endif @@ -110,17 +110,17 @@ PeleLM::Advance(int is_initIter) BL_PROFILE_VAR_STOP(PLM_SETUP); //---------------------------------------------------------------- -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY if (!is_initIter) { SprayMKD(m_cur_time, m_dt); } #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT if (do_soot_solve) { computeSootSource(AmrOldTime, m_dt); } #endif -#ifdef PELELM_USE_RADIATION +#ifdef PELE_USE_RADIATION if (do_rad_solve) { BL_PROFILE_VAR("PeleLM::advance::rad", PLM_RAD); computeRadSource(AmrOldTime); @@ -190,7 +190,7 @@ PeleLM::Advance(int is_initIter) averageDownScalars(AmrNewTime); fillPatchState(AmrNewTime); -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT if (do_soot_solve) { clipSootMoments(); } @@ -352,7 +352,7 @@ PeleLM::oneSDC( if (m_verbose > 1) { ScalAdvStart = ParallelDescriptor::second(); } -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT // Compute and update passive advective terms computePassiveAdvTerms(advData, FIRSTSOOT, NUMSOOTVAR); #endif diff --git a/Source/PeleLMeX_BC.cpp b/Source/PeleLMeX_BC.cpp index 0a389cde4..abee548bc 100644 --- a/Source/PeleLMeX_BC.cpp +++ b/Source/PeleLMeX_BC.cpp @@ -43,7 +43,7 @@ int nE_bc[] = {INT_DIR, EXT_DIR, FOEXTRAP, REFLECT_EVEN, int phiV_bc[] = {INT_DIR, EXT_DIR, REFLECT_EVEN}; #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT int soot_bc[] = {INT_DIR, EXT_DIR, FOEXTRAP, REFLECT_EVEN, REFLECT_EVEN, REFLECT_EVEN, EXT_DIR, EXT_DIR}; #endif @@ -186,7 +186,7 @@ PeleLM::setBoundaryConditions() m_bcrec_state[NE] = hackBCChargedParticle(-1.0, bcnESave); } #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT for (int idim = 0; idim < AMREX_SPACEDIM; idim++) { for (int mom = 0; mom < NUMSOOTVAR; mom++) { m_bcrec_state[FIRSTSOOT + mom].setLo(idim, soot_bc[lo_bc[idim]]); diff --git a/Source/PeleLMeX_Derive.H b/Source/PeleLMeX_Derive.H index 3880d61be..ee1d14d09 100644 --- a/Source/PeleLMeX_Derive.H +++ b/Source/PeleLMeX_Derive.H @@ -1,5 +1,5 @@ -#ifndef PELELM_Derive_H -#define PELELM_Derive_H +#ifndef PELE_Derive_H +#define PELE_Derive_H #include #include #include diff --git a/Source/PeleLMeX_DeriveFunc.H b/Source/PeleLMeX_DeriveFunc.H index 7d74421fc..2558604b1 100644 --- a/Source/PeleLMeX_DeriveFunc.H +++ b/Source/PeleLMeX_DeriveFunc.H @@ -1,5 +1,5 @@ -#ifndef PELELM_DERIVEFUNC_H -#define PELELM_DERIVEFUNC_H +#ifndef PELE_DERIVEFUNC_H +#define PELE_DERIVEFUNC_H #include #include diff --git a/Source/PeleLMeX_Evolve.cpp b/Source/PeleLMeX_Evolve.cpp index 8a2c86852..0712c416a 100644 --- a/Source/PeleLMeX_Evolve.cpp +++ b/Source/PeleLMeX_Evolve.cpp @@ -23,7 +23,7 @@ PeleLM::Evolve() << "\n ==================== NEW TIME STEP ==================== \n"; } -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY bool regridded = false; #endif if ((m_regrid_int > 0) && (m_nstep > 0) && (m_nstep % m_regrid_int == 0)) { @@ -37,12 +37,12 @@ PeleLM::Evolve() regrid(0, m_cur_time); resetMacProjector(); resetCoveredMask(); -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY regridded = true; #endif updateDiagnostics(); } -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY // Inject and redistribute spray particles if (do_spray_particles && regridded) { SprayPostRegrid(); @@ -53,7 +53,7 @@ PeleLM::Evolve() m_nstep++; m_cur_time += m_dt; -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY if (do_spray_particles) { SprayInjectRedist(); } diff --git a/Source/PeleLMeX_Index.H b/Source/PeleLMeX_Index.H index aad22b0e4..ee1f25f80 100644 --- a/Source/PeleLMeX_Index.H +++ b/Source/PeleLMeX_Index.H @@ -1,5 +1,5 @@ -#ifndef PELELM_INDEX_H -#define PELELM_INDEX_H +#ifndef PELE_INDEX_H +#define PELE_INDEX_H #define VELX 0 #define VELY 1 @@ -16,7 +16,7 @@ #else #define NUMEFIELD 0 #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT #define FIRSTSOOT (RHORT + NUMEFIELD + 1) #define NUMSOOTVAR (NUM_SOOT_MOMENTS + 1) #else diff --git a/Source/PeleLMeX_Init.cpp b/Source/PeleLMeX_Init.cpp index 826c62f4a..dace64fa6 100644 --- a/Source/PeleLMeX_Init.cpp +++ b/Source/PeleLMeX_Init.cpp @@ -187,10 +187,10 @@ PeleLM::initData() resetCoveredMask(); updateDiagnostics(); -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY SprayInit(); #endif -#ifdef PELELM_USE_RADIATION +#ifdef PELE_USE_RADIATION if (do_rad_solve) { RadInit(); } @@ -254,10 +254,10 @@ PeleLM::initData() // Read starting configuration from chk file. ReadCheckPointFile(); -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY SprayInit(); #endif -#ifdef PELELM_USE_RADIATION +#ifdef PELE_USE_RADIATION if (do_rad_solve) { RadInit(); } diff --git a/Source/PeleLMeX_Plot.cpp b/Source/PeleLMeX_Plot.cpp index f8e2cab8c..606f587ed 100644 --- a/Source/PeleLMeX_Plot.cpp +++ b/Source/PeleLMeX_Plot.cpp @@ -11,13 +11,13 @@ #include #endif -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY #include "SprayParticles.H" #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT #include "SootModel.H" #endif -#ifdef PELELM_USE_RADIATION +#ifdef PELE_USE_RADIATION #include "PeleLMRad.H" #endif @@ -120,7 +120,7 @@ PeleLM::WritePlotFile() ncomp += 1; #endif -#ifdef PELELM_USE_RADIATION +#ifdef PELE_USE_RADIATION if (do_rad_solve) ncomp += 3; #endif @@ -132,7 +132,7 @@ PeleLM::WritePlotFile() deriveEntryCount += rec->numDerive(); } ncomp += deriveEntryCount; -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY if (do_spray_particles) { ncomp += SprayParticleContainer::NumDeriveVars(); if (SprayParticleContainer::plot_spray_src) { @@ -181,13 +181,13 @@ PeleLM::WritePlotFile() plt_VarsName.push_back("nE"); plt_VarsName.push_back("phiV"); #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT for (int mom = 0; mom < NUMSOOTVAR; mom++) { std::string sootname = soot_model->sootVariableName(mom); plt_VarsName.push_back(sootname); } #endif -#ifdef PELELM_USE_RADIATION +#ifdef PELE_USE_RADIATION if (do_rad_solve) { plt_VarsName.push_back("rad.G"); plt_VarsName.push_back("rad.kappa"); @@ -229,7 +229,7 @@ PeleLM::WritePlotFile() plt_VarsName.push_back(rec->variableName(dvar)); } } -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY if (SprayParticleContainer::NumDeriveVars() > 0) { // We need virtual particles for the lower levels setupVirtualParticles(0); @@ -294,13 +294,13 @@ PeleLM::WritePlotFile() MultiFab::Copy(mf_plt[lev], m_leveldata_new[lev]->state, NE, cnt, 2, 0); cnt += 2; #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT MultiFab::Copy( mf_plt[lev], m_leveldata_new[lev]->state, FIRSTSOOT, cnt, NUMSOOTVAR, 0); cnt += NUMSOOTVAR; #endif -#ifdef PELELM_USE_RADIATION +#ifdef PELE_USE_RADIATION if (do_rad_solve) { MultiFab::Copy(mf_plt[lev], rad_model->G()[lev], 0, cnt, 1, 0); cnt += 1; @@ -349,7 +349,7 @@ PeleLM::WritePlotFile() MultiFab::Copy(mf_plt[lev], *mf, 0, cnt, mf->nComp(), 0); cnt += mf->nComp(); } -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY if (SprayParticleContainer::NumDeriveVars() > 0) { const int num_spray_derive = SprayParticleContainer::NumDeriveVars(); mf_plt[lev].setVal(0., cnt, num_spray_derive); @@ -435,7 +435,7 @@ PeleLM::WritePlotFile() Geom(), m_cur_time, istep, refRatio()); } -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY if (do_spray_particles) { bool is_spraycheck = false; for (int lev = 0; lev <= finest_level; ++lev) { @@ -558,7 +558,7 @@ PeleLM::WriteCheckPointFile() } } } -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY if (do_spray_particles) { bool is_spraycheck = true; for (int lev = 0; lev <= finest_level; ++lev) { @@ -805,7 +805,7 @@ PeleLM::initLevelDataFromPlt(int a_lev, const std::string& a_dataPltFile) #ifdef PELE_USE_EFIELD int inE = -1, iPhiV = -1; #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT int inSoot = -1; #endif for (int i = 0; i < plt_vars.size(); ++i) { @@ -836,7 +836,7 @@ PeleLM::initLevelDataFromPlt(int a_lev, const std::string& a_dataPltFile) if (plt_vars[i] == "phiV") iPhiV = i; #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT if (plt_vars[i] == "soot_N") inSoot = i; #endif @@ -903,7 +903,7 @@ PeleLM::initLevelDataFromPlt(int a_lev, const std::string& a_dataPltFile) // phiV pltData.fillPatchFromPlt(a_lev, geom[a_lev], iPhiV, PHIV, 1, ldata_p->state); #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT if (do_soot_solve) { if (inSoot >= 0) { pltData.fillPatchFromPlt( diff --git a/Source/PeleLMeX_Radiation.cpp b/Source/PeleLMeX_Radiation.cpp index 4aee7bf55..a0dee8215 100644 --- a/Source/PeleLMeX_Radiation.cpp +++ b/Source/PeleLMeX_Radiation.cpp @@ -56,7 +56,7 @@ PeleLM::computeRadSource(const PeleLM::TimeStamp& a_timestamp) ldata_p->state.const_array(mfi, FIRSTSPEC + coIndx); auto const& q_Tin = ldata_p->state.const_array(mfi, TEMP); auto const& q_Pin = ldata_p->state.const_array(mfi, RHORT); -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT auto const& q_fvin = ldata_p->state.const_array(mfi, FIRSTSOOT + 1); rad_model->updateSpecProp( mfi, q_yin_co2, q_yin_h2o, q_yin_co, q_Tin, q_Pin, q_fvin, lev); diff --git a/Source/PeleLMeX_Setup.cpp b/Source/PeleLMeX_Setup.cpp index a326df9d2..fe9ed4668 100644 --- a/Source/PeleLMeX_Setup.cpp +++ b/Source/PeleLMeX_Setup.cpp @@ -11,7 +11,7 @@ #include #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT #include "SootModel.H" #endif @@ -60,7 +60,7 @@ PeleLM::Setup() amrex::Print() << " AMReX-Hydro git hash: " << githash4 << "\n"; amrex::Print() << " ===============================================\n"; -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT soot_model = new SootModel{}; #endif @@ -83,10 +83,10 @@ PeleLM::Setup() // Tagging setup taggingSetup(); -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY SpraySetup(); #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT if (do_soot_solve) { soot_model->define(); } @@ -578,10 +578,10 @@ PeleLM::readParameters() } #endif -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY SprayReadParameters(); #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT do_soot_solve = true; pp.query("do_soot_solve", do_soot_solve); if (m_verbose && do_soot_solve) { @@ -589,7 +589,7 @@ PeleLM::readParameters() } soot_model->readSootParams(); #endif -#ifdef PELELM_USE_RADIATION +#ifdef PELE_USE_RADIATION do_rad_solve = false; pp.query("do_rad_solve", do_rad_solve); if (m_verbose && do_rad_solve) { @@ -691,7 +691,7 @@ PeleLM::variablesSetup() Print() << " PhiV: " << PHIV << "\n"; stateComponents.emplace_back(PHIV, "PhiV"); #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT for (int mom = 0; mom < NUMSOOTVAR; mom++) { std::string sootname = soot_model->sootVariableName(mom); Print() << " " << sootname << ": " << FIRSTSOOT + mom << "\n"; @@ -752,7 +752,7 @@ PeleLM::variablesSetup() m_AdvTypeState[PHIV] = 0; m_DiffTypeState[PHIV] = 0; #endif -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT for (int mom = 0; mom < NUMSOOTVAR; mom++) { m_AdvTypeState[FIRSTSOOT + mom] = 0; m_DiffTypeState[FIRSTSOOT + mom] = 0; @@ -1264,7 +1264,7 @@ PeleLM::resizeArray() m_t_old.resize(max_level + 1); m_t_new.resize(max_level + 1); -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY m_spraystate.resize(max_level + 1); m_spraysource.resize(max_level + 1); #endif diff --git a/Source/PeleLMeX_Soot.cpp b/Source/PeleLMeX_Soot.cpp index 055b3b286..4a1ce5c54 100644 --- a/Source/PeleLMeX_Soot.cpp +++ b/Source/PeleLMeX_Soot.cpp @@ -1,5 +1,5 @@ -#ifdef PELELM_USE_SOOT +#ifdef PELE_USE_SOOT #include #include #include "SootModel.H" diff --git a/Source/PeleLMeX_SprayParticles.cpp b/Source/PeleLMeX_SprayParticles.cpp index 67e805495..ae5fc2439 100644 --- a/Source/PeleLMeX_SprayParticles.cpp +++ b/Source/PeleLMeX_SprayParticles.cpp @@ -1,7 +1,7 @@ #include -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY #include "SprayParticles.H" #include diff --git a/Source/PeleLMeX_Timestep.cpp b/Source/PeleLMeX_Timestep.cpp index 932b45448..d15374fd4 100644 --- a/Source/PeleLMeX_Timestep.cpp +++ b/Source/PeleLMeX_Timestep.cpp @@ -33,7 +33,7 @@ PeleLM::computeDt(int is_init, const TimeStamp& a_time) Real dtions = estEFIonsDt(a_time); estdt = std::min(estdt, dtions); #endif -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY Real dtspray = SprayEstDt(); estdt = std::min(estdt, dtspray); #endif @@ -42,7 +42,7 @@ PeleLM::computeDt(int is_init, const TimeStamp& a_time) #ifdef PELE_USE_EFIELD << ", ions: " << dtions #endif -#ifdef PELELM_USE_SPRAY +#ifdef PELE_USE_SPRAY << ", sprays: " << dtspray #endif << "\n"; diff --git a/Source/PeleLMeX_Utils.H b/Source/PeleLMeX_Utils.H index f38e182c2..842ff7020 100644 --- a/Source/PeleLMeX_Utils.H +++ b/Source/PeleLMeX_Utils.H @@ -1,5 +1,5 @@ -#ifndef PELELM_UTILS_H -#define PELELM_UTILS_H +#ifndef PELE_UTILS_H +#define PELE_UTILS_H template amrex::Gpu::DeviceVector convertToDeviceVector(amrex::Vector v) diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index 0b396f4b3..69885d8ef 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit 0b396f4b349d1f9ebdce75ca57915b1cd58bc430 +Subproject commit 69885d8ef07b1f2aaca7ae691c872141a7cecf04 diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index ef8347cdf..e40b820b5 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -4,28 +4,28 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCustom.cmake) -if(PELELMEX_ENABLE_FCOMPARE_FOR_TESTS) - if("${PELELMEX_REFERENCE_GOLDS_DIRECTORY}" STREQUAL "") - message(FATAL_ERROR "To reference gold files, PELELMEX_REFERENCE_GOLDS_DIRECTORY must be set and exist") +if(PELE_ENABLE_FCOMPARE_FOR_TESTS) + if("${PELE_REFERENCE_GOLDS_DIRECTORY}" STREQUAL "") + message(FATAL_ERROR "To reference gold files, PELE_REFERENCE_GOLDS_DIRECTORY must be set and exist") else() - if(EXISTS ${PELELMEX_REFERENCE_GOLDS_DIRECTORY}) - set(GOLD_FILES_DIRECTORY ${PELELMEX_REFERENCE_GOLDS_DIRECTORY}/${CMAKE_SYSTEM_NAME}/${CMAKE_CXX_COMPILER_ID}/${CMAKE_CXX_COMPILER_VERSION}) + if(EXISTS ${PELE_REFERENCE_GOLDS_DIRECTORY}) + set(GOLD_FILES_DIRECTORY ${PELE_REFERENCE_GOLDS_DIRECTORY}/${CMAKE_SYSTEM_NAME}/${CMAKE_CXX_COMPILER_ID}/${CMAKE_CXX_COMPILER_VERSION}) message(STATUS "Test golds directory for fcompare: ${GOLD_FILES_DIRECTORY}") else() - message(FATAL_ERROR "Specified directory for reference gold files does not exist: ${PELELMEX_REFERENCE_GOLDS_DIRECTORY}") + message(FATAL_ERROR "Specified directory for reference gold files does not exist: ${PELE_REFERENCE_GOLDS_DIRECTORY}") endif() endif() endif() -if(PELELMEX_SAVE_GOLDS) - if("${PELELMEX_SAVED_GOLDS_DIRECTORY}" STREQUAL "") - message(FATAL_ERROR "To save gold files, PELELMEX_SAVED_GOLDS_DIRECTORY must be set and exist") +if(PELE_SAVE_GOLDS) + if("${PELE_SAVED_GOLDS_DIRECTORY}" STREQUAL "") + message(FATAL_ERROR "To save gold files, PELE_SAVED_GOLDS_DIRECTORY must be set and exist") else() - if(EXISTS ${PELELMEX_SAVED_GOLDS_DIRECTORY}) - set(SAVED_GOLDS_DIRECTORY ${PELELMEX_SAVED_GOLDS_DIRECTORY}/${CMAKE_SYSTEM_NAME}/${CMAKE_CXX_COMPILER_ID}/${CMAKE_CXX_COMPILER_VERSION}) + if(EXISTS ${PELE_SAVED_GOLDS_DIRECTORY}) + set(SAVED_GOLDS_DIRECTORY ${PELE_SAVED_GOLDS_DIRECTORY}/${CMAKE_SYSTEM_NAME}/${CMAKE_CXX_COMPILER_ID}/${CMAKE_CXX_COMPILER_VERSION}) message(STATUS "Gold files will be saved to: ${SAVED_GOLDS_DIRECTORY}") else() - message(FATAL_ERROR "Specified directory for saving gold files does not exist: ${PELELMEX_SAVED_GOLDS_DIRECTORY}") + message(FATAL_ERROR "Specified directory for saving gold files does not exist: ${PELE_SAVED_GOLDS_DIRECTORY}") endif() endif() endif() @@ -44,7 +44,7 @@ macro(setup_test) # Test plot is currently expected to be after 10 steps set(PLOT_TEST ${CURRENT_TEST_BINARY_DIR}/plt00010) # Find fcompare - if(PELELMEX_ENABLE_FCOMPARE_FOR_TESTS) + if(PELE_ENABLE_FCOMPARE_FOR_TESTS) set(FCOMPARE ${CMAKE_BINARY_DIR}/Submodules/PelePhysics/Submodules/amrex/Tools/Plotfile/fcompare) endif() # Make working directory for test @@ -56,30 +56,30 @@ macro(setup_test) file(COPY ${TEST_FILES} DESTINATION "${CURRENT_TEST_BINARY_DIR}/") # Set some default runtime options for all tests set(RUNTIME_OPTIONS "amr.plot_file=plt amr.plot_int=-1 amr.check_int=-1 amrex.the_arena_is_managed=0") - if(PELELMEX_ENABLE_FPE_TRAP_FOR_TESTS AND (NOT APPLE)) + if(PELE_ENABLE_FPE_TRAP_FOR_TESTS AND (NOT APPLE)) set(RUNTIME_OPTIONS "${RUNTIME_OPTIONS} amrex.signal_handling=1 amrex.fpe_trap_invalid=1 amrex.fpe_trap_zero=1 amrex.fpe_trap_overflow=1") else() set(RUNTIME_OPTIONS "${RUNTIME_OPTIONS} amrex.signal_handling=0") endif() - if(PELELMEX_ENABLE_MPI) - if(PELELMEX_ENABLE_CUDA) - set(PELELMEX_NP 2) # 1 rank per GPU on Eagle + if(PELE_ENABLE_MPI) + if(PELE_ENABLE_CUDA) + set(PELE_NP 2) # 1 rank per GPU on Eagle else() - set(PELELMEX_NP 4) + set(PELE_NP 4) endif() - set(MPI_COMMANDS "${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${PELELMEX_NP} ${MPIEXEC_PREFLAGS}") + set(MPI_COMMANDS "${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${PELE_NP} ${MPIEXEC_PREFLAGS}") else() - set(PELELMEX_NP 1) + set(PELE_NP 1) unset(MPI_COMMANDS) endif() # Use fcompare to test diffs in plots against gold files - if(PELELMEX_ENABLE_FCOMPARE_FOR_TESTS AND (NOT "${TEST_NAME}" MATCHES "hdf5$")) - if(PELELMEX_ENABLE_CUDA) + if(PELE_ENABLE_FCOMPARE_FOR_TESTS AND (NOT "${TEST_NAME}" MATCHES "hdf5$")) + if(PELE_ENABLE_CUDA) set(FCOMPARE_TOLERANCE "-r 1e-12 --abs_tol 1.0e-12") endif() set(FCOMPARE_COMMAND "&& ${MPI_COMMANDS} ${FCOMPARE} ${FCOMPARE_TOLERANCE} ${PLOT_TEST} ${PLOT_GOLD}") endif() - if(PELELMEX_SAVE_GOLDS) + if(PELE_SAVE_GOLDS) file(MAKE_DIRECTORY ${SAVED_GOLDS_DIRECTORY}/${TEST_EXE_DIR}/${TEST_NAME}) set(SAVE_GOLDS_COMMAND "&& cp -R ${PLOT_TEST} ${SAVED_GOLDS_DIRECTORY}/${TEST_EXE_DIR}/${TEST_NAME}/") endif() @@ -90,7 +90,7 @@ function(add_test_r TEST_NAME TEST_EXE_DIR) setup_test() set(RUNTIME_OPTIONS "amr.max_step=10 ${RUNTIME_OPTIONS}") add_test(${TEST_NAME} sh -c "${MPI_COMMANDS} ${CURRENT_TEST_EXE} ${MPIEXEC_POSTFLAGS} ${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.inp ${RUNTIME_OPTIONS} > ${TEST_NAME}.log ${SAVE_GOLDS_COMMAND} ${FCOMPARE_COMMAND}") - set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT 18000 PROCESSORS ${PELELMEX_NP} WORKING_DIRECTORY "${CURRENT_TEST_BINARY_DIR}/" LABELS "regression" ATTACHED_FILES_ON_FAIL "${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.log") + set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT 18000 PROCESSORS ${PELE_NP} WORKING_DIRECTORY "${CURRENT_TEST_BINARY_DIR}/" LABELS "regression" ATTACHED_FILES_ON_FAIL "${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.log") endfunction(add_test_r) # Regression test with mass conservation verification @@ -98,7 +98,7 @@ function(add_test_rv TEST_NAME TEST_EXE_DIR) setup_test() set(RUNTIME_OPTIONS "amr.max_step=10 peleLM.do_temporals=1 peleLM.do_mass_balance=1 peleLM.temporal_int=1 ${RUNTIME_OPTIONS}") add_test(${TEST_NAME} sh -c "rm -f datlog && ${MPI_COMMANDS} ${CURRENT_TEST_EXE} ${MPIEXEC_POSTFLAGS} ${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.inp ${RUNTIME_OPTIONS} > ${TEST_NAME}.log ${SAVE_GOLDS_COMMAND} ${FCOMPARE_COMMAND} && nosetests ${CMAKE_CURRENT_SOURCE_DIR}/test_masscons.py") - set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT 18000 PROCESSORS ${PELELMEX_NP} WORKING_DIRECTORY "${CURRENT_TEST_BINARY_DIR}/" LABELS "regression;verification" ATTACHED_FILES_ON_FAIL "${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.log") + set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT 18000 PROCESSORS ${PELE_NP} WORKING_DIRECTORY "${CURRENT_TEST_BINARY_DIR}/" LABELS "regression;verification" ATTACHED_FILES_ON_FAIL "${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.log") endfunction(add_test_rv) # Regression tests excluded from CI @@ -118,7 +118,7 @@ function(add_test_v1 TEST_NAME TEST_EXE_DIR) setup_test() set(RUN_COMMAND "rm -f mmslog datlog && ${MPI_COMMANDS} ${CURRENT_TEST_EXE} ${MPIEXEC_POSTFLAGS} ${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.inp") add_test(${TEST_NAME} sh -c "${RUN_COMMAND} ${RUNTIME_OPTIONS} > ${TEST_NAME}.log && nosetests ${TEST_NAME}.py") - set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT 18000 PROCESSORS ${PELELMEX_NP} WORKING_DIRECTORY "${CURRENT_TEST_BINARY_DIR}/" LABELS "verification" ATTACHED_FILES_ON_FAIL "${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.log") + set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT 18000 PROCESSORS ${PELE_NP} WORKING_DIRECTORY "${CURRENT_TEST_BINARY_DIR}/" LABELS "verification" ATTACHED_FILES_ON_FAIL "${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.log") endfunction(add_test_v1) # Verification test with multiple resolutions (each test runs on maximum number of processes on node) @@ -133,11 +133,11 @@ function(add_test_v2 TEST_NAME TEST_EXE_DIR LIST_OF_GRID_SIZES) file(GLOB TEST_FILES "${CURRENT_TEST_SOURCE_DIR}/*.dat" "${CURRENT_TEST_SOURCE_DIR}/*.py") file(COPY ${CURRENT_TEST_SOURCE_DIR}/${TEST_NAME}.inp DESTINATION "${CURRENT_TEST_BINARY_DIR}/${GRID_SIZE}/") file(COPY ${TEST_FILES} DESTINATION "${CURRENT_TEST_BINARY_DIR}/${GRID_SIZE}/") - if(${PELELMEX_DIM} EQUAL 3) + if(${PELE_DIM} EQUAL 3) set(NCELLS "${GRID_SIZE} ${GRID_SIZE} ${GRID_SIZE}") - elseif(${PELELMEX_DIM} EQUAL 2) + elseif(${PELE_DIM} EQUAL 2) set(NCELLS "${GRID_SIZE} ${GRID_SIZE}") - elseif(${PELELMEX_DIM} EQUAL 1) + elseif(${PELE_DIM} EQUAL 1) set(NCELLS "${GRID_SIZE}") endif() set(DELETE_PREVIOUS_FILES_COMMAND "rm -f mmslog datlog") @@ -154,13 +154,13 @@ function(add_test_v2 TEST_NAME TEST_EXE_DIR LIST_OF_GRID_SIZES) endif() endforeach() set(IMAGES_TO_UPLOAD ${CURRENT_TEST_BINARY_DIR}/p_error.png ${CURRENT_TEST_BINARY_DIR}/rho_error.png ${CURRENT_TEST_BINARY_DIR}/u_error.png) - if(${PELELMEX_DIM} EQUAL 3) + if(${PELE_DIM} EQUAL 3) list(APPEND IMAGES_TO_UPLOAD ${CURRENT_TEST_BINARY_DIR}/v_error.png ${CURRENT_TEST_BINARY_DIR}/w_error.png) - elseif(${PELELMEX_DIM} EQUAL 2) + elseif(${PELE_DIM} EQUAL 2) list(APPEND IMAGES_TO_UPLOAD ${CURRENT_TEST_BINARY_DIR}/v_error.png) endif() add_test(${TEST_NAME} sh -c "${MASTER_RUN_COMMAND} && cd ${CURRENT_TEST_BINARY_DIR} && nosetests ${CMAKE_CURRENT_SOURCE_DIR}/test_second_order.py") - set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT 18000 PROCESSORS ${PELELMEX_NP} WORKING_DIRECTORY "${CURRENT_TEST_BINARY_DIR}" LABELS "verification;no-ci" ATTACHED_FILES "${IMAGES_TO_UPLOAD}") + set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT 18000 PROCESSORS ${PELE_NP} WORKING_DIRECTORY "${CURRENT_TEST_BINARY_DIR}" LABELS "verification;no-ci" ATTACHED_FILES "${IMAGES_TO_UPLOAD}") endfunction(add_test_v2) # Standard unit test @@ -169,14 +169,14 @@ function(add_test_u TEST_NAME) set(CURRENT_TEST_SOURCE_DIR ${CMAKE_SOURCE_DIR}/Exec/UnitTests/${TEST_EXE_DIR}) set(CURRENT_TEST_BINARY_DIR ${CMAKE_BINARY_DIR}/Exec/UnitTests/${TEST_EXE_DIR}) file(MAKE_DIRECTORY ${CURRENT_TEST_BINARY_DIR}) - set(PELELMEX_NP 1) - if(PELELMEX_ENABLE_MPI) - set(MPI_COMMANDS "${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${PELELMEX_NP} ${MPIEXEC_PREFLAGS}") + set(PELE_NP 1) + if(PELE_ENABLE_MPI) + set(MPI_COMMANDS "${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${PELE_NP} ${MPIEXEC_PREFLAGS}") else() unset(MPI_COMMANDS) endif() add_test(${TEST_NAME} sh -c "${MPI_COMMANDS} ${CURRENT_TEST_EXE} ${MPIEXEC_POSTFLAGS}") - set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT 1800 PROCESSORS ${PELELMEX_NP} WORKING_DIRECTORY "${CURRENT_TEST_BINARY_DIR}/" LABELS "unit") + set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT 1800 PROCESSORS ${PELE_NP} WORKING_DIRECTORY "${CURRENT_TEST_BINARY_DIR}/" LABELS "unit") endfunction(add_test_u) function(add_test_spray TEST_EXE_DIR) @@ -185,18 +185,18 @@ function(add_test_spray TEST_EXE_DIR) set(CURRENT_TEST_SOURCE_DIR ${CMAKE_SOURCE_DIR}/Exec/RegTests/${TEST_EXE_DIR}) set(CURRENT_TEST_BINARY_DIR ${CMAKE_BINARY_DIR}/Exec/RegTests/${TEST_EXE_DIR}) set(CURRENT_TEST_EXE ${CMAKE_BINARY_DIR}/Exec/RegTests/${TEST_EXE_DIR}/${PROJECT_NAME}-${TEST_EXE_DIR}) - if(PELELMEX_ENABLE_MPI) - if(PELELMEX_ENABLE_CUDA) - set(PELELMEX_NP 2) # 1 rank per GPU on Eagle + if(PELE_ENABLE_MPI) + if(PELE_ENABLE_CUDA) + set(PELE_NP 2) # 1 rank per GPU on Eagle else() - set(PELELMEX_NP 4) + set(PELE_NP 4) endif() - set(MPI_COMMANDS "${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${PELELMEX_NP} ${MPIEXEC_PREFLAGS}") + set(MPI_COMMANDS "${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${PELE_NP} ${MPIEXEC_PREFLAGS}") else() - set(PELELMEX_NP 1) + set(PELE_NP 1) unset(MPI_COMMANDS) endif() - set(FCOMPARE ${CMAKE_BINARY_DIR}/Submodules/PelePhysics/Submodules/amrex/Tools/Plotfile/fcompare) + set(FCOMPARE ${CMAKE_BINARY_DIR}/Submodules/PelePhysics/Submodules/amrex/Tools/Plotfile/amrex.fcompare) set(MULTIRUN_FLAGS "--test_dir ${CURRENT_TEST_BINARY_DIR} --run_cmd '${MPI_COMMANDS}' --pele_exec ${PROJECT_NAME}-${TEST_EXE_DIR} --fcomp_exec ${FCOMPARE} --input_file ${TEST_NAME}.inp") file(GLOB TEST_FILES "${CURRENT_TEST_SOURCE_DIR}/*.dat" "${CURRENT_TEST_SOURCE_DIR}/*.py") # Copy files to test working directory @@ -209,19 +209,19 @@ endfunction(add_test_spray) # Regression tests #============================================================================= -if(NOT PELELMEX_ENABLE_EB) - add_test_r(flamesheet-drm19-${PELELMEX_DIM}d FlameSheet) - add_test_rv(covo-${PELELMEX_DIM}d PeriodicCases) - add_test_r(hotbubble-${PELELMEX_DIM}d HotBubble) - add_test_rv(enclosedflame-${PELELMEX_DIM}d EnclosedFlame) - if(PELELMEX_ENABLE_RADIATION) - add_test_r(soot-rad-${PELELMEX_DIM}d SootRadTest) +if(NOT PELE_ENABLE_EB) + add_test_r(flamesheet-drm19-${PELE_DIM}d FlameSheet) + add_test_rv(covo-${PELE_DIM}d PeriodicCases) + add_test_r(hotbubble-${PELE_DIM}d HotBubble) + add_test_rv(enclosedflame-${PELE_DIM}d EnclosedFlame) + if(PELE_ENABLE_RADIATION) + add_test_r(soot-rad-${PELE_DIM}d SootRadTest) endif() - if(PELELMEX_DIM EQUAL 2) - add_test_r(tripleflame-${PELELMEX_DIM}d TripleFlame) + if(PELE_DIM EQUAL 2) + add_test_r(tripleflame-${PELE_DIM}d TripleFlame) endif() - if(PELELMEX_DIM EQUAL 3) - add_test_r(hit-${PELELMEX_DIM}d HITDecay) - add_test_r(hit-les-${PELELMEX_DIM}d HITDecay) + if(PELE_DIM EQUAL 3) + add_test_r(hit-${PELE_DIM}d HITDecay) + add_test_r(hit-les-${PELE_DIM}d HITDecay) endif() endif() diff --git a/Tests/CTestNightlyScript.cmake b/Tests/CTestNightlyScript.cmake index 41a930586..22b522183 100644 --- a/Tests/CTestNightlyScript.cmake +++ b/Tests/CTestNightlyScript.cmake @@ -10,10 +10,10 @@ else() message(FATAL_ERROR "You need to set the HOST_NAME variable. CMake will exit." ) endif() -if(NOT "${PELELMEX_DIR}" STREQUAL "") - message("PELELMEX_DIR is ${PELELMEX_DIR}") +if(NOT "${PELE_DIR}" STREQUAL "") + message("PELE_DIR is ${PELE_DIR}") else() - message(FATAL_ERROR "You need to set the PELELMEX_DIR variable. CMake will exit." ) + message(FATAL_ERROR "You need to set the PELE_DIR variable. CMake will exit." ) endif() # ----------------------------------------------------------- @@ -23,8 +23,8 @@ endif() # Set important configuration variables set(CTEST_SITE "${HOST_NAME}") set(CTEST_BUILD_NAME "${CMAKE_SYSTEM_NAME}${EXTRA_BUILD_NAME}") -set(CTEST_SOURCE_DIRECTORY "${PELELMEX_DIR}") -set(CTEST_BINARY_DIRECTORY "${PELELMEX_DIR}/build") +set(CTEST_SOURCE_DIRECTORY "${PELE_DIR}") +set(CTEST_BINARY_DIRECTORY "${PELE_DIR}/build") set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) find_program(CTEST_GIT_COMMAND NAMES git) find_program(MAKE NAMES make) From d5d30955bc4331fc71a3c796ee3c34c8e5bea918 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 15:08:53 -0700 Subject: [PATCH 02/25] Rename stuff and enable soot, spray, and radiation in cmake. --- CMake/BuildPelePhysicsLib.cmake | 4 ++-- CMakeLists.txt | 14 +------------- Exec/RegTests/CMakeLists.txt | 4 +--- Exec/RegTests/SootRadTest/CMakeLists.txt | 3 ++- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/CMake/BuildPelePhysicsLib.cmake b/CMake/BuildPelePhysicsLib.cmake index 9731db4f2..a5b91924c 100644 --- a/CMake/BuildPelePhysicsLib.cmake +++ b/CMake/BuildPelePhysicsLib.cmake @@ -146,11 +146,11 @@ function(build_pele_physics_lib pele_physics_lib_name) if(PELE_PHYSICS_ENABLE_SOOT) set(SOOT_MOMENTS_VALUES 3 6) - if(NOT PELE_NUM_SOOT_MOMENTS IN_LIST SOOT_MOMENTS_VALUES) + if(NOT PELE_PHYSICS_NUM_SOOT_MOMENTS IN_LIST SOOT_MOMENTS_VALUES) message(FATAL_ERROR "NUM_SOOT_MOMENTS must be either 3 or 6") endif() target_compile_definitions(${pele_physics_lib_name} PUBLIC PELELM_USE_SOOT) - target_compile_definitions(${pele_physics_lib_name} PUBLIC NUM_SOOT_MOMENTS=${PELE_NUM_SOOT_MOMENTS}) + target_compile_definitions(${pele_physics_lib_name} PUBLIC NUM_SOOT_MOMENTS=${PELE_PHYSICS_NUM_SOOT_MOMENTS}) target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_SOOT_DIR}/SootModel.H ${PELE_PHYSICS_SOOT_DIR}/SootModel.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e93ca8c0..a3b8baa08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,6 @@ set(PELE_DIM "3" CACHE STRING "Number of physical dimensions") option(PELE_ENABLE_AMREX_PARTICLES "Enable particles in AMReX library" OFF) option(PELE_ENABLE_CLANG_TIDY "Enable clang-tidy analysis" OFF) option(PELE_ENABLE_CPPCHECK "Enable cppcheck analysis" OFF) -option(PELE_ENABLE_MASA "Enable tests that require MASA" OFF) option(PELE_ENABLE_FCOMPARE "Enable building fcompare when not testing" OFF) option(PELE_ENABLE_FCOMPARE_FOR_TESTS "Check test plots against gold files" OFF) option(PELE_SAVE_GOLDS "Enable saving of gold files to a specified directory" OFF) @@ -26,11 +25,7 @@ set(PELE_PRECISION "DOUBLE" CACHE STRING "Floating point precision SINGLE or DOU # Physics options option(PELE_ENABLE_EB "Enable Embedded Boundary" OFF) -option(PELE_ENABLE_EFIELD "Enable Electric field module" OFF) -option(PELE_ENABLE_SOOT "Enable Soot module" OFF) -option(PELE_ENABLE_PARTICLES "Enable particles" OFF) -option(PELE_ENABLE_RADIATION "Enable radiation" OFF) -set(PELE_NUM_SOOT_MOMENTS "3" CACHE STRING "Number of soot moments: 3 or 6") +option(PELE_ENABLE_PARTICLES "Enable particles and spray" OFF) # HPC options option(PELE_ENABLE_MPI "Enable MPI" OFF) @@ -50,9 +45,6 @@ if(PELE_ENABLE_CUDA) message(FATAL_ERROR "Your nvcc version is ${CMAKE_CUDA_COMPILER_VERSION} which is unsupported." "Please use CUDA toolkit version 10.0 or newer.") endif() - if(PELE_ENABLE_MASA) - message(FATAL_ERROR "MASA enabled with CUDA is unsupported.") - endif() if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES) set(CMAKE_CUDA_ARCHITECTURES 70) endif() @@ -100,11 +92,7 @@ message(STATUS "CMAKE_SYSTEM_NAME = ${CMAKE_SYSTEM_NAME}") message(STATUS "CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}") message(STATUS "CMAKE_CXX_COMPILER_VERSION = ${CMAKE_CXX_COMPILER_VERSION}") message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") - message(STATUS "PELE_PRECISION = ${PELE_PRECISION}") -if("${PELE_PRECISION}" STREQUAL "SINGLE" AND PELE_ENABLE_MASA) - message(FATAL_ERROR "Single precision currently not allowed in AMReX with MASA enabled") -endif() init_code_checks() diff --git a/Exec/RegTests/CMakeLists.txt b/Exec/RegTests/CMakeLists.txt index 0e45c8423..58793b302 100644 --- a/Exec/RegTests/CMakeLists.txt +++ b/Exec/RegTests/CMakeLists.txt @@ -14,6 +14,7 @@ else() add_subdirectory(HotBubble) add_subdirectory(PeriodicCases) add_subdirectory(TaylorGreen) + add_subdirectory(SootRadTest) #add_subdirectory(SprayTest) #add_subdirectory(Unit) if(PELE_DIM EQUAL 2) @@ -22,7 +23,4 @@ else() if(PELE_DIM EQUAL 3) add_subdirectory(TurbInflow) endif() - if(PELE_ENABLE_RADIATION) - add_subdirectory(SootRadTest) - endif() endif() diff --git a/Exec/RegTests/SootRadTest/CMakeLists.txt b/Exec/RegTests/SootRadTest/CMakeLists.txt index 868d8a8f5..a3b0356a2 100644 --- a/Exec/RegTests/SootRadTest/CMakeLists.txt +++ b/Exec/RegTests/SootRadTest/CMakeLists.txt @@ -3,6 +3,7 @@ set(PELE_PHYSICS_CHEMISTRY_MODEL SootReaction) set(PELE_PHYSICS_TRANSPORT_MODEL Simple) set(PELE_PHYSICS_ENABLE_SPRAY OFF) set(PELE_PHYSICS_SPRAY_FUEL_NUM 0) -set(PELE_PHYSICS_ENABLE_SOOT OFF) +set(PELE_PHYSICS_ENABLE_SOOT ON) +set(PELE_PHYSICS_NUM_SOOT_MOMENTS 3) set(PELE_PHYSICS_ENABLE_RADIATION ON) include(BuildExeAndLib) From 0a66c434f32fd67bb9892b371334d9eb4407d9a5 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 16:09:35 -0700 Subject: [PATCH 03/25] Fix stuff in CMake. --- CMake/BuildPeleExe.cmake | 45 ++++------------------- CMake/BuildPelePhysicsLib.cmake | 39 +++++++++++++++++++- CMake/SetAmrexOptions.cmake | 2 +- CMakeLists.txt | 3 +- Exec/Make.PeleLMeX | 4 +- Exec/RegTests/CMakeLists.txt | 5 ++- Exec/RegTests/SootRadTest/pelelmex_prob.H | 11 +++--- Submodules/PelePhysics | 2 +- 8 files changed, 57 insertions(+), 54 deletions(-) diff --git a/CMake/BuildPeleExe.cmake b/CMake/BuildPeleExe.cmake index 9836751a9..1d45d5703 100644 --- a/CMake/BuildPeleExe.cmake +++ b/CMake/BuildPeleExe.cmake @@ -16,46 +16,9 @@ function(build_pele_exe pele_exe_name pele_physics_lib_name) pelelmex_prob.cpp ) - #PeleLMeX include directories target_include_directories(${pele_exe_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(${pele_exe_name} PRIVATE ${SRC_DIR}) target_include_directories(${pele_exe_name} PRIVATE ${CMAKE_BINARY_DIR}) - #target_include_directories(${pele_exe_name} PRIVATE ${CMAKE_SOURCE_DIR}/Source/Params/param_includes) - - # Spray - set(PELE_PHYSICS_SPRAY_DIR ${CMAKE_SOURCE_DIR}/Submodules/PelePhysics/Source/Spray) - - if(PELE_ENABLE_AMREX_PARTICLES AND PELE_SPRAY_FUEL_NUM GREATER 0) - target_compile_definitions(${pele_exe_name} PRIVATE PELE_USE_SPRAY) - target_compile_definitions(${pele_exe_name} PRIVATE SPRAY_FUEL_NUM=${PELE_SPRAY_FUEL_NUM}) - target_sources(${pele_exe_name} PRIVATE - SprayParticlesInitInsert.cpp - ${SRC_DIR}/Particle.cpp - ${PELE_PHYSICS_SPRAY_DIR}/Drag.H - ${PELE_PHYSICS_SPRAY_DIR}/SprayDerive.cpp - ${PELE_PHYSICS_SPRAY_DIR}/SprayFuelData.H - ${PELE_PHYSICS_SPRAY_DIR}/SprayIO.cpp - ${PELE_PHYSICS_SPRAY_DIR}/SprayInjection.H - ${PELE_PHYSICS_SPRAY_DIR}/SprayInterpolation.H - ${PELE_PHYSICS_SPRAY_DIR}/SprayJet.H - ${PELE_PHYSICS_SPRAY_DIR}/SprayJet.cpp - ${PELE_PHYSICS_SPRAY_DIR}/SprayParticles.H - ${PELE_PHYSICS_SPRAY_DIR}/SprayParticles.cpp - ${PELE_PHYSICS_SPRAY_DIR}/SpraySB.cpp - ${PELE_PHYSICS_SPRAY_DIR}/SpraySetup.cpp - ${PELE_PHYSICS_SPRAY_DIR}/WallFunctions.H - ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/AhamedSplash.H - ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/ReitzKHRT.H - ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/SBData.H - ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/TABBreakup.H - ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/WallFilm.H - ${PELE_PHYSICS_SPRAY_DIR}/Distribution/DistBase.H - ${PELE_PHYSICS_SPRAY_DIR}/Distribution/Distributions.H - ${PELE_PHYSICS_SPRAY_DIR}/Distribution/Distributions.cpp) - target_include_directories(${pele_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}) - target_include_directories(${pele_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/Distribution) - target_include_directories(${pele_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash) - endif() target_sources(${pele_exe_name} PRIVATE @@ -108,6 +71,13 @@ function(build_pele_exe pele_exe_name pele_physics_lib_name) ${SRC_DIR}/PeleLMeX_Soot.cpp) endif() + if(PELE_PHYSICS_ENABLE_SPRAY) + target_sources(${pele_exe_name} + PRIVATE + ${SRC_DIR}/PeleLMeX_SprayParticles.cpp + SprayParticlesInitInsert.cpp) + endif() + if(PELE_PHYSICS_ENABLE_RADIATION) target_sources(${pele_exe_name} PRIVATE @@ -134,7 +104,6 @@ function(build_pele_exe pele_exe_name pele_physics_lib_name) target_link_libraries(${pele_exe_name} PRIVATE ${pele_physics_lib_name} AMReX-Hydro::amrex_hydro_api AMReX::amrex) - #Define what we want to be installed during a make install install(TARGETS ${pele_exe_name} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib diff --git a/CMake/BuildPelePhysicsLib.cmake b/CMake/BuildPelePhysicsLib.cmake index a5b91924c..61e89cc8b 100644 --- a/CMake/BuildPelePhysicsLib.cmake +++ b/CMake/BuildPelePhysicsLib.cmake @@ -9,6 +9,7 @@ function(build_pele_physics_lib pele_physics_lib_name) set(PELE_PHYSICS_UTILITY_DIR "${PELE_PHYSICS_SRC_DIR}/Source/Utility") set(PELE_PHYSICS_REACTIONS_DIR "${PELE_PHYSICS_SRC_DIR}/Source/Reactions") set(PELE_PHYSICS_SOOT_DIR "${PELE_PHYSICS_SRC_DIR}/Source/Soot") + set(PELE_PHYSICS_SPRAY_DIR "${PELE_PHYSICS_SRC_DIR}/Source/Spray") set(PELE_PHYSICS_RADIATION_DIR "${PELE_PHYSICS_SRC_DIR}/Source/Radiation") set(AMREX_SUNDIALS_DIR "${AMREX_SUBMOD_LOCATION}/Src/Extern/SUNDIALS") @@ -144,12 +145,45 @@ function(build_pele_physics_lib pele_physics_lib_name) ) target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_REACTIONS_DIR}) + if(PELE_PHYSICS_ENABLE_SPRAY) + if(PELE_PHYSICS_SPRAY_FUEL_NUM LESS 1) + message(FATAL_ERROR "SPRAY_FUEL_NUM must be greater than 0") + endif() + target_compile_definitions(${pele_physics_lib_name} PUBLIC PELE_USE_SPRAY PELELM_USE_SPRAY) + target_compile_definitions(${pele_physics_lib_name} PUBLIC SPRAY_FUEL_NUM=${PELE_PHYSICS_SPRAY_FUEL_NUM}) + target_sources(${pele_physics_lib_name} PRIVATE + ${PELE_PHYSICS_SPRAY_DIR}/Drag.H + ${PELE_PHYSICS_SPRAY_DIR}/SprayDerive.cpp + ${PELE_PHYSICS_SPRAY_DIR}/SprayFuelData.H + ${PELE_PHYSICS_SPRAY_DIR}/SprayIO.cpp + ${PELE_PHYSICS_SPRAY_DIR}/SprayInjection.H + ${PELE_PHYSICS_SPRAY_DIR}/SprayInterpolation.H + ${PELE_PHYSICS_SPRAY_DIR}/SprayJet.H + ${PELE_PHYSICS_SPRAY_DIR}/SprayJet.cpp + ${PELE_PHYSICS_SPRAY_DIR}/SprayParticles.H + ${PELE_PHYSICS_SPRAY_DIR}/SprayParticles.cpp + ${PELE_PHYSICS_SPRAY_DIR}/SpraySB.cpp + ${PELE_PHYSICS_SPRAY_DIR}/SpraySetup.cpp + ${PELE_PHYSICS_SPRAY_DIR}/WallFunctions.H + ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/AhamedSplash.H + ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/ReitzKHRT.H + ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/SBData.H + ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/TABBreakup.H + ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash/WallFilm.H + ${PELE_PHYSICS_SPRAY_DIR}/Distribution/DistBase.H + ${PELE_PHYSICS_SPRAY_DIR}/Distribution/Distributions.H + ${PELE_PHYSICS_SPRAY_DIR}/Distribution/Distributions.cpp) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/Distribution) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash) + endif() + if(PELE_PHYSICS_ENABLE_SOOT) set(SOOT_MOMENTS_VALUES 3 6) if(NOT PELE_PHYSICS_NUM_SOOT_MOMENTS IN_LIST SOOT_MOMENTS_VALUES) message(FATAL_ERROR "NUM_SOOT_MOMENTS must be either 3 or 6") endif() - target_compile_definitions(${pele_physics_lib_name} PUBLIC PELELM_USE_SOOT) + target_compile_definitions(${pele_physics_lib_name} PUBLIC PELE_USE_SOOT PELELM_USE_SOOT) target_compile_definitions(${pele_physics_lib_name} PUBLIC NUM_SOOT_MOMENTS=${PELE_PHYSICS_NUM_SOOT_MOMENTS}) target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_SOOT_DIR}/SootModel.H @@ -161,6 +195,7 @@ function(build_pele_physics_lib pele_physics_lib_name) ${PELE_PHYSICS_SOOT_DIR}/SootData.H ${PELE_PHYSICS_SOOT_DIR}/SootReactions.H) target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_SOOT_DIR}) + if(PELE_PHYSICS_ENABLE_RADIATION) target_sources(${pele_physics_lib_name} PRIVATE ${PELE_PHYSICS_RADIATION_DIR}/AMRParam.H @@ -176,7 +211,7 @@ function(build_pele_physics_lib pele_physics_lib_name) ${PELE_PHYSICS_RADIATION_DIR}/PlanckMean.H ${PELE_PHYSICS_RADIATION_DIR}/SpectralModels.H) target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_RADIATION_DIR}) - target_compile_definitions(${pele_physics_lib_name} PUBLIC PELELM_USE_RADIATION) + target_compile_definitions(${pele_physics_lib_name} PUBLIC PELE_USE_RADIATION) endif() endif() diff --git a/CMake/SetAmrexOptions.cmake b/CMake/SetAmrexOptions.cmake index 6dad28099..ac9c8e896 100644 --- a/CMake/SetAmrexOptions.cmake +++ b/CMake/SetAmrexOptions.cmake @@ -3,7 +3,7 @@ set(AMReX_SPACEDIM "${PELE_DIM}" CACHE STRING "Number of physical dimensions" FO set(AMReX_MPI ${PELE_ENABLE_MPI}) set(AMReX_OMP ${PELE_ENABLE_OPENMP}) set(AMReX_EB ${PELE_ENABLE_EB}) -set(AMReX_PARTICLES ${PELE_ENABLE_AMREX_PARTICLES}) +set(AMReX_PARTICLES ${PELE_ENABLE_PARTICLES}) set(AMReX_PLOTFILE_TOOLS ${PELE_ENABLE_FCOMPARE}) set(AMReX_SUNDIALS OFF) set(AMReX_FORTRAN OFF) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3b8baa08..6336df751 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,6 @@ include(CMakePackageConfigHelpers) include(PeleUtils) set(PELE_DIM "3" CACHE STRING "Number of physical dimensions") -option(PELE_ENABLE_AMREX_PARTICLES "Enable particles in AMReX library" OFF) option(PELE_ENABLE_CLANG_TIDY "Enable clang-tidy analysis" OFF) option(PELE_ENABLE_CPPCHECK "Enable cppcheck analysis" OFF) option(PELE_ENABLE_FCOMPARE "Enable building fcompare when not testing" OFF) @@ -25,7 +24,7 @@ set(PELE_PRECISION "DOUBLE" CACHE STRING "Floating point precision SINGLE or DOU # Physics options option(PELE_ENABLE_EB "Enable Embedded Boundary" OFF) -option(PELE_ENABLE_PARTICLES "Enable particles and spray" OFF) +option(PELE_ENABLE_PARTICLES "Enable particles and spray" ON) # HPC options option(PELE_ENABLE_MPI "Enable MPI" OFF) diff --git a/Exec/Make.PeleLMeX b/Exec/Make.PeleLMeX index d4d70a72d..f20d4e26e 100644 --- a/Exec/Make.PeleLMeX +++ b/Exec/Make.PeleLMeX @@ -39,7 +39,7 @@ endif ifeq ($(USE_PARTICLES), TRUE) ifdef SPRAY_FUEL_NUM # This tells PeleMP that PeleC is not being used - DEFINES += -DPELELM_USE_SPRAY + DEFINES += -DPELE_USE_SPRAY -DPELELM_USE_SPRAY DEFINES += -DSPRAY_FUEL_NUM=$(SPRAY_FUEL_NUM) endif endif @@ -49,7 +49,7 @@ ifeq ($(USE_SOOT), TRUE) $(error NUM_SOOT_MOMENTS must be 3 or 6) endif # This tells PeleMP that PeleC is not being used - DEFINES += -DPELELM_USE_SOOT + DEFINES += -DPELE_USE_SOOT -DPELELM_USE_SOOT DEFINES += -DNUM_SOOT_MOMENTS=$(NUM_SOOT_MOMENTS) endif diff --git a/Exec/RegTests/CMakeLists.txt b/Exec/RegTests/CMakeLists.txt index 58793b302..d8ac60c5b 100644 --- a/Exec/RegTests/CMakeLists.txt +++ b/Exec/RegTests/CMakeLists.txt @@ -15,8 +15,9 @@ else() add_subdirectory(PeriodicCases) add_subdirectory(TaylorGreen) add_subdirectory(SootRadTest) - #add_subdirectory(SprayTest) - #add_subdirectory(Unit) + if(PELE_ENABLE_PARTICLES) + add_subdirectory(SprayTest) + endif() if(PELE_DIM EQUAL 2) add_subdirectory(TripleFlame) endif() diff --git a/Exec/RegTests/SootRadTest/pelelmex_prob.H b/Exec/RegTests/SootRadTest/pelelmex_prob.H index 136adc360..c079d383c 100644 --- a/Exec/RegTests/SootRadTest/pelelmex_prob.H +++ b/Exec/RegTests/SootRadTest/pelelmex_prob.H @@ -22,19 +22,18 @@ pelelmex_initdata( int k, int /*is_incompressible*/, amrex::Array4 const& state, - amrex::Array4 const& aux, + amrex::Array4 const& /*aux*/, amrex::GeometryData const& geomdata, ProbParm const& prob_parm, pele::physics::PMF::PmfData::DataContainer const* pmf_data) { const amrex::Real* prob_lo = geomdata.ProbLo(); - const amrex::Real* prob_hi = geomdata.ProbHi(); const amrex::Real* dx = geomdata.CellSize(); AMREX_D_TERM(const amrex::Real x = prob_lo[0] + (i + 0.5) * dx[0]; - , const amrex::Real y = prob_lo[1] + (j + 0.5) * dx[1]; - , const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2];); + , /*const amrex::Real y = prob_lo[1] + (j + 0.5) * dx[1];*/ + , /*const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2];*/); amrex::GpuArray massfrac = {{0.0}}; amrex::GpuArray pmf_vals = {{0.0}}; amrex::Real x1 = (x - prob_parm.standoff - 0.5 * dx[0]) * 100.; @@ -74,12 +73,12 @@ AMREX_GPU_DEVICE AMREX_FORCE_INLINE void bcnormal( - const amrex::Real x[AMREX_SPACEDIM], + const amrex::Real* /*x[AMREX_SPACEDIM]*/, const int /*m_nAux*/, amrex::Real s_ext[NVAR], const int idir, const int sgn, - const amrex::Real time, + const amrex::Real /*time*/, amrex::GeometryData const& geomdata, ProbParm const& prob_parm, pele::physics::PMF::PmfData::DataContainer const* pmf_data) diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index 69885d8ef..d0f282c26 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit 69885d8ef07b1f2aaca7ae691c872141a7cecf04 +Subproject commit d0f282c26cbbccd076ed5d6e7527fa83107d4b7f From 255d861d2774af86f99e42b098f98bc6590f54a1 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 16:16:43 -0700 Subject: [PATCH 04/25] Fix header guards. --- Source/Efield/PeleLMeX_EF.H | 3 +++ Source/Efield/PeleLMeX_EOS_Extension.H | 4 ++-- Source/PeleLMeX_BCfill.H | 4 ++-- Source/PeleLMeX_DeriveFunc.H | 4 ++-- Source/PeleLMeX_Index.H | 4 ++-- Source/PeleLMeX_UserKeys.H | 4 ++-- Source/PeleLMeX_Utils.H | 4 ++-- 7 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Source/Efield/PeleLMeX_EF.H b/Source/Efield/PeleLMeX_EF.H index 8c0be54a4..d5bd95dcb 100644 --- a/Source/Efield/PeleLMeX_EF.H +++ b/Source/Efield/PeleLMeX_EF.H @@ -1,3 +1,5 @@ +#ifndef PELELM_EF_H +#define PELELM_EF_H // included in the PeleLM.H // E-field with EB capability is not fully implemented @@ -94,3 +96,4 @@ std::ofstream tmpIonsFile; // Extra diagnostics int m_do_extraEFdiags = 0; amrex::Vector> m_ionsFluxes; +#endif diff --git a/Source/Efield/PeleLMeX_EOS_Extension.H b/Source/Efield/PeleLMeX_EOS_Extension.H index 9da0198af..6a2b9b963 100644 --- a/Source/Efield/PeleLMeX_EOS_Extension.H +++ b/Source/Efield/PeleLMeX_EOS_Extension.H @@ -1,5 +1,5 @@ -#ifndef _EOS_EXT_H -#define _EOS_EXT_H +#ifndef EOS_EXT_H +#define EOS_EXT_H #include #include diff --git a/Source/PeleLMeX_BCfill.H b/Source/PeleLMeX_BCfill.H index 3aaebe095..2ee3162a2 100644 --- a/Source/PeleLMeX_BCfill.H +++ b/Source/PeleLMeX_BCfill.H @@ -1,5 +1,5 @@ -#ifndef PELE_BCFILL -#define PELE_BCFILL +#ifndef PELELM_BCFILL +#define PELELM_BCFILL #include #include #include diff --git a/Source/PeleLMeX_DeriveFunc.H b/Source/PeleLMeX_DeriveFunc.H index 2558604b1..7d74421fc 100644 --- a/Source/PeleLMeX_DeriveFunc.H +++ b/Source/PeleLMeX_DeriveFunc.H @@ -1,5 +1,5 @@ -#ifndef PELE_DERIVEFUNC_H -#define PELE_DERIVEFUNC_H +#ifndef PELELM_DERIVEFUNC_H +#define PELELM_DERIVEFUNC_H #include #include diff --git a/Source/PeleLMeX_Index.H b/Source/PeleLMeX_Index.H index ee1f25f80..39ca06f26 100644 --- a/Source/PeleLMeX_Index.H +++ b/Source/PeleLMeX_Index.H @@ -1,5 +1,5 @@ -#ifndef PELE_INDEX_H -#define PELE_INDEX_H +#ifndef PELELM_INDEX_H +#define PELELM_INDEX_H #define VELX 0 #define VELY 1 diff --git a/Source/PeleLMeX_UserKeys.H b/Source/PeleLMeX_UserKeys.H index 7a9f9d789..1e311d72c 100644 --- a/Source/PeleLMeX_UserKeys.H +++ b/Source/PeleLMeX_UserKeys.H @@ -1,5 +1,5 @@ -#ifndef PELE_USERKEYS_H -#define PELE_USERKEYS_H +#ifndef PELELM_USERKEYS_H +#define PELELM_USERKEYS_H #include #include diff --git a/Source/PeleLMeX_Utils.H b/Source/PeleLMeX_Utils.H index 842ff7020..f38e182c2 100644 --- a/Source/PeleLMeX_Utils.H +++ b/Source/PeleLMeX_Utils.H @@ -1,5 +1,5 @@ -#ifndef PELE_UTILS_H -#define PELE_UTILS_H +#ifndef PELELM_UTILS_H +#define PELELM_UTILS_H template amrex::Gpu::DeviceVector convertToDeviceVector(amrex::Vector v) From db131ff6f5e7de9eca8d11f005f618cb06650a99 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 16:18:19 -0700 Subject: [PATCH 05/25] Fix header guard. --- Source/PeleLMeX_Derive.H | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/PeleLMeX_Derive.H b/Source/PeleLMeX_Derive.H index ee1d14d09..3880d61be 100644 --- a/Source/PeleLMeX_Derive.H +++ b/Source/PeleLMeX_Derive.H @@ -1,5 +1,5 @@ -#ifndef PELE_Derive_H -#define PELE_Derive_H +#ifndef PELELM_Derive_H +#define PELELM_Derive_H #include #include #include From 694b8bcfdb4adf9f47fdf0439c5401600f2661e6 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 16:19:06 -0700 Subject: [PATCH 06/25] Formatting. --- Exec/RegTests/SootRadTest/pelelmex_prob.H | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Exec/RegTests/SootRadTest/pelelmex_prob.H b/Exec/RegTests/SootRadTest/pelelmex_prob.H index c079d383c..8cf4070f8 100644 --- a/Exec/RegTests/SootRadTest/pelelmex_prob.H +++ b/Exec/RegTests/SootRadTest/pelelmex_prob.H @@ -33,7 +33,8 @@ pelelmex_initdata( AMREX_D_TERM(const amrex::Real x = prob_lo[0] + (i + 0.5) * dx[0]; , /*const amrex::Real y = prob_lo[1] + (j + 0.5) * dx[1];*/ - , /*const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2];*/); + , + /*const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2];*/); amrex::GpuArray massfrac = {{0.0}}; amrex::GpuArray pmf_vals = {{0.0}}; amrex::Real x1 = (x - prob_parm.standoff - 0.5 * dx[0]) * 100.; From 7197fe03ee6af5047fd6d97f115ae74211c4e4e7 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 16:57:05 -0700 Subject: [PATCH 07/25] Change CI parameter names. --- .github/workflows/ci.yml | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b13d2257e..0ae705a39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,11 +160,11 @@ jobs: -DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install-${DIM}d-${{matrix.os}}-${{matrix.build_type}}-${{matrix.enable_eb}} \ -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ - -DPELELMEX_DIM:STRING=${DIM} \ - -DPELELMEX_ENABLE_MPI:BOOL=ON \ - -DPELELMEX_ENABLE_EB:BOOL=${{matrix.use_eb}} \ - -DPELELMEX_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ - -DPELELMEX_ENABLE_MASA:BOOL=OFF \ + -DPELE_DIM:STRING=${DIM} \ + -DPELE_ENABLE_MPI:BOOL=ON \ + -DPELE_ENABLE_EB:BOOL=${{matrix.use_eb}} \ + -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ + -DPELE_ENABLE_MASA:BOOL=OFF \ -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \ ${{github.workspace}}; \ if [ $? -ne 0 ]; then exit 1; fi \ @@ -254,8 +254,8 @@ jobs: cmake -Bbuild-${{matrix.cuda_pkg}} \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ - -DPELELMEX_ENABLE_MPI:BOOL=OFF \ - -DPELELMEX_ENABLE_CUDA:BOOL=ON \ + -DPELE_ENABLE_MPI:BOOL=OFF \ + -DPELE_ENABLE_CUDA:BOOL=ON \ -DAMReX_CUDA_ERROR_CAPTURE_THIS:BOOL=ON \ -DCMAKE_CUDA_ARCHITECTURES:STRING=70 \ -DCMAKE_CUDA_COMPILER_LAUNCHER:STRING=ccache \ @@ -319,14 +319,14 @@ jobs: -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_CXX_COMPILER:STRING=$(which clang++) \ -DCMAKE_C_COMPILER:STRING=$(which clang) \ - -DPELELMEX_ENABLE_MPI:BOOL=OFF \ - -DPELELMEX_ENABLE_HIP:BOOL=ON \ + -DPELE_ENABLE_MPI:BOOL=OFF \ + -DPELE_ENABLE_HIP:BOOL=ON \ -DAMReX_AMD_ARCH:STRING=gfx90a \ -DCMAKE_HIP_ARCHITECTURES:STRING=gfx90a \ -DAMDGPU_TARGETS:STRING=gfx90a \ -DGPU_TARGETS:STRING=gfx90a \ -DAMReX_GPU_RDC:BOOL=OFF \ - -DPELELMEX_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ + -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \ ${{github.workspace}} - name: Build @@ -388,10 +388,10 @@ jobs: -DCMAKE_CXX_COMPILER:STRING=$(which icpx) \ -DCMAKE_C_COMPILER:STRING=$(which icx) \ -DCMAKE_CXX_FLAGS:STRING=-fsycl \ - -DPELELMEX_ENABLE_MPI:BOOL=OFF \ - -DPELELMEX_ENABLE_MASA:BOOL=OFF \ - -DPELELMEX_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ - -DPELELMEX_ENABLE_SYCL:BOOL=ON \ + -DPELE_ENABLE_MPI:BOOL=OFF \ + -DPELE_ENABLE_MASA:BOOL=OFF \ + -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ + -DPELE_ENABLE_SYCL:BOOL=ON \ -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \ ${{github.workspace}} - name: Build @@ -447,11 +447,11 @@ jobs: -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_CXX_COMPILER:STRING=clang++ \ -DCMAKE_C_COMPILER:STRING=clang \ - -DPELELMEX_ENABLE_EB:BOOL=${{matrix.use_eb}} \ - -DPELELMEX_ENABLE_MPI:BOOL=OFF \ - -DPELELMEX_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ - -DPELELMEX_ENABLE_MASA:BOOL=OFF \ - -DPELELMEX_ENABLE_CLANG_TIDY:BOOL=ON \ + -DPELE_ENABLE_EB:BOOL=${{matrix.use_eb}} \ + -DPELE_ENABLE_MPI:BOOL=OFF \ + -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ + -DPELE_ENABLE_MASA:BOOL=OFF \ + -DPELE_ENABLE_CLANG_TIDY:BOOL=ON \ -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \ ${{github.workspace}} - name: Check @@ -499,10 +499,10 @@ jobs: -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_CXX_COMPILER:STRING=clang++ \ -DCMAKE_C_COMPILER:STRING=clang \ - -DPELELMEX_ENABLE_MPI:BOOL=OFF \ - -DPELELMEX_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ - -DPELELMEX_ENABLE_MASA:BOOL=OFF \ - -DPELELMEX_ENABLE_CLANG_TIDY:BOOL=OFF \ + -DPELE_ENABLE_MPI:BOOL=OFF \ + -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ + -DPELE_ENABLE_MASA:BOOL=OFF \ + -DPELE_ENABLE_CLANG_TIDY:BOOL=OFF \ ${{github.workspace}} - name: Build run: | From b3d66405442926a0b0998b3c1e8d830e34171507 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 16:58:11 -0700 Subject: [PATCH 08/25] Remove MASA parameter. --- .github/workflows/ci.yml | 4 ---- .github/workflows/linux.yml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ae705a39..df32a2c2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,7 +164,6 @@ jobs: -DPELE_ENABLE_MPI:BOOL=ON \ -DPELE_ENABLE_EB:BOOL=${{matrix.use_eb}} \ -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ - -DPELE_ENABLE_MASA:BOOL=OFF \ -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \ ${{github.workspace}}; \ if [ $? -ne 0 ]; then exit 1; fi \ @@ -389,7 +388,6 @@ jobs: -DCMAKE_C_COMPILER:STRING=$(which icx) \ -DCMAKE_CXX_FLAGS:STRING=-fsycl \ -DPELE_ENABLE_MPI:BOOL=OFF \ - -DPELE_ENABLE_MASA:BOOL=OFF \ -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ -DPELE_ENABLE_SYCL:BOOL=ON \ -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \ @@ -450,7 +448,6 @@ jobs: -DPELE_ENABLE_EB:BOOL=${{matrix.use_eb}} \ -DPELE_ENABLE_MPI:BOOL=OFF \ -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ - -DPELE_ENABLE_MASA:BOOL=OFF \ -DPELE_ENABLE_CLANG_TIDY:BOOL=ON \ -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \ ${{github.workspace}} @@ -501,7 +498,6 @@ jobs: -DCMAKE_C_COMPILER:STRING=clang \ -DPELE_ENABLE_MPI:BOOL=OFF \ -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \ - -DPELE_ENABLE_MASA:BOOL=OFF \ -DPELE_ENABLE_CLANG_TIDY:BOOL=OFF \ ${{github.workspace}} - name: Build diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 32e109223..098e84601 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -28,7 +28,7 @@ jobs: # env: # AMREX_HOME: ${GITHUB_WORKSPACE}/build/amrex # PELE_PHYSICS_HOME: ${GITHUB_WORKSPACE}/build/PelePhysics - # PELELMEX_HOME: ${GITHUB_WORKSPACE} + # PELE_HOME: ${GITHUB_WORKSPACE} # AMREX_HYDRO_HOME: ${GITHUB_WORKSPACE}/build/AMReX-Hydro # SUNDIALS_HOME : ${GITHUB_WORKSPACE}/build/sundials # working-directory: ./Exec/RegTests/EB_FlowPastCylinder/ From 373fc73176832b29adc6e4a27e38125625bc96d3 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 19:07:54 -0700 Subject: [PATCH 09/25] Fix some clang-tidy warnings. --- Source/PeleLMeX_Advance.cpp | 2 +- Source/PeleLMeX_Plot.cpp | 6 ++++-- Source/PeleLMeX_Radiation.cpp | 5 +++-- Source/PeleLMeX_Setup.cpp | 4 ++-- Source/PeleLMeX_Soot.cpp | 4 ++-- Source/PeleLMeX_SprayParticles.cpp | 2 +- Submodules/PelePhysics | 2 +- Tests/CMakeLists.txt | 4 ++-- Tests/__pycache__/test_masscons.cpython-39.pyc | Bin 0 -> 977 bytes 9 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 Tests/__pycache__/test_masscons.cpython-39.pyc diff --git a/Source/PeleLMeX_Advance.cpp b/Source/PeleLMeX_Advance.cpp index 5dbd513a5..ab75e1595 100644 --- a/Source/PeleLMeX_Advance.cpp +++ b/Source/PeleLMeX_Advance.cpp @@ -111,7 +111,7 @@ PeleLM::Advance(int is_initIter) //---------------------------------------------------------------- #ifdef PELE_USE_SPRAY - if (!is_initIter) { + if (is_initIter == 0) { SprayMKD(m_cur_time, m_dt); } #endif diff --git a/Source/PeleLMeX_Plot.cpp b/Source/PeleLMeX_Plot.cpp index 606f587ed..a5cbedce3 100644 --- a/Source/PeleLMeX_Plot.cpp +++ b/Source/PeleLMeX_Plot.cpp @@ -121,8 +121,9 @@ PeleLM::WritePlotFile() #endif #ifdef PELE_USE_RADIATION - if (do_rad_solve) + if (do_rad_solve) { ncomp += 3; + } #endif // Derive @@ -837,8 +838,9 @@ PeleLM::initLevelDataFromPlt(int a_lev, const std::string& a_dataPltFile) iPhiV = i; #endif #ifdef PELE_USE_SOOT - if (plt_vars[i] == "soot_N") + if (plt_vars[i] == "soot_N") { inSoot = i; + } #endif } if (idY < 0) { diff --git a/Source/PeleLMeX_Radiation.cpp b/Source/PeleLMeX_Radiation.cpp index a0dee8215..50f449dab 100644 --- a/Source/PeleLMeX_Radiation.cpp +++ b/Source/PeleLMeX_Radiation.cpp @@ -18,8 +18,9 @@ PeleLM::RadInit() rc.h2oIndx = i; continue; } - if (names[i] == "CO") + if (names[i] == "CO") { rc.coIndx = i; + } } amrex::ParmParse mlmgpp("pelerad"); @@ -42,7 +43,7 @@ PeleLM::computeRadSource(const PeleLM::TimeStamp& a_timestamp) BL_PROFILE_VAR("PeleLM::advance::rad::spec", PLM_RAD_SPEC); for (int lev = 0; lev <= finest_level; lev++) { - auto ldata_p = PeleLM::getLevelDataPtr(lev, a_timestamp); + auto* ldata_p = PeleLM::getLevelDataPtr(lev, a_timestamp); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) #endif diff --git a/Source/PeleLMeX_Setup.cpp b/Source/PeleLMeX_Setup.cpp index fe9ed4668..fd82afd36 100644 --- a/Source/PeleLMeX_Setup.cpp +++ b/Source/PeleLMeX_Setup.cpp @@ -584,7 +584,7 @@ PeleLM::readParameters() #ifdef PELE_USE_SOOT do_soot_solve = true; pp.query("do_soot_solve", do_soot_solve); - if (m_verbose && do_soot_solve) { + if ((m_verbose != 0) && do_soot_solve) { Print() << "Simulation performed with soot modeling \n"; } soot_model->readSootParams(); @@ -592,7 +592,7 @@ PeleLM::readParameters() #ifdef PELE_USE_RADIATION do_rad_solve = false; pp.query("do_rad_solve", do_rad_solve); - if (m_verbose && do_rad_solve) { + if ((m_verbose != 0) && do_rad_solve) { Print() << "Simulation performed with radiation modeling \n"; } #endif diff --git a/Source/PeleLMeX_Soot.cpp b/Source/PeleLMeX_Soot.cpp index 4a1ce5c54..8bd3eef4c 100644 --- a/Source/PeleLMeX_Soot.cpp +++ b/Source/PeleLMeX_Soot.cpp @@ -35,7 +35,7 @@ PeleLM::computeSootSource(const PeleLM::TimeStamp& a_timestamp, const Real a_dt) { bool pres_term = false; // Do not include change in pressure in energy for (int lev = 0; lev <= finest_level; lev++) { - auto ldata_p = getLevelDataPtr(lev, a_timestamp); + auto* ldata_p = getLevelDataPtr(lev, a_timestamp); Real time = getTime(lev, a_timestamp); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) @@ -56,7 +56,7 @@ void PeleLM::clipSootMoments() { for (int lev = 0; lev <= finest_level; lev++) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) #endif diff --git a/Source/PeleLMeX_SprayParticles.cpp b/Source/PeleLMeX_SprayParticles.cpp index ae5fc2439..2ab14b406 100644 --- a/Source/PeleLMeX_SprayParticles.cpp +++ b/Source/PeleLMeX_SprayParticles.cpp @@ -269,7 +269,7 @@ PeleLM::SprayMKD(const Real time, const Real dt) if (!do_spray_particles) { return; } - if (spray_verbose) { + if (spray_verbose != 0) { Print() << "moveKickDrift ... updating particle positions and velocity\n"; } BL_PROFILE("PeleLMeX::SprayMKD()"); diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index d0f282c26..dfec29a67 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit d0f282c26cbbccd076ed5d6e7527fa83107d4b7f +Subproject commit dfec29a67633843cf9df45ac369585a9bae32c31 diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index e40b820b5..415fa353e 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -45,7 +45,7 @@ macro(setup_test) set(PLOT_TEST ${CURRENT_TEST_BINARY_DIR}/plt00010) # Find fcompare if(PELE_ENABLE_FCOMPARE_FOR_TESTS) - set(FCOMPARE ${CMAKE_BINARY_DIR}/Submodules/PelePhysics/Submodules/amrex/Tools/Plotfile/fcompare) + set(FCOMPARE ${CMAKE_BINARY_DIR}/Submodules/PelePhysics/Submodules/amrex/Tools/Plotfile/amrex_fcompare) endif() # Make working directory for test file(MAKE_DIRECTORY ${CURRENT_TEST_BINARY_DIR}) @@ -196,7 +196,7 @@ function(add_test_spray TEST_EXE_DIR) set(PELE_NP 1) unset(MPI_COMMANDS) endif() - set(FCOMPARE ${CMAKE_BINARY_DIR}/Submodules/PelePhysics/Submodules/amrex/Tools/Plotfile/amrex.fcompare) + set(FCOMPARE ${CMAKE_BINARY_DIR}/Submodules/PelePhysics/Submodules/amrex/Tools/Plotfile/amrex_fcompare) set(MULTIRUN_FLAGS "--test_dir ${CURRENT_TEST_BINARY_DIR} --run_cmd '${MPI_COMMANDS}' --pele_exec ${PROJECT_NAME}-${TEST_EXE_DIR} --fcomp_exec ${FCOMPARE} --input_file ${TEST_NAME}.inp") file(GLOB TEST_FILES "${CURRENT_TEST_SOURCE_DIR}/*.dat" "${CURRENT_TEST_SOURCE_DIR}/*.py") # Copy files to test working directory diff --git a/Tests/__pycache__/test_masscons.cpython-39.pyc b/Tests/__pycache__/test_masscons.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d6f204272b4c736a1a4dfa552e26dfe65b6eaab1 GIT binary patch literal 977 zcmZWo&2AGh5Vm){8z)Vm4L!gGa^a9mbL3K>qEb;2tq>FmSqRHrJMD)3!`>7cB^S!I z7oMQy#%u5xzH;IfI5D#UDH4`E`+3GQ{^n;@uh${4zP`OM?-(IJ@vyo;M|NPlXCO4u zG$Ug9rFkGiy2MOGjV%`OQ=$VMejz$E@uYPT3U1n(y$|f3iLW}>1U%>~GK_vfJaU+z zTwMVic3`{PAPf;y6A@@C!evy!G(&IS-7O1uWL&+goSEH2MfRpv&B4&cTx z_RQ6$@~lpC;~9EEp1H2Y8sfcd`sskEdyET%{6Y zG0~IHXZxo=?r%RFQo(FpW{1PJ4@&1*rRr1PQpa!?0GpI);e$#GZjI71ac35bN1hi-h%iI^%c=a9nK}DaNghK^bbs729*E+ literal 0 HcmV?d00001 From 3493efaa893c3b287e01430bd46c6963220118d9 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 19:08:26 -0700 Subject: [PATCH 10/25] Remove accidental file. --- Tests/__pycache__/test_masscons.cpython-39.pyc | Bin 977 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Tests/__pycache__/test_masscons.cpython-39.pyc diff --git a/Tests/__pycache__/test_masscons.cpython-39.pyc b/Tests/__pycache__/test_masscons.cpython-39.pyc deleted file mode 100644 index d6f204272b4c736a1a4dfa552e26dfe65b6eaab1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 977 zcmZWo&2AGh5Vm){8z)Vm4L!gGa^a9mbL3K>qEb;2tq>FmSqRHrJMD)3!`>7cB^S!I z7oMQy#%u5xzH;IfI5D#UDH4`E`+3GQ{^n;@uh${4zP`OM?-(IJ@vyo;M|NPlXCO4u zG$Ug9rFkGiy2MOGjV%`OQ=$VMejz$E@uYPT3U1n(y$|f3iLW}>1U%>~GK_vfJaU+z zTwMVic3`{PAPf;y6A@@C!evy!G(&IS-7O1uWL&+goSEH2MfRpv&B4&cTx z_RQ6$@~lpC;~9EEp1H2Y8sfcd`sskEdyET%{6Y zG0~IHXZxo=?r%RFQo(FpW{1PJ4@&1*rRr1PQpa!?0GpI);e$#GZjI71ac35bN1hi-h%iI^%c=a9nK}DaNghK^bbs729*E+ From b81c153af2babc1a23a282652a1fef463ceb35c1 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 20:09:56 -0700 Subject: [PATCH 11/25] Fix more clang-tidy warnings. --- Source/PeleLMeX_Plot.cpp | 10 +++++----- Source/PeleLMeX_SprayParticles.cpp | 10 +++++----- Submodules/PelePhysics | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Source/PeleLMeX_Plot.cpp b/Source/PeleLMeX_Plot.cpp index a5cbedce3..d9a04d444 100644 --- a/Source/PeleLMeX_Plot.cpp +++ b/Source/PeleLMeX_Plot.cpp @@ -367,17 +367,17 @@ PeleLM::WritePlotFile() if (do_spray_particles && SprayParticleContainer::plot_spray_src) { SprayComps scomps = SprayParticleContainer::getSprayComps(); MultiFab::Copy( - mf_plt[lev], *m_spraysource[lev].get(), scomps.rhoSrcIndx, cnt++, 1, 0); + mf_plt[lev], *m_spraysource[lev], scomps.rhoSrcIndx, cnt++, 1, 0); MultiFab::Copy( - mf_plt[lev], *m_spraysource[lev].get(), scomps.engSrcIndx, cnt++, 1, 0); + mf_plt[lev], *m_spraysource[lev], scomps.engSrcIndx, cnt++, 1, 0); MultiFab::Copy( - mf_plt[lev], *m_spraysource[lev].get(), scomps.momSrcIndx, cnt, + mf_plt[lev], *m_spraysource[lev], scomps.momSrcIndx, cnt, AMREX_SPACEDIM, 0); cnt += AMREX_SPACEDIM; for (int spf = 0; spf < SPRAY_FUEL_NUM; ++spf) { MultiFab::Copy( - mf_plt[lev], *m_spraysource[lev].get(), scomps.specSrcIndx + spf, - cnt++, 1, 0); + mf_plt[lev], *m_spraysource[lev], scomps.specSrcIndx + spf, cnt++, 1, + 0); } } #endif diff --git a/Source/PeleLMeX_SprayParticles.cpp b/Source/PeleLMeX_SprayParticles.cpp index 2ab14b406..90606317a 100644 --- a/Source/PeleLMeX_SprayParticles.cpp +++ b/Source/PeleLMeX_SprayParticles.cpp @@ -235,7 +235,7 @@ PeleLM::SpraySetState(const Real& a_flow_dt) grids[lev], dmap[lev], num_spray_src, source_ghosts, MFInfo(), *m_factory[lev])); } - fillpatch_state(lev, m_cur_time, *(m_spraystate[lev].get()), state_ghosts); + fillpatch_state(lev, m_cur_time, *(m_spraystate[lev]), state_ghosts); m_spraysource[lev]->setVal(0.); } mesh_regrid = false; @@ -244,8 +244,8 @@ PeleLM::SpraySetState(const Real& a_flow_dt) void PeleLM::SprayAddSource(const int level) { - MultiFab& source = *(m_spraysource[level].get()); - MultiFab& extsource = *(m_extSource[level].get()); + MultiFab& source = *(m_spraysource[level]); + MultiFab& extsource = *(m_extSource[level]); const int eghosts = extsource.nGrow(); SprayComps scomps = SprayParticleContainer::getSprayComps(); MultiFab::Add( @@ -301,8 +301,8 @@ PeleLM::SprayMKDLevel(const int level, const Real time, const Real dt) // the new time auto const* ltransparm = PeleLM::trans_parms.device_trans_parm(); - MultiFab& state = *(m_spraystate[level].get()); - MultiFab& source = *(m_spraysource[level].get()); + MultiFab& state = *(m_spraystate[level]); + MultiFab& source = *(m_spraysource[level]); const int state_ghosts = spray_state_ghosts[level]; const int source_ghosts = spray_source_ghosts[level]; bool isVirt = false; diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index dfec29a67..7f926b3d9 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit dfec29a67633843cf9df45ac369585a9bae32c31 +Subproject commit 7f926b3d99b3d38c3f873b7a3a347b86a8827d5a From db729882d7d6bfdadaa21a1213a4f0a462908e68 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 08:34:33 -0700 Subject: [PATCH 12/25] Fix clang-tidy warnings. --- Source/PeleLMeX.H | 12 ++++++------ Source/PeleLMeX_Soot.cpp | 4 ++-- Source/PeleLMeX_SprayParticles.cpp | 9 +++++---- Submodules/PelePhysics | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Source/PeleLMeX.H b/Source/PeleLMeX.H index 6f50d6b68..3e670b470 100644 --- a/Source/PeleLMeX.H +++ b/Source/PeleLMeX.H @@ -120,7 +120,7 @@ public: #ifdef PELE_USE_SPRAY // ReadSprayParameters - void SprayReadParameters(); + static void SprayReadParameters(); // SpraySetup void SpraySetup(); @@ -817,9 +817,9 @@ public: //----------------------------------------------------------------------------- // Sprays void setupVirtualParticles(const int level); - void removeVirtualParticles(const int level); - void setupGhostParticles(const int ngrow, const int level); - void removeGhostParticles(const int level); + static void removeVirtualParticles(const int level); + static void setupGhostParticles(const int ngrow, const int level); + static void removeGhostParticles(const int level); amrex::Real SprayEstDt(); void SprayMKD(const amrex::Real time, const amrex::Real dt); void @@ -843,10 +843,10 @@ public: // Soot // SetSootIndx - void setSootIndx(); + void setSootIndx() const; // CleanupSootModel - void cleanupSootModel(); + void cleanupSootModel() const; // AddSootDerivePlotVars // void addSootDerivePlotVars(PeleLMDeriveList& derive_lst); diff --git a/Source/PeleLMeX_Soot.cpp b/Source/PeleLMeX_Soot.cpp index 8bd3eef4c..3b890a83d 100644 --- a/Source/PeleLMeX_Soot.cpp +++ b/Source/PeleLMeX_Soot.cpp @@ -7,7 +7,7 @@ using namespace amrex; void -PeleLM::setSootIndx() +PeleLM::setSootIndx() const { const int ndim = AMREX_SPACEDIM; SootComps sootComps; @@ -25,7 +25,7 @@ PeleLM::setSootIndx() } void -PeleLM::cleanupSootModel() +PeleLM::cleanupSootModel() const { delete soot_model; } diff --git a/Source/PeleLMeX_SprayParticles.cpp b/Source/PeleLMeX_SprayParticles.cpp index 90606317a..00f98f60b 100644 --- a/Source/PeleLMeX_SprayParticles.cpp +++ b/Source/PeleLMeX_SprayParticles.cpp @@ -4,6 +4,7 @@ #ifdef PELE_USE_SPRAY #include "SprayParticles.H" #include +#include using namespace amrex; @@ -229,11 +230,11 @@ PeleLM::SpraySetState(const Real& a_flow_dt) if ( mesh_regrid || prev_state[lev] != state_ghosts || prev_source[lev] != source_ghosts) { - m_spraystate[lev].reset(new MultiFab( - grids[lev], dmap[lev], NVAR, state_ghosts, MFInfo(), *m_factory[lev])); - m_spraysource[lev].reset(new MultiFab( + m_spraystate[lev] = std::make_unique( + grids[lev], dmap[lev], NVAR, state_ghosts, MFInfo(), *m_factory[lev]); + m_spraysource[lev] = std::make_unique( grids[lev], dmap[lev], num_spray_src, source_ghosts, MFInfo(), - *m_factory[lev])); + *m_factory[lev]); } fillpatch_state(lev, m_cur_time, *(m_spraystate[lev]), state_ghosts); m_spraysource[lev]->setVal(0.); diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index 7f926b3d9..b44d88025 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit 7f926b3d99b3d38c3f873b7a3a347b86a8827d5a +Subproject commit b44d880257d6966888fc264472327d318562d41c From 4dddf88fc24d972f91a6e12bdb439a1c20b8ffbc Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 09:11:28 -0700 Subject: [PATCH 13/25] Fix error. --- Source/PeleLMeX.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/PeleLMeX.H b/Source/PeleLMeX.H index 3e670b470..93371a063 100644 --- a/Source/PeleLMeX.H +++ b/Source/PeleLMeX.H @@ -120,7 +120,7 @@ public: #ifdef PELE_USE_SPRAY // ReadSprayParameters - static void SprayReadParameters(); + void SprayReadParameters(); // SpraySetup void SpraySetup(); From a6230d794d0219e6b0c0c3bd2a2f489e6a5e7450 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 09:23:39 -0700 Subject: [PATCH 14/25] Fix error. --- Source/PeleLMeX.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/PeleLMeX.H b/Source/PeleLMeX.H index 93371a063..633dada18 100644 --- a/Source/PeleLMeX.H +++ b/Source/PeleLMeX.H @@ -818,7 +818,7 @@ public: // Sprays void setupVirtualParticles(const int level); static void removeVirtualParticles(const int level); - static void setupGhostParticles(const int ngrow, const int level); + void setupGhostParticles(const int ngrow, const int level); static void removeGhostParticles(const int level); amrex::Real SprayEstDt(); void SprayMKD(const amrex::Real time, const amrex::Real dt); From 90e61ebe54f2c0147121b8e163d474ad128c7574 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 09:40:33 -0700 Subject: [PATCH 15/25] Update PelePhysics. --- Submodules/PelePhysics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index b44d88025..f784d3cf6 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit b44d880257d6966888fc264472327d318562d41c +Subproject commit f784d3cf6350af2b7048674b4ecedc3c170946d2 From 031c17afe878c2cff912e258f96b8754dde52937 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 09:42:05 -0700 Subject: [PATCH 16/25] Remove more static. --- Source/PeleLMeX.H | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/PeleLMeX.H b/Source/PeleLMeX.H index 633dada18..28d7a8a46 100644 --- a/Source/PeleLMeX.H +++ b/Source/PeleLMeX.H @@ -817,9 +817,9 @@ public: //----------------------------------------------------------------------------- // Sprays void setupVirtualParticles(const int level); - static void removeVirtualParticles(const int level); + void removeVirtualParticles(const int level); void setupGhostParticles(const int ngrow, const int level); - static void removeGhostParticles(const int level); + void removeGhostParticles(const int level); amrex::Real SprayEstDt(); void SprayMKD(const amrex::Real time, const amrex::Real dt); void From 3725381cd3c948a5480ae9d659d16066b6665882 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 10:07:25 -0700 Subject: [PATCH 17/25] Revert some stuff. --- Source/PeleLMeX.H | 4 ++-- Source/PeleLMeX_Soot.cpp | 4 ++-- Submodules/PelePhysics | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/PeleLMeX.H b/Source/PeleLMeX.H index 28d7a8a46..6f50d6b68 100644 --- a/Source/PeleLMeX.H +++ b/Source/PeleLMeX.H @@ -843,10 +843,10 @@ public: // Soot // SetSootIndx - void setSootIndx() const; + void setSootIndx(); // CleanupSootModel - void cleanupSootModel() const; + void cleanupSootModel(); // AddSootDerivePlotVars // void addSootDerivePlotVars(PeleLMDeriveList& derive_lst); diff --git a/Source/PeleLMeX_Soot.cpp b/Source/PeleLMeX_Soot.cpp index 3b890a83d..8bd3eef4c 100644 --- a/Source/PeleLMeX_Soot.cpp +++ b/Source/PeleLMeX_Soot.cpp @@ -7,7 +7,7 @@ using namespace amrex; void -PeleLM::setSootIndx() const +PeleLM::setSootIndx() { const int ndim = AMREX_SPACEDIM; SootComps sootComps; @@ -25,7 +25,7 @@ PeleLM::setSootIndx() const } void -PeleLM::cleanupSootModel() const +PeleLM::cleanupSootModel() { delete soot_model; } diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index f784d3cf6..e3a8b1ee3 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit f784d3cf6350af2b7048674b4ecedc3c170946d2 +Subproject commit e3a8b1ee39df5e4fde34348e4bd541c925cdc4e2 From a0aa55fef169c591dbb4bbec64bf02b31abbac60 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 12:11:05 -0700 Subject: [PATCH 18/25] Fix warnings. --- .clang-tidy | 2 ++ Submodules/PelePhysics | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index daa36fc77..f0010b68f 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -19,6 +19,8 @@ Checks: 'bugprone-*, -readability-static-accessed-through-instance, -readability-identifier-length, -readability-function-cognitive-complexity, + -readability-convert-member-functions-to-static, + -readability-make-member-function-const, -readability-function-size' WarningsAsErrors: '' HeaderFilterRegex: 'PeleLMeX\/Source|PeleLMeX\/Exec|PeleLMeX\/Submodules\/PelePhysics\/Source|PeleLMeX\/Submodules\/PelePhysics\/Mechanism' diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index e3a8b1ee3..40a643027 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit e3a8b1ee39df5e4fde34348e4bd541c925cdc4e2 +Subproject commit 40a643027bad87874046f6b7d989d820a6808112 From 972a3fed9bf0763d56f0fa9ef19c9828ae2a0340 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 12:16:05 -0700 Subject: [PATCH 19/25] Update PelePhysics. --- Submodules/PelePhysics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index 40a643027..8b7c52c10 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit 40a643027bad87874046f6b7d989d820a6808112 +Subproject commit 8b7c52c10811d71c56f176523daaad6495dae0b4 From 85a0d00fffb18065acb4b4c356f417a01203fa75 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 13:46:56 -0700 Subject: [PATCH 20/25] Try to fix a warning. --- Submodules/PelePhysics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index 8b7c52c10..f0bfd1a3d 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit 8b7c52c10811d71c56f176523daaad6495dae0b4 +Subproject commit f0bfd1a3d478b97c3c9812ce2a1a5b060de2468f From c3374b35d810ce1931063958dc6fef4f09cbca98 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 14:11:02 -0700 Subject: [PATCH 21/25] Revert changes. --- Submodules/PelePhysics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index f0bfd1a3d..168992537 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit f0bfd1a3d478b97c3c9812ce2a1a5b060de2468f +Subproject commit 16899253769416ee1c028b07f13a5279a34f650f From afb2d35bda1133fda30cfc8eb73a2541659ebf1d Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 14:26:09 -0700 Subject: [PATCH 22/25] Try cast to real. --- Submodules/PelePhysics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index 168992537..22f5dc45c 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit 16899253769416ee1c028b07f13a5279a34f650f +Subproject commit 22f5dc45c8d36e575968e398cdc8e6c26b4e30b9 From 0d88d7ee9dcf9655b87436e04b2397adf10d8831 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 21 Dec 2023 15:46:02 -0700 Subject: [PATCH 23/25] Update PelePhysics. --- Submodules/PelePhysics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Submodules/PelePhysics b/Submodules/PelePhysics index 22f5dc45c..87f970625 160000 --- a/Submodules/PelePhysics +++ b/Submodules/PelePhysics @@ -1 +1 @@ -Subproject commit 22f5dc45c8d36e575968e398cdc8e6c26b4e30b9 +Subproject commit 87f970625571901e4444a7d4610dc65f71c50a3f From 4d93cb58a9e7d799240afec53f069c682f13a498 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Tue, 9 Jan 2024 14:21:24 -0700 Subject: [PATCH 24/25] Address requests. --- CMake/BuildPelePhysicsLib.cmake | 35 ++++++++++--------- .../RegTests/SootRadTest/pelelmex_prob_parm.H | 4 +-- README.md | 4 ++- Source/Efield/PeleLMeX_EFDeriveFunc.H | 4 +-- 4 files changed, 25 insertions(+), 22 deletions(-) diff --git a/CMake/BuildPelePhysicsLib.cmake b/CMake/BuildPelePhysicsLib.cmake index 61e89cc8b..ce3b15cd3 100644 --- a/CMake/BuildPelePhysicsLib.cmake +++ b/CMake/BuildPelePhysicsLib.cmake @@ -196,23 +196,24 @@ function(build_pele_physics_lib pele_physics_lib_name) ${PELE_PHYSICS_SOOT_DIR}/SootReactions.H) target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_SOOT_DIR}) - if(PELE_PHYSICS_ENABLE_RADIATION) - target_sources(${pele_physics_lib_name} PRIVATE - ${PELE_PHYSICS_RADIATION_DIR}/AMRParam.H - ${PELE_PHYSICS_RADIATION_DIR}/Constants.H - ${PELE_PHYSICS_RADIATION_DIR}/MLMGParam.H - ${PELE_PHYSICS_RADIATION_DIR}/POneMulti.H - ${PELE_PHYSICS_RADIATION_DIR}/POneMultiEB.H - ${PELE_PHYSICS_RADIATION_DIR}/POneMultiLevbyLev.H - ${PELE_PHYSICS_RADIATION_DIR}/POneSingle.H - ${PELE_PHYSICS_RADIATION_DIR}/POneSingleEB.H - ${PELE_PHYSICS_RADIATION_DIR}/PeleCRad.H - ${PELE_PHYSICS_RADIATION_DIR}/PeleLMRad.H - ${PELE_PHYSICS_RADIATION_DIR}/PlanckMean.H - ${PELE_PHYSICS_RADIATION_DIR}/SpectralModels.H) - target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_RADIATION_DIR}) - target_compile_definitions(${pele_physics_lib_name} PUBLIC PELE_USE_RADIATION) - endif() + endif() + + if(PELE_PHYSICS_ENABLE_RADIATION) + target_sources(${pele_physics_lib_name} PRIVATE + ${PELE_PHYSICS_RADIATION_DIR}/AMRParam.H + ${PELE_PHYSICS_RADIATION_DIR}/Constants.H + ${PELE_PHYSICS_RADIATION_DIR}/MLMGParam.H + ${PELE_PHYSICS_RADIATION_DIR}/POneMulti.H + ${PELE_PHYSICS_RADIATION_DIR}/POneMultiEB.H + ${PELE_PHYSICS_RADIATION_DIR}/POneMultiLevbyLev.H + ${PELE_PHYSICS_RADIATION_DIR}/POneSingle.H + ${PELE_PHYSICS_RADIATION_DIR}/POneSingleEB.H + ${PELE_PHYSICS_RADIATION_DIR}/PeleCRad.H + ${PELE_PHYSICS_RADIATION_DIR}/PeleLMRad.H + ${PELE_PHYSICS_RADIATION_DIR}/PlanckMean.H + ${PELE_PHYSICS_RADIATION_DIR}/SpectralModels.H) + target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_RADIATION_DIR}) + target_compile_definitions(${pele_physics_lib_name} PUBLIC PELE_USE_RADIATION) endif() include(AMReXBuildInfo) diff --git a/Exec/RegTests/SootRadTest/pelelmex_prob_parm.H b/Exec/RegTests/SootRadTest/pelelmex_prob_parm.H index 6ac087b3b..c28c86501 100644 --- a/Exec/RegTests/SootRadTest/pelelmex_prob_parm.H +++ b/Exec/RegTests/SootRadTest/pelelmex_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELE_PROB_PARM_H -#define PELE_PROB_PARM_H +#ifndef PELELMEX_PROB_PARM_H +#define PELELMEX_PROB_PARM_H #include #include diff --git a/README.md b/README.md index c24f53c21..6b694b399 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ export SUNDIALS_HOME=${PELE_PHYSICS_HOME}/Submodules/sundials ### Compilation -Both GNUmake and CMake can be used to build a *PeleLMeX* executable, but GNUmake is the preferred choice. +Both GNUmake and CMake can be used to build *PeleLMeX* executables. GNUmake is the preferred choice for single executables when running production simulations. While CMake is the preferred method for automatically building and testing most available executables. The code handling the initial condition and boundary conditions is unique to each case, and subfolders in the `Exec` directory provide a number of examples. @@ -108,6 +108,8 @@ If this is a clean install, you will need to make the third party libraries with Finally, make with: `make -j`, or if on macOS: `make -j COMP=llvm`. To clean the installation, use either `make clean` or `make realclean`. If running into compile errors after changing compile time options in PeleLMeX (e.g., the chemical mechanism), the first thing to try is to clean your build by running `make TPLrealclean && make realclean`, then try to rebuild the third party libraries and PeleLMeX with `make TPL && make -j`. See the [Tutorial](https://amrex-combustion.github.io/PeleLMeX/manual/html/Tutorials_HotBubble.html) for this case for instructions on how to compile with different options (for example, to compile without MPI support or to compile for GPUs) and how to run the code once compiled. +To compile and test using CMake, refer to the example `cmake.sh` script in the `Build` directory, or reference the GitHub Actions workflows in the `.github/workflows` directory. + ## Getting help, contributing Do you have a question ? Found an issue ? Please use the [GitHub Discussions](https://github.com/AMReX-Combustion/PeleLMeX/discussions) to engage diff --git a/Source/Efield/PeleLMeX_EFDeriveFunc.H b/Source/Efield/PeleLMeX_EFDeriveFunc.H index 14344bf93..37d9208c4 100644 --- a/Source/Efield/PeleLMeX_EFDeriveFunc.H +++ b/Source/Efield/PeleLMeX_EFDeriveFunc.H @@ -1,5 +1,5 @@ -#ifndef PELEEF_DERIVEFUNC_H -#define PELEEF_DERIVEFUNC_H +#ifndef PELELMEF_DERIVEFUNC_H +#define PELELMEF_DERIVEFUNC_H #include #include From b25696e0ed6a2f8649823f98e2a2d3caeeb1c8db Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Tue, 9 Jan 2024 14:23:33 -0700 Subject: [PATCH 25/25] Fix another header. --- Exec/RegTests/SootRadTest/pelelmex_prob.H | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Exec/RegTests/SootRadTest/pelelmex_prob.H b/Exec/RegTests/SootRadTest/pelelmex_prob.H index 8cf4070f8..455018113 100644 --- a/Exec/RegTests/SootRadTest/pelelmex_prob.H +++ b/Exec/RegTests/SootRadTest/pelelmex_prob.H @@ -1,5 +1,5 @@ -#ifndef PELE_PROB_H -#define PELE_PROB_H +#ifndef PELELMEX_PROB_H +#define PELELMEX_PROB_H #include #include