matrix free for linear solver

Lisandro Dalcin dalcinl at gmail.com
Mon Mar 3 12:04:15 CST 2008


Well, if this helps you, you have attached a self-dontained example
for sequentially solving a 3D Poisson problem by using MATSHELL and
KSP. It IS NOT based on PETSc DA's.

The actual routine implementing a finite difference scheme is in
Fortran 90.  It assumes the domain is the unit box, bc are all
Dirichlet and zero, and that the each direction of the box is
discretized with the same number of nodes.

Additionally, some part of the code is lacking error checking, that is
the ierr=... and CHKERRQ() macros.

Hope this can be helpful to you...

Regards,


On 3/3/08, li pan <li76pan at yahoo.com> wrote:
> Dear all,
>  If I want to solve a linear equation in matrix free
>  scheme, how is the command line argument? I only know
>  for nonlinear solver it is _snes_mf
>
>  thanx
>
>
>  pan
>
>
>
>       ____________________________________________________________________________________
>  Looking for last minute shopping deals?
>  Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
>


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
-------------- next part --------------
A non-text attachment was scrubbed...
Name: del2lib.f90
Type: application/octet-stream
Size: 577 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080303/5f593730/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: del2mat.h
Type: application/octet-stream
Size: 1229 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080303/5f593730/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: solvesys.c
Type: application/octet-stream
Size: 1732 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080303/5f593730/attachment-0002.obj>


More information about the petsc-users mailing list