OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
GenArrayParticle.h
Go to the documentation of this file.
1// -*- C++ -*-
2/***************************************************************************
3 *
4 * The IPPL Framework
5 *
6 ***************************************************************************/
7
8#ifndef GEN_ARRAY_PARTICLE_H
9#define GEN_ARRAY_PARTICLE_H
10
11/*
12 * GenArrayParticle - Specialized Particle container for N data elements.
13 *
14 * GenArrayParticle is a special version of a IpplParticleBase class, specialized
15 * to have D-dimensional coordinates of type T1, and N extra data items of
16 * type T2.
17 */
18
19// include files
21
22
23// GenArrayParticle class definition
24template<class PLayout, class T, unsigned N>
25class GenArrayParticle : public IpplParticleBase<PLayout> {
26
27public:
28 // attributes for this class: an array with N attributes
30
31 // constructor: user-provided Layout object must be supplied
33 for (unsigned int i = 0; i < N; i++)
34 this->addAttribute(data[i]);
35 }
36
37private:
38 // disable default constructor
40
41};
42
43#endif // GEN_ARRAY_PARTICLE_H
void addAttribute(ParticleAttribBase &pa)
ParticleAttrib< T > data[N]
GenArrayParticle(PLayout *L)