--
You received this message because you are subscribed to the Google Groups "basilisk-fr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to basilisk-fr+unsubscribe@googlegroups.com.
To post to this group, send email to basil...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/basilisk-fr/6f106b90-911e-48bf-bff1-2aa13bb00c24%40googlegroups.com.
Hi Miloud,I happened to discuss with Stephane about the output yesterday. The current output_vtk is a simple and temporary fix and it cast the octree data to a structure grid. What it means is that now you pretend you have a data with a uniform Cartesian grid with the maximum level. Therefore, you can imagine if you simply extend the approach to 3D, it is not surprised to me that the data would be huge. Converting the file from ASCII to binary like Andrés suggested may help but depending on your problem, the file can still be very large.Ideally, we should work on developing a octree-vtk output (Stephane mentioned that it is on his to-do list, so it will take a while). Or even better, we can split the data into multiple blocks to enable parallel visualization by for example paraview.For the moment, there are a few compromise tricks to try:1, Gerris has a more sophisticated vtk writer, which can read a gfs file and cast it into vtk format. It uses unstructured mesh, so though not as good as a octree, it is for sure much better than the current output_vtk in basilisk. If you have gerris installed, they you simply need to use:gerris3D -e "OutputSimulation {iStep = 1} file.vtk {format=VTK variables = T} file.gfs2, Then if the file is still too big, Stephane suggested that one may consider to limit the maximum level when he outputs with output_gfs. For example, you use maximum level 13 for calculation, but you only output the results only up to level 12. This would obviously reduce the file size and it would be useful if the fine mesh results are only important to capturing the physics but not to visualization.Best,Stanley
On Thu, Jan 5, 2017 at 8:52 PM, Andrés Castillo-Castellanos <thuc...@gmail.com> wrote:
Hey Miloud,
The thing with output_vtk is that data is written in plain text. This is handy, but files are usually 4 to 6 times larger, so switching to binary files would improve that. For that you could use the old VTK binary format or the newer XML based ones (vtu,vts,vtp) and so on. I have a draft for the newer format vts (also writes in ascii) that is meant to be used with multigrid in 3D. Some tweaking might be required but at least should give you an idea of this new format. For that, switching to a binary file sould be relatively straightforward.
As an alternative you could read this other post on the XDMF format that is suited for large dataset. https://groups.google.com/d/topic/basilisk-fr/rriHZd4d1Pc/discussion
Best regards,
Le jeudi 5 janvier 2017 19:55:28 UTC+1, Miloud BenBen a écrit :Dear users,I try to write vtk from basilisk using output_vtk but the problem I think is that the function is only done for 2D. So I write a version for 3D but i have large files at end and the files are not working with paraview either.I wonder if there is solution to reduce the size, when i convert from gfs is perfect excepting the bug about different (N- versus Z-) ordering conventions.I am open to any suggestions, thank you,Miloud
--
You received this message because you are subscribed to the Google Groups "basilisk-fr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to basilisk-fr...@googlegroups.com.
To post to this group, send email to basil...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/basilisk-fr/6f106b90-911e-48bf-bff1-2aa13bb00c24%40googlegroups.com.
fputs ("\t\t\t <CellData Scalars=\"scalars\">\n", fp);
for (scalar s in list) {
fprintf (fp,"\t\t\t\t <DataArray type=\"Float64\" Name=\"%s\" format=\"ascii\">\n", s.name);
foreach(){
fprintf (fp, "\t\t\t\t\t %g\n", val(s));
}
fputs ("\t\t\t\t </DataArray>\n", fp);
}
....
Into something like this
fputs ("\t\t\t <PointDataScalars=\"scalars\">\n", fp); for (scalar s in list) { fprintf (fp,"\t\t\t\t <DataArray type=\"Float64\" Name=\"%s\" format=\"ascii\">\n", s.name); foreach_vertex(){fprintf (fp, "\t\t\t\t\t %g\n",interpolate (s, x, y)); } fputs ("\t\t\t\t </DataArray>\n", fp); }
...
fputs ("\t\t\t </PointData>\n", fp);
> email to basil...@googlegroups.com.