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
1 merge request!91Resolve "define further classes of processes (MaintenanceProcess?)"
......@@ -14,21 +14,23 @@
#include <corsika/setup/SetupTrajectory.h>
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)
: fMaxStepLength(maxStepLength) {}
NullModel::NullModel(units::si::LengthType maxStepLength)
: fMaxStepLength(maxStepLength) {}
template <>
process::EProcessReturn NullModel::DoContinuous(setup::Stack::ParticleType&,
setup::Trajectory&, setup::Stack&) const {
return process::EProcessReturn::eOk;
}
template <>
process::EProcessReturn NullModel::DoContinuous(setup::Stack::ParticleType&,
setup::Trajectory&) const {
return process::EProcessReturn::eOk;
}
template <>
units::si::LengthType NullModel::MaxStepLength(setup::Stack::ParticleType&,
setup::Trajectory&) const {
return fMaxStepLength;
}
template <>
units::si::LengthType NullModel::MaxStepLength(setup::Stack::ParticleType&,
setup::Trajectory&) const {
return fMaxStepLength;
}
} // namespace corsika::process::null_model
......@@ -25,8 +25,8 @@ namespace corsika::process::null_model {
void Init();
template <typename Particle, typename Track, typename Stack>
process::EProcessReturn DoContinuous(Particle&, Track&, Stack&) const;
template <typename Particle, typename Track>
process::EProcessReturn DoContinuous(Particle&, Track&) const;
template <typename Particle, typename Track>
corsika::units::si::LengthType MaxStepLength(Particle&, Track&) const;
......
......@@ -55,7 +55,7 @@ TEST_CASE("NullModel", "[processes]") {
model.Init();
[[maybe_unused]] const process::EProcessReturn ret =
model.DoContinuous(particle, track, stack);
model.DoContinuous(particle, track);
LengthType const length = model.MaxStepLength(particle, track);
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