1
$\begingroup$

My background is mainly engineering and applied research and I have been a developer or some CFD software, but mostly at high level without worrying about linear solvers and the like. This has been changing lately, has we have been wishing to integrate PETSc without our own software instead of using our own in-house sparse libraries (for reason that I believe are evident. There is no way our small lab can develop a better library of linear solver than PETSc or Trillinos).

However, coming from an engineering background, I find I totally lack knowledge on iterative linear solvers (Krylov subspace, multigrid, etc.). Would there be a reference ( a book preferably, I am still oldschool) that would cover this type of material in a way that would be readable without undergraduate or graduate studies in math, but coming from a more engineering background?

On a relevant note, I have seen that there are many tutorials regarding PETSc on their homepage (http://www.mcs.anl.gov/petsc/documentation/tutorials/HandsOnExercise.html), but I fear I am struggling to find a starting point to learn this type of library or even install it on my local linux distribution correctly. What would be the best starting document for a)installation (and making sure its ok with MPI) and b) learning steps by steps?

$\endgroup$
3
$\begingroup$

If you're looking for a book and are happy with finite element discretizations, you can check out Elman, Silvester, and Wather, "Finite Elements and Fast Iterative Solvers". If you prefer finite volume or finite difference methods, Wesseling's CFD book has a section on multigrid that will at least give you the context for multigrid-specific material. If you're specifically interested in multigrid, Trottenberg is a good choice. Saad is a good iterative methods book, but that depth is not necessary to understand solvers in PETSc.

$\endgroup$
4
$\begingroup$

Wow! A question that I can answer!

I have been using PETSc for the past year and a half to solve the Navier-Stokes equations (with some hard-coded MPI).

The best way to learn PETSc is to (1) read the manual so you generally know what's in PETSc, (2) decide roughly which part of PETSc you need, and then (3) begin experimenting with simple examples to build an understanding of the components that you need.

I recently learned how to use PETSc's Data Management for Distributed Arrays (DMDA) in conjunction with KSP. There is no straight-forward guide, as far as I know. The best way to learn is to choose a basic component of the system, for instance DMDACreate3D(), and try to build a working code that illustrates only that object. You build the working code by looking at PETSc's in depth examples of the function.

After doing this with a number of different PETSc concepts, say DMDA, matrices and vectors, index sets, vector scattering, etc., then you can put together your own application code.

Unfortunately there is no shortcut... but you probably know that about HPC.

Best of luck.

$\endgroup$
2
$\begingroup$

What would be the best starting document for ... b) learning steps by steps?

See my project to write an intro book on using PETSc to solve PDEs: https://github.com/bueler/p4pdes

An early draft PDF is at the "Releases" tab.

$\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.