- edited description
Solution export to VTK drops small values
If a dolfin.Function vector contains small values, e.g. 1e-19, they appear to be set to zero in
$func = dolfin.Function(self.model.mesh.get_function_space())
$... (set small values in func)
$fd = dolfin.File("trajectory.pvd")
$fd << func
In the resulting vtk-file, all values are 0.
I have the same problem when assembling matrices (small values dropped). If this is per design there should be a way to change the default behavior to not drop any small elements.
Comments (6)
-
reporter -
We had reports a long time back that the small number were causing ParaView problems for some users. It would be better to not mess with the solution vector when writing to file.
As a work-around, try using the XDMF format rather than PVD.
-
- marked as enhancement
- marked as minor
- changed milestone to 1.6
-
reporter Yes, that is the usecase. I export the solutions for visualization in ParaView. The issue is not in the solution vector, it is in the export. I am not using the Function to solve a PDE, I use it as a container for data from my spatial stochastic solvers, so I do need to set the data manually. The XDMF format export does not seem to have this problem. Thanks.
-
- changed status to resolved
-
- removed milestone
Removing milestone: 1.6 (automated comment)
- Log in to comment