From 55145b8698b0bec5f6f921ddfdf6747c767d1e91 Mon Sep 17 00:00:00 2001 From: mertelx Date: Thu, 21 Dec 2023 15:43:48 +0100 Subject: [PATCH 1/5] Add file endings to remove cmake warnings --- libs/kiss/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/kiss/CMakeLists.txt b/libs/kiss/CMakeLists.txt index 2752f6bb0..53065f852 100644 --- a/libs/kiss/CMakeLists.txt +++ b/libs/kiss/CMakeLists.txt @@ -3,10 +3,10 @@ cmake_minimum_required(VERSION 2.6) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) add_library(kiss STATIC - src/logger - src/path - src/string - src/uuid + src/logger.cpp + src/path.cpp + src/string.cpp + src/uuid.cpp ) SET_TARGET_PROPERTIES( kiss PROPERTIES COMPILE_FLAGS -fPIC) From 2bf8efa01c705cb658e1a6d938d80e38a3130558 Mon Sep 17 00:00:00 2001 From: mertelx Date: Mon, 8 Jan 2024 16:19:49 +0100 Subject: [PATCH 2/5] Increase minimal cmake version to 3.14 --- libs/HepPID/CMakeLists.txt | 2 +- libs/gtest/CMakeLists.txt | 2 +- libs/healpix_base/CMakeLists.txt | 2 +- libs/kiss/CMakeLists.txt | 2 +- libs/sophia/CMakeLists.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/HepPID/CMakeLists.txt b/libs/HepPID/CMakeLists.txt index 4017027f7..06ec24296 100644 --- a/libs/HepPID/CMakeLists.txt +++ b/libs/HepPID/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.14) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) diff --git a/libs/gtest/CMakeLists.txt b/libs/gtest/CMakeLists.txt index 2669f53ff..8c3c5da82 100644 --- a/libs/gtest/CMakeLists.txt +++ b/libs/gtest/CMakeLists.txt @@ -17,7 +17,7 @@ endif() # ${gtest_BINARY_DIR}. # Language "C" is required for find_package(Threads). project(gtest CXX C) -cmake_minimum_required(VERSION 2.6.2) +cmake_minimum_required(VERSION 3.14) if (COMMAND set_up_hermetic_build) set_up_hermetic_build() diff --git a/libs/healpix_base/CMakeLists.txt b/libs/healpix_base/CMakeLists.txt index 3aa2417cc..03a34190a 100644 --- a/libs/healpix_base/CMakeLists.txt +++ b/libs/healpix_base/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.14) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) diff --git a/libs/kiss/CMakeLists.txt b/libs/kiss/CMakeLists.txt index 53065f852..f30c7eaf5 100644 --- a/libs/kiss/CMakeLists.txt +++ b/libs/kiss/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.14) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) diff --git a/libs/sophia/CMakeLists.txt b/libs/sophia/CMakeLists.txt index 150c07579..5a45ada49 100644 --- a/libs/sophia/CMakeLists.txt +++ b/libs/sophia/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.14) enable_language(Fortran) From 9b1d4768eddba6d2d22445c2595300c324784d1b Mon Sep 17 00:00:00 2001 From: mertelx Date: Mon, 8 Jan 2024 16:37:49 +0100 Subject: [PATCH 3/5] Remove AMRMagneticField: Was deprecated since 3.2.1 --- CHANGELOG.md | 1 + CMakeLists.txt | 11 --- include/CRPropa.h | 1 - .../crpropa/magneticField/AMRMagneticField.h | 88 ------------------- python/2_headers.i | 1 - 5 files changed, 1 insertion(+), 101 deletions(-) delete mode 100644 include/crpropa/magneticField/AMRMagneticField.h diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eb5e7d1c..ffd856c6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Features that are deprecated and will be removed after this release ### Removed features +* AMRMagneticField - underlying library (saga) is no longer supported. ### New plugins and resources linked on the webpages diff --git a/CMakeLists.txt b/CMakeLists.txt index 14ff42e1f..591ade36c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,17 +245,6 @@ if(ENABLE_QUIMBY) endif(QUIMBY_FOUND) endif(ENABLE_QUIMBY) -# SAGA (optinal for AMR grids) -find_package(SAGA) -if(SAGA_FOUND) - list(APPEND CRPROPA_EXTRA_INCLUDES ${SAGA_INCLUDE_DIR}) - list(APPEND CRPROPA_EXTRA_LIBRARIES ${SAGA_LIBRARY}) - add_definitions (-DCRPROPA_HAVE_SAGA) - list(APPEND CRPROPA_SWIG_DEFINES -DCRPROPA_HAVE_SAGA) - list(APPEND SWIG_INCLUDE_DIRECTORIES ${SAGA_INCLUDE_DIR}/../python) - list(APPEND SWIG_INCLUDE_DIRECTORIES ${SAGA_INCLUDE_DIR}) -endif(SAGA_FOUND) - # muparser (optional for generic source spectra) find_package(muParser) if(MUPARSER_FOUND) diff --git a/include/CRPropa.h b/include/CRPropa.h index 7b2779202..abd06532a 100644 --- a/include/CRPropa.h +++ b/include/CRPropa.h @@ -54,7 +54,6 @@ #include "crpropa/module/TextOutput.h" #include "crpropa/module/Tools.h" -#include "crpropa/magneticField/AMRMagneticField.h" #include "crpropa/magneticField/ArchimedeanSpiralField.h" #include "crpropa/magneticField/JF12Field.h" #include "crpropa/magneticField/JF12FieldSolenoidal.h" diff --git a/include/crpropa/magneticField/AMRMagneticField.h b/include/crpropa/magneticField/AMRMagneticField.h deleted file mode 100644 index 8f1e75b7c..000000000 --- a/include/crpropa/magneticField/AMRMagneticField.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef CRPROPA_AMRMAGNETICFIELD_H -#define CRPROPA_AMRMAGNETICFIELD_H - -#ifdef CRPROPA_HAVE_SAGA - -#include -#include -#include - -#ifdef _OPENMP - #include "omp.h" -#endif - -#include "crpropa/Units.h" -#include "crpropa/magneticField/MagneticField.h" -#include "crpropa/Vector3.h" - -#include "kiss/logger.h" - -#include "saga/LocalProperties.h" -#include "saga/AMRgrid.h" -#include "saga/MagneticField.h" -#include "saga/Referenced.h" - - - -namespace crpropa { -/** - * \addtogroup MagneticFields - * @{ - */ - -/** - @class AMRMagneticField - @brief Wrapper for saga::MagneticField - Can be found in github.com/rafaelab/saga - - Deprecation Warning: - As SAGA (SQLite AMR Grid Application) is no longer supported, the AMRMagenticField - class will be removed in the future. - */ -class AMRMagneticField: public MagneticField { - -private: - saga::ref_ptr field; - double cfLength; - double cfDensity; - double cfMagneticField; - -public: - /** Constructor - @param field_ saga magnetic field - @param convLength rescaling length - @param convDensity rescaling density - @param convMagneticField rescaling magnetic field strength -*/ - AMRMagneticField(saga::ref_ptr field_, double convLength, double convDensity, double convMagneticField) - { - field = field_; - cfLength = convLength; - cfDensity = convDensity; - cfMagneticField = convMagneticField; - - KISS_LOG_WARNING << "DEPRECATION WARNING: AMRMagneticField class will be removed in the future," - <<"as the underlying library (saga) is no longer supported."; - } - - Vector3d getField(const Vector3d &position) const { - - double x = position.x / cfLength; - double y = position.y / cfLength; - double z = position.z / cfLength; - - std::vector b = field->getField(x, y, z); - Vector3d B; - B.setXYZ(b[0], b[1], b[2]); - B = B * cfMagneticField; - - return B; - } - -}; -/** @} */ - -} // namespace crpropa - -#endif // CRPROPA_HAVE_SAGA -#endif // CRPROPA_AMRMAGNETICFIELD_H diff --git a/python/2_headers.i b/python/2_headers.i index 4ada108e5..808ae7b95 100644 --- a/python/2_headers.i +++ b/python/2_headers.i @@ -446,7 +446,6 @@ using namespace crpropa; // for usage of namespace in header files, necessary %include "crpropa/magneticField/GalacticMagneticField.h" %feature("notabstract") QuimbyMagneticFieldAdapter; %include "crpropa/magneticField/QuimbyMagneticField.h" -%include "crpropa/magneticField/AMRMagneticField.h" %include "crpropa/magneticField/JF12Field.h" %include "crpropa/magneticField/JF12FieldSolenoidal.h" %include "crpropa/magneticField/PolarizedSingleModeMagneticField.h" From 68e4732f1009625d3236d575e3417a1d87866280 Mon Sep 17 00:00:00 2001 From: mertelx Date: Mon, 8 Jan 2024 17:06:15 +0100 Subject: [PATCH 4/5] Remove ObserverPoint: Was deprecated in version 3.2.1 --- CHANGELOG.md | 2 ++ include/crpropa/module/Observer.h | 13 ------------- src/module/Observer.cpp | 17 ----------------- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffd856c6e..bf972ce31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## CRPropa vNext ### Bug fixes: + * Fixed sign for exponential decay of magn. field strength with Galactic height in LogarithmicSpiralField ### New features: @@ -10,6 +11,7 @@ ### Removed features * AMRMagneticField - underlying library (saga) is no longer supported. +* ObserverPoint: Use Observer1D instead. ### New plugins and resources linked on the webpages diff --git a/include/crpropa/module/Observer.h b/include/crpropa/module/Observer.h index adf7c8fc4..0de4ce5d3 100644 --- a/include/crpropa/module/Observer.h +++ b/include/crpropa/module/Observer.h @@ -121,19 +121,6 @@ class ObserverTracking: public ObserverFeature { }; -/** - @class ObserverPoint - @brief Detects particles when reaching x = 0 - -Should be removed and replaced by Observer1D - */ -class ObserverPoint: public ObserverFeature { -public: - DetectionState checkDetection(Candidate *candidate) const; - std::string getDescription() const; -}; - - /** @class Observer1D @brief Detects particles when reaching x = 0 diff --git a/src/module/Observer.cpp b/src/module/Observer.cpp index c600dce50..067ca71a1 100644 --- a/src/module/Observer.cpp +++ b/src/module/Observer.cpp @@ -133,23 +133,6 @@ std::string ObserverTracking::getDescription() const { return ss.str(); } -// ObserverPoint -------------------------------------------------------------- -DetectionState ObserverPoint::checkDetection(Candidate *candidate) const { - KISS_LOG_WARNING << "ObserverPoint is deprecated and is no longer supported. Please use Observer1D instead.\n"; - double x = candidate->current.getPosition().x; - if (x > 0) { - // Limits the next step size to prevent candidates from overshooting in case of non-detection - candidate->limitNextStep(x); - return NOTHING; - } - // Detects particles when reaching x = 0 - return DETECTED; -} - -std::string ObserverPoint::getDescription() const { - return "ObserverPoint: observer at x = 0"; -} - // Observer1D -------------------------------------------------------------- DetectionState Observer1D::checkDetection(Candidate *candidate) const { double x = candidate->current.getPosition().x; From 6ab72c79f4f29f8a071d2b3b0699f7f13d1c822c Mon Sep 17 00:00:00 2001 From: mertelx Date: Tue, 9 Jan 2024 08:49:47 +0100 Subject: [PATCH 5/5] clean up, fixing typos, updating version in doc --- README.md | 2 +- doc/conf.py | 4 ++-- doc/pages/Data-files.md | 4 ++-- doc/pages/Installation.md | 4 ---- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b89e9cf81..e55b42521 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ CRPropa ======== -![stable release](https://img.shields.io/badge/stable\_release-3.2.0-darkblue) +![stable release](https://img.shields.io/badge/stable\_release-3.2.1-darkblue) [![Build status](https://github.com/crpropa/crpropa3/actions/workflows/testing.yml/badge.svg)](https://github.com/crpropa/crpropa3/actions/) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/CRPropa/CRPropa3.svg)](https://isitmaintained.com/project/CRPropa/CRPropa3) [![Percentage of issues still open](https://isitmaintained.com/badge/open/CRPropa/CRPropa3.svg)](https://isitmaintained.com/project/CRPropa/CRPropa3) diff --git a/doc/conf.py b/doc/conf.py index 318d59305..5c5e2d677 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -19,13 +19,13 @@ # -- Project information ----------------------------------------------------- project = u'CRPropa3' -copyright = u'2022, The CRPropa Developers' +copyright = u'2024, The CRPropa Developers' author = u'The CRPropa Developers' # The short X.Y version version = u'3.2' # The full version, including alpha/beta/rc tags -release = u'3.2.0' +release = u'3.2.1' # -- General configuration --------------------------------------------------- diff --git a/doc/pages/Data-files.md b/doc/pages/Data-files.md index ba8f312be..77552d70b 100644 --- a/doc/pages/Data-files.md +++ b/doc/pages/Data-files.md @@ -1,4 +1,4 @@ -CRPropa needs a number of data files to run. These include databases for nuclear mass and decay rates, interaction rates for photodisintegration, photo-pion production and electron-pair production, as well as the data files for DINT and EleCa. +CRPropa needs a number of data files to run. These include databases for nuclear mass and decay rates, interaction rates for photodisintegration, photo-pion production and electron-pair production. The scripts and files that are used to prepare the data files are tracked by the [CRPropa3-data repository](https://github.com/CRPropa/CRPropa3-data). Since a git repository is not well suited to store these large files (and git-lfs is not free on GitHub), the data files are downloaded automatically during cmake configuration. In case you want to use a different photodisintegration model or want to download the default data file manually use the following [link](https://www.desy.de/~crpropa/data/interaction_data/) to the tarballs files and extract them to your install folder. @@ -21,7 +21,7 @@ $ ls data-YYYY-MM-DD.tar.gz | xargs -I{} sh -c 'md5sum "$1" > "$1-CHECKSUM"' -- ``` where **YYYY-MM-DD** can be obtained directly with `date +"%Y-%m-%d"`. -To verify the integrity of the data files, a it is enough to download the checksum file in the same directory with the data file: +To verify the integrity of the data files, it is enough to download the checksum file in the same directory with the data file: ``` $ md5sum -c *-CHECKSUM ``` diff --git a/doc/pages/Installation.md b/doc/pages/Installation.md index 95170416d..eb638449f 100644 --- a/doc/pages/Installation.md +++ b/doc/pages/Installation.md @@ -22,7 +22,6 @@ Optionally CRPropa can be compiled with the following dependencies to enable cer The following packages are provided with the source code and do not need to be installed separately. + SOPHIA: photo-hadronic interactions -+ EleCa and dint: electromagnetic cascades + googletest: unit-testing + HepPID: particle ID library + kiss: small tool collection @@ -31,9 +30,6 @@ The following packages are provided with the source code and do not need to be i + healpix_base: Equal area pixelization of the sphere - - - ## Build and Installation Variants ### Installation in system path