<div dir="ltr"><div>Start by looking as src/snes/examples/tutorials/ex28.c, then try to structure your code similarly. You can also look at src/ksp/ksp/examples/tests/ex22.c.<br><br></div>I will also strengthen my previous statement. You will be doing yourself a disservice in terms of understanding of PETSc, testability, and practicality if you try to write everything using MatShell now. Don't do it. Use normal matrices and follow the structure of ex28.c. Even if your eventual goal is to do everything with MatShell, you'll get there sooner (and have a better code) if you DON'T start out using MatShell.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 21, 2013 at 4:19 PM, Amneet Bhalla <span dir="ltr"><<a href="mailto:mail2amneet@gmail.com" target="_blank">mail2amneet@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you guys comment on what example case would be best to start off for shell <div>operators with FieldSplit? The examples I am looking into all start with creating native </div>
<div>PETSc matrices and vectors. </div><div>

<br></div><div>If possible could you write down steps that would be needed in setting such system...</div><div><br></div><div>a) Create matrices using XXXX (?) b) Create vectors using YYYY ....<div><div class="h5"><br><br>
<div class="gmail_quote">

On Thu, Feb 21, 2013 at 3:24 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr"><div><div>On Thu, Feb 21, 2013 at 4:20 PM, Amneet Bhalla <span dir="ltr"><<a href="mailto:mail2amneet@gmail.com" target="_blank">mail2amneet@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_extra">


<div class="gmail_quote"><div><div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="gmail_quote">On Thu, Feb 21, 2013 at 2:57 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

that you're happy with and that performs well with fieldsplit or custom preconditioning that will be amenable to your MatShells</blockquote></div><br>Is fieldsplit an alternative approach to MatNest and VecNest? The problem is that I am working on nonnative PETSc<div>





data; so I am not sure which recent methods would support shell approach. All I want is to use PETSc's algorithm </div><div>for solving multicomponent system of equation. I am not bothering about preconditioning yet, as I will be trying</div>





<div>a custom preconditioner down the road.  </div></blockquote><div><br></div></div></div><div>MatNest is just an optimization matrix format. Get your stuff working with FieldSplit and then think about optimization.</div>


<div>
<br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><span><font color="#888888"><br><span><font color="#888888">-- <br>

<div>Amneet <br>
<br></div><div><br></div><div><br></div>
</font></span></font></span></div><span><font color="#888888">
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>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
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div>Amneet <br><br></div><div><br></div><div><br></div>
</font></span></div>
</blockquote></div><br></div>