On Thu, Aug 21, 2008 at 9:01 AM, Boyce Griffith
<griffith at courant.nyu.edu> wrote:
> Hi, Folks --
>
> I am using a home-grown "multi-Vec" (i.e., vector of vectors) implementation
> with a PETSc nonlinear solver.  I'd like to be able to use PETSc's
> matrix-free Jacobian with this solver along with a PCCOMPOSITE
> preconditioner; however, it seems like I need to override the default
> implementation of MatGetVecs in order to get this to work.
>
> Is there a kosher way to do this?

You can use MatShellSetOperation() and set the operation
MATOP_GET_VECS. Despite the name, that function can let you set/change
the implementation of Mat operations for any matrix type. Try to make
the call to MatShellSetOperation() in the Jacobian routine and let me
know if you have trouble.


> Thanks,
>
> -- Boyce
>
>



-- 
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


Reply via email to