IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 4fbecb2a authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

maxStepLength as parameter for NullModel

parent 7ef1ee01
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ endif()
# enable warnings and disallow non-standard language
set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wno-ignored-qualifiers")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g")
# clang produces a lot of unecessary warnings without this:
add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-Wno-nonportable-include-path>")
......
......@@ -47,7 +47,8 @@ namespace corsika::cascade {
void Run() {
while (!fStack.IsEmpty()) {
while (!fStack.IsEmpty()) {
Particle& pNext = *fStack.GetNextParticle();
auto pNext = fStack.GetNextParticle();
//std::cout << pNext
Step(pNext);
}
// do cascade equations, which can put new particles on Stack,
......
......@@ -17,11 +17,11 @@
namespace corsika::process::null_model {
class NullModel : public corsika::process::ContinuousProcess<NullModel> {
corsika::units::si::LengthType fMaxStepLength{
corsika::units::si::meter * std::numeric_limits<double>::infinity()};
corsika::units::si::LengthType const fMaxStepLength;
public:
NullModel(corsika::units::si::LengthType maxStepLength)
NullModel(corsika::units::si::LengthType maxStepLength =
corsika::units::si::meter * std::numeric_limits<double>::infinity())
: fMaxStepLength(maxStepLength) {}
void Init();
......
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