diff --git a/src/ic_generator.cc b/src/ic_generator.cc index 7d5e8ac..0e3f506 100644 --- a/src/ic_generator.cc +++ b/src/ic_generator.cc @@ -436,20 +436,24 @@ int Run( ConfigFile& the_config ) if( the_output_plugin->write_species_as( this_species ) == output_type::particles ) { // if particles occupy a bcc lattice, then there are 2 x N^3 of them... - if( initial_bcc_lattice ) - particles.allocate( 2*num_p_in_load ); - else - particles.allocate( num_p_in_load ); - // generate particle IDs - auto ipcount0 = (initial_bcc_lattice? 2:1) * particles.get_local_offset(); + if( !initial_bcc_lattice ){ + particles.allocate( num_p_in_load ); + for( size_t i=0,ipcount=0; i