Laplacian solver

Barry Smith bsmith at mcs.anl.gov
Mon May 22 17:09:36 CDT 2006



   George,

     First, is it a structured grid in 2 or 3 dimensions or is it unstructured with 
finite elements?

     If a structured grid you should use an example like src/ksp/ksp/examples/tutorials/ex29.c
or ex22f.F or ex22.c or ex34.c


     If it is finite elements on an unstructured grid then it is much
more difficult. We do not yet have the tools for easily parallelizing all
the mesh management (which is that hard part). For the solver all you need
do is loop over elements, computing the stiffness for each element and call
MatSetValues() or MatSetValuesLocal() to insert into the matrix. Similar for 
the load vector.

     Good luck,

   Barry


On Mon, 22 May 2006, mep4gk01 at ucy.ac.cy wrote:

> Dear Sirs,
>
> My name is George Katsambas and I am an MSc student at the University of Cyprus (mechanical engineering department). I am trying to parallelize a Laplacian sovler using BiCGStab method (in Fortran). After a lot of effort I create, using MPI, the system Ax=b but it was very difficult for me, to parallelize the serial solver so I download and installed PETSc.  I read the manual and I run the tutorials but I cannot understand how I can pass my data into the PETSc routines in order to prepare the data for the KSP solver. Can you please give some quitelines how I can do this and if it is possible to be done. Your help will be very valuable for me.
>
> Best regards,
> George Katsambas
>
>




More information about the petsc-users mailing list