fix possible uninitialized data access with pppm and pppm/disp
This commit is contained in:
@ -95,6 +95,11 @@ PPPM::PPPM(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg),
|
|||||||
MPI_Comm_rank(world,&me);
|
MPI_Comm_rank(world,&me);
|
||||||
MPI_Comm_size(world,&nprocs);
|
MPI_Comm_size(world,&nprocs);
|
||||||
|
|
||||||
|
nfft_both = 0;
|
||||||
|
nxhi_in = nxlo_in = nxhi_out = nxlo_out = 0;
|
||||||
|
nyhi_in = nylo_in = nyhi_out = nylo_out = 0;
|
||||||
|
nzhi_in = nzlo_in = nzhi_out = nzlo_out = 0;
|
||||||
|
|
||||||
density_brick = vdx_brick = vdy_brick = vdz_brick = NULL;
|
density_brick = vdx_brick = vdy_brick = vdz_brick = NULL;
|
||||||
density_fft = NULL;
|
density_fft = NULL;
|
||||||
u_brick = NULL;
|
u_brick = NULL;
|
||||||
|
|||||||
@ -121,6 +121,13 @@ PPPMDisp::PPPMDisp(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg),
|
|||||||
|
|
||||||
MPI_Comm_rank(world,&me);
|
MPI_Comm_rank(world,&me);
|
||||||
MPI_Comm_size(world,&nprocs);
|
MPI_Comm_size(world,&nprocs);
|
||||||
|
nfft_both = nfft_both_6 = 0;
|
||||||
|
nxhi_in = nxlo_in = nxhi_out = nxlo_out = 0;
|
||||||
|
nyhi_in = nylo_in = nyhi_out = nylo_out = 0;
|
||||||
|
nzhi_in = nzlo_in = nzhi_out = nzlo_out = 0;
|
||||||
|
nxhi_in_6 = nxlo_in_6 = nxhi_out_6 = nxlo_out_6 = 0;
|
||||||
|
nyhi_in_6 = nylo_in_6 = nyhi_out_6 = nylo_out_6 = 0;
|
||||||
|
nzhi_in_6 = nzlo_in_6 = nzhi_out_6 = nzlo_out_6 = 0;
|
||||||
|
|
||||||
csumflag = 0;
|
csumflag = 0;
|
||||||
B = NULL;
|
B = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user