<div dir="ltr"><div dir="ltr">On Wed, May 15, 2019 at 1:48 AM Adrian Croucher via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Further to this, I think I'm a bit confused about using PetscFV to set <br>
up the data layout (as seems to be done in the TS ex11 example), vs. <br>
doing it by creating a section using DMPlexCreateSection() and then <br>
DMSetSection().<br>
<br>
If you do it using PetscFV, as in TS ex11, there seems to be no need to <br>
create a section explicitly.<br></blockquote><div><br></div><div>Yes, it is done automatically by the DM, which holds the PetscFV object.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
If you do it using by creating a section, is there still any need to set <br>
up the PetscFV? I seem to recall trying taking the PetscFV stuff out of <br>
my code and finding that it didn't work properly without it.</blockquote><div><br></div><div>You should be able to take it out if you make a Section by hand, unless you</div><div>are using some other functionality.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> It seems <br>
PetscFV does some other things besides setting up a data layout, but if <br>
so I am unclear as to what they are.<br></blockquote><div><br></div><div>I guess now that things are more clear, I should write something about how this is intended to go together.</div><div><br></div><div>PetscSection: There is a little in the manual on this. It is a generalization of PetscLayout for Vec, in that</div><div>instead of a map {process -> #dof} that we use to layout a parallel vector, it is</div><div><br></div><div> {point -> #dof}</div><div><br></div><div>that we can use to specify any data layout, depending on what we call "points". We can get PetscLayout</div><div>if points denote processes, or finite element/volume layouts if points denote pieces of the mesh (Plex),</div><div>or matrix layouts if points denote dofs, etc.</div><div><br></div><div>PetscSection is the algebraic interface to the solvers which gets setup by stuff managing assembly. It</div><div>can indicate field divisions, blocking, constrained unknowns, etc.</div><div><br></div><div>A DM is supposed to build a Section to talk to the solvers about data layout. I built two supporting classes,</div><div>PetscFE and PetscFV, to help the DM build a Section for common discretizations.</div><div><br></div><div>In addition, if you have a Plex, the discretization information can also be used to integrate residuals and</div><div>Jacobians, apply boundary conditions, and interpolate to different meshes. However, there is no requirement</div><div>to do so.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
- Adrian<br>
<br>
On 15/05/19 2:37 PM, Adrian Croucher wrote:<br>
> hi<br>
><br>
> I just tried upgrading from PETSc 3.10 to 3.11 and working my way <br>
> through all the changes that have broken things in my code.<br>
><br>
> I think I have most of them working again, except for the changes to <br>
> PetscFV. Following the TS ex11 example I am now using DMAddField() and <br>
> DMCreateDS().<br>
><br>
> It looks like I am now supposed to use PetscFVSetComponentName() to <br>
> set field component names. Unfortunately there does not appear to be a <br>
> Fortran interface for this function yet?<br>
><br>
> - Adrian<br>
><br>
-- <br>
Dr Adrian Croucher<br>
Senior Research Fellow<br>
Department of Engineering Science<br>
University of Auckland, New Zealand<br>
email: <a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a><br>
tel: +64 (0)9 923 4611<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>