Closed sigvaldm closed 6 years ago
Just tested this for a Laframboise simulation with 1000 time-steps. The timings are 28 sec (reinitialize and return by value) vs. 17 sec (initialize outside the time-loop and pass by reference) for poisson solver.
Absolutely awesome! Add changes to the PoissonSolver to the "objects" branch (now pushed to origin) before this is merged to develop, as it contains significant changes to the PoissonSolver already.
Perhaps also check EField (any others?) while you're at it?
Done.
It is perhaps most convenient the way
PoissonSolver::solve()
works today, but perhaps it should be tested how much performance gain we would get by not making a newdf::Function phi
each time? It could be made outside the time-loop and passed as a reference argument tosolve()
. Not as nice, perhaps, but it wouldn't be unusual in a high performance code (or any C++ code, really).