Skip to content

Commit

Permalink
Update pelephysics submodule (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf authored Dec 13, 2023
1 parent 2ecfd3b commit 2756b4f
Show file tree
Hide file tree
Showing 21 changed files with 175 additions and 169 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Checks: 'bugprone-*,
-readability-function-cognitive-complexity,
-readability-function-size'
WarningsAsErrors: ''
HeaderFilterRegex: 'PeleC\/Source|PeleC\/Exec|PeleC\/Submodules\/Pele'
HeaderFilterRegex: 'PeleC\/Source|PeleC\/Exec|PeleC\/Submodules\/PelePhysics\/Source|PeleC\/Submodules\/PelePhysics\/Mechanism'
AnalyzeTemporaryDtors: false
FormatStyle: none
User: user
Expand Down
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ updates:
interval: "weekly"
directory: /
allow:
- dependency-name: "Submodules/AMReX"
- dependency-name: "Submodules/PelePhysics"
51 changes: 24 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Clone
uses: actions/checkout@v3
with:
submodules: true
submodules: 'recursive'
- name: Setup
working-directory: ./Exec/RegTests/PMF
run: |
Expand All @@ -40,8 +40,6 @@ jobs:
echo "CCACHE_COMPRESSLEVEL=1" >> $GITHUB_ENV
echo "CCACHE_LOGFILE=${{github.workspace}}/ccache.log.txt" >> $GITHUB_ENV
echo "CCACHE_MAXSIZE=350M" >> $GITHUB_ENV
#printf "CC=gcc-10\nCXX=g++-10\nFC=gfortran-10\nF90=gfortran-10" \
# >> ${{github.workspace}}/Submodules/AMReX/Tools/GNUMake/Make.local
make COMP=gnu USE_MPI=FALSE DEBUG=TRUE TPL
make COMP=llvm USE_MPI=FALSE DEBUG=TRUE PRECISION=FLOAT TPL
- name: Install Ccache
Expand Down Expand Up @@ -75,7 +73,7 @@ jobs:
working-directory: ./Exec/RegTests/PMF
run: |
egrep "warning:|error:" build-output.txt \
| egrep -v "Submodules/AMReX|Submodules/sundials|GNUmakefile" \
| egrep -v "Submodules/amrex|Submodules/sundials|GNUmakefile" \
| egrep -v "ld: warning:" | sort | uniq \
| awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > warnings.txt
cat warnings.txt
Expand All @@ -100,7 +98,7 @@ jobs:
working-directory: ./Exec/RegTests/EB-C10
run: |
egrep "warning:|error:" build-output.txt \
| egrep -v "Submodules/AMReX|Submodules/sundials|GNUmakefile" \
| egrep -v "Submodules/amrex|Submodules/sundials|GNUmakefile" \
| egrep -v "ld: warning:" | sort | uniq \
| awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > warnings.txt
cat warnings.txt
Expand All @@ -125,7 +123,7 @@ jobs:
working-directory: ./Exec/RegTests/TG
run: |
egrep "warning:|error:" build-output.txt \
| egrep -v "Submodules/AMReX|Submodules/sundials|GNUmakefile" \
| egrep -v "Submodules/amrex|Submodules/sundials|GNUmakefile" \
| egrep -v "ld: warning:" | sort | uniq \
| awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > warnings.txt
cat warnings.txt
Expand All @@ -147,8 +145,8 @@ jobs:
working-directory: ./Exec/RegTests/Soot-Flame
run: |
egrep "warning:|error:" build-output.txt \
| egrep -v "Submodules/AMReX|Submodules/sundials|GNUmakefile|Submodules/PeleMP" \
| egrep -v "Submodules/PelePhysics/Support/Mechanism/Models" | sort | uniq \
| egrep -v "Submodules/amrex|Submodules/sundials|GNUmakefile" \
| egrep -v "Submodules/PelePhysics/Mechanisms" | sort | uniq \
| awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > warnings.txt
cat warnings.txt
export return=$(tail -n 1 warnings.txt | awk '{print $2}')
Expand All @@ -169,8 +167,8 @@ jobs:
working-directory: ./Exec/RegTests/Spray-Conv
run: |
egrep "warning:|error:" build-output.txt \
| egrep -v "Submodules/AMReX|Submodules/sundials|GNUmakefile|Submodules/PeleMP" \
| egrep -v "Submodules/PelePhysics/Support/Mechanism/Models" | sort | uniq \
| egrep -v "Submodules/amrex|Submodules/sundials|GNUmakefile" \
| egrep -v "Submodules/PelePhysics/Mechanisms" | sort | uniq \
| awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > warnings.txt
cat warnings.txt
export return=$(tail -n 1 warnings.txt | awk '{print $2}')
Expand Down Expand Up @@ -206,7 +204,7 @@ jobs:
- name: Clone
uses: actions/checkout@v3
with:
submodules: true
submodules: 'recursive'
- name: Python
uses: actions/setup-python@v4
with:
Expand All @@ -220,7 +218,7 @@ jobs:
echo "CCACHE_MAXSIZE=${{matrix.ccache_size}}" >> $GITHUB_ENV
cmake -E make_directory ${{runner.workspace}}/deps
if [ "${RUNNER_OS}" != "macOS" ]; then
${{github.workspace}}/Submodules/AMReX/.github/workflows/dependencies/ubuntu_free_disk_space.sh
${{github.workspace}}/Submodules/PelePhysics/Submodules/amrex/.github/workflows/dependencies/ubuntu_free_disk_space.sh
fi
- name: Dependencies
run: |
Expand Down Expand Up @@ -297,7 +295,7 @@ jobs:
run: |
echo "::add-matcher::.github/problem-matchers/gcc.json"
egrep "warning:|error:" ${{runner.workspace}}/build-output.txt \
| egrep -v "Submodules/AMReX|Submodules/sundials" \
| egrep -v "Submodules/amrex|Submodules/sundials" \
| egrep -v "ld: warning:" | egrep -v "lto-wrapper: warning:" | sort | uniq \
| awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > ${{runner.workspace}}/build-output-warnings.txt
cat ${{runner.workspace}}/build-output-warnings.txt
Expand Down Expand Up @@ -325,7 +323,7 @@ jobs:
- name: Clone
uses: actions/checkout@v3
with:
submodules: true
submodules: 'recursive'
- name: Setup
run: |
echo "NPROCS=$(nproc)" >> $GITHUB_ENV
Expand All @@ -335,7 +333,7 @@ jobs:
echo "CCACHE_MAXSIZE=500M" >> $GITHUB_ENV
- name: Dependencies
run: |
${{github.workspace}}/Submodules/AMReX/.github/workflows/dependencies/ubuntu_free_disk_space.sh
${{github.workspace}}/Submodules/PelePhysics/Submodules/amrex/.github/workflows/dependencies/ubuntu_free_disk_space.sh
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
Expand Down Expand Up @@ -388,7 +386,7 @@ jobs:
- name: Clone
uses: actions/checkout@v3
with:
submodules: true
submodules: 'recursive'
- name: Setup
run: |
echo "NPROCS=$(nproc)" >> $GITHUB_ENV
Expand All @@ -398,7 +396,7 @@ jobs:
echo "CCACHE_MAXSIZE=100M" >> $GITHUB_ENV
- name: Dependencies
run: |
${{github.workspace}}/Submodules/AMReX/.github/workflows/dependencies/ubuntu_free_disk_space.sh
${{github.workspace}}/Submodules/PelePhysics/Submodules/amrex/.github/workflows/dependencies/ubuntu_free_disk_space.sh
curl -O https://repo.radeon.com/rocm/rocm.gpg.key
sudo apt-key add rocm.gpg.key
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/5.6.1 ubuntu main' \
Expand Down Expand Up @@ -459,7 +457,7 @@ jobs:
- name: Clone
uses: actions/checkout@v3
with:
submodules: true
submodules: 'recursive'
- name: Setup
run: |
echo "NPROCS=$(nproc)" >> $GITHUB_ENV
Expand All @@ -470,7 +468,7 @@ jobs:
echo "CCACHE_DEPEND=1" >> $GITHUB_ENV
- name: Dependencies
run: |
${{github.workspace}}/Submodules/AMReX/.github/workflows/dependencies/ubuntu_free_disk_space.sh
${{github.workspace}}/Submodules/PelePhysics/Submodules/amrex/.github/workflows/dependencies/ubuntu_free_disk_space.sh
sudo wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" \
Expand Down Expand Up @@ -524,7 +522,7 @@ jobs:
# - name: Clone
# uses: actions/checkout@v3
# with:
# submodules: true
# submodules: 'recursive'
# - name: Dependencies
# run: |
# export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=TRUE
Expand Down Expand Up @@ -559,15 +557,15 @@ jobs:
- name: Clone
uses: actions/checkout@v3
with:
submodules: true
submodules: 'recursive'
- name: Setup
run: |
echo "NPROCS=$(nproc)" >> $GITHUB_ENV
echo "CCACHE_COMPRESS=1" >> $GITHUB_ENV
echo "CCACHE_COMPRESSLEVEL=1" >> $GITHUB_ENV
echo "CCACHE_LOGFILE=${{github.workspace}}/ccache.log.txt" >> $GITHUB_ENV
echo "CCACHE_MAXSIZE=500M" >> $GITHUB_ENV
${{github.workspace}}/Submodules/AMReX/.github/workflows/dependencies/ubuntu_free_disk_space.sh
${{github.workspace}}/Submodules/PelePhysics/Submodules/amrex/.github/workflows/dependencies/ubuntu_free_disk_space.sh
- name: Install Ccache
run: |
wget https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-linux-x86_64.tar.xz
Expand Down Expand Up @@ -597,9 +595,9 @@ jobs:
working-directory: ${{runner.workspace}}/build-clang-tidy
run: |
#set -eu -o pipefail
cmake --build . --parallel ${{env.NPROCS}} 2>&1 | tee -a clang-tidy-full-report.txt
cmake --build . --parallel 2 2>&1 | tee -a clang-tidy-full-report.txt
egrep "warning:|error:" clang-tidy-full-report.txt \
| egrep -v "Submodules/AMReX|Submodules/sundials" \
| egrep -v "Submodules/amrex|Submodules/sundials" \
| egrep -v "ld: warning:" | sort | uniq \
| awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > clang-tidy-warnings.txt
- name: Ccache Report
Expand All @@ -623,7 +621,7 @@ jobs:
- name: Clone
uses: actions/checkout@v3
with:
submodules: true
submodules: 'recursive'
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down Expand Up @@ -656,8 +654,7 @@ jobs:
with:
patterns: |
-**/Submodules/sundials/**
-**/Submodules/AMReX/**
-**/Submodules/AMReX-Hydro/**
-**/Submodules/amrex/**
input: sarif-results/cpp.sarif
output: sarif-results/cpp.sarif
- name: Upload CodeQL sarif
Expand Down
11 changes: 1 addition & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
[submodule "Submodules/AMReX"]
path = Submodules/AMReX
url = https://github.com/AMReX-Codes/amrex.git
[submodule "Submodules/PelePhysics"]
path = Submodules/PelePhysics
url = https://github.com/AMReX-Combustion/PelePhysics.git
[submodule "Submodules/PeleMP"]
path = Submodules/PeleMP
url = https://github.com/AMReX-Combustion/PeleMP.git
[submodule "Submodules/sundials"]
path = Submodules/sundials
url = https://github.com/LLNL/sundials.git
url = https://github.com/AMReX-Combustion/PelePhysics.git
76 changes: 35 additions & 41 deletions CMake/BuildPeleCExe.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,38 @@ function(build_pelec_exe pelec_exe_name pelec_lib_name)
target_include_directories(${pelec_exe_name} PRIVATE ${CMAKE_BINARY_DIR})
target_include_directories(${pelec_exe_name} PRIVATE ${CMAKE_SOURCE_DIR}/Source/Params/param_includes)

# Set PeleMP flags
set(PELEMP_SRC_DIR ${CMAKE_SOURCE_DIR}/Submodules/PeleMP/Source)
if(PELEC_ENABLE_AMREX_PARTICLES AND PELEMP_SPRAY_FUEL_NUM GREATER 0)
# Spray
set(PELE_PHYSICS_SPRAY_DIR ${CMAKE_SOURCE_DIR}/Submodules/PelePhysics/Source/Spray)
if(PELEC_ENABLE_AMREX_PARTICLES AND PELE_SPRAY_FUEL_NUM GREATER 0)
target_compile_definitions(${pelec_exe_name} PRIVATE PELEC_USE_SPRAY)
target_compile_definitions(${pelec_exe_name} PRIVATE SPRAY_FUEL_NUM=${PELEMP_SPRAY_FUEL_NUM})
target_compile_definitions(${pelec_exe_name} PRIVATE SPRAY_FUEL_NUM=${PELE_SPRAY_FUEL_NUM})
target_sources(${pelec_exe_name} PRIVATE
SprayParticlesInitInsert.cpp
SprayParticlesInitInsert.cpp
${SRC_DIR}/Particle.cpp
${PELEMP_SRC_DIR}/PP_Spray/SprayParticles.cpp
${PELEMP_SRC_DIR}/PP_Spray/SprayParticles.H
${PELEMP_SRC_DIR}/PP_Spray/SprayFuelData.H
${PELEMP_SRC_DIR}/PP_Spray/SprayInterpolation.H
${PELEMP_SRC_DIR}/PP_Spray/Drag.H
${PELEMP_SRC_DIR}/PP_Spray/SprayInjection.H
${PELEMP_SRC_DIR}/PP_Spray/SpraySetup.cpp
${PELEMP_SRC_DIR}/PP_Spray/SprayDerive.cpp
${PELEMP_SRC_DIR}/PP_Spray/SprayJet.H
${PELEMP_SRC_DIR}/PP_Spray/SprayJet.cpp
${PELEMP_SRC_DIR}/PP_Spray/SprayIO.cpp
${PELEMP_SRC_DIR}/PP_Spray/WallFunctions.H
${PELEMP_SRC_DIR}/PP_Spray/Distribution/DistBase.H
${PELEMP_SRC_DIR}/PP_Spray/Distribution/Distributions.H
${PELEMP_SRC_DIR}/PP_Spray/Distribution/Distributions.cpp)
target_include_directories(${pelec_exe_name} PRIVATE ${PELEMP_SRC_DIR}/PP_Spray)
target_include_directories(${pelec_exe_name} PRIVATE ${PELEMP_SRC_DIR}/PP_Spray/Distribution)
endif()
if(PELEC_ENABLE_SOOT)
target_compile_definitions(${pelec_exe_name} PRIVATE PELEC_USE_SOOT)
target_compile_definitions(${pelec_exe_name} PRIVATE NUM_SOOT_MOMENTS=${PELEMP_NUM_SOOT_MOMENTS})
set(SOOT_MOMENTS_VALUES 3 6)
if(NOT PELEMP_NUM_SOOT_MOMENTS IN_LIST SOOT_MOMENTS_VALUES)
message(FATAL_ERROR "NUM_SOOT_MOMENTS must be either 3 or 6")
endif()
target_sources(${pelec_exe_name} PRIVATE
${SRC_DIR}/Soot.cpp
${PELEMP_SRC_DIR}/Soot_Models/SootModel.cpp
${PELEMP_SRC_DIR}/Soot_Models/SootModel_react.cpp
${PELEMP_SRC_DIR}/Soot_Models/SootModel_derive.cpp
${PELEMP_SRC_DIR}/Soot_Models/Constants_Soot.H
${PELEMP_SRC_DIR}/Soot_Models/SootData.H
${PELEMP_SRC_DIR}/Soot_Models/SootReactions.H
${PELEMP_SRC_DIR}/Soot_Models/SootModel.H
${PELEMP_SRC_DIR}/Soot_Models/SootModel_derive.H)
target_include_directories(${pelec_exe_name} PRIVATE ${PELEMP_SRC_DIR}/Soot_Models)
${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(${pelec_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR})
target_include_directories(${pelec_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/Distribution)
target_include_directories(${pelec_exe_name} PUBLIC ${PELE_PHYSICS_SPRAY_DIR}/BreakupSplash)
endif()

target_sources(${pelec_exe_name}
Expand Down Expand Up @@ -122,6 +110,12 @@ function(build_pelec_exe pelec_exe_name pelec_lib_name)
${SRC_DIR}/WENO.H
)

# Soot
if(PELEC_ENABLE_SOOT)
target_sources(${pelec_exe_name} PRIVATE
${SRC_DIR}/Soot.cpp)
endif()

if(PELEC_ENABLE_ASCENT)
target_sources(${pelec_exe_name}
PRIVATE
Expand Down
Loading

0 comments on commit 2756b4f

Please sign in to comment.