Skip to content
Snippets Groups Projects
Commit ff496c99 authored by Rafael Ravedutti's avatar Rafael Ravedutti
Browse files

Check particle capacity on ParticleDataHandling

parent 13dfc2c2
Branches
Tags
No related merge requests found
......@@ -175,14 +175,16 @@ public:
void deserializeImpl(IBlock *const, const BlockDataID&, mpi::RecvBuffer& buffer) {
int nlocal = ps->getTrackedVariableAsInteger("nlocal");
int particle_capacity = ps->getTrackedVariableAsInteger("particle_capacity");
real_t real_tmp;
int int_tmp;
uint_t nrecv;
buffer >> nrecv;
// TODO: Check if there is enough particle capacity for the new particles
// md_resize_recv_buffer_capacity((int) nparticles);
// TODO: Check if there is enough particle capacity for the new particles, when there is not,
// all properties and arrays which have particle_capacity as one of their dimensions must be reallocated
PAIRS_ASSERT(nlocal + nrecv < particle_capacity);
for(int i = 0; i < nrecv; ++i) {
for(auto &prop: ps->getProperties()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment