Skip to content
Open
Show file tree
Hide file tree
Changes from 120 commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
bd15e91
creating InteractionRates class
GDMarco Mar 5, 2024
4efbaa5
InteractionRates class in SWIG
GDMarco Mar 5, 2024
1c9085e
update CMakeLists.txt
GDMarco Mar 5, 2024
0bb1fec
correct InteractionRates.cpp #include
GDMarco Mar 5, 2024
cfa0371
avoid redefinition in InteractionRates.cpp
GDMarco Mar 5, 2024
dc7b60c
outOfLine definition in InteractionRates.cpp
GDMarco Mar 5, 2024
d4cc1c8
update PhotonBackground.h for space dependent fields
GDMarco Mar 6, 2024
63f5573
update PhotonBackground.cpp for space dependent fields
GDMarco Mar 6, 2024
bf17391
update EMPairProduction.h/.cpp for space dependent fields
GDMarco Mar 6, 2024
68a1df2
correct #include for PhotonBackground.h/.cpp
GDMarco Mar 6, 2024
28dd755
correct #include in src/PhotonBackground.cpp
GDMarco Mar 6, 2024
60d904c
correct src/EMPairProduction.cpp
GDMarco Mar 6, 2024
f88fd02
update files for position dependent background photons & EMPP
GDMarco Mar 6, 2024
abf4d14
correct minor errors for position dependent photon field & EMPP
GDMarco Mar 6, 2024
b26d064
Update PhotonBackground.h
GDMarco Mar 6, 2024
bb502eb
Update PhotonBackground.cpp
GDMarco Mar 6, 2024
9067fa8
Update EMPairProduction.cpp
GDMarco Mar 6, 2024
7cad8ff
Update EMPairProduction.h
GDMarco Mar 6, 2024
e688abf
update EMInverseComptonScattering.h/.cpp for position dependent photo…
GDMarco Mar 7, 2024
d0b21b0
update EMDoublePairProduction.h/.cpp for position dependent photon ba…
GDMarco Mar 7, 2024
9e6b95c
update EMTripletPairProduction.h/.cpp for spatial dependent photon field
GDMarco Mar 7, 2024
a5d9696
Update InteractionRates.h
GDMarco Mar 8, 2024
9fbd61a
Update InteractionRates.h
GDMarco Mar 8, 2024
f573b6f
Update InteractionRates.cpp
GDMarco Mar 8, 2024
149a771
Update PhotonBackground.h indentation
GDMarco Mar 8, 2024
715ec1f
style typos & methods in InteractionRates class
GDMarco Mar 8, 2024
01dc99e
fix PhotonBackground.h for merging
GDMarco Mar 8, 2024
f501c69
change exit with throw std::runtime_error() & style
GDMarco Mar 8, 2024
615f18c
Update CMakeLists.txt C++17
GDMarco Mar 8, 2024
aeba158
Update (back) CMakeLists.txt to C++11 version
GDMarco Mar 8, 2024
82f1317
Update testPythonExtension.py PhotonField()
GDMarco Mar 12, 2024
30cd854
Update testInteraction.cpp
GDMarco Mar 12, 2024
9e56180
Update PhotonBackground.h
GDMarco Mar 20, 2024
e1f6a52
Update PhotonBackground.h
GDMarco Mar 20, 2024
7573248
Update EMPairProduction.h
GDMarco Mar 20, 2024
7d07ade
Update EMPairProduction.h
GDMarco Mar 20, 2024
214355f
Update testInteraction.cpp
GDMarco Mar 25, 2024
233a137
Committing changes before switching branches
GDMarco Mar 26, 2024
bbc11cf
cleaning EMPairProduction.cpp
GDMarco Mar 26, 2024
890aa7c
update EMPairProduction.h
GDMarco Mar 26, 2024
7cb31e0
update testInteraction.cpp
GDMarco Mar 26, 2024
f56dbdc
Update EMInverseComptonScattering.cpp
GDMarco Mar 26, 2024
712748f
Update EMDoublePairProduction.cpp
GDMarco Mar 26, 2024
07b6671
Update EMTripletPairProduction.cpp
GDMarco Mar 26, 2024
04664d3
Update EMDoublePairProduction.cpp
GDMarco Mar 26, 2024
ec74a01
Update EMInverseComptonScattering.cpp
GDMarco Mar 26, 2024
ee721fc
Update EMPairProduction.cpp
GDMarco Mar 26, 2024
ba9f4a6
Update EMPairProduction.cpp
GDMarco Mar 26, 2024
7901e26
update EMPairProduction.cpp
GDMarco Mar 26, 2024
3cb6df8
update EMPairProduction.cpp
GDMarco Mar 26, 2024
314077f
correct src/InteractionRates.cpp
GDMarco Mar 26, 2024
985598c
nomenclature Iso->Hom
GDMarco Apr 4, 2024
c2f6c56
Update CMakeLists.txt to C++17
GDMarco Apr 10, 2024
e7be9e6
Optimization for PhotonBackground(assuming same energy binning)
GDMarco May 7, 2024
07692b3
Optimization, assuming the same energy binning in each node
GDMarco May 8, 2024
f6c5227
new functions getClosestRate
GDMarco Jun 26, 2024
39c7542
update functions for process and perfInt in InteractionRates
GDMarco Jul 1, 2024
f1af6d5
clean optimisation
GDMarco Jul 3, 2024
bf27960
fix nomenclature
GDMarco Jul 23, 2024
d256457
minor changes
GDMarco Jul 24, 2024
bd3b426
fix nomenclature
GDMarco Jul 25, 2024
e8699a3
add include
GDMarco Jul 25, 2024
bb73984
add surface in EM interactions & checking procedure initPosDepRate()
GDMarco Oct 4, 2024
04bd2d8
correcting -out of table E- errors
GDMarco Oct 10, 2024
0b3b2cb
add R12 class
GDMarco Oct 15, 2024
5ebc9c4
try to fix indentation
GDMarco Oct 16, 2024
2bb434a
add surface to posDepRadField + checks
GDMarco Nov 6, 2024
278f8cc
opt in distance calc
GDMarco Mar 4, 2025
14a3f25
nanoflann impl (low-tested)
GDMarco Mar 6, 2025
112be8e
add nLeaf & nThreads par for nanoflann
GDMarco Mar 10, 2025
8388e98
fix spacing/style
GDMarco Aug 1, 2025
f651d0a
fix spacing/style & rm comments in .cc
GDMarco Aug 1, 2025
f483730
Surface as ref_ptr
GDMarco Sep 26, 2025
2407d02
add example
GDMarco Jan 26, 2026
c6313bf
Remove and ignore macOS .DS_Store files
GDMarco Jan 26, 2026
2c88d42
Merge remote-tracking branch 'upstream/master' into PositionDependent…
GDMarco Jan 26, 2026
3ec95f1
latest -small changes-
GDMarco Jan 26, 2026
be4c696
CI: enable C++17 and install nanoflann
GDMarco Jan 27, 2026
1b1ee97
adding nanoflann as a header-only in libs/
GDMarco Jan 27, 2026
edab4f8
adding nanoflann as a header-only in libs/ -correct-
GDMarco Jan 27, 2026
5520562
adding nanoflann -correctv2-
GDMarco Jan 27, 2026
1c2accd
adding nanoflann -correctv3-
GDMarco Jan 27, 2026
5c10445
adding nanoflann -correctv4-
GDMarco Jan 27, 2026
e0fd15b
adding nanoflann -correctv5-
GDMarco Jan 27, 2026
393071d
adding C++17 flags in the tests
GDMarco Jan 27, 2026
13be94b
formatting .yaml
GDMarco Jan 27, 2026
2666a1c
formatting .yaml v2
GDMarco Jan 28, 2026
9feb2b4
formatting .yaml v3
GDMarco Jan 28, 2026
d4d02d6
formatting .yaml v4
GDMarco Jan 28, 2026
ec2f5cd
formatting .yaml v5
GDMarco Jan 28, 2026
a14ea76
formatting .yaml v6
GDMarco Jan 28, 2026
d2db12b
formatting .yaml v7
GDMarco Jan 28, 2026
2669e52
correcting _OSX.yaml
GDMarco Jan 28, 2026
8098c9a
correcting _OSX.yaml v1
GDMarco Jan 28, 2026
e9c84dc
correcting _OSX.yaml v2
GDMarco Jan 28, 2026
0dc79ee
correcting _OSX.yaml v3
GDMarco Jan 28, 2026
6188885
correcting differences OSX and Ubuntu in calling filesystem
GDMarco Jan 28, 2026
8f59c6e
correcting ubuntu .yaml to C++17
GDMarco Jan 28, 2026
0e687fa
correcting ubuntu .yaml to C++17 v1
GDMarco Jan 28, 2026
bb581d2
add stdfs++ to CMakeLists.txt
GDMarco Jan 28, 2026
09d42f8
add stdfs++ to CMakeLists.txt v1
GDMarco Jan 28, 2026
da8b4b5
add stdfs++ to CMakeLists.txt v2
GDMarco Jan 28, 2026
424b0dc
add C++17 to ub22.yaml
GDMarco Jan 28, 2026
63ad5c4
change GCC version in CMake
GDMarco Jan 28, 2026
d26b64a
change GCC version in CMake v2 + in PhBkg
GDMarco Jan 28, 2026
380cd68
change GCC version in CMake v3
GDMarco Jan 28, 2026
3610079
try to fix PythonExtension test
GDMarco Jan 28, 2026
9971827
try to fix PythonExtension and Interaction tests
GDMarco Jan 28, 2026
b9b5de3
add warnings for not finding posdepradfields
GDMarco Feb 2, 2026
7d2a0dd
add warnings for not finding posdepradfields v2
GDMarco Feb 2, 2026
4f97506
add --output for test
GDMarco Feb 2, 2026
e185892
donot test without tables
GDMarco Feb 2, 2026
4bb0728
donot test without tables in testInt
GDMarco Feb 2, 2026
910461f
donot test without tables in testInt v2
GDMarco Feb 2, 2026
00b3f41
donot test without tables in testInt v3
GDMarco Feb 2, 2026
d5d04f0
donot test without tables in testInt v4
GDMarco Feb 2, 2026
52ddb8e
donot test without tables in testInt v5 + EMPP
GDMarco Feb 2, 2026
62e7085
donot test without tables in testInt v6
GDMarco Feb 2, 2026
49d1d63
donot test without tables in testInt v7 + EMPP v2
GDMarco Feb 2, 2026
8285960
EMPP v3
GDMarco Feb 3, 2026
7d46929
answer to PR v1
GDMarco Mar 6, 2026
d62de4f
changes reported in CHANGELOG.md
GDMarco Mar 6, 2026
028002a
removed nanoflann lib since its header only
JanNiklasB Mar 9, 2026
4705a60
removed splitFilename since it was never declared
JanNiklasB Mar 9, 2026
a1895df
fixed wrong declaration of constructors
JanNiklasB Mar 9, 2026
98be491
removed unused variable
JanNiklasB Mar 9, 2026
a0107b4
moved splitFilename to Common.cpp
JanNiklasB Mar 9, 2026
ba8ae38
Changed initialization parameter to constant values in class
JanNiklasB Mar 9, 2026
e726045
added old initRate
JanNiklasB Mar 9, 2026
8407f8e
changed spaces to tabs for indentation (see CONTRIBUTE.md)
JanNiklasB Mar 9, 2026
470a603
Merge branch 'master' into PhotonFieldPR
JanNiklasB Mar 9, 2026
a432e2b
added more overloads for init*Rates and changed handling von Rates
JanNiklasB Mar 9, 2026
d9c95bb
Moved init*Rates to interactionRates classes and added seter and gete…
Mar 10, 2026
859c3d1
isPositionDependent and surface now defined in all constructors
JanNiklasB Mar 23, 2026
9c7777b
Merge pull request #1 from JanNiklasB/PhotonFieldPR
GDMarco Mar 25, 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
10 changes: 9 additions & 1 deletion .github/workflows/test_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DENABLE_PYTHON=True -DPython_EXECUTABLE=${{ matrix.config.py }} -DENABLE_TESTING=Off -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native -DPython_INSTALL_PACKAGE_DIR=/home/runner/.local/
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local \
-DENABLE_PYTHON=True \
-DPython_EXECUTABLE=${{ matrix.config.py }} \
-DENABLE_TESTING=Off \
-DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} \
-DSIMD_EXTENSIONS=native \
-DPython_INSTALL_PACKAGE_DIR=/home/runner/.local/ \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_FLAGS="-std=c++17 -I${{ github.workspace }}/libs/nanoflann/include -Wall -Wextra"
- name: Build CRPropa
run: |
cd build
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/testing_OSX.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ jobs:
- name: Preinstall
run: |
brew install hdf5 fftw cfitsio muparser libomp swig python3
pip install numpy==1.26.4 cmake
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install numpy==1.26.4 cmake
- name: Set up the build
env:
CXX: ${{ matrix.config.cxx }}
Expand All @@ -30,7 +33,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DENABLE_PYTHON=True -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS="none"
cmake .. -DENABLE_PYTHON=True -DPython_EXECUTABLE=$GITHUB_WORKSPACE/venv/bin/python -DCMAKE_CXX_STANDARD=17 -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS="none"
- name: Build CRPropa
run: |
cd build
Expand All @@ -40,7 +43,7 @@ jobs:
CRPROPA_DATA_PATH: "/Users/runner/work/CRPropa3/CRPropa3/build/data"
run: |
cd build
make test
make test ARGS="--output-on-failure"
- name: Archive test results
if: always()
uses: actions/upload-artifact@v4
Expand Down
Empty file.
6 changes: 3 additions & 3 deletions .github/workflows/testing_ubuntu20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DENABLE_PYTHON=True -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native
cmake .. -DENABLE_PYTHON=True -DENABLE_TESTING=On -DCMAKE_CXX_STANDARD=17 -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native
- name: Build CRPropa
run: |
cd build
make
- name: Run tests
run: |
cd build
make test
make test ARGS="--output-on-failure"
- name: Archive test results
if: always()
uses: actions/upload-artifact@v4
with:
name: "test-report_${{matrix.config.name}}"
path: build/Testing/Temporary/LastTest.log
path: build/Testing/Temporary/LastTest.log
10 changes: 8 additions & 2 deletions .github/workflows/testing_ubuntu22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,21 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DENABLE_PYTHON=True -DENABLE_TESTING=On -DPython_EXECUTABLE=${{ matrix.config.py }} -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native
cmake .. -DENABLE_PYTHON=True \
-DENABLE_TESTING=On \
-DPython_EXECUTABLE=${{ matrix.config.py }} \
-DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} \
-DSIMD_EXTENSIONS=native \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_FLAGS="-std=c++17 -Wall -Wextra -I${{ github.workspace }}/libs/nanoflann/include"
- name: Build CRPropa
run: |
cd build
make
- name: Run tests
run: |
cd build
make test
make test ARGS="--output-on-failure"
- name: Archive test results
if: always()
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ cmake/CMakeFiles/
*.dat
*.ipynb_checkpoints
*.idea
.DS_Store
24 changes: 20 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ cmake_minimum_required(VERSION 3.14)
project(CRPropa Fortran C CXX)
set(CRPROPA_RELEASE_VERSION 3.2.1+) # Update for new release

