<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 7, 2010, at 10:57 AM, David sheehan wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>>First, configure with Hypre . </div> <div>You mean, configure for the installation of PETSC with hypre? thanks.</div></blockquote> yes, add --download-hypre</div><div><br><blockquote type="cite"> <div> </div> <div>>Then -pc_type hypre -pc_hypre_type boomeramg</div> <div>You mean, without adding any information into code include, just compile and link</div> <div>the code, to get an excuteable file, e.g. "a.out", then</div> <div>a.out -pc_type hypre -pc_hypre_type boomeramg</div> <div>is it right? thanks.</div></blockquote><div><br></div> Yes,</div><div><br><blockquote type="cite"> <div><br> <div>>I cannot understand exactly what you mean. However, if you want to create a PC</div> <div>> based upon a >matrix which is not the system matrix A, you can specify it in</div> <div>> KSPSetOperators().</div> <div> </div> <div>I mean Ax =b doesn't have A in explicit form, but in expression A=B+C1+C2+...+Cn, </div> <div>where B is main part of A in an explicity form, C1, C2,... and Cn are small portions </div> <div>comparing with B and they don't have an explicit form. Thus I want to make a </div> <div>preconditioner from B, then apply the preconditioner to Ax=b. Please tell me how I </div> <div>can do by PETSC sentences for PETSC solver, thanks.</div></div></blockquote><div><br></div> call KSPSetOperators(ksp,A,B,......)</div><div><br></div><div> Barry</div><div><br></div><div><br><blockquote type="cite"><div> <div> </div> <div> </div> <div>David</div> <div> </div><br></div> <div class="gmail_quote">On Sun, Mar 7, 2010 at 12:32 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>></span> wrote:<br> <blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"> <div class="im">On Sat, Mar 6, 2010 at 11:49 PM, David sheehan <span dir="ltr"><<a href="mailto:david.sheehanjr@gmail.com" target="_blank">david.sheehanjr@gmail.com</a>></span> wrote:<br></div> <div class="gmail_quote"> <div class="im"> <blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"> <div>Hi, <br>I need your helps about PETSC as follows:<br>1) how can I call boomerAMG of HYPRE through PETSC as a solver and a preconditioner?<br></div></blockquote> <div><br></div></div> <div>First, configure with Hypre . Then -pc_type hypre -pc_hypre_type boomeramg</div> <div class="im"> <div> </div> <blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"> <div>2) how can I make a precondioner from B matrix, but apply the preconditioner to Ax=b in PETSC? <br>Thanks in advance.</div></blockquote> <div><br></div></div> <div>I cannot understand exactly what you mean. However, if you want to create a PC based upon a matrix</div> <div>which is not the system matrix A, you can specify it in KSPSetOperators().</div> <div><br></div> <div> Matt</div> <div> </div> <blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><font color="#888888"> <div>David</div></font></blockquote></div>-- <br><font color="#888888">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br> -- Norbert Wiener<br></font></blockquote></div><br></blockquote></div><br></body></html>