Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
f3935be
saving flux squared for standard deviation
Fuad-HH May 22, 2025
7b9d30d
particle energy group attribute for flux
Fuad-HH May 23, 2025
a79124f
copy back material ids
Fuad-HH Jun 17, 2025
afc0f21
degas2 physics api
Fuad-HH Jun 20, 2025
a0ea9f3
degas2 physics test case
Fuad-HH Jun 20, 2025
fe4548e
test discovery at pre test instead of during build
Fuad-HH Jun 25, 2025
a6af786
Add ionization and charge exchange roughly
gpaynter5004 Jun 30, 2025
5793685
Fixed mislabelled variables, std::num
gpaynter5004 Jun 30, 2025
16b33bf
added semicolon
gpaynter5004 Jun 30, 2025
75a3e47
Fixed Pi
gpaynter5004 Jun 30, 2025
d440b1f
Fixed std::numbers being in there still
gpaynter5004 Jun 30, 2025
4a8585d
Changed coef to coef2 correctly
gpaynter5004 Jun 30, 2025
bd4b88c
Changed std::log to log
gpaynter5004 Jun 30, 2025
ded643c
changed log to logf
gpaynter5004 Jun 30, 2025
d0a6226
Add logging and test for both moving and colliding
gpaynter5004 Jul 1, 2025
4cac6cb
Fix for loop and endl.
gpaynter5004 Jul 1, 2025
e24d0d5
Move for loop
gpaynter5004 Jul 1, 2025
80c2c29
Change to console log
gpaynter5004 Jul 1, 2025
91e485b
Put print in the parallel loop
gpaynter5004 Jul 1, 2025
fb5cabd
Trying to move data off of gpu
gpaynter5004 Jul 1, 2025
f95edd1
trying to copy gpu view onto cpu
gpaynter5004 Jul 1, 2025
78bca1e
Set more realistic parameters in test
gpaynter5004 Jul 1, 2025
d2cd025
add space in log
gpaynter5004 Jul 1, 2025
116af54
Change energy_group type to double
gpaynter5004 Jul 2, 2025
3a82591
Format output as csv
gpaynter5004 Jul 2, 2025
bc89e8c
Format output as csv
gpaynter5004 Jul 2, 2025
c68f773
Merge remote-tracking branch 'origin/add-atom-phys' into add-atom-phys
gpaynter5004 Jul 2, 2025
0a2da30
Fix CSV formatting
gpaynter5004 Jul 2, 2025
7bb9daf
Set particle number to 1000
gpaynter5004 Jul 2, 2025
1c76c89
Rename variables to be more consistent
gpaynter5004 Jul 2, 2025
c4c120c
Set density to more reasonable value
gpaynter5004 Jul 2, 2025
5466493
Try avoiding calculating the cross sections twice
gpaynter5004 Jul 3, 2025
ebfc1eb
Try avoiding calculating the cross sections twice
gpaynter5004 Jul 3, 2025
7e46ec1
Fix type
gpaynter5004 Jul 3, 2025
ca6ffe2
Merge remote-tracking branch 'origin/test-atom-phys' into test-atom-phys
gpaynter5004 Jul 3, 2025
62873bf
Fix typo
gpaynter5004 Jul 3, 2025
d57122c
Fix typo
gpaynter5004 Jul 3, 2025
3280456
Fix typo
gpaynter5004 Jul 3, 2025
a511e81
Try putting declaration earlier
gpaynter5004 Jul 3, 2025
4657a90
Try fixing declaration
gpaynter5004 Jul 3, 2025
76f2890
Clear some non-functional code (note will not compile)
gpaynter5004 Jul 3, 2025
2cbf183
Store energy in a kokkos::view inside of DG2Physics.h and add index t…
gpaynter5004 Jul 3, 2025
eda9e6a
remove const in function definition
gpaynter5004 Jul 3, 2025
47b8507
change sigmas to auto
gpaynter5004 Jul 3, 2025
0aaf1d0
explicitly return a variable previously declared as double
gpaynter5004 Jul 3, 2025
663cd96
Explicitly call DG2Physics.foo
gpaynter5004 Jul 3, 2025
35f7444
Try calling with :: instead
gpaynter5004 Jul 3, 2025
9bd33fd
Try making sigma a const?
gpaynter5004 Jul 3, 2025
cdde6b3
How about making the functions constant ooh
gpaynter5004 Jul 3, 2025
f393060
How about making the functions constant ooh
gpaynter5004 Jul 3, 2025
bb1ce98
Changing the logging to debug
gpaynter5004 Jul 3, 2025
0fd0350
Change sigma to double from auto
gpaynter5004 Jul 3, 2025
abd2fea
Temporarily have weight output sigma_cx
gpaynter5004 Jul 3, 2025
5757790
Temporarily have weight output sigma_cx inside the function that calc…
gpaynter5004 Jul 3, 2025
8cba999
Weight Back to normal
gpaynter5004 Jul 3, 2025
6f20775
Make the inputs be non-constant for the cross sections
gpaynter5004 Jul 3, 2025
7673d5b
Replace math functions with kokkos math functions
gpaynter5004 Jul 7, 2025
16c5bd7
temporarily have sigma_ion be just the energy and have that saved to …
gpaynter5004 Jul 7, 2025
714e186
pass the struct not the energy for sigma
gpaynter5004 Jul 7, 2025
bccf642
pass the struct not the energy for sigma
gpaynter5004 Jul 7, 2025
b0e820e
replace sigma ion with energy again
gpaynter5004 Jul 7, 2025
945f542
Properly initialize particle energy
gpaynter5004 Jul 7, 2025
13488dd
Initialize particle energy in a not very smart way.
gpaynter5004 Jul 7, 2025
c35e409
Print average of distances
gpaynter5004 Jul 7, 2025
8e23013
Print some statistics on x direction after collision and mean free path.
gpaynter5004 Jul 7, 2025
1aa8241
Set loop variables initial value
gpaynter5004 Jul 7, 2025
7b520ab
Set loop variables initial value
gpaynter5004 Jul 7, 2025
f384b05
Merge remote-tracking branch 'origin/test-atom-phys' into test-atom-phys
gpaynter5004 Jul 7, 2025
8aa6171
Define set particle energies function
gpaynter5004 Jul 7, 2025
6c4bd93
Add catch2 checks
gpaynter5004 Jul 7, 2025
5dc49d1
Add catch2 checks
gpaynter5004 Jul 7, 2025
a097511
Add Catch:: namespace
gpaynter5004 Jul 7, 2025
739453a
Add Catch::Matchers:: namespace
gpaynter5004 Jul 7, 2025
d3c7551
try moving tests outside of Kokkos::finalize
gpaynter5004 Jul 7, 2025
090ded5
return require to befre kokkos finalize
gpaynter5004 Jul 7, 2025
13c4e24
Convert main() to TEST_CASE
gpaynter5004 Jul 7, 2025
7ab2a5f
Make the test fail to confirm it works
gpaynter5004 Jul 7, 2025
6f81472
Return to functional tests
gpaynter5004 Jul 7, 2025
818b88d
Comment out logging
gpaynter5004 Jul 8, 2025
05fd1b2
delete unneeded comment
gpaynter5004 Jul 8, 2025
7141a5c
Change energy group back to int and stop assigning it to the energy
gpaynter5004 Jul 8, 2025
e4e70a2
Make a test that tracks one particle until death
gpaynter5004 Jul 9, 2025
ec902e4
Make a test that tracks one particle until death
gpaynter5004 Jul 9, 2025
5c61256
Make a test that tracks one particle until death
gpaynter5004 Jul 9, 2025
f20065b
Make a test that tracks one particle until death
gpaynter5004 Jul 9, 2025
152951a
Make a test that tracks one particle until death
gpaynter5004 Jul 9, 2025
ccf0d7f
Make a test that tracks one particle until death
gpaynter5004 Jul 9, 2025
f831c01
Make a test that tracks one particle until death
gpaynter5004 Jul 9, 2025
4161d6a
Make a test that tracks one particle until death
gpaynter5004 Jul 9, 2025
d7180c9
Make a test that tracks one particle until death
gpaynter5004 Jul 9, 2025
2a10d0d
Merge remote-tracking branch 'origin/test-atom-phys' into test-atom-phys
gpaynter5004 Jul 9, 2025
3dae712
Make a test that tracks one particle until death
gpaynter5004 Jul 9, 2025
742bf0f
Test avoiding the custom type
gpaynter5004 Jul 9, 2025
d7a5d6f
Return to particle_info type. Just make the array way to large and le…
gpaynter5004 Jul 9, 2025
59dbdab
Return to particle_info type. Just make the array way to large and le…
gpaynter5004 Jul 9, 2025
df805b6
Change seed
gpaynter5004 Jul 9, 2025
e40b819
Merge pull request #1 from gpaynter5004/test-atom-phys
gpaynter5004 Jul 9, 2025
60276e0
Revert to last finished form
gpaynter5004 Jul 9, 2025
cd6adc8
Merge pull request #2 from gpaynter5004/degas2_physics
Fuad-HH Jul 11, 2025
7c4d3b3
degas2 main added
Fuad-HH Jul 14, 2025
cb9c1d8
separated the impl header from the cpp file
Fuad-HH Jul 15, 2025
59ed1f2
fix linking error
Fuad-HH Jul 15, 2025
bf1e8fc
first draft of degas2
Fuad-HH Jul 15, 2025
4f9cd7e
Code in the "get_field_values" function
gpaynter5004 Jul 17, 2025
f168001
Add comments and add the headers for file I/O.
gpaynter5004 Jul 17, 2025
f6ce9b6
Update degas2-main.cpp
gpaynter5004 Jul 18, 2025
2274d0b
Add alpha to particle_info struct to be multiplied into tally
gpaynter5004 Jul 22, 2025
b40e227
Merge remote-tracking branch 'origin/degas2_physics' into degas2_physics
gpaynter5004 Jul 22, 2025
27c85cd
Implement rejection testing for the collision new velocity
gpaynter5004 Jul 23, 2025
70bf3e7
Fix formatting and add comment
gpaynter5004 Jul 23, 2025
231f36c
Define max_sigma_cx
gpaynter5004 Jul 23, 2025
603dc73
specular reflection
Fuad-HH Jul 24, 2025
5eae254
uniform 3d distribution over the whole domain
Fuad-HH Jul 24, 2025
e98a392
Merge pull request #3 from gpaynter5004/degas2_physics
Fuad-HH Jul 24, 2025
79dd7f6
Revert "Degas2 physics Field Value Inputting"
Fuad-HH Jul 24, 2025
0a7b8de
Merge pull request #4 from Fuad-HH/revert-3-degas2_physics
Fuad-HH Jul 24, 2025
13d0bef
Reapply "Degas2 physics Field Value Inputting"
Fuad-HH Jul 24, 2025
5063130
Merge branch 'degas2_physics' of github.com:Fuad-HH/PumiUMTally into …
Fuad-HH Jul 24, 2025
48e7aaf
sample initial energy
Fuad-HH Jul 24, 2025
c3e36b8
collide or sample new distance based on if reached destination or not
Fuad-HH Jul 24, 2025
8bdb038
multiply contribution with alpha factor
Fuad-HH Jul 24, 2025
baee046
Update degas2-main.cpp
gpaynter5004 Jul 24, 2025
c7fc5e1
Set the alpha to actually update
gpaynter5004 Jul 25, 2025
b5852dc
Fix formatting
gpaynter5004 Jul 25, 2025
952647d
Bug fix: random_pool, uniform source distribution, NEEDS TO FIX: ille…
Jul 25, 2025
5a9be24
Merge remote-tracking branch 'origin/degas2_physics' into degas2_physics
gpaynter5004 Jul 25, 2025
6c09ac0
Fix illegal memory access error. NEED TO FIX: particles deleting
gpaynter5004 Jul 30, 2025
5f8318e
Merge branch 'degas2_physics' of https://github.com/gpaynter5004/Pumi…
gpaynter5004 Jul 30, 2025
f13992a
Fix particle deleting due to improper definitions of igin and destina…
gpaynter5004 Aug 1, 2025
e66f8a8
Re-enable the print for the test test_degas2_physics.cpp
gpaynter5004 Aug 8, 2025
2ad7a73
Correct rejection sampling DG2Physics.h
gpaynter5004 Aug 8, 2025
29fa14e
Correct units in test case test_degas2_physics.cpp
gpaynter5004 Aug 8, 2025
7c60190
Correct units in log test_degas2_physics.cpp
gpaynter5004 Aug 8, 2025
b401232
Bug fix rejection sampling DG2Physics.h
gpaynter5004 Aug 8, 2025
9ee65a6
fix bugs
Fuad-HH Aug 21, 2025
1607890
use isotropically sampled initial direction
Fuad-HH Aug 22, 2025
07806e6
merge Gabe's degas2 physics
Fuad-HH Apr 29, 2026
e43b841
Enhance CI workflows with additional logging and configuration updates
Fuad-HH Apr 29, 2026
f2bce18
Update CMakeLists.txt to link test_degas2_physics with pumipic library
Fuad-HH Apr 30, 2026
7afdf83
Remove pull_request triggers from CI workflows
Fuad-HH Apr 30, 2026
1154558
Add LD_LIBRARY_PATH to CI workflow environment
Fuad-HH Apr 30, 2026
1440b87
Update static analysis workflow dependent on test's success
Fuad-HH Apr 30, 2026
2435668
add OpenMP environment variables before running tests
Fuad-HH Apr 30, 2026
cdbaae7
branch-specific triggers for main
Fuad-HH Apr 30, 2026
65cea8b
debug print particle locations
Fuad-HH Apr 30, 2026
d56922a
update tolerance for position mean check
Fuad-HH Apr 30, 2026
570b325
format degas2 physics changes
Fuad-HH Apr 30, 2026
11e8eca
added dg2 physics format git-blame ignore
Fuad-HH Apr 30, 2026
3fe481f
moved get centroid method to impl header
Fuad-HH Apr 30, 2026
de78f4c
Refactor degas2-main.cpp
Fuad-HH Apr 30, 2026
9c39acf
fix function signature
Fuad-HH May 1, 2026
99fb85c
refactor fields struct
Fuad-HH Jun 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
c765e51344ad4a458d042ceefdf19fd61edf79ab # clang-format
59fe44fd6d08218b8aeae7612bdd5a71d0289ce5 # format /test/test_hostwrite_initialization.cpp
570b3252bcb6e080bde4113cc9d7ed2aa5796fd6 # format degas2 physics files
8 changes: 7 additions & 1 deletion .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Format Check

