fixed poisson examples dependency on cuda runtime enviornment. fix motiv...

...ated by helmholtz example code.

This fix is essentially what was done in the helmholtz code. Its a bit hacky and it would be better to hide this runtime dependence from the user. I did not test on a gpu.