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

Mohammad Hassan Baghaei mhbaghaei at mail.sjtu.edu.cn
Tue Feb 13 16:05:41 CST 2018


Thanks for your great note, Dave. Yeah! I would be able to at least view the edge values, although I could not specify the data. Previously I searched in points data, I now view the values by Surface With Edges option.

 

From: Dave May [mailto:dave.mayhem23 at gmail.com] 
Sent: Wednesday, February 14, 2018 5:37 AM
To: Matthew Knepley <knepley at gmail.com>
Cc: Mohammad Hassan Baghaei <mhbaghaei at mail.sjtu.edu.cn>; PETSc <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] Accessing a field values of Staggered grid

 

 

 

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

On Tue, Feb 13, 2018 at 3:21 PM, Mohammad Hassan Baghaei <mhbaghaei at mail.sjtu.edu.cn <mailto: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/20180214/8293e284/attachment-0001.html>


More information about the petsc-users mailing list