on:
push:
branches: [main]
pull_request:
pull_request_target:
branches: [main]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -31,6 +32,11 @@ jobs:
exit 0
fi

echo "Files to be checked:"
for file in "${files[@]}"; do
echo " $file"
done

clang-format-20 --version
clang-format-20 -style=file --dry-run -Werror "${files[@]}"

12 changes: 10 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Static Analysis

on:
push:
pull_request:
workflow_run:
workflows: ["Test"]
types:
- completed
workflow_dispatch:

env:
Expand All @@ -11,9 +13,14 @@ env:
jobs:
clang-tidy:
runs-on: ubuntu-latest
if: >
github.event_name == 'workflow_dispatch' ||
(github.event.workflow_run.conclusion == 'success')

steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.workflow_run.head_sha || github.ref }}

- name: Install dependencies
uses: ./.github/actions/install-deps
Expand All @@ -35,6 +42,7 @@ jobs:
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_C_COMPILER=mpicc \
-DBUILD_SHARED_LIBS=ON \
-DPUMITALLY_ENABLE_DEGAS2=ON \
-DCMAKE_CXX_CLANG_TIDY=${TIDY_CMD}

- name: Build with clang-tidy
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ name: Test

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

env:
DEPS_DIR: ${{ github.workspace }}/deps
LD_LIBRARY_PATH: ${{ github.workspace }}/deps/lib

jobs:
ctest:
Expand All @@ -26,12 +29,17 @@ jobs:
-DCMAKE_PREFIX_PATH=$DEPS_DIR \
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_SHARED_LIBS=ON \
-DPUMITALLYOPENMC_ENABLE_TESTS=ON
-DPUMITALLY_ENABLE_DEGAS2=ON \
-DPUMITALLY_ENABLE_TESTS=ON

- name: Build
run: cmake --build build -j$(nproc)

- name: Run tests
run: ctest --test-dir build --output-on-failure
run: |
export OMP_PROC_BIND=spread
export OMP_PLACES=threads
export OMP_NUM_THREADS=$(nproc)
ctest --test-dir build --output-on-failure
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ build-*
.idea/
config.sh
Testing/
*.vtk
48 changes: 48 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(PUMITALLY_ENABLE_TESTS "Enable tests" OFF)
option(PUMITALLY_USE_KOKKOS_CUDA "Use CUDA" OFF)
option(PUMITALLY_MEASURE_TIME "Measure time" OFF)
option(PUMITALLY_ENABLE_DEGAS2 "Enable Degas2" OFF)
###################################################################

################################## PUMIPIC ########################
Expand All @@ -30,6 +31,18 @@ set(PUMITALLY_SOURCES
src/pumitally/PumiTallyImpl.cpp
)

