diff --git a/src/USER-DRUDE/fix_drude_transform.cpp b/src/USER-DRUDE/fix_drude_transform.cpp index 29c1ff8821..bdb5d95acc 100644 --- a/src/USER-DRUDE/fix_drude_transform.cpp +++ b/src/USER-DRUDE/fix_drude_transform.cpp @@ -75,7 +75,7 @@ void FixDrudeTransform::setup(int) { if (!rmass) { if (!mcoeff) mcoeff = new double[ntypes+1]; - double mcoeff_loc[ntypes+1]; + double *mcoeff_loc = new double[ntypes+1]; for (int itype=0; itype<=ntypes; itype++) mcoeff_loc[itype] = 2.; // an impossible value: mcoeff is at most 1. for (int i=0; i::setup(int) { // mcoeff is 2 for non polarizable // 0 < mcoeff < 1 for drude // mcoeff < 0 for core + delete[] mcoeff_loc; } }