From 3e775f01b896fec253151298f924fdedc930e12e Mon Sep 17 00:00:00 2001 From: "charles.prouveur" Date: Thu, 8 Aug 2024 12:02:37 +0200 Subject: [PATCH] removed useless class member pointers Jx_, etc. in 1D, could be done in 2D and 3D as well --- src/Projector/Projector1D.h | 2 +- src/Projector/Projector1D2Order.cpp | 12 ++++++------ src/Projector/Projector1D4Order.cpp | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Projector/Projector1D.h b/src/Projector/Projector1D.h index c08c0e9a8..67eb72382 100755 --- a/src/Projector/Projector1D.h +++ b/src/Projector/Projector1D.h @@ -30,7 +30,7 @@ class Projector1D : public Projector double dx_inv_; double dx_ov_dt_; int i_domain_begin_; - double *Jx_, *Jy_, *Jz_, *rho_; + //double *Jx_, *Jy_, *Jz_, *rho_; }; #endif diff --git a/src/Projector/Projector1D2Order.cpp b/src/Projector/Projector1D2Order.cpp index 451bca539..67d050ead 100755 --- a/src/Projector/Projector1D2Order.cpp +++ b/src/Projector/Projector1D2Order.cpp @@ -315,20 +315,20 @@ void Projector1D2Order::currentsAndDensityWrapper( ElectroMagn *EMfields, Partic std::vector *delta = &( smpi->dynamics_deltaold[ithread] ); std::vector *invgf = &( smpi->dynamics_invgf[ithread] ); - Jx_ = &( *EMfields->Jx_ )( 0 ); - Jy_ = &( *EMfields->Jy_ )( 0 ); - Jz_ = &( *EMfields->Jz_ )( 0 ); - rho_ = &( *EMfields->rho_ )( 0 ); + double *Jx = &( *EMfields->Jx_ )( 0 ); + double *Jy = &( *EMfields->Jy_ )( 0 ); + double *Jz = &( *EMfields->Jz_ )( 0 ); + double *rho = &( *EMfields->rho_ )( 0 ); // If no field diagnostics this timestep, then the projection is done directly on the total arrays if( !diag_flag ) { if( !is_spectral ) { for( int ipart=istart ; ipart *delta = &( smpi->dynamics_deltaold[ithread] ); std::vector *invgf = &( smpi->dynamics_invgf[ithread] ); - Jx_ = &( *EMfields->Jx_ )( 0 ); - Jy_ = &( *EMfields->Jy_ )( 0 ); - Jz_ = &( *EMfields->Jz_ )( 0 ); - rho_ = &( *EMfields->rho_ )( 0 ); + double *Jx = &( *EMfields->Jx_ )( 0 ); + double *Jy = &( *EMfields->Jy_ )( 0 ); + double *Jz = &( *EMfields->Jz_ )( 0 ); + double *rho = &( *EMfields->rho_ )( 0 ); // If no field diagnostics this timestep, then the projection is done directly on the total arrays if( !diag_flag ) { if( !is_spectral ) { for( int ipart=istart ; ipart