forked from ComputationalRadiationPhysics/picongpu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspeciesDefinition.param
202 lines (166 loc) · 5.35 KB
/
speciesDefinition.param
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
/**
* Copyright 2013-2015 Rene Widera, Marco Garten, Richard Pausch
*
* This file is part of PIConGPU.
*
* PIConGPU is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PIConGPU is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PIConGPU.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "simulation_defines.hpp"
#include "particles/Identifier.hpp"
#include "compileTime/conversion/MakeSeq.hpp"
#include "dimensions/DataSpace.hpp"
#include "identifier/identifier.hpp"
#include "identifier/alias.hpp"
#include "identifier/value_identifier.hpp"
#include "particles/Particles.hpp"
#include "particles/ParticleDescription.hpp"
#include <boost/mpl/string.hpp>
#include "particles/ionization/byField/ionizers.def"
namespace picongpu
{
/*########################### define particle attributes #####################*/
/** describe attributes of a particle*/
typedef typename MakeSeq<position<position_pic>, momentum, weighting>::type DefaultParticleAttributes;
/** \todo: not nice, we change this later with nice interfaces
* Plugins should add required attributes
*/
/*add old momentum for radiation plugin*/
typedef typename MakeSeq<
#if(ENABLE_RADIATION == 1)
momentumPrev1
#endif
>::type AttributMomentum_mt1;
/*add old radiation flag for radiation plugin*/
typedef typename MakeSeq<
#if(RAD_MARK_PARTICLE>1) || (RAD_ACTIVATE_GAMMA_FILTER!=0)
radiationFlag
#endif
>::type AttributRadiationFlag;
/* attribute sequence for species: electrons */
typedef
typename MakeSeq<
DefaultParticleAttributes,
AttributMomentum_mt1,
AttributRadiationFlag
>::type AttributeSeqElectrons;
/* attribute sequence for species: ions */
typedef
typename MakeSeq<
DefaultParticleAttributes,
AttributMomentum_mt1,
AttributRadiationFlag
>::type AttributeSeqIons;
/*########################### end particle attributes ########################*/
/*########################### define species #################################*/
/*--------------------------- electrons --------------------------------------*/
typedef bmpl::vector<
particlePusher<UsedParticlePusher>,
shape<UsedParticleShape>,
interpolation<UsedField2Particle>,
current<UsedParticleCurrentSolver>
> ParticleFlagsElectrons;
/* define species: electrons */
typedef Particles<ParticleDescription<
bmpl::string<'e','H'>,
SuperCellSize,
AttributeSeqElectrons,
ParticleFlagsElectrons,
typename MakeSeq<CommunicationId<PAR_ELECTRONS> >::type >
> PIC_Electrons;
/* define species: electrons */
typedef Particles<ParticleDescription<
bmpl::string<'e','C'>,
SuperCellSize,
AttributeSeqElectrons,
ParticleFlagsElectrons,
typename MakeSeq<CommunicationId<PAR_ELECTRONS+1> >::type >
> PIC_ElectronsC;
/*--------------------------- ions -------------------------------------------*/
/*! Specify (chemical) element
*
* Proton and neutron numbers define the chemical element that the ion species
* is based on. This value can be non-integer for physical models taking
* charge shielding effects into account.
* @see http://en.wikipedia.org/wiki/Effective_nuclear_charge
*
* It is wrapped into a struct because of C++ restricting floats from being
* template arguments.
*
* Do not forget to set the correct mass of the atom in
* @see physicalConstants.param !
*/
struct Hydrogen
{
static const float_X numberOfProtons = 1.0;
static const float_X numberOfNeutrons = 1.0;
};
typedef bmpl::vector<
particlePusher<UsedParticlePusher>,
shape<UsedParticleShape>,
interpolation<UsedField2Particle>,
current<UsedParticleCurrentSolver>,
atomicNumbers<Hydrogen>
> ParticleFlagsIons;
/* define species: ions */
typedef Particles<ParticleDescription<
bmpl::string<'i','H'>,
SuperCellSize,
AttributeSeqIons,
ParticleFlagsIons,
typename MakeSeq<CommunicationId<PAR_IONS> >::type >
> PIC_Ions;
//##### carbon
struct Carbon
{
static const float_X numberOfProtons = 6.0;
static const float_X numberOfNeutrons = 6.0;
};
typedef bmpl::vector<
particlePusher<UsedParticlePusher>,
shape<UsedParticleShape>,
interpolation<UsedField2Particle>,
current<UsedParticleCurrentSolver>,
atomicNumbers<Carbon>
> ParticleFlagsIonsC;
/* define species: ions */
typedef Particles<ParticleDescription<
bmpl::string<'i','C'>,
SuperCellSize,
AttributeSeqIons,
ParticleFlagsIonsC,
typename MakeSeq<CommunicationId<PAR_ELECTRONS+2> >::type >
> PIC_IonsC;
/*########################### end species ####################################*/
/*! we delete this ugly definition of VectorAllSpecies after all picongpu components
* support multi species */
/** \todo: not nice, but this should be changed in the future*/
typedef typename MakeSeq<
#if (ENABLE_ELECTRONS == 1)
PIC_Electrons
#endif
>::type Species1;
typedef typename MakeSeq<
#if (ENABLE_IONS == 1)
PIC_Ions
#endif
>::type Species2;
typedef typename MakeSeq<
Species1,
Species2,
PIC_IonsC,
PIC_ElectronsC
>::type VectorAllSpecies;
} //namespace picongpu