Skip to content

Commit e0e9d9f

Browse files
committed
Remove writing of particles_info table
1 parent c54bbab commit e0e9d9f

1 file changed

Lines changed: 2 additions & 48 deletions

File tree

include/picongpu/plugins/openPMD/WriteSpecies.hpp

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ namespace openPMD
520520

521521
/* write species counter table to openPMD storage */
522522
log< picLog::INPUT_OUTPUT >(
523-
"openPMD: (begin) writing particle index table for %1%" ) %
523+
"openPMD: (begin) writing particle patches for %1%" ) %
524524
T_SpeciesFilter::getName();
525525
{
526526
using index_t = uint64_t;
@@ -562,59 +562,13 @@ namespace openPMD
562562
extent_x.store< index_t >( mpiRank, patchExtent[ d ] );
563563
}
564564

565-
// legacy from here one
566-
567-
constexpr uint64_t localTableSize = 5;
568-
569-
GridController< simDim > & gc =
570-
Environment< simDim >::get().GridController();
571-
572-
const size_t pos_offset = 2;
573-
574-
/* particlesMetaInfo = (num particles, scalar position, particle
575-
* offset x, y, z) */
576-
std::shared_ptr< uint64_t > particlesMetaInfo{
577-
new uint64_t[ localTableSize ]{
578-
myNumParticles, gc.getScalarPosition(), 0, 0, 0 },
579-
[]( uint64_t * ptr ) { delete[] ptr; }
580-
};
581-
auto particlesMetaInfoPtr = particlesMetaInfo.get();
582-
for( size_t d = 0; d < simDim; ++d )
583-
{
584-
particlesMetaInfoPtr[ pos_offset + d ] =
585-
particleOffset[ d ];
586-
}
587-
588-
/* prevent that top (y) gpus have negative value here */
589-
if( gc.getPosition().y() == 0 )
590-
particlesMetaInfoPtr[ pos_offset + 1 ] = 0;
591-
592-
if( particleOffset[ 1 ] < 0 ) // 1 == y
593-
particlesMetaInfoPtr[ pos_offset + 1 ] = 0;
594-
595-
::openPMD::RecordComponent recordComponent =
596-
particleSpecies[ "particles_info" ]
597-
[::openPMD::RecordComponent::SCALAR ];
598-
599-
params
600-
->initDataset< DIM1 >(
601-
recordComponent,
602-
datatype,
603-
{ localTableSize * uint64_t( gc.getGlobalSize() ) },
604-
true,
605-
params->compressionMethod )
606-
.template storeChunk(
607-
particlesMetaInfo,
608-
{ localTableSize * uint64_t( gc.getGlobalRank() ) },
609-
{ localTableSize } );
610-
611565
/* openPMD ED-PIC: additional attributes */
612566
setParticleAttributes( iteration );
613567
params->openPMDSeries->flush();
614568
}
615569

616570
log< picLog::INPUT_OUTPUT >(
617-
"openPMD: ( end ) writing particle index table for %1%" ) %
571+
"openPMD: ( end ) writing particle patches for %1%" ) %
618572
T_SpeciesFilter::getName();
619573
}
620574
};

0 commit comments

Comments
 (0)