Skip to content

Commit 3fe0185

Browse files
author
Mathieu Lobet
committed
Change nDim_ into n_dimensions_ in radiation.h and MultiphotonBreitWheeler.h to respect the Smilei syntaxe rules
1 parent 393a5c9 commit 3fe0185

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/MultiphotonBreitWheeler/MultiphotonBreitWheeler.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
MultiphotonBreitWheeler::MultiphotonBreitWheeler(Params& params, Species * species)
2020
{
2121
// Dimension position
22-
nDim_ = params.nDim_particle;
22+
n_dimensions_ = params.nDim_particle;
2323

2424
// Time step
2525
dt = params.timestep;
@@ -161,7 +161,7 @@ void MultiphotonBreitWheeler::operator() (Particles &particles,
161161
// for now particles could be created outside of the local domain
162162
// without been subject do boundary conditions (including domain exchange)
163163
//double* position[3];
164-
//for ( int i = 0 ; i<nDim_ ; i++ )
164+
//for ( int i = 0 ; i<n_dimensions_ ; i++ )
165165
// position[i] = &( particles.position(i,0) );
166166

167167
// Weight shortcut
@@ -248,10 +248,10 @@ void MultiphotonBreitWheeler::operator() (Particles &particles,
248248
// Move the photons
249249

250250
//#ifdef __DEBUG
251-
// for ( int i = 0 ; i<nDim_ ; i++ )
251+
// for ( int i = 0 ; i<n_dimensions_ ; i++ )
252252
// particles.position_old(i,ipart) = position[i][ipart];
253253
//#endif
254-
// for ( int i = 0 ; i<nDim_ ; i++ )
254+
// for ( int i = 0 ; i<n_dimensions_ ; i++ )
255255
// position[i][ipart] += event_time*momentum[i][ipart]/(*gamma)[ipart];
256256

257257

@@ -343,14 +343,14 @@ void MultiphotonBreitWheeler::pair_emission(int ipart,
343343
//inv_gamma = 1./sqrt(1.+p*p);
344344

345345
// Positions
346-
for (i=0; i<nDim_; i++) {
346+
for (i=0; i<n_dimensions_; i++) {
347347
new_pair[k].position(i,idNew)=particles.position(i,ipart);
348348
// + new_pair[k].momentum(i,idNew)*remaining_dt*inv_gamma;
349349
}
350350

351351
// Old positions
352352
#ifdef __DEBUG
353-
for (i=0; i<nDim_; i++) {
353+
for (i=0; i<n_dimensions_; i++) {
354354
new_pair[k].position_old(i,idNew)=particles.position(i,ipart) ;
355355
}
356356
#endif

src/MultiphotonBreitWheeler/MultiphotonBreitWheeler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class MultiphotonBreitWheeler
125125
// General parameters
126126

127127
//! Dimension of position
128-
int nDim_;
128+
int n_dimensions_;
129129

130130
//! Time step
131131
double dt;

src/Radiation/Radiation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
// -----------------------------------------------------------------------------
1717
Radiation::Radiation(Params& params, Species * species)
1818
{
19-
// Dimension position
20-
nDim_ = params.nDim_particle;
19+
// Number of dimensions for the positions and momentums
20+
n_dimensions_ = params.nDim_particle;
2121

2222
// Time step
2323
dt_ = params.timestep;

src/Radiation/Radiation.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ class Radiation
111111
// General parameters
112112

113113
//! Dimension of position
114-
int nDim_;
114+
int n_dimensions_;
115115

116-
//! Inverse species mass
116+
//! Inversed species mass
117117
double one_over_mass_;
118118

119119
//! Time step
@@ -128,7 +128,7 @@ class Radiation
128128
//! Normalized Schwinger Electric field
129129
double norm_E_Schwinger_;
130130

131-
//! Inverse Normalized Schwinger Electric field
131+
//! Inversed Normalized Schwinger Electric field
132132
double inv_norm_E_Schwinger_;
133133

134134
private:

src/Radiation/RadiationMonteCarlo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void RadiationMonteCarlo::operator() (
105105

106106
// Position shortcut
107107
double* position[3];
108-
for ( int i = 0 ; i<nDim_ ; i++ )
108+
for ( int i = 0 ; i<n_dimensions_ ; i++ )
109109
position[i] = &( particles.position(i,0) );
110110

111111
// Charge shortcut
@@ -322,7 +322,7 @@ void RadiationMonteCarlo::photon_emission(int ipart,
322322
323323
int idNew = new_photons.size() - 1;
324324
325-
for (int i=0; i<nDim_; i++) {
325+
for (int i=0; i<n_dimensions_; i++) {
326326
new_photons.position(i,idNew)=position[i][ipart];
327327
}
328328
@@ -356,7 +356,7 @@ void RadiationMonteCarlo::photon_emission(int ipart,
356356
// For all new photons...
357357
for (int idNew=npart-radiation_photon_sampling_; idNew<npart; idNew++)
358358
{
359-
for (int i=0; i<nDim_; i++) {
359+
for (int i=0; i<n_dimensions_; i++) {
360360
new_photons.position(i,idNew)=position[i][ipart];
361361
}
362362

0 commit comments

Comments
 (0)