diff --git a/src/Random/InverseTransformSampling.h b/src/Random/InverseTransformSampling.h index 8841444ee..6fc21e52b 100644 --- a/src/Random/InverseTransformSampling.h +++ b/src/Random/InverseTransformSampling.h @@ -30,8 +30,6 @@ namespace ippl { Distribution dist_m; size_type ntotal_m; - Vector rmax_m; - Vector rmin_m; Vector umin_m, umax_m; /*! @@ -71,7 +69,6 @@ namespace ippl { * @param locrmin_r Minimum local (per rank) range. * @param ntotal_ Total number of samples to generate. */ - template InverseTransformSampling(Distribution &dist_r, Vector &rmax_r, Vector &rmin_r, Vector &locrmax_r, Vector &locrmin_r, size_type &ntotal_r) : dist_m(dist_r), ntotal_m(ntotal_r){ @@ -89,7 +86,6 @@ namespace ippl { * @param rmin_r Minimum global range for sampling. * @param ntotal_r Total number of samples to generate. */ - template InverseTransformSampling(Distribution &dist_r, Vector &rmax_r, Vector &rmin_r, size_type &ntotal_r) : dist_m(dist_r), ntotal_m(ntotal_r){ @@ -155,14 +151,12 @@ namespace ippl { * @param new_rmin The new minimum range for sampling. This vector defines * the lower bounds for each dimension. */ - void updateBounds(Vector& new_rmax, Vector& new_rmin) { - rmax_m = new_rmax; - rmin_m = new_rmin; + void updateBounds(Vector& rmax, Vector& rmin) { Vector nr_m, dr_m; for (unsigned d = 0; d < Dim; ++d) { - umin_m[d] = dist_m.getCdf(rmin_m[d], d); - umax_m[d] = dist_m.getCdf(rmax_m[d], d); + umin_m[d] = dist_m.getCdf(rmin[d], d); + umax_m[d] = dist_m.getCdf(rmax[d], d); } }