[petsc-dev] DMDA VTK viewer regression: field names missing

Dave May dave.mayhem23 at gmail.com
Thu Mar 28 10:20:30 CDT 2019


On Thu, 28 Mar 2019 at 15:42, Jed Brown via petsc-dev <petsc-dev at mcs.anl.gov>
wrote:

> Matthew Knepley <knepley at gmail.com> writes:
>
> > On Wed, Mar 27, 2019 at 10:56 PM Jed Brown via petsc-dev <
> > petsc-dev at mcs.anl.gov> wrote:
> >
> >> Prior to this PR, which was merged for 3.10
> >>
> >>
> >>
> https://bitbucket.org/petsc/petsc/pull-requests/1029/dmda-vtk-viewing-output-multiple-dof/diff
> >>   https://bitbucket.org/petsc/petsc/commits/ea2d7708fa6
> >>
> >> we could have files that look like the following, and thus were easy to
> >> navigate in Paraview and Visit.
> >>
> >
> > Tell me if I am wrong (since I do not run it this way). I think the point
> > of Patrick's change is a good one, and
> > necessary to view things with DMStag.
>
> Or maybe just necessary to avoid needing to use multiple files or add
> filters.
>
> > What Jed dislikes, rightly, is that some metadata has gone missing.
> > Does Xdmf allow you to name the components? The way I do this
> > petsc_gen_xdmf.py is to write the whole thing as Patrick does, but
> > then create views into the data using the component names. It sound
> > like this should be doable here.
>
> Perhaps.  A key reason for using VTK viewers is that they're relatively
> quick and foolproof compared to formats that need libraries and/or
> auxiliary files.


I completely agree with the above comment. I consider these files as
"instant and usable viz".

I'd like both the dm field names and the vec name to be used to define the
vtk field names.

One idea:
  vecname_fieldname
falling back to
  "field"%d_fieldname, where %d is the index of the vector to be written
(we can determine this as all vectors are cached to support appended data)
faillng back to
  "field"%d_%d
where the last index here is the block index.

These names should work with unnamed dm fields, multiple vectors obtained
from DMCreateGlobalVector or VecDuplicate. It does not account immediately
address what happens if two vectors produce identical fieldname - code
should be added for that using the last fall back. I think this would be
better than using the stringifed memory address which was used before
Patrick's PR. That suffered from the same issue Jed raised at the start of
this thread (users must remember the order vecs were written)

Thanks
Dave





>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190328/36785bba/attachment.html>


More information about the petsc-dev mailing list