Version 2, position dependent E/B, kinetic ions, boris mover, terminator
This commit is contained in:
Executable
+65
@@ -0,0 +1,65 @@
|
||||
#ifndef PARTICLE_H
|
||||
#define PARTICLE_H
|
||||
|
||||
#include "blitz/array.h"
|
||||
#include "simulation/coordinates.h"
|
||||
#include "simulation/species.h"
|
||||
|
||||
namespace particle {
|
||||
|
||||
class Particle {
|
||||
public:
|
||||
// Particle(std::shared_ptr<species::TrackedSpecie> specie,
|
||||
// Coordinate* position,
|
||||
// Vector* velocity);
|
||||
Particle(std::shared_ptr<species::TrackedSpecie> specie,
|
||||
const Coordinate& position,
|
||||
const Vector& velocity);
|
||||
|
||||
void position(const Coordinate& new_position);
|
||||
CartesianCoordinate position() const;
|
||||
|
||||
void velocity(const CartesianVector& new_velocity);
|
||||
CartesianVector velocity() const;
|
||||
|
||||
void move(const Coordinate& distance);
|
||||
|
||||
double kineticEnergy_eV() const;
|
||||
double absoluteVelocity() const;
|
||||
double absoluteVelocitySquared() const;
|
||||
|
||||
double mass_kg() const;
|
||||
double charge_C() const;
|
||||
|
||||
species::TrackedSpecie* specie() const;
|
||||
|
||||
static void lastId(long int id);
|
||||
static long int lastId(); // only local on this cpu
|
||||
|
||||
void increaseInteractionCounter();
|
||||
long int interactionCounter() const;
|
||||
|
||||
void increaseTimeAlive(double time_s);
|
||||
double timeAlive() const;
|
||||
|
||||
void increaseTimeInBin(double time_s);
|
||||
void resetTimeInBin();
|
||||
double timeInBin() const;
|
||||
|
||||
private:
|
||||
CartesianVector velocity_;
|
||||
CartesianCoordinate position_;
|
||||
|
||||
double time_alive_s_;
|
||||
double time_in_bin_s_;
|
||||
long int interaction_counter_;
|
||||
|
||||
std::shared_ptr<species::TrackedSpecie> specie_;
|
||||
long int id_;
|
||||
|
||||
static long int last_id_; // only local on this cpu
|
||||
};
|
||||
|
||||
}; // namespace particle
|
||||
|
||||
#endif /* PARTICLE_H */
|
||||
Reference in New Issue
Block a user