Skip to content
Snippets Groups Projects

Feature paraview vtk

Merged Mark OLESEN requested to merge feature-paraview-vtk into develop

Longstanding changes to OpenFOAM infrastructure for improving the handling of VTK output and paraview interfaces.

Follows up on work started with 1612 (the vtk output formatters). At that stage, we had introduced foam-vtk-cells in the attempt to consolidate vtkTopo (from foamToVTK), some bits and pieces from a foamToVTU utility and of course the paraview reader module. Each of these did something somewhat similar: namely convert OpenFOAM volume meshes into VTK formats, plus some additional management of polyhedral decomposition (since VTK still isn't the best with these). However, each of the applications have very slightly different requirements on the output format (legacy vs xml etc). Reducing the memory overhead and improving the overall performance of the paraview reader module was an additional driving factor. The latter becoming quite important if we wish to target a catalyst interface.

The key points of the updated infrastructure:

  • dimensioning analysis for OpenFOAM -> VTK conversion now stored and encapsulated as foamVtuSizing.
  • copying of OpenFOAM mesh types to VTK types is now done as a service method (algorithm) from foamVtuSizing, with storage being administer elsewhere outside of the class. This lets us target various combinations of output format (legacy, xml, vtk-internal) and storage primitives (int32, int64) and storage types (OpenFOAM List, std::vector, VTK storage classes) without code duplication. This lets us leverage the OpenFOAM infrastructure when populating the VTK classes and handle the different API sizings (eg, OpenFOAM label vs VTK vtkIdType) and the different mesh layouts with the minimal level of overhead.
  • Revamped paraview reader module to cache the VTK grid and only shallow copy it when changing time-steps (when the OpenFOAM mesh itself doesn't change). The storage change also makes it easier to understand what the reader module is actually doing.
  • Extended the formatting support for legacy and also xml formats.
  • Now possible to emit VTU, VTP files from foamToVTK. This makes for easier loading of results and with xml formats we can start grouping multiblock files etc in the future.
  • propagated the newer formatting options to reduce overall code clutter in most places where vtk output was being generated. This will still need more attention, but is largely complete.

@Sergio @Prashant - extra testing would be nice.

Edited by Mark OLESEN

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Mark OLESEN changed target branch from master to develop

    changed target branch from master to develop

  • Mark OLESEN changed the description

    changed the description

  • Mark OLESEN added 93 commits

    added 93 commits

    • f656f4ee...407b8c77 - 66 commits from branch develop
    • f5a3828e - ENH: provide OpenFOAM/VTK low-level transcription routines
    • 7024cbef - ENH: rationalize VTK output classes and structures
    • 021952a7 - ENH: replace writeFuncs in setSet with foamVtk library utilities
    • 91383d73 - STYLE: use labelRange and range-based-for in paraview readers
    • d938206d - ENH: use prefix when displaying group,patch names for paraview selection
    • d01976bd - ENH: use smart pointers for paraview readers
    • b051d607 - STYLE: avoid VTK InsertNextPoint if we already know the sizes
    • 01a04e6e - STYLE: reduce number of small methods in paraview reader
    • 12231112 - ENH: improve internal bookkeeping in paraview readers
    • 0d02dd8d - ENH: first pv reader version with delayed assembly of output blocks
    • 77ec48e3 - ENH: replace internal meshmaps with foamVtkMeshMaps
    • 00abf327 - ENH: replace paraview vtk conversion with library utilities
    • 9dcabc1d - ENH: replace foamToVTK routines with library-level equivalents
    • a0364c16 - ENH: paraFoam --help => immediate pass-through to paraview --help
    • c70a1d09 - ENH: paraview reader module with internal caching of the vtk geometries
    • f6126cac - ENH: support enumerations for vtk xml file tags and some legacy text elements
    • d540facc - ENH: construct VTK writers with the outputOptions and adjust internally
    • 8eb4ff31 - ENH: add VTP, VTU output for most vtk writers (insitu only)
    • 24945710 - ENH: add VTP output support for surfMesh
    • 82911b3c - CONFIG: bump paraview version
    • 72d06a93 - ENH: consolidate vtk classes into 'Foam::vtk' namespace
    • d59d7a8a - STYLE: adjust feedback comments in foamToVTK
    • 41e38b6c - STYLE: pass legacy nCmpt as int
    • 57e14df6 - ENH: support direct writing of fields from vtk::internalWriter
    • 24e6b661 - ENH: support direct writing of fields from vtk::patchWriter
    • dbdbff92 - ENH: upgrade writeVTK function object -> vtkWrite function object
    • 05a7160e - ENH: add foamToVTK -name option

    Compare with previous version

    Toggle commit list
  • merged

  • Andrew Heather mentioned in commit 0032fe3b

    mentioned in commit 0032fe3b

Please register or sign in to reply