[Paraview] VTK-Import, NaN-entries
Mathias Winkel
win_wa at gmx.net
Fri Mar 12 08:54:01 EST 2010
Hello,
Thank you for your answer.
Obviously, replacing the invalid data by some number seems to be the
only way. After digging through the Paraview-source I found, that the
vtk-files are read using an istream object with the >> operator (
http://www.cplusplus.com/reference/iostream/istream/operator%3E%3E/ ),
that by standardization does not support non-number-arguments.
So I changed my converter script to replace any "NaN" by something like
-0.9999E30. The value -1e99 did not work for me. Obviously, the allowed
data range is limited to exponents somewhere around 1e43. However, I did
not check that in detail...
If anybody has a better solution, pleas let me know :-)
Thank you and have a nice weekend,
Mathias
Oliver Gloth wrote:
> Hi,
>
> what about -1e99, that's what I have done so far. Then you can easily
> spot the regions where your simulation has fallen over ...
>
> Regards,
> Oliver
>
> Mathias Winkel wrote:
>> Hello,
>>
>> I am using Paraview 3.6.2 to visualize some simulation data by
>> converting my program's output to an ascii-vtk file using a self-made
>> shell script. These (in fact many) vtk files are then imported to
>> Paraview and used for animations etc.
>>
>> During testing, rewirting some code etc., my original simulation data
>> contains invalid numbers (divisions by zero etc.) which are printed as
>> "NaN" when output by Fortran. My data conversion to vtk works anyway,
>> but Paraview cannot import these files since it obviously treats the
>> "NaN" entries as text or something instead as numbers.
>>
>> Do you know if there is some "NaN"-analogon that can be used inside vtk
>> files for Paraview importing? I already tried "nan", "Nan", "NAN", but
>> no success.
>>
>> Attached to this eMail there is a short example file which contains an
>> "NaN" in line 517. After replacing it by "0", the file can be correctly
>> imported, otherwise one half of the dataset epond is missing and an
>> error message is generated.
>> However, I wouldn't like to replace any "NaN" by zeros, since these
>> values are not zero :-)
>>
>> Thank you in advance for your ideas.
>>
>> Regards,
>>
>> Mathias
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>
>
More information about the ParaView
mailing list