ThreeDCartPotSolver solver(64,64,64,1,1,1); //initialize solver class
solver.setY0BoundPotsConst(10); //set boundary points constant (all dirichlet)
for(int s=0; s<100; s++) //loop the solve routine (without altering boundary conditions).
solver.zeroSolutionVec(); //writes zeroes solution vector (f from MKL manual)
solver.writePotData("cartpot.dat"); //writes out f to data file
You are right, if you choose first variant (dpar=bx-ax and so on) the memory leak appeared because it is not recommended way of use Poisson library in loop, it is just a trick. Please choose second variant (set ipar=9) then there is not memory leaks and result of PL is correct.
With best regards,