[petsc-users] Accessing a field values of Staggered grid

Dave May dave.mayhem23 at gmail.com
Tue Feb 13 15:36:48 CST 2018


On 13 February 2018 at 21:17, Matthew Knepley <knepley at gmail.com> wrote:

> On Tue, Feb 13, 2018 at 3:21 PM, Mohammad Hassan Baghaei <
> mhbaghaei at mail.sjtu.edu.cn> wrote:
>
>> Hi
>>
>> I am filling the local vector from dm , has a section layout. The thing
>> is I want to know how I can see the field variable values defined on edges,
>> the staggered grid. In fact, Whenever I output to VTK in preview, I would
>> be able to see the main grid. But the values which are defined on edges, I
>> could not see them and that makes me unsure about the way I fill the local
>> vector. How I would be babe to check the field value on staggered grid?
>>
>
> VTK does not have a way to specify data on edges, only on cells or
> vertices.
>

This is not entirely true.

At least for a staggered grid, where you have one DOF per edge, you can
represent the edge data via the type VTK_VERTEX.
You won't generate a beautiful picture, as your field will be rendered as a
set of points (your edge faces) - but you can at least inspect the values
within ParaView.

Thanks,
  Dave


>
>   Thanks,
>
>     Matt
>
>
>> Thanks
>>
>> Amir
>>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180213/400c2a7b/attachment.html>


More information about the petsc-users mailing list