<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 10/2/14 7:26 PM, Sharp Stone wrote:<br>
</div>
<blockquote
cite="mid:CABJpBAycmBergkwoV0vTni8SAwfsRNKapfvzJO-L66D27LBVaw@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Matt and Jed,
<div><br>
</div>
<div>Thank you very much for your replies. In source code ex19,
the routine SNESSetNGS() is used, and no other options or
Jacobi routines are used. How can we change the iteration
method? The routine SNESSetFromOptions(snes) could do this for
the user? If I understand correctly, petsc would use
Gauss-Seidel or Jacobi method as designated with even the same
source code?<br>
</div>
</div>
</blockquote>
Yes, and this applies for other objects as well. The important
thing, in general, is to call XXXSetFromOptions after you have set
any default options with XXXSetYYY, but before you call XXXSetUp
(which does things like allocate memory). This allows you to set
whichever defaults make sense, and also control things from the
command line.<br>
<blockquote
cite="mid:CABJpBAycmBergkwoV0vTni8SAwfsRNKapfvzJO-L66D27LBVaw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Thank you in advance!</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Oct 2, 2014 at 1:12 PM, Jed
Brown <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><span
class="">Sharp Stone <<a moz-do-not-send="true"
href="mailto:thronesf@gmail.com">thronesf@gmail.com</a>>
writes:<br>
<br>
> Matt,<br>
><br>
> Thank you very much!<br>
><br>
> The ex19 used the Gauss-Seidel method. But I'm a
little bit wonder whether<br>
> we have any examples of Jacobi method to solve such
linear systems "(mat)A<br>
> dot (vec)X = (vec)B" with dof>1? Thanks in
advance!<br>
<br>
</span>ex19 does whatever you want: -pc_type jacobi and the
like.<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div>Best regards,</div>
<div><br>
</div>
Feng</div>
</div>
</blockquote>
<br>
</body>
</html>