<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Providing matrix vector product yourself for matrix free in SNES</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hi,<BR>
<BR>
I was wondering if it is possible to provide PETSc the matrix vector product yourself for a matrix free computation inside the SNES environment. The reason for asking is that the truncation error in the standard finite difference approach may lead to some noisy behavior for our application. We have found a nice way to get rid off the truncation error completely by using dual numbers for the creation of the Jacobian matrices. The same technique can be used for the matrix vector product inside SNES, but this means that the user has to provide this product to PETSc.<BR>
<BR>
To be more specific. I would like to solve the nonlinear problem F(U) = 0 via the SNES environment using the matrix free option. So similarly to the function SNESSetFunction, which sets the function evaluation routine, I'm seeking for a function that sets the function to compute the matrix vector product dF/dU times V, where U and V are inputs. Is such a function available or is there a different way to provide the matrix vector product yourself?<BR>
<BR>
Thanks,<BR>
<BR>
Edwin<BR>
---------------------------------------------------<BR>
Edwin van der Weide<BR>
Department of Mechanical Engineering<BR>
University of Twente<BR>
Enschede, the Netherlands<BR>
</FONT>
</P>
</BODY>
</HTML>