Important PIConGPU Classes¶
This is very, very small selection of classes of interest to get you started.
MySimulation¶
-
class
MySimulation
: 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
-
MySimulation
()¶ Constructor.
-
virtual void
pluginRegisterHelp
(po::options_description &desc)¶ Register command line parameters for this plugin.
Parameters are parsed and set prior to plugin load.
- Parameters
desc
: boost::program_options description
-
std::string
pluginGetName
() const¶ Return the name of this plugin for status messages.
- Return
plugin name
-
virtual void
pluginLoad
()¶
-
virtual void
pluginUnload
()¶
-
void
notify
(uint32_t currentStep)¶ Notification callback.
For example Plugins can set their requested notification frequency at the PluginConnector
- Parameters
currentStep
: current simulation iteration step
-
virtual void
init
()¶ Initialize simulation.
Does hardware selections/reservations, memory allocations and initializes data structures as empty.
-
virtual uint32_t
fillSimulation
()¶ Fills simulation with initial data after init()
- Return
returns the first step of the simulation (can be >0 for, e.g., restarts from checkpoints)
-
virtual void
runOneStep
(uint32_t currentStep)¶ Run one simulation step.
- Parameters
currentStep
: iteration number of the current step
-
virtual void
movingWindowCheck
(uint32_t currentStep)¶ 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
-
virtual void
resetAll
(uint32_t currentStep)¶ 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.
-
void
slide
(uint32_t currentStep)¶
-
virtual void
setInitController
(IInitPlugin *initController)¶
-
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
, typenameT_Flags
, typenameT_Attributes
>
classParticles
: public pmacc::ParticlesBase<ParticleDescription<T_Name, SuperCellSize, T_Attributes, T_Flags, bmpl::if_<bmpl::contains<T_Flags, GetKeyFromAlias<T_Flags, boundaryCondition<>>::type>, pmacc::traits::Resolve<GetKeyFromAlias<T_Flags, boundaryCondition<>>::type>::type, pmacc::HandleGuardRegion<pmacc::particles::policies::ExchangeParticles, particles::boundary::CallPluginsAndDeleteParticles>>::type>, MappingDesc, DeviceHeap>, public pmacc::ISimulationData¶ particle species
- Template Parameters
T_Name
: name of the species [type boost::mpl::string]T_Attributes
: sequence with attributes [type boost::mpl forward sequence]T_Flags
: sequence with flags e.g. solver [type boost::mpl forward sequence]
Public Types
-
template<>
usingSpeciesParticleDescription
= pmacc::ParticleDescription<T_Name, SuperCellSize, T_Attributes, T_Flags, typename bmpl::if_<bmpl::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, particles::boundary::CallPluginsAndDeleteParticles>>::type>¶
-
template<>
usingParticlesBaseType
= ParticlesBase<SpeciesParticleDescription, picongpu::MappingDesc, DeviceHeap>¶
-
template<>
usingFrameType
= typename ParticlesBaseType::FrameType¶
-
template<>
usingFrameTypeBorder
= typename ParticlesBaseType::FrameTypeBorder¶
-
template<>
usingParticlesBoxType
= typename ParticlesBaseType::ParticlesBoxType¶
Public Functions
-
void
createParticleBuffer
()¶
-
void
update
(uint32_t const currentStep)¶
-
template<typename
T_DensityFunctor
, typenameT_PositionFunctor
>
voidinitDensityProfile
(T_DensityFunctor &densityFunctor, T_PositionFunctor &positionFunctor, const uint32_t currentStep)¶
-
template<typename
T_SrcName
, typenameT_SrcAttributes
, typenameT_SrcFlags
, typenameT_ManipulateFunctor
, typenameT_SrcFilterFunctor
>
voiddeviceDeriveFrom
(Particles<T_SrcName, T_SrcAttributes, T_SrcFlags> &src, T_ManipulateFunctor &manipulateFunctor, T_SrcFilterFunctor &srcFilterFunctor)¶
-
SimulationDataId
getUniqueId
()¶ Return the globally unique identifier for this simulation data.
- Return
globally unique identifier
-
void
synchronize
()¶ Synchronizes simulation data, meaning accessing (host side) data will return up-to-date values.
-
void
syncToDevice
()¶ Synchronize data from host to device.
ComputeGridValuePerFrame¶
-
template<class
T_ParticleShape
, classT_DerivedAttribute
>
classComputeGridValuePerFrame
¶ Public Types
-
template<>
usingAssignmentFunction
= typename T_ParticleShape::ChargeAssignment¶
Public Functions
-
HDINLINE
ComputeGridValuePerFrame
()¶
-
HDINLINE float1_64 picongpu::particles::particleToGrid::ComputeGridValuePerFrame::getUnit() const
return unit for this solver
- Return
solver unit
-
HINLINE std::vector< float_64 > picongpu::particles::particleToGrid::ComputeGridValuePerFrame::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 FrameType, typename TVecSuperCell, typename BoxTmp, typename T_Acc>DINLINE void picongpu::particles::particleToGrid::ComputeGridValuePerFrame::operator()(T_Acc const & acc, FrameType & frame, const int localIdx, const TVecSuperCell superCell, BoxTmp & tmpBox)
Public Static Functions
-
HINLINE std::string picongpu::particles::particleToGrid::ComputeGridValuePerFrame::getName()
return name of the this solver
- Return
name of solver
-
template<>