35 lines
777 B
C++
35 lines
777 B
C++
//
|
|
// postive_drift.h
|
|
// mc_electron
|
|
//
|
|
// Created by Christian Reiling on 04.07.19.
|
|
// Copyright © 2019 Christian Reiling. All rights reserved.
|
|
//
|
|
|
|
#ifndef postive_drift_h
|
|
#define postive_drift_h
|
|
|
|
#include "drift_base.h"
|
|
|
|
|
|
class Positive_Mover_Drift : public Drift_Base {
|
|
public:
|
|
Positive_Mover_Drift(species this_species, Particle_Logger_Base *Logger, Population_Base *Population) : Drift_Base(this_species, Logger, Population) {};
|
|
|
|
protected:
|
|
void doWallInteraction(Particle *movePart, vec3 *oldLoc_m, double *znew_m);
|
|
};
|
|
|
|
|
|
void Positive_Mover_Drift::doWallInteraction(Particle *movePart, vec3 *oldLoc_m, double *znew_m) {
|
|
if (*znew_m >= z_WGTS_end_m) {
|
|
*znew_m = z_WGTS_end_m;
|
|
}
|
|
if (*znew_m <= z_RW_m) {
|
|
*znew_m = z_RW_m;
|
|
}
|
|
}
|
|
|
|
|
|
#endif /* postive_drift_h */
|