Skip to content

Commit

Permalink
Change nDim_ into n_dimensions_ in radiation.h and MultiphotonBreitWh…
Browse files Browse the repository at this point in the history
…eeler.h to respect the Smilei syntaxe rules
  • Loading branch information
Mathieu Lobet committed Dec 12, 2018
1 parent 393a5c9 commit 3fe0185
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions src/MultiphotonBreitWheeler/MultiphotonBreitWheeler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
MultiphotonBreitWheeler::MultiphotonBreitWheeler(Params& params, Species * species)
{
// Dimension position
nDim_ = params.nDim_particle;
n_dimensions_ = params.nDim_particle;

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

// Weight shortcut
Expand Down Expand Up @@ -248,10 +248,10 @@ void MultiphotonBreitWheeler::operator() (Particles &particles,
// Move the photons

//#ifdef __DEBUG
// for ( int i = 0 ; i<nDim_ ; i++ )
// for ( int i = 0 ; i<n_dimensions_ ; i++ )
// particles.position_old(i,ipart) = position[i][ipart];
//#endif
// for ( int i = 0 ; i<nDim_ ; i++ )
// for ( int i = 0 ; i<n_dimensions_ ; i++ )
// position[i][ipart] += event_time*momentum[i][ipart]/(*gamma)[ipart];


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

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

// Old positions
#ifdef __DEBUG
for (i=0; i<nDim_; i++) {
for (i=0; i<n_dimensions_; i++) {
new_pair[k].position_old(i,idNew)=particles.position(i,ipart) ;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/MultiphotonBreitWheeler/MultiphotonBreitWheeler.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class MultiphotonBreitWheeler
// General parameters

//! Dimension of position
int nDim_;
int n_dimensions_;

//! Time step
double dt;
Expand Down
4 changes: 2 additions & 2 deletions src/Radiation/Radiation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
// -----------------------------------------------------------------------------
Radiation::Radiation(Params& params, Species * species)
{
// Dimension position
nDim_ = params.nDim_particle;
// Number of dimensions for the positions and momentums
n_dimensions_ = params.nDim_particle;

// Time step
dt_ = params.timestep;
Expand Down
6 changes: 3 additions & 3 deletions src/Radiation/Radiation.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ class Radiation
// General parameters

//! Dimension of position
int nDim_;
int n_dimensions_;

//! Inverse species mass
//! Inversed species mass
double one_over_mass_;

//! Time step
Expand All @@ -128,7 +128,7 @@ class Radiation
//! Normalized Schwinger Electric field
double norm_E_Schwinger_;

//! Inverse Normalized Schwinger Electric field
//! Inversed Normalized Schwinger Electric field
double inv_norm_E_Schwinger_;

private:
Expand Down
6 changes: 3 additions & 3 deletions src/Radiation/RadiationMonteCarlo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void RadiationMonteCarlo::operator() (

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

// Charge shortcut
Expand Down Expand Up @@ -322,7 +322,7 @@ void RadiationMonteCarlo::photon_emission(int ipart,
int idNew = new_photons.size() - 1;
for (int i=0; i<nDim_; i++) {
for (int i=0; i<n_dimensions_; i++) {
new_photons.position(i,idNew)=position[i][ipart];
}
Expand Down Expand Up @@ -356,7 +356,7 @@ void RadiationMonteCarlo::photon_emission(int ipart,
// For all new photons...
for (int idNew=npart-radiation_photon_sampling_; idNew<npart; idNew++)
{
for (int i=0; i<nDim_; i++) {
for (int i=0; i<n_dimensions_; i++) {
new_photons.position(i,idNew)=position[i][ipart];
}

Expand Down

0 comments on commit 3fe0185

Please sign in to comment.