Frd to vtu converter

Hello everyone,

I had a go at developing a converter that creates ascii or binary vtu files from ascii frd files. The converter uses vtu11 (https://github.com/phmkopp/vtu11) for writing the vtu file. The frd file is mapped (https://github.com/mandreyel/mio) to allow fast access to its contents.
Please feel free to test the converter with your output files and I would appreciate any feedback or notes on any errors with the conversion. For a 3GB frd file the conversion time is 125seconds (approx 2 minutes) on my machine (Intel(R) Xeon(R) Silver 4210 CPU @ 2.20GHz 2.19 GHz (2 processors) - 128GB RAM)

https://drive.google.com/drive/folders/1hf454ZvMhj5fFR21utrCTcpw1fEX-Rrt?usp=sharing

Many thanks,
JW

2 Likes

This could be interesting, thanks! I will test during the night. My two cents:

  1. Could be extrange/dangeorous to give directly an .exe, surely purists will ask you for the code to compile by her self
  2. Looks like that the user must install some other tools to make it work:

Regards!

Many thanks @SergioP . I have recompiled using Visual Studio only without the Intel Compiler; it is a bit slower but still works.
I did think about sharing the code but I need to spend some time cleaning it up…many test routines and other bits of code yet to be deleted.

Best wishes,
JW

Hi Jason,
Your converter could be a killer for my ccx2paraview. I hate you :slight_smile:
Please, share the code for Linux users. Let me know, if you would like to host your project here: CALCULIX · GitHub

1 Like

Hi Ihor,

ccx2paraview is actually one of the main tools in my numerical analysis workflow/toolkit along with PrePomax; so thank you for developing and sharing ccx2paraview.
The base for the converter is a rough C++ conversion of the frd reader from PrePomax and I would need some time to clean up the code before sharing. I got it up and running last weekend for my test cases and wanted some feedback from others with there models before trimming it down.

Best wishes,
JW

1 Like

May I ask why you need the mapping? As far as I understand memory mapping is useful for random access on large files. Converting a file should be possible in a “read once from beginning to end while processing the data on-the-fly” fashion. Or do I miss something? I am particularly unfamiliar with VTU, but I do write converters of FE I/O files with focus on performance, so I am really curious about your decision to map the file.

1 Like

Hello @OliverKunc,

I have a bad habit of trying to peek at my frd files while CalculiX is still running and have at times received a message that a write operation to the frd file could not be performed. With that in mind, I wanted something to grab and create a quick snapshot of the frd file so that the converter can work with it just in case CalculiX may need write access to the file; this was preferred rather than using std::getline to read the files contents line by line, particularly for very large files.
After the mapping, I use std::strtok_r to get the lines of text from the map; this is very similar to using std::getline. It is still a work in progress so I can compile another version using std::getline to see if there is any changes in the total conversion time.

Best wishes,
JW

1 Like