Fixes to the segfault error

I didn't see the segfault because I did all of my testing with single precision.  For some unknown reason, double precision exposed a C++ error in the cuda code that should have been caught regardless of the floating point precision.  I fixed the error and tested it with both the Jacobi and PX extension.  The model I have is no longer working, but it ran to completion without a sefault.