diff -Nru libecpint-1.0.4/debian/changelog libecpint-1.0.5/debian/changelog --- libecpint-1.0.4/debian/changelog 2021-01-17 18:33:01.000000000 +0000 +++ libecpint-1.0.5/debian/changelog 2021-02-05 10:42:24.000000000 +0000 @@ -1,3 +1,9 @@ +libecpint (1.0.5-1) unstable; urgency=medium + + * New upstream point release. + + -- Michael Banck Fri, 05 Feb 2021 11:42:24 +0100 + libecpint (1.0.4-2) unstable; urgency=medium * debian/control (libecpint-dev/Depends): Added libpugixml-dev. diff -Nru libecpint-1.0.4/debian/rules libecpint-1.0.5/debian/rules --- libecpint-1.0.4/debian/rules 2020-10-13 18:31:33.000000000 +0000 +++ libecpint-1.0.5/debian/rules 2021-01-18 17:40:56.000000000 +0000 @@ -6,3 +6,6 @@ %: dh $@ --buildsystem=cmake + +override_dh_auto_configure: + dh_auto_configure -- -DBUILD_SHARED_LIBS=ON diff -Nru libecpint-1.0.4/include/libecpint/bessel.hpp libecpint-1.0.5/include/libecpint/bessel.hpp --- libecpint-1.0.4/include/libecpint/bessel.hpp 2020-12-14 15:13:42.000000000 +0000 +++ libecpint-1.0.5/include/libecpint/bessel.hpp 2021-01-24 23:25:46.000000000 +0000 @@ -51,9 +51,9 @@ int order; ///< Order to which the Bessel series is expanded double scale; ///< N/16.0 - double **K; ///< Bessel function values - double ***dK; ///< Bessel function derivatives - double *C; ///< Coefficients of derivatives of the Bessel function + std::vector> K; ///< Bessel function values + std::vector>> dK; ///< Bessel function derivatives + std::vector C; ///< Coefficients of derivatives of the Bessel function /** * Pretabulates the Bessel function (and derivs) to a given accuracy. @@ -69,8 +69,6 @@ /// Specified constructor. Will call init with given arguments. BesselFunction(int lMax, int N, int order, double accuracy); - /// Destructor, cleans up K and C - ~BesselFunction(); /** * Initialises and pretabulates the BesselFunction up to the given angular momentum. diff -Nru libecpint-1.0.4/src/lib/bessel.cpp libecpint-1.0.5/src/lib/bessel.cpp --- libecpint-1.0.4/src/lib/bessel.cpp 2020-12-14 15:13:42.000000000 +0000 +++ libecpint-1.0.5/src/lib/bessel.cpp 2021-01-24 23:25:46.000000000 +0000 @@ -45,25 +45,15 @@ scale = N/16.0; // Allocate arrays - K = new double*[N+1]; - dK = new double**[N+1]; - for (int i = 0; i < N+1; i++) { - K[i] = new double[lMax + TAYLOR_CUT + 1]; - dK[i] = new double*[TAYLOR_CUT + 1]; - for (int j = 0; j < TAYLOR_CUT + 1; j++) - dK[i][j] = new double[lMax + TAYLOR_CUT + 1]; - } - C = new double[lMax+TAYLOR_CUT]; - + + K=std::vector>(N+1,std::vector(lMax + TAYLOR_CUT + 1,0.0)); + C=std::vector(lMax+TAYLOR_CUT,0.0); + dK=std::vector>>(N+1,std::vector>(lMax + TAYLOR_CUT + 1,std::vector(lMax + TAYLOR_CUT + 1,0.0))); // Tabulate values tabulate(accuracy); } - BesselFunction::~BesselFunction() { - free(K); - free(dK); - free(C); - } + // Tabulate the bessel function values int BesselFunction::tabulate(const double accuracy) { diff -Nru libecpint-1.0.4/src/lib/ecp.cpp libecpint-1.0.5/src/lib/ecp.cpp --- libecpint-1.0.4/src/lib/ecp.cpp 2020-12-14 15:13:42.000000000 +0000 +++ libecpint-1.0.5/src/lib/ecp.cpp 2021-01-24 23:25:46.000000000 +0000 @@ -67,6 +67,7 @@ gaussians = other.gaussians; N = other.N; L = other.L; + atom_id=other.atom_id; min_exp = other.min_exp; for (int i = 0; i < LIBECPINT_MAX_L + 1; i++) { min_exp_l[i] = other.min_exp_l[i];