Skip to content
Snippets Groups Projects
Commit c8f4b555 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

avoid uninitialized data for using ewald/disp with lj only

parent e13e4031
No related branches found
No related tags found
No related merge requests found
......@@ -141,6 +141,7 @@ void EwaldDisp::init()
init_coeffs();
init_coeff_sums();
if (function[0]) qsum_qsq();
else qsqsum = qsum = 0.0;
natoms_original = atom->natoms;
// turn off coulombic if no charge
......@@ -152,6 +153,7 @@ void EwaldDisp::init()
}
double bsbsum = 0.0;
M2 = 0.0;
if (function[1]) bsbsum = sum[1].x2;
if (function[2]) bsbsum = sum[2].x2;
......@@ -526,6 +528,7 @@ void EwaldDisp::init_coeff_sums()
Sum sum_local[EWALD_MAX_NSUMS];
memset(sum_local, 0, EWALD_MAX_NSUMS*sizeof(Sum));
memset(sum, 0, EWALD_MAX_NSUMS*sizeof(Sum));
// now perform qsum and qsq via parent qsum_qsq()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment