10
$\begingroup$

I am looking to port some code that resolves a set of partial differential equations (PDE) by the finite volume method in IMPLICIT form (for the time discretization).

As result there is a tridiagonal system of equations in x,y,z directions which is handled by the ADI/TDMA scheme.

I can not seem to find anything regarding implicit solution of PDEs with CUDA.

Is the ADI/TDMA scheme possible to implement in CUDA?? Is there an example like 2D heat diffusion equation available somewhere??

All I could find is a CUDA sample code for 2D heat diffusion equation in finite differences but in EXPLICIT form (University of Cambridge).

Any hint/reference would be greatly appreciated.

$\endgroup$
  • 2
    $\begingroup$ What kind of PDEs are you working with? Is this linear, nonlinear? Is your whole system tridiagonal? (I don't understand what you meant by 'tridiagonal in x,y,z directions'). In general it is hard to implement sparse solvers or iterative solvers on GPU because of globalized inner products and irregular communication (but communication may be less of an issue if this is tridiagonal). Edit: Ok googled ADI, never used it before myself. Quick google on tridiagonal solvers though found this: impact.crhc.illinois.edu/shared/papers/sc12_tridiagonal-1.pdf $\endgroup$ – Reid.Atcheson May 14 '13 at 1:48
  • $\begingroup$ Thank you for the link. The PDEs are from conservation equations of momentum, mass and energy so they are strongly coupled and non-linear. Seems that mr Nikolai Sakharnykh has done it already. Here is the link for the interested: nvidia.com/content/GTC/documents/1058_GTC09.pdf. Can not find a sample code though, that would really help. $\endgroup$ – Khine May 17 '13 at 3:23
  • 2
    $\begingroup$ Please delete your duplicate posting on SO, or ask for it to be migrated here. $\endgroup$ – David Ketcheson May 19 '13 at 5:43
1
$\begingroup$

This problem lends itself to a highly vectorized form. As you noted, the ADI method gives a few steps of tridiagonal systems. Since it's in the form of linear equations, you can use CUsolver and CUblas to call parallel GPU versions of standard linear algebra routines. Using these, you should be able to take the explicit code and just change the inner loop to an appropriate CUsolver call and solve it in a way where the code looks almost exactly like a CPU implementation, but with the matrix operations done on the GPUs via library calls.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.