On 20/06/2011 15:37, John Peterson wrote:
> On Mon, Jun 20, 2011 at 1:29 AM, Matteo Semplice
> <[email protected]> wrote:
>
> Hi Matteo,
>
>
>> I had a quick look at the code and maybe the bug is in
>> libMesh::VTKIO::cells_to_vtk (at line 140 of file vtk_io.C).
>> In fact, I think that the loop
>>
>> for(unsigned int el_nr =0; el_nr< mesh.n_active_elem(); ++el_nr){
>> Elem *elem = mesh.elem(el_nr);
>>
>
> It looks as though this incorrect behavior has been fixed since the
> 0.7.0.4 release.
>
> The change took place in r4293, on 2011-03-24.
>
> The loop you mentioned was changed to a loop over active element iterators.
>
> Would it be possible for you to try the SVN version of libmesh instead?
>
Indeed, the output is fine with the current svn version (r4640).
Many thanks for pointing this out and apologies for not checking this
before writing.
However, while I was testing, I found another problem.
The VTK output is correct only for first order elements (QUAD4 and TRI3).
In fact, if I use 2 TRI6 elements on a unit square domain, the output of
VTKIO::write_equation_systems contains 9 nodes (which includes the
midpoints of the edges), but the "connectivity" says
<DataArray type="Int32" Name="connectivity" format="ascii"
RangeMin="-2147483648" RangeMax="8">
0 3 5 -2147483648 0 -2147483648
0 5 8 -2147483648 0 -2147483648
</DataArray>
which is of course wrong since there is no node number -2147483648...
and this makes paraview crash.
Even worse, the output of VTKIO::write() on the same example has
connectivity
<DataArray type="Int32" Name="connectivity" format="ascii"
RangeMin="-1073642363" RangeMax="1071843595">
0 3 5 -1073642363 834831672 1071843595
0 5 8 -1073642363 834831672 1071843595
</DataArray>
which is also wrong and different from the previoius one.
(I am not sure of what the correct output should be, but I guess it
would be something like
0 3 1 4 2 5
0 5 2 7 6 8
However, don't quote me on this, since I don't know very well the vtk
format)
Matteo
--
Matteo Semplice Dip. di Fisica e Matematica
Phone: 031-2386132 Università dell'Insubria
Fax: 031-2386209 Via Valleggio, 11
22100 Como
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users