diff --git a/.clang-tidy b/.clang-tidy index c1c5f1b64a..1e317982ae 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -48,6 +48,6 @@ CheckOptions: performance-move-const-arg.CheckTriviallyCopyableMove: false performance-move-const-arg.CheckMoveToConstRef: false -HeaderFilterRegex: '(example|app|src/(accel|celeritas|corecel|orange|geocel))/.*\.hh$' +HeaderFilterRegex: '(app|src/(accel|celeritas|corecel|orange|geocel))/.*\.hh$' FormatStyle: file ... diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 1035083d59..b274cb6799 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -70,7 +70,7 @@ jobs: with: ref: ${{env.SPACK_REF}} buildcache: true - color: true + color: true path: spack-src - name: Initialize spack environment run: | @@ -149,7 +149,7 @@ jobs: BASE=$(git merge-base origin/${BASE_REF} HEAD) ALL_FILES=$(git diff --name-only --diff-filter=ACM "$BASE" HEAD) set +e - CC_FILES=$(grep -E '^(src|app|example)/.*\.cc$' - <<< "$ALL_FILES") + CC_FILES=$(grep -E '^(src|app)/.*\.cc$' - <<< "$ALL_FILES") set -e if [ -z "$CC_FILES" ]; then echo "No files to run clang-tidy on." @@ -208,6 +208,8 @@ jobs: (matrix.special != 'asanlite') && (matrix.special != 'clang-tidy') }} + env: + CELER_DISABLE_ACCEL_EXAMPLES: 1 # Only run minimal example run: | . ${SPACK_VIEW}/rc CELER_INSTALL_DIR=${PWD}/build ./scripts/ci/test-examples.sh @@ -228,11 +230,13 @@ jobs: ./bin/celer-sim --version - name: Build examples # TODO: ASAN requires flags downstream - env: + env: CELER_DISABLE_ACCEL_EXAMPLES: >- ${{ ( (matrix.special == 'minimal') || (matrix.special == 'float') + || (matrix.geometry == 'geant4') + || !matrix.geant ) && '1' || '' }} if: >- diff --git a/.github/workflows/build-ultralite.yml b/.github/workflows/build-ultralite.yml index e598dd2c28..8618191e92 100644 --- a/.github/workflows/build-ultralite.yml +++ b/.github/workflows/build-ultralite.yml @@ -21,7 +21,7 @@ jobs: run: | sudo apt-get -q -y update sudo apt-get -q -y install \ - ccache cmake ninja-build + ccache cmake ninja-build nlohmann-json3-dev - name: Check out Celeritas uses: actions/checkout@v4 - name: Cache ccache diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 7974ef8b01..b978090db0 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -8,7 +8,8 @@ concurrency: cancel-in-progress: true env: - celer_upload_doc: >- + CMAKE_PRESET: doc + CELER_UPLOAD_DOC: >- ${{ github.ref_name == 'develop' || contains(github.ref_name, 'backports/') || contains(github.head_ref, 'release-') @@ -17,13 +18,16 @@ env: jobs: dev: + env: + CELER_TARGET: doxygen + CELER_UPLOAD_DIR: build/doc/doxygen-html runs-on: ubuntu-latest steps: - name: Install dependencies run: | sudo apt-get -y update sudo apt-get -y install \ - cmake graphviz ninja-build doxygen gcc + cmake graphviz ninja-build doxygen nlohmann-json3-dev - name: Check out Celeritas uses: actions/checkout@v4 with: @@ -33,25 +37,22 @@ jobs: # Turn warnings into errors only for PRs # Disable expensive graphs for PRs also run: | + ln -fs scripts/cmake-presets/ci-ubuntu-github.json CMakeUserPresets.json mkdir build && cd build - cmake \ - -DCELERITAS_BUILD_DOCS=ON \ - -DCELERITAS_DOXYGEN_BUILD_TESTS=ON \ - ${{ github.workflow == 'pr' + cmake --preset=${CMAKE_PRESET} --log-level=VERBOSE \ + ${{ github.workflow == 'pull_request' && '-DDOXYGEN_WARN_AS_ERROR="YES" -DDOXYGEN_HAVE_DOT="NO"' || ''}} \ - -GNinja \ .. - name: Build documentation - working-directory: build run: | - ninja doxygen - find doc/doxygen-html -name '*.md5' -exec rm {} + + cmake --build --preset=${CMAKE_PRESET} --target ${CELER_TARGET} + find ${CELER_UPLOAD_DIR} -name '*.md5' -exec rm {} + - name: Upload artifacts - if: ${{env.celer_upload_doc}} + if: ${{env.CELER_UPLOAD_DOC}} uses: actions/upload-artifact@v4 with: - path: build/doc/doxygen-html + path: ${{env.CELER_UPLOAD_DIR}} name: doc-dev if-no-files-found: error overwrite: true @@ -59,12 +60,15 @@ jobs: user: runs-on: ubuntu-latest + env: + CELER_TARGET: doc + CELER_UPLOAD_DIR: build/doc/html steps: - name: Install dependencies run: | sudo apt-get -y update sudo apt-get -y install \ - cmake graphviz ninja-build doxygen gcc + cmake graphviz ninja-build doxygen nlohmann-json3-dev - uses: actions/setup-python@v5 with: python-version: '3.10' @@ -79,24 +83,22 @@ jobs: pip install -r scripts/doc-requirements.txt - name: Configure celeritas run: | + ln -fs scripts/cmake-presets/ci-ubuntu-github.json CMakeUserPresets.json mkdir build && cd build - cmake \ - -DCELERITAS_BUILD_DOCS=ON \ - -DDOXYGEN_HAVE_DOT="NO" \ - ${{ github.workflow == 'pr' + cmake --preset=${CMAKE_PRESET} --log-level=VERBOSE \ + ${{ github.workflow == 'pull_request' && '-DDOXYGEN_WARN_AS_ERROR="YES" -DCELERITAS_SPHINX_USER_HTML_ARGS="-W;--keep-going"' || ''}} \ - -GNinja .. - - name: Build user documentation - working-directory: build + .. + - name: Build documentation run: | - ninja doc - find doc/html -name '*.md5' -exec rm {} + + cmake --build --preset=${CMAKE_PRESET} --target ${CELER_TARGET} + find ${CELER_UPLOAD_DIR} -name '*.md5' -exec rm {} + - name: Upload artifacts - if: ${{env.celer_upload_doc}} + if: ${{env.CELER_UPLOAD_DOC}} uses: actions/upload-artifact@v4 with: - path: build/doc/html + path: ${{env.CELER_UPLOAD_DIR}} name: doc-user if-no-files-found: error overwrite: true diff --git a/doc/implementation/geant4-interface.rst b/doc/implementation/geant4-interface.rst index 1ea40bf274..cc446d394e 100644 --- a/doc/implementation/geant4-interface.rst +++ b/doc/implementation/geant4-interface.rst @@ -45,6 +45,20 @@ Celeritas. They are also necessary to set up the GPU offloading characteristics. Future versions of Celeritas will automate more of these settings. +By default, sensitive detectors are automatically mapped from Geant4 to +Celeritas using the ``enabled`` option of +:cpp:struct:`celeritas::SDSetupOptions`. If no SDs are present (e.g., in a test +problem, or one which has only a "stepping manager" which is not presently +compatible with Celeritas), the Celeritas setup will fail with an error like: + +.. code-block:: none + + *** G4Exception : celer0001 + issued by : accel/detail/HitManager.cc:210 + Celeritas runtime error: no G4 sensitive detectors are defined: set `SetupOptions.sd.enabled` to `false` if this is expected + *** Fatal Exception *** core dump *** + + .. doxygenstruct:: celeritas::SetupOptions :members: :no-link: @@ -81,6 +95,8 @@ Interface utilities .. doxygenclass:: celeritas::ExceptionConverter +.. doxygenstruct:: celeritas::AlongStepFactoryInput + .. doxygenclass:: celeritas::AlongStepFactoryInterface diff --git a/example/accel/fastsim-offload.cc b/example/accel/fastsim-offload.cc index 0469086098..eed6408888 100644 --- a/example/accel/fastsim-offload.cc +++ b/example/accel/fastsim-offload.cc @@ -73,6 +73,10 @@ class DetectorConstruction final : public G4VUserDetectorConstruction "Aluminium", 13., 26.98 * g / mole, 2.700 * g / cm3}} { setup_options.make_along_step = celeritas::UniformAlongStepFactory(); + + // NOTE: since no SD is enabled, we must manually disable Celeritas hit + // processing + setup_options.sd.enabled = false; } G4VPhysicalVolume* Construct() final diff --git a/example/accel/simple-offload.cc b/example/accel/simple-offload.cc index 88c94b73a1..32fdb2e4c9 100644 --- a/example/accel/simple-offload.cc +++ b/example/accel/simple-offload.cc @@ -69,7 +69,10 @@ class DetectorConstruction final : public G4VUserDetectorConstruction "Aluminium", 13., 26.98 * g / mole, 2.700 * g / cm3}} { setup_options.make_along_step = celeritas::UniformAlongStepFactory(); - setup_options.geometry_output_file = "simple-example.gdml"; + + // NOTE: since no SD is enabled, we must manually disable Celeritas hit + // processing + setup_options.sd.enabled = false; } G4VPhysicalVolume* Construct() final diff --git a/example/accel/trackingmanager-offload.cc b/example/accel/trackingmanager-offload.cc index 3887d42c07..90c1d3c30f 100644 --- a/example/accel/trackingmanager-offload.cc +++ b/example/accel/trackingmanager-offload.cc @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -48,6 +49,7 @@ #include #include #include +#include #include #include @@ -64,6 +66,32 @@ G4ThreadLocal celeritas::LocalTransporter local_transporter; // Simple interface to running celeritas G4ThreadLocal celeritas::SimpleOffload simple_offload; +class SensitiveDetector final : public G4VSensitiveDetector +{ + public: + explicit SensitiveDetector(std::string name) + : G4VSensitiveDetector{std::move(name)} + { + } + + double edep() const { return edep_; } + + protected: + void Initialize(G4HCofThisEvent*) final { edep_ = 0; } + bool ProcessHits(G4Step* step, G4TouchableHistory*) final + { + CELER_ASSERT(step); + edep_ += step->GetTotalEnergyDeposit(); + return true; + } + + private: + double edep_{0}; +}; + +// Simple (not best practice) way of accessing SD +G4ThreadLocal SensitiveDetector const* global_sd{nullptr}; + //---------------------------------------------------------------------------// class DetectorConstruction final : public G4VUserDetectorConstruction { @@ -73,6 +101,9 @@ class DetectorConstruction final : public G4VUserDetectorConstruction "Aluminium", 13., 26.98 * g / mole, 2.700 * g / cm3}} { setup_options.make_along_step = celeritas::UniformAlongStepFactory(); + + // Export a GDML file with the problem setup and SDs + setup_options.geometry_output_file = "simple-example.gdml"; } G4VPhysicalVolume* Construct() final @@ -80,13 +111,24 @@ class DetectorConstruction final : public G4VUserDetectorConstruction CELER_LOG_LOCAL(status) << "Setting up detector"; auto* box = new G4Box("world", 1000 * cm, 1000 * cm, 1000 * cm); auto* lv = new G4LogicalVolume(box, aluminum_, "world"); + world_lv_ = lv; auto* pv = new G4PVPlacement( 0, G4ThreeVector{}, lv, "world", nullptr, false, 0); return pv; } + void ConstructSDandField() final + { + auto* sd_manager = G4SDManager::GetSDMpointer(); + auto detector = std::make_unique("example-sd"); + world_lv_->SetSensitiveDetector(detector.get()); + global_sd = detector.get(); + sd_manager->AddNewDetector(detector.release()); + } + private: - G4Material* aluminum_; + G4Material* aluminum_{nullptr}; + G4LogicalVolume* world_lv_{nullptr}; }; //---------------------------------------------------------------------------// @@ -156,6 +198,19 @@ class EventAction final : public G4UserEventAction { simple_offload.BeginOfEventAction(event); } + void EndOfEventAction(G4Event const* event) final + { + // Log total energy deposition + if (global_sd) + { + CELER_LOG(info) << "Total energy deposited: " + << (global_sd->edep() / CLHEP::MeV) << " MeV"; + } + else + { + CELER_LOG(error) << "Global SD was not set"; + } + } }; //---------------------------------------------------------------------------// diff --git a/scripts/ci/test-examples.sh b/scripts/ci/test-examples.sh index f6c6c12df0..450cbad250 100755 --- a/scripts/ci/test-examples.sh +++ b/scripts/ci/test-examples.sh @@ -32,12 +32,15 @@ build_local() { ninja } +export CELER_LOG=debug CELER_LOG_LOCAL=debug + +# Run minimal example cd "${CELER_SOURCE_DIR}/example/minimal" build_local ./minimal - -if [ -z "CELER_DISABLE_ACCEL_EXAMPLES" ]; then +# Run Geant4 app example(s) +if [ -z "${CELER_DISABLE_ACCEL_EXAMPLES}" ]; then cd "${CELER_SOURCE_DIR}/example/accel" build_local ctest -V --no-tests=error diff --git a/scripts/cmake-presets/ci-ubuntu-github.json b/scripts/cmake-presets/ci-ubuntu-github.json index 7a40df8f80..b11dfbccaf 100644 --- a/scripts/cmake-presets/ci-ubuntu-github.json +++ b/scripts/cmake-presets/ci-ubuntu-github.json @@ -34,6 +34,17 @@ "CMAKE_INSTALL_PREFIX": "${sourceDir}/install" } }, + { + "name": "doc", + "inherits": ["base"], + "displayName": "Build only documentation", + "cacheVariables": { + "CELERITAS_BUILD_DOCS": {"type": "BOOL", "value": "ON"}, + "CELERITAS_DEBUG": {"type": "BOOL", "value": "OFF"}, + "CELERITAS_DOXYGEN_BUILD_TESTS": {"type": "BOOL", "value": "ON"}, + "CELERITAS_USE_PNG": {"type": "BOOL", "value": "OFF"} + } + }, { "name": "spack", "inherits": ["base"], @@ -157,6 +168,18 @@ } } ], + "buildPresets": [ + { + "name": "base", + "configurePreset": "base", + "nativeToolOptions": ["-k0"], + "verbose": true + }, + { + "name": "doc", + "inherits": "base" + } + ], "testPresets": [ { "name": "base", diff --git a/src/celeritas/em/data/CommonCoulombData.hh b/src/celeritas/em/data/CommonCoulombData.hh index e8ae40612f..275ee0aed4 100644 --- a/src/celeritas/em/data/CommonCoulombData.hh +++ b/src/celeritas/em/data/CommonCoulombData.hh @@ -17,7 +17,10 @@ namespace celeritas /*! * Physics IDs for MSC. * - * TODO these will probably be changed to a map over all particle IDs. + * \todo If we want to extend this *generally*, we should have an array (length + * \c ParticleParams::size() ) that maps IDs to "model parameters". For + * example, electrons and positrons probably map to the same ID. Light ions and + * protons probably do as well. */ struct CoulombIds { diff --git a/src/celeritas/em/distribution/MuAngularDistribution.hh b/src/celeritas/em/distribution/MuAngularDistribution.hh index e0819830b3..e032045d1b 100644 --- a/src/celeritas/em/distribution/MuAngularDistribution.hh +++ b/src/celeritas/em/distribution/MuAngularDistribution.hh @@ -12,7 +12,7 @@ #include "corecel/math/Algorithms.hh" #include "celeritas/Constants.hh" #include "celeritas/Quantities.hh" -#include "celeritas/random//distribution/GenerateCanonical.hh" +#include "celeritas/random/distribution/UniformRealDistribution.hh" namespace celeritas { @@ -35,8 +35,8 @@ namespace celeritas r_{\text{max}} = frac{\pi}{2} E' / m \min(1, E' / \epsilon), * \f] * and where \f$ m \f$ is the incident muon mass, \f$ E \f$ is incident energy, - * \$ \epsilon \f$ is the emitted energy, \f$ E' = E - \epsilon \f$, and \f$ - * \xi \sim U(0,1) \f$. + * \f$ \epsilon \f$ is the emitted energy, + * \f$ E' = E - \epsilon \f$, and \f$ \xi \sim U(0,1) \f$. * * \note This performs the same sampling routine as in Geant4's \c * G4ModifiedMephi class and documented in section 11.2.4 of the Geant4 Physics @@ -64,7 +64,7 @@ class MuAngularDistribution // Incident particle Lorentz factor real_type gamma_; // r_max^2 / (1 + r_max^2) - real_type a_over_xi_; + UniformRealDistribution sample_a_; }; //---------------------------------------------------------------------------// @@ -80,11 +80,10 @@ MuAngularDistribution::MuAngularDistribution(Energy inc_energy, : gamma_(1 + value_as(inc_energy) / value_as(inc_mass)) { real_type r_max_sq = ipow<2>( - gamma_ * constants::pi * real_type(0.5) - * min( - 1, - gamma_ * value_as(inc_mass) / value_as(energy) - 1)); - a_over_xi_ = r_max_sq / (1 + r_max_sq); + real_type(0.5) * constants::pi * gamma_ + * min(real_type(1), + gamma_ * value_as(inc_mass) / value_as(energy) - 1)); + sample_a_ = {0, r_max_sq / (1 + r_max_sq)}; } //---------------------------------------------------------------------------// @@ -94,7 +93,7 @@ MuAngularDistribution::MuAngularDistribution(Energy inc_energy, template CELER_FUNCTION real_type MuAngularDistribution::operator()(Engine& rng) { - real_type a = generate_canonical(rng) * a_over_xi_; + real_type a = sample_a_(rng); return std::cos(std::sqrt(a / (1 - a)) / gamma_); } diff --git a/src/celeritas/em/distribution/WentzelDistribution.hh b/src/celeritas/em/distribution/WentzelDistribution.hh index f0bca16ed9..55d55e972f 100644 --- a/src/celeritas/em/distribution/WentzelDistribution.hh +++ b/src/celeritas/em/distribution/WentzelDistribution.hh @@ -25,9 +25,7 @@ namespace celeritas { //---------------------------------------------------------------------------// /*! - * Helper class for \c CoulombScatteringInteractor . - * - * Samples the polar scattering angle for the Wentzel Coulomb scattering model. + * Sample the polar scattering angle cosine for Wentzel Coulomb scattering. * * This chooses between sampling scattering off an electron or nucleus based on * the relative cross sections. Electron scattering angle imposes a maximum @@ -37,12 +35,17 @@ namespace celeritas * nuclear cross sections (calculated by \c WentzelHelper) and nuclear form * factors (see \c ExpNuclearFormFactor, \c GaussianNuclearFormFactor, and \c * UUNuclearFormFactor ) that describe an approximate spatial charge - * distribution of the nucleus. + * distribution of the nucleus. The class is used by \c + * CoulombScatteringInteractor . * * The polar angle distribution is given in [Fern] eqn 88 and is normalized on the interval * \f$ cos\theta \in [\cos\theta_\mathrm{min}, \cos\theta_\mathrm{max}] \f$. - * The sampling function for \f$ \mu = \frac{1}{2}(1 - \cos\theta) \f$ is + * The sampling function for the angular deflection + * \f[ + * \mu(\theta) \equiv \frac{1}{2}(1 - \cos\theta) + * \f] + * is * \f[ \mu = \mu_1 + \frac{(A + \mu_1) \xi (\mu_2 - \mu_1)}{A + \mu_2 - \xi (\mu_2 - \mu_1)}, @@ -173,7 +176,7 @@ WentzelDistribution::WentzelDistribution( //---------------------------------------------------------------------------// /*! - * Sample the polar scattered angle of the incident particle. + * Sample the cosine polar scattered angle of the incident particle. */ template CELER_FUNCTION real_type WentzelDistribution::operator()(Engine& rng) const diff --git a/src/celeritas/em/xs/NuclearFormFactors.hh b/src/celeritas/em/xs/NuclearFormFactors.hh index c92079bd07..0a0ade2a1e 100644 --- a/src/celeritas/em/xs/NuclearFormFactors.hh +++ b/src/celeritas/em/xs/NuclearFormFactors.hh @@ -151,7 +151,7 @@ class GaussianNuclearFormFactor : public ExpNuclearFormFactor * [FMS93] J.M. Fernández-Varea, R. Mayol, F. Salvat, Cross sections for * elastic scattering of fast electrons and positrons by atoms, Nuclear * Instruments and Methods in Physics Research Section B: Beam - * Interactions with Materials and Atoms 82 (1993) 39–45. + * Interactions with Materials and Atoms 82 (1993) 39–45. * https://doi.org/10.1016/0168-583X(93)95079-K. */ class UUNuclearFormFactor : public NuclearFormFactorTraits diff --git a/src/celeritas/em/xs/WentzelHelper.hh b/src/celeritas/em/xs/WentzelHelper.hh index 7b1c54895b..9e17989f68 100644 --- a/src/celeritas/em/xs/WentzelHelper.hh +++ b/src/celeritas/em/xs/WentzelHelper.hh @@ -59,7 +59,7 @@ class WentzelHelper return screening_coefficient_; } - //! Get the Mott factor + //! Get the Mott factor (maximum, used for rejection) CELER_FUNCTION real_type mott_factor() const { return mott_factor_; } //! Get the multiplicative factor for the cross section @@ -102,7 +102,7 @@ class WentzelHelper calc_screening_coefficient(ParticleTrackView const& particle) const; // Calculate the screening coefficient R^2 for electrons - CELER_CONSTEXPR_FUNCTION real_type screen_r_sq_elec() const; + static CELER_CONSTEXPR_FUNCTION MomentumSq screen_r_sq_elec(); // Calculate the multiplicative factor for the cross section inline CELER_FUNCTION real_type @@ -195,6 +195,13 @@ CELER_FUNCTION real_type WentzelHelper::calc_xs_factor( /*! * Calculate the Moliere screening coefficient as in [PRM] eqn 8.51. * + * See Eq.32 in [Fern], referencing Bethe's re-derivation of Moliere + * scattering: + * Bethe, H. A. “Moliere’s Theory of Multiple Scattering.” Physical Review + * 89, no. 6 (March 15, 1953): 1256–66. + * https://doi.org/10.1103/PhysRev.89.1256. + * + * * \note The \c screenZ in Geant4 is equal to twice the screening coefficient. */ CELER_FUNCTION real_type WentzelHelper::calc_screening_coefficient( @@ -205,9 +212,11 @@ CELER_FUNCTION real_type WentzelHelper::calc_screening_coefficient( real_type sq_cbrt_z = fastpow(real_type(target_z_.get()), real_type{2} / 3); if (target_z_.get() > 1) { + // TODO: tau correction factor and "min" value are of unknown + // provenance. The equation in Fernandez 1993 has factor=1, no special + // casing for z=1, and no "min" for the correction real_type tau = value_as(particle.energy()) / value_as(particle.mass()); - // TODO: Reference for this factor? real_type factor = std::sqrt(tau / (tau + sq_cbrt_z)); correction = min(target_z_.get() * real_type{1.13}, @@ -218,7 +227,8 @@ CELER_FUNCTION real_type WentzelHelper::calc_screening_coefficient( * factor / particle.beta_sq()); } - return correction * this->screen_r_sq_elec() * sq_cbrt_z + return correction * sq_cbrt_z + * value_as(this->screen_r_sq_elec()) / value_as(particle.momentum_sq()); } @@ -237,14 +247,13 @@ CELER_FUNCTION real_type WentzelHelper::calc_screening_coefficient( C_{TF} = \frac{1}{2} \left(\frac{3\pi}{4}\right)^{2/3}. * \f] */ -CELER_CONSTEXPR_FUNCTION real_type WentzelHelper::screen_r_sq_elec() const +CELER_CONSTEXPR_FUNCTION auto WentzelHelper::screen_r_sq_elec() -> MomentumSq { //! Thomas-Fermi constant \f$ C_{TF} \f$ - constexpr real_type ctf = 0.8853413770001135; + constexpr Constant ctf{0.8853413770001135}; return native_value_to( - ipow<2>(constants::hbar_planck / (2 * ctf * constants::a0_bohr))) - .value(); + ipow<2>(constants::hbar_planck / (2 * ctf * constants::a0_bohr))); } //---------------------------------------------------------------------------// diff --git a/src/celeritas/random/RngReseed.cu b/src/celeritas/random/RngReseed.cu index 288cf4df07..4b13f72ff5 100644 --- a/src/celeritas/random/RngReseed.cu +++ b/src/celeritas/random/RngReseed.cu @@ -14,6 +14,7 @@ namespace celeritas { +#if !defined(__DOXYGEN__) || __DOXYGEN__ > 0x010908 //---------------------------------------------------------------------------// // KERNEL INTERFACE //---------------------------------------------------------------------------// @@ -36,4 +37,5 @@ void reseed_rng(DeviceCRef const& params, } //---------------------------------------------------------------------------// +#endif } // namespace celeritas diff --git a/src/celeritas/random/RngReseed.hh b/src/celeritas/random/RngReseed.hh index 8a4e12f5cb..c2b11a0b1e 100644 --- a/src/celeritas/random/RngReseed.hh +++ b/src/celeritas/random/RngReseed.hh @@ -28,7 +28,7 @@ void reseed_rng(HostCRef const&, StreamId, UniqueEventId); -#if !CELER_USE_DEVICE +#if !CELER_USE_DEVICE && (!defined(__DOXYGEN__) || __DOXYGEN__ > 0x010908) //---------------------------------------------------------------------------// /*! * Reinitialize the RNG states on device at the start of an event. diff --git a/test/celeritas/global/AlongStepTestBase.hh b/test/celeritas/global/AlongStepTestBase.hh index 9ac7faa55a..e592583b2e 100644 --- a/test/celeritas/global/AlongStepTestBase.hh +++ b/test/celeritas/global/AlongStepTestBase.hh @@ -3,7 +3,7 @@ // See the top-level COPYRIGHT file for details. // SPDX-License-Identifier: (Apache-2.0 OR MIT) //---------------------------------------------------------------------------// -//! \file celeritas/alongstepTestBase.hh +//! \file celeritas/global/AlongStepTestBase.hh //---------------------------------------------------------------------------// #pragma once