Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Saving solution (magnetostatics) to .vtk - extremely large files

More
5 years 8 months ago #686 by creativeworker
Hello,

i'd like to save my solution of the ngsolve calculation to a .vtk file to prepare some nice graphics with ParaView. The problem is a magnetostatic one and has about 600.000 elements.
The export is lasting forever and producing extremely large files. (way over 20 GB)

i use the following code:
Code:
# VTKOutput object vtk = VTKOutput(ma=mesh, coefs=[u], names = ["vectorfield"], filename="result", subdivision=3) # Exporting the results: vtk.Do()

Is there something wrong with the concept of exporting the solution?
Can i reduce the resolution of the numbers?

Many thanks in advance for your support!
With best regards
More
5 years 8 months ago #688 by schruste
Hi creativeworker,

The VTK-legacy format (what is used here) is really consuming a lot of disk space (we haven't implemented the VTK binary format which would spare a lot of space). Your example snippet is fine. However, you are using subdivision=3 which means that every tetrahedron is divided into 8³=512 tetrahedron only for the purpose of visualization. This makes sense for higher order polynomials representing solutions with large variations. However, if you are ok with a low resolution visualization, try subdivision=0 which should give you roughly a file size of around 40 MB.

Best,
Christoph
The following user(s) said Thank You: creativeworker, gcdiwan
More
5 years 8 months ago #689 by creativeworker
Thank you! This solved it for my purpose. I wasn't aware of the extreme effect of the subdivision parameter. FYI: The file has now 160MB.
Time to create page: 0.144 seconds