Changed mover to work with times instead of distance; Changed how interactions are done (recombination still tbd)
28 lines
959 B
C++
Executable File
28 lines
959 B
C++
Executable File
#include "interactions/charge_exchange.h"
|
|
|
|
#include "constants/physical_constants.h"
|
|
#include "simulation/drift_velocity.h"
|
|
#include "simulation/velocity_distribution.h"
|
|
|
|
namespace interaction {
|
|
|
|
ChargeExchange::ChargeExchange(std::function<double(double)> cross_section,
|
|
std::shared_ptr<species::Specie> target)
|
|
: Interaction(cross_section, target) {}
|
|
|
|
InteractionOutput ChargeExchange::performInteraction(
|
|
particle::Particle& particle,
|
|
RandomNumbers* generator) {
|
|
DEBUG_LEVEL_3("Perform charge exchange.");
|
|
|
|
// const auto x_impact = particle.position();
|
|
// const blitz::TinyVector<double, 3> v_target =
|
|
// target_->driftVelocity()->driftVelocity(x_impact).cartesianEntries() +
|
|
// target_->velocityDistribution()
|
|
// ->rollVelocity(x_impact, generator->engine())
|
|
// .cartesianEntries();
|
|
|
|
particle.velocity(CartesianVector(target_velocity_));
|
|
return InteractionOutput();
|
|
}
|
|
}; |