|
IPPL (Independent Parallel Particle Layer)
IPPL
|
#include <ChargedParticles.hpp>
Public Types | |
| typedef ippl::BConds< Field< T, Dim >, Dim > | bc_type |
| using | vector_type |
| using | index_type |
| using | particle_position_type |
| using | particle_index_type |
| using | Layout_t |
| using | attribute_type |
| using | container_type |
| using | attribute_container_type |
| using | bc_container_type |
| using | hash_container_type |
| using | size_type |
Public Member Functions | |
| ChargedParticles (PLayout &pl, Vector_t< double, Dim > hr, Vector_t< double, Dim > rmin, Vector_t< double, Dim > rmax, std::array< bool, Dim > isParallel, double Q, std::string solver) | |
| void | setPotentialBCs () |
| void | registerAttributes () |
| ~ChargedParticles () | |
| void | setupBCs () |
| void | updateLayout (FieldLayout_t< Dim > &fl, Mesh_t< Dim > &mesh, bool &isFirstRepartition) |
| void | initializeFields (Mesh_t< Dim > &mesh, FieldLayout_t< Dim > &fl) |
| void | initializeORB (FieldLayout_t< Dim > &fl, Mesh_t< Dim > &mesh) |
| void | repartition (FieldLayout_t< Dim > &fl, Mesh_t< Dim > &mesh, bool &isFirstRepartition) |
| bool | balance (size_type totalP, const unsigned int nstep) |
| void | gatherStatistics (size_type totalP) |
| void | gatherCIC () |
| void | scatterCIC (size_type totalP, unsigned int iteration, Vector_t< double, Dim > &hrField) |
| void | initSolver (const ippl::ParameterList &sp=ippl::ParameterList()) |
| void | runSolver () |
| template<typename Solver> | |
| void | initSolverWithParams (const ippl::ParameterList &sp) |
| void | initCGSolver (const ippl::ParameterList &sp_old) |
| void | initFFTSolver () |
| void | initTGSolver () |
| void | initOpenSolver () |
| void | dumpData () |
| VField_t< T, Dim >::HostMirror | getEMirror () const |
| void | updateEMirror (typename VField_t< T, Dim >::HostMirror &mirror) const |
| void | dumpLandau () |
| template<typename View> | |
| void | dumpLandau (const View &Eview) |
| void | dumpBumponTail () |
| void | dumpParticleData () |
| void | dumpLocalDomains (const FieldLayout_t< Dim > &fl, const unsigned int step) |
| void | initialize (Layout_t &layout) |
| size_type | getLocalNum () const |
| void | setLocalNum (size_type size) |
| size_type | getTotalNum () const |
| Layout_t & | getLayout () |
| const Layout_t & | getLayout () const |
| void | setParticleBC (const bc_container_type &bcs) |
| void | setParticleBC (BC bc) |
| void | addAttribute (detail::ParticleAttribBase< MemorySpace > &pa) |
| attribute_type< MemorySpace > * | getAttribute (size_t i) |
| void | forAllAttributes (Functor &&f) const |
| void | forAllAttributes (Functor &&f) |
| unsigned | getAttributeNum () const |
| void | create (size_type nLocal) |
| void | createWithID (index_type id) |
| void | globalCreate (size_type nTotal) |
| void | destroy (const Kokkos::View< bool *, Properties... > &invalid, const size_type destroyNum) |
| void | update () |
| void | internalDestroy (const Kokkos::View< bool *, Properties... > &invalid, const size_type destroyNum) |
| void | sendToRank (int rank, int tag, std::vector< MPI_Request > &requests, const HashType &hash) |
| void | recvFromRank (int rank, int tag, size_type nRecvs) |
| void | serialize (Archive &ar, size_type nsends) |
| void | deserialize (Archive &ar, size_type nrecvs) |
| size_type | packedSize (const size_type count) const |
| detail::size_type | packedSize (const size_type count) const |
Public Attributes | |
| VField_t< T, Dim > | E_m |
| Field_t< Dim > | rho_m |
| Field< T, Dim > | phi_m |
| bc_type | allPeriodic |
| ORB< T, Dim > | orb |
| Vector_t< T, Dim > | nr_m |
| Vector_t< double, Dim > | hr_m |
| Vector_t< double, Dim > | rmin_m |
| Vector_t< double, Dim > | rmax_m |
| std::string | stype_m |
| std::string | ptype_m |
| std::array< bool, Dim > | isParallel_m |
| double | Q_m |
| double | time_m |
| double | rhoNorm_m |
| unsigned int | loadbalancefreq_m |
| double | loadbalancethreshold_m |
| ParticleAttrib< double > | q |
| Base::particle_position_type | P |
| Base::particle_position_type | E |
| particle_position_type | R |
| view of particle positions | |
| particle_index_type | ID |
| view of particle IDs | |
Protected Member Functions | |
| void | pack (const hash_container_type &hash) |
| void | unpack (size_type nrecvs) |
Private Types | |
| using | Base = ippl::ParticleBase<PLayout> |
Private Member Functions | |
| void | setBCAllPeriodic () |
Private Attributes | |
| Solver_t< T, Dim > | solver_m |
| Layout_t * | layout_m |
| particle layout | |
| size_type | localNum_m |
| processor local number of particles | |
| size_type | totalNum_m |
| total number of particles (across all processes) | |
| attribute_container_type | attributes_m |
| all attributes | |
| index_type | nextID_m |
| next unique particle ID | |
| index_type | numNodes_m |
| number of MPI ranks | |
| hash_container_type | deleteIndex_m |
| buffers for particle partitioning | |
| hash_container_type | keepIndex_m |
Static Private Attributes | |
| static constexpr bool | EnableIDs |
Definition at line 192 of file ChargedParticles.hpp.
|
inherited |
Definition at line 104 of file ParticleBase.h.
|
inherited |
Definition at line 99 of file ParticleBase.h.
|
private |
Definition at line 193 of file ChargedParticles.hpp.
|
inherited |
Definition at line 107 of file ParticleBase.h.
| typedef ippl::BConds<Field<T, Dim>, Dim> ChargedParticles< PLayout, T, Dim >::bc_type |
Definition at line 200 of file ChargedParticles.hpp.
|
inherited |
Definition at line 102 of file ParticleBase.h.
|
inherited |
Definition at line 109 of file ParticleBase.h.
|
inherited |
Definition at line 92 of file ParticleBase.h.
|
inherited |
Definition at line 96 of file ParticleBase.h.
|
inherited |
Definition at line 94 of file ParticleBase.h.
|
inherited |
Definition at line 93 of file ParticleBase.h.
|
inherited |
Definition at line 111 of file ParticleBase.h.
|
inherited |
Definition at line 91 of file ParticleBase.h.
|
inline |
Definition at line 236 of file ChargedParticles.hpp.
References hr_m, isParallel_m, Q_m, registerAttributes(), rmax_m, rmin_m, setPotentialBCs(), setupBCs(), and stype_m.
|
inline |
Definition at line 268 of file ChargedParticles.hpp.
|
inherited |
Add particle attribute
| pa | attribute to be added to ParticleBase |
Referenced by ChargedParticles< PLayout, T, Dim >::registerAttributes().
|
inline |
Definition at line 332 of file ChargedParticles.hpp.
References ippl::Comm, ippl::ParticleBase< PLayout >::getLocalNum(), loadbalancefreq_m, loadbalancethreshold_m, and TestName.
|
inherited |
Create nLocal processor local particles. This is a collective call, i.e. all MPI ranks must call this.
| nLocal | number of local particles to be created |
|
inherited |
Create a new particle with a given ID. This is a collective call. If a process passes a negative number, it does not create a particle.
| id | particle identity number |
|
inherited |
Deserialize to do MPI calls.
| ar | archive |
|
inherited |
Particle deletion Function. Partition the particles into a valid region and an invalid region, effectively deleting the invalid particles. This is a collective call.
| invalid | View marking which indices are invalid |
| destroyNum | Total number of invalid particles |
|
inline |
Definition at line 717 of file ChargedParticles.hpp.
References Inform::APPEND, ippl::apply(), ippl::Comm, Dim, E_m, endl(), ippl::getRangePolicy(), hr_m, ippl::parallel_reduce(), Inform::precision(), Inform::setf(), and time_m.
|
inline |
Definition at line 583 of file ChargedParticles.hpp.
References Inform::APPEND, ippl::apply(), ippl::Comm, Dim, E_m, endl(), ippl::ParticleBase< PLayout >::getLocalNum(), ippl::getRangePolicy(), hr_m, P, ippl::parallel_reduce(), Inform::precision(), rho_m, rhoNorm_m, Inform::setf(), and time_m.
|
inline |
Definition at line 665 of file ChargedParticles.hpp.
References dumpLandau(), and E_m.
Referenced by dumpLandau().
|
inline |
Definition at line 668 of file ChargedParticles.hpp.
References Inform::APPEND, ippl::apply(), ippl::Comm, E_m, endl(), ippl::getRangePolicy(), hr_m, ippl::parallel_reduce(), Inform::precision(), Inform::setf(), and time_m.
|
inline |
Definition at line 797 of file ChargedParticles.hpp.
References ippl::Comm, Dim, and ippl::FieldLayout< Dim >::getHostLocalDomains().
|
inline |
Definition at line 772 of file ChargedParticles.hpp.
References ippl::Comm, Dim, endl(), ippl::ParticleBase< PLayout >::getLocalNum(), Inform::OVERWRITE, P, Inform::precision(), ippl::ParticleBase< PLayout >::R, and Inform::setf().
|
inlineinherited |
Definition at line 223 of file ParticleBase.h.
|
inlineinherited |
Calls a given function for all attributes in the bunch
| MemorySpace | the memory space of the attributes to visit (void to visit all of them) |
| Functor | the functor type |
| f | a functor taking a single ParticleAttrib<MemorySpace> |
Definition at line 211 of file ParticleBase.h.
|
inline |
Definition at line 386 of file ChargedParticles.hpp.
References E_m, and ippl::ParticleBase< PLayout >::R.
|
inline |
Definition at line 358 of file ChargedParticles.hpp.
References Inform::APPEND, ippl::Comm, endl(), ippl::ParticleBase< PLayout >::getLocalNum(), Inform::precision(), Inform::setf(), and time_m.
|
inlineinherited |
Get particle attribute
| i | attribute number in container |
Definition at line 199 of file ParticleBase.h.
|
inlineinherited |
Definition at line 240 of file ParticleBase.h.
|
inline |
Definition at line 655 of file ChargedParticles.hpp.
References E_m, and updateEMirror().
|
inlineinherited |
Definition at line 167 of file ParticleBase.h.
Referenced by ChargedParticles< PLayout, T, Dim >::updateLayout().
|
inlineinherited |
Definition at line 172 of file ParticleBase.h.
|
inlineinherited |
Definition at line 155 of file ParticleBase.h.
Referenced by ChargedParticles< PLayout, T, Dim >::balance(), ChargedParticles< PLayout, T, Dim >::dumpData(), ChargedParticles< PLayout, T, Dim >::dumpParticleData(), ChargedParticles< PLayout, T, Dim >::gatherStatistics(), and ChargedParticles< PLayout, T, Dim >::scatterCIC().
|
inlineinherited |
Definition at line 162 of file ParticleBase.h.
|
inherited |
Create nTotal particles globally, equally distributed among all processors. This is a collective call.
| nTotal | number of total particles to be created |
|
inline |
Definition at line 515 of file ChargedParticles.hpp.
References ippl::ParameterList::add(), ippl::ParameterList::get(), ippl::PoissonCG< Field< T, Dim >, Field_t< Dim > >::GRAD, initSolverWithParams(), ippl::ParameterList::merge(), ptype_m, and stype_m.
Referenced by initSolver().
|
inline |
Definition at line 531 of file ChargedParticles.hpp.
References ippl::ParameterList::add(), Dim, initSolverWithParams(), and ippl::p2p_pl.
Referenced by initSolver().
|
inherited |
Initialize the particle layout. Needs to be called when the ParticleBase instance is constructed with the default ctor.
|
inline |
Definition at line 295 of file ChargedParticles.hpp.
References allPeriodic, E_m, phi_m, rho_m, and stype_m.
|
inline |
Definition at line 304 of file ChargedParticles.hpp.
|
inline |
Definition at line 565 of file ChargedParticles.hpp.
References ippl::ParameterList::add(), Dim, initSolverWithParams(), and ippl::p2p_pl.
Referenced by initSolver().
|
inline |
Definition at line 435 of file ChargedParticles.hpp.
References endl(), initCGSolver(), initFFTSolver(), initOpenSolver(), initTGSolver(), and stype_m.
|
inline |
Definition at line 495 of file ChargedParticles.hpp.
References E_m, std::get(), phi_m, rho_m, and solver_m.
Referenced by initCGSolver(), initFFTSolver(), initOpenSolver(), and initTGSolver().
|
inline |
Definition at line 548 of file ChargedParticles.hpp.
References ippl::ParameterList::add(), Dim, initSolverWithParams(), and ippl::p2p_pl.
Referenced by initSolver().
|
inherited |
|
protectedinherited |
Fill attributes of buffer.
| buffer | to send |
| hash | function to access index. |
|
inherited |
Determine the total space necessary to store a certain number of particles
| MemorySpace | only consider attributes stored in this memory space |
| count | particle number |
|
inherited |
Definition at line 328 of file ParticleBase.hpp.
|
inherited |
Receives particles from another rank
| rank | the source rank |
| tag | the MPI tag |
| recvNum | the number of messages already received (to distinguish the buffers) |
| nRecvs | the number of particles to receive |
|
inline |
Definition at line 261 of file ChargedParticles.hpp.
References ippl::ParticleBase< PLayout >::addAttribute().
Referenced by ChargedParticles().
|
inline |
Definition at line 308 of file ChargedParticles.hpp.
References Dim, std::get(), orb, ippl::ParticleBase< PLayout >::R, rho_m, solver_m, stype_m, and updateLayout().
|
inline |
Definition at line 450 of file ChargedParticles.hpp.
References Inform::APPEND, ippl::Comm, Dim, endl(), std::get(), ippl::PoissonCG< FieldLHS, FieldRHS >::getIterationCount(), ippl::PoissonCG< FieldLHS, FieldRHS >::getResidue(), ptype_m, ippl::PoissonCG< FieldLHS, FieldRHS >::solve(), solver_m, stype_m, and time_m.
|
inline |
Definition at line 388 of file ChargedParticles.hpp.
References ippl::Vector< T, Dim >::begin(), ippl::Comm, Dim, ippl::Vector< T, Dim >::end(), endl(), ippl::ParticleBase< PLayout >::getLocalNum(), IpplTimings::getTimer(), q, Q_m, ippl::ParticleBase< PLayout >::R, rho_m, rhoNorm_m, rmax_m, rmin_m, IpplTimings::startTimer(), IpplTimings::stopTimer(), and stype_m.
|
inherited |
Sends particles to another rank
| HashType | the hash view type |
| rank | the destination rank |
| tag | the MPI tag |
| sendNum | the number of messages already sent (to distinguish the buffers) |
| requests | destination vector in which to store the MPI requests for polling purposes |
| hash | a hash view indicating which particles need to be sent to which rank |
|
inherited |
Serialize to do MPI calls.
| ar | archive |
|
inlineprivate |
Definition at line 814 of file ChargedParticles.hpp.
References ippl::PERIODIC, and ippl::ParticleBase< PLayout >::setParticleBC().
Referenced by setupBCs().
|
inlineinherited |
Definition at line 157 of file ParticleBase.h.
|
inlineinherited |
Set all boundary conditions to this BC
| bc | the boundary conditions |
Definition at line 184 of file ParticleBase.h.
|
inlineinherited |
Set all boundary conditions
| bc | the boundary conditions |
Definition at line 178 of file ParticleBase.h.
Referenced by ChargedParticles< PLayout, T, Dim >::setBCAllPeriodic().
|
inline |
Definition at line 251 of file ChargedParticles.hpp.
References allPeriodic, Dim, and stype_m.
Referenced by ChargedParticles().
|
inline |
Definition at line 270 of file ChargedParticles.hpp.
References setBCAllPeriodic().
Referenced by ChargedParticles().
|
protectedinherited |
Fill my attributes.
| buffer | received |
|
inlineinherited |
Definition at line 280 of file ParticleBase.h.
Referenced by ChargedParticles< PLayout, T, Dim >::updateLayout().
|
inline |
Definition at line 661 of file ChargedParticles.hpp.
References E_m.
Referenced by getEMirror().
|
inline |
Definition at line 272 of file ChargedParticles.hpp.
References allPeriodic, E_m, ippl::ParticleBase< PLayout >::getLayout(), IpplTimings::getTimer(), phi_m, rho_m, IpplTimings::startTimer(), IpplTimings::stopTimer(), stype_m, ippl::ParticleBase< PLayout >::update(), and ippl::Field< T, Dim, Mesh, Centering, ViewArgs >::updateLayout().
Referenced by repartition().
| bc_type ChargedParticles< PLayout, T, Dim >::allPeriodic |
Definition at line 201 of file ChargedParticles.hpp.
Referenced by initializeFields(), setPotentialBCs(), and updateLayout().
|
privateinherited |
all attributes
Definition at line 365 of file ParticleBase.h.
|
privateinherited |
buffers for particle partitioning
Definition at line 374 of file ParticleBase.h.
| Base::particle_position_type ChargedParticles< PLayout, T, Dim >::E |
Definition at line 234 of file ChargedParticles.hpp.
| VField_t<T, Dim> ChargedParticles< PLayout, T, Dim >::E_m |
Definition at line 196 of file ChargedParticles.hpp.
Referenced by dumpBumponTail(), dumpData(), dumpLandau(), dumpLandau(), gatherCIC(), getEMirror(), initializeFields(), initSolverWithParams(), updateEMirror(), and updateLayout().
|
staticconstexprprivateinherited |
Definition at line 88 of file ParticleBase.h.
| Vector_t<double, Dim> ChargedParticles< PLayout, T, Dim >::hr_m |
Definition at line 208 of file ChargedParticles.hpp.
Referenced by ChargedParticles(), dumpBumponTail(), dumpData(), and dumpLandau().
|
inherited |
view of particle IDs
Definition at line 118 of file ParticleBase.h.
| std::array<bool, Dim> ChargedParticles< PLayout, T, Dim >::isParallel_m |
Definition at line 215 of file ChargedParticles.hpp.
Referenced by ChargedParticles().
|
privateinherited |
Definition at line 375 of file ParticleBase.h.
|
privateinherited |
particle layout
Definition at line 356 of file ParticleBase.h.
| unsigned int ChargedParticles< PLayout, T, Dim >::loadbalancefreq_m |
Definition at line 227 of file ChargedParticles.hpp.
Referenced by balance().
| double ChargedParticles< PLayout, T, Dim >::loadbalancethreshold_m |
Definition at line 229 of file ChargedParticles.hpp.
Referenced by balance().
|
privateinherited |
processor local number of particles
Definition at line 359 of file ParticleBase.h.
|
privateinherited |
next unique particle ID
Definition at line 368 of file ParticleBase.h.
| Vector_t<T, Dim> ChargedParticles< PLayout, T, Dim >::nr_m |
Definition at line 206 of file ChargedParticles.hpp.
|
privateinherited |
number of MPI ranks
Definition at line 371 of file ParticleBase.h.
| ORB<T, Dim> ChargedParticles< PLayout, T, Dim >::orb |
Definition at line 204 of file ChargedParticles.hpp.
Referenced by initializeORB(), and repartition().
| Base::particle_position_type ChargedParticles< PLayout, T, Dim >::P |
Definition at line 233 of file ChargedParticles.hpp.
Referenced by dumpData(), and dumpParticleData().
| Field<T, Dim> ChargedParticles< PLayout, T, Dim >::phi_m |
Definition at line 198 of file ChargedParticles.hpp.
Referenced by initializeFields(), initSolverWithParams(), and updateLayout().
| std::string ChargedParticles< PLayout, T, Dim >::ptype_m |
Definition at line 213 of file ChargedParticles.hpp.
Referenced by initCGSolver(), and runSolver().
| ParticleAttrib<double> ChargedParticles< PLayout, T, Dim >::q |
Definition at line 232 of file ChargedParticles.hpp.
Referenced by scatterCIC().
| double ChargedParticles< PLayout, T, Dim >::Q_m |
Definition at line 217 of file ChargedParticles.hpp.
Referenced by ChargedParticles(), and scatterCIC().
|
inherited |
view of particle positions
Definition at line 115 of file ParticleBase.h.
Referenced by ChargedParticles< PLayout, T, Dim >::dumpParticleData(), ChargedParticles< PLayout, T, Dim >::gatherCIC(), ChargedParticles< PLayout, T, Dim >::repartition(), and ChargedParticles< PLayout, T, Dim >::scatterCIC().
| Field_t<Dim> ChargedParticles< PLayout, T, Dim >::rho_m |
Definition at line 197 of file ChargedParticles.hpp.
Referenced by dumpData(), initializeFields(), initializeORB(), initSolverWithParams(), repartition(), scatterCIC(), and updateLayout().
| double ChargedParticles< PLayout, T, Dim >::rhoNorm_m |
Definition at line 225 of file ChargedParticles.hpp.
Referenced by dumpData(), and scatterCIC().
| Vector_t<double, Dim> ChargedParticles< PLayout, T, Dim >::rmax_m |
Definition at line 210 of file ChargedParticles.hpp.
Referenced by ChargedParticles(), and scatterCIC().
| Vector_t<double, Dim> ChargedParticles< PLayout, T, Dim >::rmin_m |
Definition at line 209 of file ChargedParticles.hpp.
Referenced by ChargedParticles(), and scatterCIC().
|
private |
Definition at line 220 of file ChargedParticles.hpp.
Referenced by initSolverWithParams(), repartition(), and runSolver().
| std::string ChargedParticles< PLayout, T, Dim >::stype_m |
Definition at line 212 of file ChargedParticles.hpp.
Referenced by ChargedParticles(), initCGSolver(), initializeFields(), initSolver(), repartition(), runSolver(), scatterCIC(), setPotentialBCs(), and updateLayout().
| double ChargedParticles< PLayout, T, Dim >::time_m |
Definition at line 223 of file ChargedParticles.hpp.
Referenced by dumpBumponTail(), dumpData(), dumpLandau(), gatherStatistics(), and runSolver().
|
privateinherited |
total number of particles (across all processes)
Definition at line 362 of file ParticleBase.h.