26 lines
869 B
C++
Executable File
26 lines
869 B
C++
Executable File
#include "interactions/free_movement.h"
|
|
|
|
#include "constants/sim_constants.h"
|
|
|
|
namespace interaction {
|
|
|
|
FreeMovement::FreeMovement()
|
|
: Interaction(std::function<double(double)>([](double x) { return 0.; }),
|
|
nullptr) {}
|
|
|
|
InteractionOutput FreeMovement::performInteraction(particle::Particle& particle,
|
|
RandomNumbers* generator) {
|
|
DEBUG_LEVEL_3("Perform free movement.");
|
|
// do nothing
|
|
return InteractionOutput();
|
|
}
|
|
|
|
double FreeMovement::microscopicCrossSection(double energy_eV) {
|
|
// returns very small number
|
|
return SimConstants::minimal_cross_section;
|
|
}
|
|
double FreeMovement::macroscopicCrossSection(particle::Particle& particle) {
|
|
// returns a very small number, so the interaction will only be
|
|
return SimConstants::minimal_macroscopic_cross_section;
|
|
}
|
|
}; // namespace interaction
|