if(PUMITALLY_ENABLE_DEGAS2)
set(PUMITALLY_DEGAS2_HEADERS
src/physics/degas2/DG2Physics.h
src/physics/degas2/DG2CrossSection.h
)
set(PUMITALLY_DEGAS2_SOURCES
src/physics/degas2/DG2Physics.cpp
src/physics/degas2/DG2CrossSection.cpp
)
endif()



################################## Testing ########################
if(PUMITALLY_ENABLE_TESTS)
Expand Down Expand Up @@ -73,6 +86,21 @@ if(PUMITALLY_MEASURE_TIME)

target_compile_definitions(pumitally PRIVATE -DPUMITALLY_MEASURE_TIME)
endif()

if(PUMITALLY_ENABLE_DEGAS2)
add_library(pumitally_degas2)
target_sources(pumitally_degas2 PRIVATE ${PUMITALLY_DEGAS2_SOURCES})
target_link_libraries(pumitally_degas2 PRIVATE pumipic::pumipic)

add_executable(degas2 src/physics/degas2/degas2-main.cpp)
target_link_libraries(degas2 PRIVATE pumitally_degas2 pumitally pumipic::pumipic)
target_include_directories(degas2
PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
${CMAKE_SOURCE_DIR}/src/pumitally
)
endif()
###################################################################


