updated version
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
//
|
||||
// Created by Christian Reiling on 13.09.18.
|
||||
//
|
||||
// Notes: Energy being calculated using speed and mass
|
||||
|
||||
#ifndef particle_h
|
||||
#define particle_h
|
||||
@@ -20,29 +21,28 @@ typedef enum species{electron, positron, proton, tritium, tritium2, helium, deut
|
||||
|
||||
using namespace blitz;
|
||||
|
||||
class particle
|
||||
class Particle
|
||||
{
|
||||
private:
|
||||
double m,q,E;
|
||||
double m,q;
|
||||
TinyVector<double,3> x,v;
|
||||
species s;
|
||||
long int id;
|
||||
public:
|
||||
|
||||
virtual ~particle() { }
|
||||
particle(){}
|
||||
particle(double mass, double charge, double energy,TinyVector<double,3> loc, TinyVector<double,3> speed, double idnum, species spec)
|
||||
virtual ~Particle() { }
|
||||
Particle(){}
|
||||
Particle(double mass, double charge,TinyVector<double,3> loc, TinyVector<double,3> speed, double idnum, species spec)
|
||||
{
|
||||
m = mass;
|
||||
q = charge;
|
||||
E = energy;
|
||||
x = loc;
|
||||
v = speed;
|
||||
id = idnum;
|
||||
s = spec;
|
||||
}
|
||||
|
||||
//particle(Array<double, 1> props); //Create from Array
|
||||
//Particle(Array<double, 1> props); //Create from Array
|
||||
|
||||
double mass() { return(m); }
|
||||
double charge() { return(q); }
|
||||
@@ -55,8 +55,7 @@ public:
|
||||
TinyVector<double, 3> locSet(TinyVector<double, 3> xneu) { return x = xneu; };
|
||||
TinyVector<double, 3> speedSet(TinyVector<double, 3> vneu);
|
||||
|
||||
|
||||
|
||||
friend ostream& operator<<(ostream& os, const Particle& partOut);
|
||||
|
||||
/*
|
||||
void copyol(particle*);
|
||||
@@ -67,6 +66,9 @@ public:
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
class particle_info : public particle {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user