On 9/30/21 6:02 AM, vachanpo...@gmail.com wrote:

I found this thread which highlights one small issue in importing a unv file (generated by Salome): https://groups.google.com/g/dealii/c/iWnLv4v0V1M/m/38jm5Ck8WXYJ.

If I understand correctly, dealii expects the file to start with "-1" and then have the section "2411", instead of all the other stuff that Salome prints. This issue still persists in dealii-9.3.0 (and Salome 9.7).

Is there any specific reason why we simply can not ignore all the lines between "-1" and "2411"?

I am willing to submit a patch if the developers feel this not wrong and would be useful.

Yes, this makes sense. A patch would be welcome!

(Fundamentally, the reason why UNV is such a terrible file format is because it is essentially a memory dump of a program built decades ago. It has a large number of "sections" -- 2411 being one of them -- each of which one has to understand because there are no begin- and end-markers for each section. You can't just read the file until you find the number 2411: if you wanted to do it right, you'd have to correctly read the previous section until it is over, at which point you can inspect the next number and see whether it is 2411, indicating the 2411 section. In practice, you are probably safe if you skip forward to a place where a new -1 alone on one line is followed by 2411 alone on one line, but while this works, this is not the *correct* way to read these files. It really is a complete nightmare and my preference would be if that file format was banned from existence by the QAnon high council. My second choice would be if people/Salome exported meshes in other, better described and easier to read formats.)

Best
 W.


--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/2ba62583-1f00-bdd4-d514-254a120f8c8b%40colostate.edu.

Reply via email to