Expand Down Expand Up @@ -137,5 +165,25 @@ install(FILES
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pumitally
)

if(PUMITALLY_ENABLE_DEGAS2)
install(TARGETS pumitally_degas2
EXPORT pumitallyTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pumitally
)
install(EXPORT pumitallyTargets
FILE pumitally_degas2Targets.cmake
NAMESPACE pumitally::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pumitally
)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/src/physics/degas2/DG2Physics.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pumitally/physics/degas2
)
endif()

###################################################################

9 changes: 9 additions & 0 deletions src/physics/degas2/DG2CrossSection.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Created by Fuad Hasans on 6/20/25.
//

#include "DG2CrossSection.h"

DG2CrossSection::DG2CrossSection(std::string filename) {
// fill in the arrays
}
38 changes: 38 additions & 0 deletions src/physics/degas2/DG2CrossSection.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// Created by Fuad Hasan on 6/20/25.
//

#ifndef PUMITALLY_DG2CROSSSECTION_H
#define PUMITALLY_DG2CROSSSECTION_H

#include <Omega_h_array.hpp>

class DG2CrossSection {
public:
// fills the cross-section arrays from the given file
explicit DG2CrossSection(std::string filename);

// explicitly given cross-section arrays constructor
DG2CrossSection(Kokkos::View<Omega_h::Real ***> sigma_t,
Kokkos::View<Omega_h::Real ***> sigma_a,
Kokkos::View<Omega_h::Real ****> scattering_matrix,
Kokkos::View<Omega_h::Real ***> sigma_s)
: nEnergyGroups(sigma_t.extent(2)), nMaterials(sigma_t.extent(0)),
nTemperatures(sigma_t.extent(1)), sigma_t(sigma_t), sigma_a(sigma_a),
scattering_matrix(scattering_matrix), sigma_s(sigma_s) {}

DG2CrossSection(const DG2CrossSection &other) = default;

// no need to define readers of the cross-section arrays

int nEnergyGroups;
int nMaterials;
int nTemperatures;

Kokkos::View<Omega_h::Real ***> sigma_t; // mat, T, g
Kokkos::View<Omega_h::Real ***> sigma_a; // mat, T, g
Kokkos::View<Omega_h::Real ****> scattering_matrix; // mat, T, g, g
Kokkos::View<Omega_h::Real ***> sigma_s; // mat, T, g
};

#endif // PUMITALLY_DG2CROSSSECTION_H
4 changes: 4 additions & 0 deletions src/physics/degas2/DG2Physics.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//
// Created by Fuad Hasan on 6/20/25.
//
#include "DG2Physics.h"
Loading
Loading