aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Axel Huebl <axel.huebl@plasma.ninja> 2019-09-11 16:06:07 -0700
committerGravatar Axel Huebl <axel.huebl@plasma.ninja> 2019-09-11 16:06:07 -0700
commitd6f8ce933459c52552772ae8bba683ec2e8cb3ad (patch)
tree402b290423f05b7e8b7a1621b3626534e5ccde43 /Source/Particles/WarpXParticleContainer.cpp
parent54ae07546fd5fd8fe3fa11cc3031f5140a1d2949 (diff)
downloadWarpX-d6f8ce933459c52552772ae8bba683ec2e8cb3ad.tar.gz
WarpX-d6f8ce933459c52552772ae8bba683ec2e8cb3ad.tar.zst
WarpX-d6f8ce933459c52552772ae8bba683ec2e8cb3ad.zip
Source: tabs2spaces
Manually fix tabs to four spaces and alignments for consistent prepresentation of source code over all machines.
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.cpp')
-rw-r--r--Source/Particles/WarpXParticleContainer.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp
index 83de9fb0e..6de7a6011 100644
--- a/Source/Particles/WarpXParticleContainer.cpp
+++ b/Source/Particles/WarpXParticleContainer.cpp
@@ -108,7 +108,7 @@ WarpXParticleContainer::ReadParameters ()
static bool initialized = false;
if (!initialized)
{
- ParmParse pp("particles");
+ ParmParse pp("particles");
#ifdef AMREX_USE_GPU
do_tiling = false; // By default, tiling is off on GPU
@@ -118,7 +118,7 @@ WarpXParticleContainer::ReadParameters ()
pp.query("do_tiling", do_tiling);
pp.query("do_not_push", do_not_push);
- initialized = true;
+ initialized = true;
}
}
@@ -168,28 +168,28 @@ WarpXParticleContainer::AddOneParticle (ParticleTileType& particle_tile,
void
WarpXParticleContainer::AddNParticles (int lev,
int n, const Real* x, const Real* y, const Real* z,
- const Real* vx, const Real* vy, const Real* vz,
- int nattr, const Real* attr, int uniqueparticles, int id)
+ const Real* vx, const Real* vy, const Real* vz,
+ int nattr, const Real* attr, int uniqueparticles, int id)
{
BL_ASSERT(nattr == 1);
const Real* weight = attr;
int ibegin, iend;
if (uniqueparticles) {
- ibegin = 0;
- iend = n;
+ ibegin = 0;
+ iend = n;
} else {
- int myproc = ParallelDescriptor::MyProc();
- int nprocs = ParallelDescriptor::NProcs();
- int navg = n/nprocs;
- int nleft = n - navg * nprocs;
- if (myproc < nleft) {
- ibegin = myproc*(navg+1);
- iend = ibegin + navg+1;
- } else {
- ibegin = myproc*navg + nleft;
- iend = ibegin + navg;
- }
+ int myproc = ParallelDescriptor::MyProc();
+ int nprocs = ParallelDescriptor::NProcs();
+ int navg = n/nprocs;
+ int nleft = n - navg * nprocs;
+ if (myproc < nleft) {
+ ibegin = myproc*(navg+1);
+ iend = ibegin + navg+1;
+ } else {
+ ibegin = myproc*navg + nleft;
+ iend = ibegin + navg;
+ }
}
// Add to grid 0 and tile 0
@@ -206,12 +206,12 @@ WarpXParticleContainer::AddNParticles (int lev,
for (int i = ibegin; i < iend; ++i)
{
ParticleType p;
- if (id==-1)
- {
- p.id() = ParticleType::NextID();
- } else {
- p.id() = id;
- }
+ if (id==-1)
+ {
+ p.id() = ParticleType::NextID();
+ } else {
+ p.id() = id;
+ }
p.cpu() = ParallelDescriptor::MyProc();
#if (AMREX_SPACEDIM == 3)
p.pos(0) = x[i];