VTK output error using unstructured grids (found in regression_tests and shortcourse files)

79 views
Skip to first unread message

James Patterson

unread,
Oct 3, 2022, 6:31:34 PM10/3/22
to pflotr...@googlegroups.com

Hey there,

 

I’m an aspiring PFLOTRANer and am just starting out. But I believe found an issue with VTK output of unstructured grids.

 

Issue: output to VTK is successful and text appears plausibly normal, but loading into Paraview gives this error: “Number of cells don’t match!”

 

Conditions: occurs when using the FORMAT VTK option in OUTPUT block after loading in an unstructured file (.h5 or .ugi) via TYPE UNSTRUCTURED <file_name> in GRID. The error does not occur when creating a structured grid directly within PFLOTRAN.

 

To reproduce: take, for example, this regression test: pflotran/regression_tests/default/discretization/mixed_implicit-np4.in and replace “FORMAT HDF5” on line 93 with “FORMAT VTK”. I have reproduced the error on every regression test and shortcourse project which uses unstructured grids (e.g. pflotran/shortcourse/exercises/implicit_grid/mixed_implicit.in). I’ve attached the altered input file and initial VTK output.

 

Possible explanation: I’ve compared these outputs with VTK files which are output from structured grids (e.g. pflotran/shortcourse/exercises/5-spot/pflotran.in), and it seems that the VTK file has no cell vertex/point data at all. It’s missing 3 blocks: POINTS, CELLS, and CELL_TYPES. Instead it just jumped to CELL_DATA and gives the data values but non of the geometry info. Perhaps this is meant as a way of reducing the amount of geometry data that is included in the VTK files, but as .ugi is not a recognized file format for Paraview I don’t see a way to merge the two.

 

System and install info: Ubuntu 22.04, pflotran installed last week following these instructions exactly.

 

 

Thanks for the help and please let me know if there’s anything I can do to make the issue clearer.

 

Cheers,

 

James P.

Notice: This email and any attachments are confidential and may not be used, published or redistributed without the prior written consent of the Institute of Geological and Nuclear Sciences Limited (GNS Science). If received in error please destroy and immediately notify GNS Science. Do not copy or disclose the contents.
mixed_implicit-np4_JWP.in
mixed_implicit-np4_JWP-000.vtk

Hammond, Glenn E

unread,
Oct 4, 2022, 11:38:09 AM10/4/22
to pflotr...@googlegroups.com

James,

 

This issue was discovered in August and an error message was added to the master branch of the code (development version).

 

https://bitbucket.org/pflotran/pflotran/annotate/master/src/pflotran/output_vtk.F90?at=master#output_vtk.F90-396

 

The output of unstructured grids using VTK is currently not supported as the code does not write the geometries for the cells.

 

I recommend using the .xmf format (FORMAT HDF5) for unstructured grids, and it can be read by Paraview.

 

Glenn

 

From: pflotr...@googlegroups.com <pflotr...@googlegroups.com> On Behalf Of James Patterson
Sent: Monday, October 3, 2022 3:31 PM
To: pflotr...@googlegroups.com
Subject: [pflotran-dev: 6158] VTK output error using unstructured grids (found in regression_tests and shortcourse files)

 

Check twice before you click! This email originated from outside PNNL.

 

--
You received this message because you are subscribed to the Google Groups "pflotran-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pflotran-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pflotran-dev/SYYP282MB0798D23D28957B07C61C7442DC5B9%40SYYP282MB0798.AUSP282.PROD.OUTLOOK.COM.

Reply all
Reply to author
Forward
0 new messages