IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 4a7d7f14 authored by ralfulrich's avatar ralfulrich
Browse files

fixed NullModel

parent 83117902
No related branches found
No related tags found
No related merge requests found
...@@ -14,21 +14,23 @@ ...@@ -14,21 +14,23 @@
#include <corsika/setup/SetupTrajectory.h> #include <corsika/setup/SetupTrajectory.h>
using namespace corsika; using namespace corsika;
using namespace corsika::process::null_model; namespace corsika::process::null_model {
void corsika::process::null_model::NullModel::Init() {} void NullModel::Init() {}
NullModel::NullModel(units::si::LengthType maxStepLength) NullModel::NullModel(units::si::LengthType maxStepLength)
: fMaxStepLength(maxStepLength) {} : fMaxStepLength(maxStepLength) {}
template <> template <>
process::EProcessReturn NullModel::DoContinuous(setup::Stack::ParticleType&, process::EProcessReturn NullModel::DoContinuous(setup::Stack::ParticleType&,
setup::Trajectory&, setup::Stack&) const { setup::Trajectory&) const {
return process::EProcessReturn::eOk; return process::EProcessReturn::eOk;
} }
template <> template <>
units::si::LengthType NullModel::MaxStepLength(setup::Stack::ParticleType&, units::si::LengthType NullModel::MaxStepLength(setup::Stack::ParticleType&,
setup::Trajectory&) const { setup::Trajectory&) const {
return fMaxStepLength; return fMaxStepLength;
} }
} // namespace corsika::process::null_model
...@@ -25,8 +25,8 @@ namespace corsika::process::null_model { ...@@ -25,8 +25,8 @@ namespace corsika::process::null_model {
void Init(); void Init();
template <typename Particle, typename Track, typename Stack> template <typename Particle, typename Track>
process::EProcessReturn DoContinuous(Particle&, Track&, Stack&) const; process::EProcessReturn DoContinuous(Particle&, Track&) const;
template <typename Particle, typename Track> template <typename Particle, typename Track>
corsika::units::si::LengthType MaxStepLength(Particle&, Track&) const; corsika::units::si::LengthType MaxStepLength(Particle&, Track&) const;
......
...@@ -55,7 +55,7 @@ TEST_CASE("NullModel", "[processes]") { ...@@ -55,7 +55,7 @@ TEST_CASE("NullModel", "[processes]") {
model.Init(); model.Init();
[[maybe_unused]] const process::EProcessReturn ret = [[maybe_unused]] const process::EProcessReturn ret =
model.DoContinuous(particle, track, stack); model.DoContinuous(particle, track);
LengthType const length = model.MaxStepLength(particle, track); LengthType const length = model.MaxStepLength(particle, track);
CHECK((length / 10_m) == Approx(1)); CHECK((length / 10_m) == Approx(1));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment