[Paraview] Minor bug in OPENFOAM import filter

David Lonie david.lonie at kitware.com
Fri Jun 24 13:34:10 EDT 2016


Hi Eugene,

On Wed, Jun 22, 2016 at 11:45 AM, Eugene de Villiers <e.devilliers at engys.com
> wrote:

> Attached find a small case
>

Thanks -- I've loaded this up and can reproduce the error. The error occurs
in vtkFoamEntryValue::ReadList, which contains the following comment:

// general-purpose list reader - guess the type of the list and read

// it. only supports ascii format and assumes the preceding '(' has

// already been thrown away.  the reader supports nested list with

// variable lengths (e. g. `((token token) (token token token)).'

// also *supports compound of tokens and lists (e. g. `((token token)*

// *token)') only if a list comes as the first value.*


So the list (1.1 (1 2 3)) is being parsed as a list, and our reader
only supports lists

containing mixed tokens / lists if the lists precede the tokens. And
indeed, changing

file to read ((1 2 3) 1.1) will eliminate the error. The current
parser assumes that the

remainder of the list will also be scalars and attempts to read them
in -- then it

chokes when it encounters a '(' instead of another scalar.


Again, I'm not familiar with the openFOAM format, but would writing
the list with the

nested list first be feasible on your end? I'm not sure if this is a
format restriction or

an implementation detail of our reader.


Alternatively, I saw some discussion around skipping every entry in
boundaryField

specifications other than 'value'. This would likely be quite easy to
implement. My

only question is, would it break anything for the visualization?


Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160624/7a339f65/attachment.html>


More information about the ParaView mailing list