<div class="gmail_quote">On Tue, Nov 1, 2011 at 10:06, Alexander Grayver <span dir="ltr"><<a href="mailto:agrayver@gfz-potsdam.de">agrayver@gfz-potsdam.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#ffffff" text="#000000">Thanks Jed, looks easy. I've read about this parameter in
documentation, but it wasn't obvious how to use it. <br>
May be it's worth to mention it shortly in "2.4.4 Accessing the
Vector Entries for DMDA Vectors" or somewhere else.<br></div></blockquote><div><br></div><div>I'll add a note. The most common approach is to declare a struct</div><div><br></div><div><div>typedef struct {</div>
<div> PetscScalar u,v,omega,temp;</div><div>} Field;</div></div><div><br></div><div>and then access as x[j][i].omega, etc. An example:</div><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/src/snes/examples/tutorials/ex50.c.html">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/src/snes/examples/tutorials/ex50.c.html</a></div>
<div><br></div></div>