OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ippl
src
Particle
GenArrayParticle.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
/***************************************************************************
3
*
4
* The IPPL Framework
5
*
6
*
7
* Visit http://people.web.psi.ch/adelmann/ for more details
8
*
9
***************************************************************************/
10
11
#ifndef GEN_ARRAY_PARTICLE_H
12
#define GEN_ARRAY_PARTICLE_H
13
14
/*
15
* GenArrayParticle - Specialized Particle container for N data elements.
16
*
17
* GenArrayParticle is a special version of a IpplParticleBase class, specialized
18
* to have D-dimensional coordinates of type T1, and N extra data items of
19
* type T2.
20
*/
21
22
// include files
23
#include "
Particle/IpplParticleBase.h
"
24
25
26
// GenArrayParticle class definition
27
template
<
class
PLayout,
class
T,
unsigned
N>
28
class
GenArrayParticle
:
public
IpplParticleBase
<PLayout> {
29
30
public
:
31
// attributes for this class: an array with N attributes
32
ParticleAttrib<T>
data
[N];
33
34
// constructor: user-provided Layout object must be supplied
35
GenArrayParticle
(PLayout* L) :
IpplParticleBase
<PLayout>(L) {
36
for
(
int
i = 0; i < N; i++)
37
addAttribute
(
data
[i]);
38
}
39
40
private
:
41
// disable default constructor
42
GenArrayParticle
();
43
44
};
45
46
#endif // GEN_ARRAY_PARTICLE_H
47
48
/***************************************************************************
49
* $RCSfile: GenArrayParticle.h,v $ $Author: adelmann $
50
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:28 $
51
* IPPL_VERSION_ID: $Id: GenArrayParticle.h,v 1.1.1.1 2003/01/23 07:40:28 adelmann Exp $
52
***************************************************************************/
GenArrayParticle::data
ParticleAttrib< T > data[N]
Definition:
GenArrayParticle.h:32
GenArrayParticle::GenArrayParticle
GenArrayParticle(PLayout *L)
Definition:
GenArrayParticle.h:35
IpplParticleBase.h
IpplParticleBase
Definition:
MakeDataSource.h:26
ParticleAttrib
Definition:
MakeDataSource.h:25
GenArrayParticle::GenArrayParticle
GenArrayParticle()
IpplParticleBase::addAttribute
void addAttribute(ParticleAttribBase &pa)
Definition:
IpplParticleBase.h:237
GenArrayParticle
Definition:
GenArrayParticle.h:28
Generated on Sat Jan 4 2020 14:47:37 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5