Important PIConGPU Classes
This is very, very small selection of classes of interest to get you started.
Simulation
-
class Simulation : public pmacc::SimulationHelper<simDim>
Global simulation controller class.
Initialises simulation data and defines the simulation steps for each iteration.
- Template Parameters:
DIM – the dimension (2-3) for the simulation
Public Functions
-
Simulation() = default
Constructor.
-
inline virtual void pluginRegisterHelp(po::options_description &desc) override
Register command line parameters for this plugin.
Parameters are parsed and set prior to plugin load.
- Parameters:
desc – boost::program_options description
-
inline virtual void startSimulation() override
Begin the simulation.
-
inline nlohmann::json metadata() const
-
inline virtual std::string pluginGetName() const override
Return the name of this plugin for status messages.
- Returns:
plugin name
-
inline virtual void pluginLoad() override
-
inline virtual void pluginUnload() override
-
inline virtual void notify(uint32_t) override
Notification callback.
For example Plugins can set their requested notification frequency at the PluginConnector
- Parameters:
currentStep – current simulation iteration step
-
inline virtual void init() override
Initialize simulation.
Does hardware selections/reservations, memory allocations and initializes data structures as empty.
-
inline virtual uint32_t fillSimulation() override
Fills simulation with initial data after init()
- Returns:
returns the first step of the simulation (can be >0 for, e.g., restarts from checkpoints)
-
inline virtual void runOneStep(uint32_t currentStep) override
Run one simulation step.
- Parameters:
currentStep – iteration number of the current step
-
inline virtual void movingWindowCheck(uint32_t currentStep) override
Check if moving window work must do.
If no moving window is needed the implementation of this function can be empty
- Parameters:
currentStep – simulation step
-
inline virtual void resetAll(uint32_t currentStep) override
Reset the simulation to a state such as it was after init() but for a specific time step.
Can be used to call fillSimulation() again.
-
inline void slide(uint32_t currentStep)
-
inline virtual void setInitController(IInitPlugin *initController)
-
inline MappingDesc *getMappingDescription()
FieldE
-
class FieldE : public picongpu::fields::EMFieldBase
Representation of the electric field.
Stores field values on host and device and provides data synchronization between them.
Implements interfaces defined by SimulationFieldHelper< MappingDesc > and ISimulationData.
FieldB
-
class FieldB : public picongpu::fields::EMFieldBase
Representation of the magnetic field.
Stores field values on host and device and provides data synchronization between them.
Implements interfaces defined by SimulationFieldHelper< MappingDesc > and ISimulationData.
FieldJ
-
class FieldJ : public pmacc::SimulationFieldHelper<MappingDesc>, public pmacc::ISimulationData
Representation of the current density field.
Stores field values on host and device and provides data synchronization between them.
Implements interfaces defined by SimulationFieldHelper< MappingDesc > and ISimulationData.
FieldTmp
-
class FieldTmp : public pmacc::SimulationFieldHelper<MappingDesc>, public pmacc::ISimulationData
Representation of the temporary scalar field for plugins and temporary particle data mapped to grid (charge density, energy density, etc.)
Stores field values on host and device and provides data synchronization between them.
Implements interfaces defined by SimulationFieldHelper< MappingDesc > and ISimulationData.
Particles
-
template<typename T_Name, typename T_Flags, typename T_Attributes>
class Particles : public pmacc::ParticlesBase<ParticleDescription<T_Name, std::integral_constant<uint32_t, numFrameSlots>, SuperCellSize, T_Attributes, T_Flags, pmacc::mp_if<pmacc::mp_contains<T_Flags, GetKeyFromAlias<T_Flags, boundaryCondition<>>::type>, pmacc::traits::Resolve<GetKeyFromAlias<T_Flags, boundaryCondition<>>::type>::type, pmacc::HandleGuardRegion<pmacc::particles::policies::ExchangeParticles, pmacc::particles::policies::DoNothing>>>, MappingDesc, DeviceHeap>, public pmacc::ISimulationData particle species
- Template Parameters:
T_Name – name of the species [type PMACC_CSTRING]
T_Attributes – sequence with attributes [type boost::mp11 list]
T_Flags – sequence with flags e.g. solver [type boost::mp11 list]
Public Types
-
using SpeciesParticleDescription = pmacc::ParticleDescription<T_Name, std::integral_constant<uint32_t, numFrameSlots>, SuperCellSize, T_Attributes, T_Flags, pmacc::mp_if<pmacc::mp_contains<T_Flags, typename GetKeyFromAlias<T_Flags, boundaryCondition<>>::type>, typename pmacc::traits::Resolve<typename GetKeyFromAlias<T_Flags, boundaryCondition<>>::type>::type, pmacc::HandleGuardRegion<pmacc::particles::policies::ExchangeParticles, pmacc::particles::policies::DoNothing>>>
-
using ParticlesBaseType = ParticlesBase<SpeciesParticleDescription, picongpu::MappingDesc, DeviceHeap>
-
using FrameType = typename ParticlesBaseType::FrameType
-
using FrameTypeBorder = typename ParticlesBaseType::FrameTypeBorder
-
using ParticlesBoxType = typename ParticlesBaseType::ParticlesBoxType
Public Functions
-
void createParticleBuffer()
-
void update(uint32_t const currentStep)
Push all particles.
-
template<typename T_MapperFactory>
inline void shiftBetweenSupercells(T_MapperFactory const &mapperFactory, bool onlyProcessMustShiftSupercells) Update the supercell storage for particles in the area according to particle attributes.
- Template Parameters:
T_MapperFactory – factory type to construct a mapper that defines the area to process
- Parameters:
mapperFactory – factory instance
onlyProcessMustShiftSupercells – whether to process only supercells with mustShift set to true (optimization to be used with particle pusher) or process all supercells
-
void applyBoundary(uint32_t const currentStep)
Apply all boundary conditions.
-
template<typename T_SrcName, typename T_SrcAttributes, typename T_SrcFlags, typename T_ManipulateFunctor, typename T_SrcFilterFunctor>
void deviceDeriveFrom(Particles<T_SrcName, T_SrcAttributes, T_SrcFlags> &src, T_ManipulateFunctor &manipulateFunctor, T_SrcFilterFunctor &srcFilterFunctor)
-
virtual SimulationDataId getUniqueId() override
Return the globally unique identifier for this simulation data.
- Returns:
globally unique identifier
-
virtual void synchronize() override
Synchronizes simulation data, meaning accessing (host side) data will return up-to-date values.
-
virtual void syncToDevice() override
Synchronize data from host to device.
-
template<typename T_Pusher>
void push(uint32_t const currentStep) Do the particle push stage using the given pusher.
- Template Parameters:
T_Pusher – non-composite pusher type
- Parameters:
currentStep – current time iteration
Public Static Functions
-
static inline std::array<particles::boundary::Description, simDim> &boundaryDescription()
Get boundary descriptions for the species.
For both sides along the same axis, both boundaries have the same description. Must not be modified outside of the ParticleBoundaries simulation stage.
This method is static as it is used by static getStringProperties().
ComputeGridValuePerFrame
-
template<class T_ParticleShape, class T_DerivedAttribute>
class ComputeGridValuePerFrame Public Types
-
using AssignmentFunction = typename T_ParticleShape::ChargeAssignment
-
using LowerMargin = typename pmacc::math::CT::make_Int<simDim, lowerMargin>::type
-
using UpperMargin = typename pmacc::math::CT::make_Int<simDim, upperMargin>::type
Public Functions
-
HDINLINE ComputeGridValuePerFrame() = default
- HDINLINE float1_64 getUnit () const
return unit for this solver
- Returns:
solver unit
- HINLINE std::vector< float_64 > getUnitDimension () const
return powers of the 7 base measures for this solver
characterizing the unit of the result of the solver in SI (length L, mass M, time T, electric current I, thermodynamic temperature theta, amount of substance N, luminous intensity J)
- template<typename T_Particle, typename TVecSuperCell, typename BoxTmp, typename T_Worker, typename T_AccFilter> DINLINE void operator() (T_Worker const &worker, T_Particle &particle, TVecSuperCell const superCell, T_AccFilter &accFilter, BoxTmp &tmpBox)
Public Static Functions
- static HINLINE std::string getName ()
return name of the this solver
- Returns:
name of solver
-
using AssignmentFunction = typename T_ParticleShape::ChargeAssignment