Skip to content

Commit

Permalink
Particles: initGas -> initDensityProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Jan 11, 2017
1 parent 0d64c3c commit 151c23b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/picongpu/include/particles/InitFunctors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct CreateDensity
auto speciesPtr = tuple[SpeciesName()];
DensityFunctor densityFunctor(currentStep);
PositionFunctor positionFunctor(currentStep);
speciesPtr->initGas(densityFunctor, positionFunctor, currentStep);
speciesPtr->initDensityProfile(densityFunctor, positionFunctor, currentStep);
}
};

Expand Down
4 changes: 2 additions & 2 deletions src/picongpu/include/particles/Particles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class Particles : public ParticlesBase<

void update(uint32_t currentStep);

template<typename T_GasFunctor, typename T_PositionFunctor>
void initGas(T_GasFunctor& gasFunctor, T_PositionFunctor& positionFunctor, const uint32_t currentStep);
template<typename T_DensityFunctor, typename T_PositionFunctor>
void initDensityProfile(T_DensityFunctor& densityFunctor, T_PositionFunctor& positionFunctor, const uint32_t currentStep);

template<
typename T_SrcName,
Expand Down
14 changes: 8 additions & 6 deletions src/picongpu/include/particles/Particles.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,19 @@ template<
typename T_Attributes,
typename T_Flags
>
template<typename T_GasFunctor, typename T_PositionFunctor>
template<typename T_DensityFunctor, typename T_PositionFunctor>
void
Particles<
T_Name,
T_Attributes,
T_Flags
>::initGas( T_GasFunctor& gasFunctor,
T_PositionFunctor& positionFunctor,
const uint32_t currentStep )
>::initDensityProfile(
T_DensityFunctor& densityFunctor,
T_PositionFunctor& positionFunctor,
const uint32_t currentStep
)
{
log<picLog::SIMULATION_STATE > ( "initialize gas profile for species %1%" ) % FrameType::getName( );
log<picLog::SIMULATION_STATE > ( "initialize density profile for species %1%" ) % FrameType::getName( );

const uint32_t numSlides = MovingWindow::getInstance( ).getSlideCounter( currentStep );
const SubGrid<simDim>& subGrid = Environment<simDim>::get( ).SubGrid( );
Expand All @@ -288,7 +290,7 @@ Particles<
AreaMapping<CORE+BORDER,MappingDesc> mapper(this->cellDescription);
PMACC_KERNEL( KernelFillGridWithParticles< Particles >{} )
(mapper.getGridDim(), block)
( gasFunctor, positionFunctor, totalGpuCellOffset, this->particlesBuffer->getDeviceParticleBox( ), mapper );
( densityFunctor, positionFunctor, totalGpuCellOffset, this->particlesBuffer->getDeviceParticleBox( ), mapper );


this->fillAllGaps( );
Expand Down

0 comments on commit 151c23b

Please sign in to comment.