On Wed, Jun 29, 2016 at 11:52 AM, John Peterson <jwpeter...@gmail.com>
wrote:

>
>
> On Wed, Jun 29, 2016 at 10:43 AM, Junchao Zhang <junchao.zh...@gmail.com>
> wrote:
>
>>
>> On Wed, Jun 29, 2016 at 11:28 AM, John Peterson <jwpeter...@gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Wed, Jun 29, 2016 at 10:00 AM, Junchao Zhang <junchao.zh...@gmail.com
>>> > wrote:
>>>
>>>> I usually dump a mesh into a GMVIO file and then view it with ParaView.
>>>> Suppose I find a cell is weird and want to examine it in debugger. I can
>>>> get the cell ID in ParaView, which I guess is a sequential number for
>>>> active elements. Then, how can I locate the cell (get the pointer to
>>>> it) in
>>>> debugger? Suppose we use ReplicatedMesh.
>>>>
>>>
>>> The cell number in Paraview (make sure you select GlobalElementId, not
>>> PedigreeElementID) is typically off-by-one (libmesh is zero-based, Exodus
>>> is one-based) from the numbering in libmesh when you are using
>>> ReplicatedMesh, unless renumbering happens in your simulation, then all
>>> bets are off...
>>>
>>>
>>  ParaView gives a 0-based ID for elements dumped by libmesh.
>>
>
> I'm curious why you think this.  I just wrote out a 1 element mesh and
> checked the element ID in paraview.  It's 1, not 0.
>
> Image:
> https://drive.google.com/file/d/0B9BK7pg8se_iSG80NGwxUkJiX0E/view?usp=sharing
>

 Because I always see element 0 in ParaView. I use GMV files.


>
>
>
>
>
>> For adaptive mesh, they are only active elements. Hope libmesh could
>> provide an interface to query active elements, otherwise it is very
>> inconvenient to debug AMR code.
>>
>
> libmesh provides many such interfaces.  Paul already described how to
> print element IDs in the debugger.  If you want to print them from code,
> just add print statements to do that (loop over active elements, etc).
>

OK, I will use this approach.


>
> --
> John
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to