aboutsummaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/ParticleProb.cpp17
-rw-r--r--Python/pywarpx/AMReX.py3
-rw-r--r--Python/pywarpx/Particles.py15
3 files changed, 17 insertions, 18 deletions
diff --git a/Python/ParticleProb.cpp b/Python/ParticleProb.cpp
deleted file mode 100644
index 71a2118c9..000000000
--- a/Python/ParticleProb.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-
-//
-// Each problem must have its own version of PhysicalParticleContainer::InitData()
-// to initialize the particle data. It must also initialize charge and mass.
-//
-
-#include <ParticleContainer.H>
-#include <WarpXConst.H>
-
-using namespace amrex;
-
-void
-PhysicalParticleContainer::InitData()
-{
- charge = -PhysConst::q_e;
- mass = PhysConst::m_e;
-}
diff --git a/Python/pywarpx/AMReX.py b/Python/pywarpx/AMReX.py
index e84c240af..0cf9290b8 100644
--- a/Python/pywarpx/AMReX.py
+++ b/Python/pywarpx/AMReX.py
@@ -6,7 +6,7 @@ from .Geometry import geometry
from .Algo import algo
from .Langmuirwave import langmuirwave
from .Interpolation import interpolation
-from .Particles import particles
+from .Particles import particles, electrons
import ctypes
from ._libwarpx import libwarpx
@@ -23,6 +23,7 @@ class AMReX(object):
argv += langmuirwave.attrlist()
argv += interpolation.attrlist()
argv += particles.attrlist()
+ argv += electrons.attrlist()
amrex_init(argv)
diff --git a/Python/pywarpx/Particles.py b/Python/pywarpx/Particles.py
index a11da823d..a166b029e 100644
--- a/Python/pywarpx/Particles.py
+++ b/Python/pywarpx/Particles.py
@@ -1,3 +1,18 @@
from .Bucket import Bucket
particles = Bucket('particles')
+
+electrons = Bucket('electrons')
+electrons.charge = "-q_e"
+electrons.mass = "m_e"
+electrons.injection_style = "python"
+
+positrons = Bucket('positrons')
+positrons.charge = "q_e"
+positrons.mass = "m_e"
+positrons.injection_style = "python"
+
+protons = Bucket('protons')
+protons.charge = "q_e"
+protons.mass = "m_p"
+protons.injection_style = "python"