set(CMAKE_CXX_STANDARD 11)
# Detect platform and set C++ standard
if(APPLE)
message(STATUS "Building on macOS, using C++11")
set(CMAKE_CXX_STANDARD 11)
# set(CMAKE_CXX_STANDARD_REQUIRED ON)
else()
message(STATUS "Building on Linux/Ubuntu, using C++17")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})

set(CRPROPA_EXTRA_SOURCES)
Expand Down Expand Up @@ -57,7 +66,6 @@ if(NOT CMAKE_BUILD_TYPE)
endif(NOT CMAKE_BUILD_TYPE)
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")


# ----------------------------------------------------------------------------
# Version info from Git
# ----------------------------------------------------------------------------
Expand Down Expand Up @@ -335,7 +343,7 @@ CRPropa should compile, but will likely not work properly! Please install data f
endif()

# ----------------------------------------------------------------------------
# Library and Binary
# Library and Binary
# ----------------------------------------------------------------------------
file(GLOB_RECURSE CRPROPA_INCLUDES RELATIVE ${CMAKE_SOURCE_DIR} include/*.h)
include_directories(include ${CRPROPA_EXTRA_INCLUDES})
Expand All @@ -355,6 +363,7 @@ add_library(crpropa SHARED
src/ParticleMass.cpp
src/ParticleState.cpp
src/PhotonBackground.cpp
src/InteractionRates.cpp
src/ProgressBar.cpp
src/Random.cpp
src/Source.cpp
Expand Down Expand Up @@ -441,7 +450,10 @@ else()
MESSAGE(STATUS "Build of documentation disabeled. Enable with BUILD_DOC=On")
endif(BUILD_DOC)


# Only add stdc++fs for older GCC (needed for Ubuntu 20)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10)
target_link_libraries(crpropa stdc++fs)
endif()

# ----------------------------------------------------------------------------
# Python
Expand Down Expand Up @@ -538,6 +550,10 @@ if(ENABLE_PYTHON AND Python_FOUND)

endif(ENABLE_PYTHON AND Python_FOUND)

target_include_directories(crpropa
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add nanoflann to crpropa over CRPROPA_EXTRA_INCLUDE and CRPROPA_EXTRA_SOURCES (see other libraries).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add it to the CRPROPA_EXTRA_INCLUDE, as the other libraries (e.g. kiss). Why also to CRPROPA_EXTRA_SOURCES?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, for nanoflann you only have Includes, so only to CRPROPA_EXTRA_INCLUDE

PUBLIC
${CMAKE_SOURCE_DIR}/libs/nanoflann/include
)

# ----------------------------------------------------------------------------
# Install
Expand Down
Loading
Loading