Skip to content

Update filewriter - #8

Merged
spcvanschie merged 5 commits into
mainfrom
update_filewriter
Oct 5, 2026
Merged

spcvanschie merged 5 commits into
mainfrom
update_filewriter

Conversation

@spcvanschie

Copy link
Copy Markdown
Collaborator

Summary

Overview

  • Fixed MPI mesh partition boundaries in Paraview #5. We now instead gather the whole solution field to rank 0, which is reasonably doable for DG0, but not useful for extremely large problems.
  • Adding a bunch of tests that should run in a few seconds.
  • Adding mesh deformation to the written files, so we don't have to keep adding that in post-processing.

Changes (Check all boxes that apply)

  • Added tests
  • Added examples
  • Updated docs
  • Refactor code
  • Added functionality
  • Fixed bugs (Patch version increase)
  • Changed API (Major/Minor version increase)
  • New release (Major/Minor/Patch version increase)

spcvanschie and others added 5 commits October 5, 2026 12:25
…time keywords to FileWriter

ParaView's VTX reader concatenates the per-rank blocks of a parallel write
without merging the points the blocks share, so DG0 and continuous fields
written per rank showed the MPI partition boundaries as cracks (extra
exterior edges/faces, jumps in point-interpolated cell data). FileWriter now
gathers those spaces to rank 0 and writes them as one block on a serial copy
of the mesh. DG p >= 1 fields, which VTX writes with separate points for
every cell, are still written per rank in parallel (owned cells only).

FileWriter takes two keywords, set per writer:
- mesh_deformation: write each frame on the mesh geometry at the time of the
  write instead of the geometry at construction.
- time_dependent: label frames by an increasing physical time (time=)
  instead of a counter (write_counter).

The wind-tunnel model writes the FOM solution, pressure and mesh-quality
fields on the deformed mesh; the node-motion field stays on the baseline so
Warp By Vector reproduces the deformed mesh.

Tests: tests/test_filewriter.py checks the output meshes and functions
in-process (also re-run under mpirun -n 3) and replays 1- and 3-rank VTX
files the way ParaView's reader assembles them (tests/vtx_replay), requiring
identical structure and values. tests/vtx_replay/make_paraview_check.py
writes a file set for checking by hand in ParaView.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the end-to-end VTX replay test, which compiled a C++ ADIOS2 reader
and spawned four MPI runs (~50 s), by an in-process check that the per-rank
VTX blocks (dolfinx.plot.vtk_mesh, the arrays VTXWriter writes) add up to
the points and cells of a serial write. With the rank-0 gather disabled it
fails for exactly the DG0 and continuous spaces. The filewriter tests now
take ~4 s, including the mpirun -n 3 re-run, and need nothing beyond the
package's own dependencies.

Writers are created through a fixture that closes their files before
removing the temporary directory, so a failing test reports instead of
ADIOS2 aborting the run. The ParaView check-set generator moves to
tests/manual/ (not collected by pytest).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@spcvanschie
spcvanschie merged commit ccca26b into main Oct 5, 2026
3 checks passed
@spcvanschie
spcvanschie deleted the update_filewriter branch October 5, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MPI mesh partition boundaries in Paraview

1 participant