On Wed, May 28, 2008 at 8:12 AM, Satish Balay <balay at mcs.anl.gov> wrote: > > Approved:bsbglmdk > > Received: from mailgw.mcs.anl.gov (mailgw.mcs.anl.gov [140.221.9.4]) > by mcs.anl.gov (8.11.6/8.9.3) with ESMTP id m4SAUFM21948 > for <petsc-users at mcs.anl.gov>; Wed, 28 May 2008 05:30:16 -0500 > Received: from localhost (localhost [127.0.0.1]) > by mailgw.mcs.anl.gov (Postfix) with ESMTP id D6BA0348003 > for <petsc-users at mcs.anl.gov>; Wed, 28 May 2008 05:30:15 -0500 (CDT) > X-Greylist: delayed 23 seconds by postgrey-1.21 at mailgw.mcs.anl.gov; Wed, > 28 May 2008 05:30:14 CDT > Received: from rzcomm22.rz.tu-bs.de (rzcomm22.rz.tu-bs.de [134.169.9.68]) > (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) > (No client certificate requested) > by mailgw.mcs.anl.gov (Postfix) with ESMTP id 5BAD2348002 > for <petsc-users at mcs.anl.gov>; Wed, 28 May 2008 05:30:14 -0500 (CDT) > Received: from [134.169.59.41] (seraph.infam.bau.tu-bs.de [134.169.59.41]) > by rzcomm22.rz.tu-bs.de (8.13.8/8.13.8) with ESMTP id m4SATmG0019828 > for <petsc-users at mcs.anl.gov>; Wed, 28 May 2008 12:29:49 +0200 > (envelope-from m.schauer at tu-bs.de) > Message-ID: <483D341B.6060100 at tu-bs.de> > Date: Wed, 28 May 2008 12:29:47 +0200 > From: Marco Schauer <m.schauer at tu-bs.de> > User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) > MIME-Version: 1.0 > To: petsc-users at mcs.anl.gov > Subject: How to use SNES > Content-Type: text/plain; charset=UTF-8; format=flowed > Content-Transfer-Encoding: 8bit > X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mailgw.mcs.anl.gov > X-Spam-Status: No, hits=0.0 required=5.0 > tests=USER_AGENT > version=2.55 > X-Spam-Level: > X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) > X-MCS-Mail-Loop: petsc-users > > Hello, > I???d like to compute a nonlinear equation system. My system looks like > this: K(u)*u=f, in which u, f are vectors and K is a Matrix that depends > on u. I have already a function to calculate K, but I don???t now how can > I use PETSc to solve this system?
The first thing to do is formulate the system as F(u) = 0, so that would be F(u) = K(u)*u - f This is directly soluble with the option -snes_fd. If later you want to provide the Jacobian, you can. Matt > Thanks for support, kind regard > Marco Schauer -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
