Repository navigation
Update filewriter - #8
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Overview
Changes (Check all boxes that apply)