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>
