aboutsummaryrefslogtreecommitdiff
path: root/Source/ParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-02-04 18:30:26 -0800
committerGravatar MaxThevenet <mthevenet@lbl.gov> 2019-02-04 18:30:26 -0800
commita321b95b2f7fc48d295368e3d8772a3b8135328f (patch)
treefee1d6055e0d435f0321ecaea696609afda782d2 /Source/ParticleContainer.cpp
parent415bcd342181240b3c87e1ea3506c0e8118ef42e (diff)
downloadWarpX-a321b95b2f7fc48d295368e3d8772a3b8135328f.tar.gz
WarpX-a321b95b2f7fc48d295368e3d8772a3b8135328f.tar.zst
WarpX-a321b95b2f7fc48d295368e3d8772a3b8135328f.zip
added temporary PhysicalParticleContainer to the MultiParticleContainer. segfault at init
Diffstat (limited to 'Source/ParticleContainer.cpp')
-rw-r--r--Source/ParticleContainer.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/ParticleContainer.cpp b/Source/ParticleContainer.cpp
index 8aac692d6..8ca6b7614 100644
--- a/Source/ParticleContainer.cpp
+++ b/Source/ParticleContainer.cpp
@@ -28,6 +28,13 @@ MultiParticleContainer::MultiParticleContainer (AmrCore* amr_core)
if (WarpX::use_laser) {
allcontainers[n-1].reset(new LaserParticleContainer(amr_core,n-1));
}
+ // pc_tmp = WarpXParticleContainer(amr_core, 0);
+ // pc_tmp = std::unique_ptr<WarpXParticleContainer> (new WarpXParticleContainer(this));
+ pc_tmp.reset(new PhysicalParticleContainer(amr_core));
+ // pc_tmp = std::unique_ptr<WarpXParticleContainer> (new WarpXParticleContainer(amr_core, 0));
+ // pc_tmp = std::unique_ptr<PhysicalParticleContainer> (new PhysicalParticleContainer(amr_core));
+ // pc_tmp = std::unique_ptr<amrex::ParticleContainer<0,0,PIdx::nattribs>> (new amrex::ParticleContainer<0,0,PIdx::nattribs>);
+
}
void
@@ -81,6 +88,7 @@ MultiParticleContainer::AllocData ()
for (auto& pc : allcontainers) {
pc->AllocData();
}
+ pc_tmp->AllocData();
}
void
@@ -89,6 +97,7 @@ MultiParticleContainer::InitData ()
for (auto& pc : allcontainers) {
pc->InitData();
}
+ pc_tmp->InitData();
}
@@ -274,6 +283,7 @@ MultiParticleContainer::Redistribute ()
for (auto& pc : allcontainers) {
pc->Redistribute();
}
+ pc_tmp->Redistribute();
}
void
@@ -282,6 +292,7 @@ MultiParticleContainer::RedistributeLocal (const int num_ghost)
for (auto& pc : allcontainers) {
pc->Redistribute(0, 0, 0, num_ghost);
}
+ pc_tmp->Redistribute(0, 0, 0, num_ghost);
}
Vector<long>
@@ -305,6 +316,7 @@ MultiParticleContainer::Increment (MultiFab& mf, int lev)
for (auto& pc : allcontainers) {
pc->Increment(mf,lev);
}
+ pc_tmp->Increment(mf,lev);
}
void
@@ -313,6 +325,7 @@ MultiParticleContainer::SetParticleBoxArray (int lev, BoxArray& new_ba)
for (auto& pc : allcontainers) {
pc->SetParticleBoxArray(lev,new_ba);
}
+ pc_tmp->SetParticleBoxArray(lev,new_ba);
}
void
@@ -321,6 +334,7 @@ MultiParticleContainer::SetParticleDistributionMap (int lev, DistributionMapping
for (auto& pc : allcontainers) {
pc->SetParticleDistributionMap(lev,new_dm);
}
+ pc_tmp->SetParticleDistributionMap(lev,new_dm);
}
void
@@ -329,6 +343,7 @@ MultiParticleContainer::PostRestart ()
for (auto& pc : allcontainers) {
pc->PostRestart();
}
+ pc_tmp->PostRestart();
}
void