Skip to content

Archive format 2: time outside, space inside - #23

Merged
cekees merged 2 commits into
mainfrom
ymf-nesting
Oct 26, 2026
Merged

cekees merged 2 commits into
mainfrom
ymf-nesting

Conversation

@cekees

@cekees cekees commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Implements the design in docs/design-time-outside-space.md (approved; the note's commit rides along because this branch is stacked on #22, so merge #22 first or let this one carry it).

  • ymf_archive_version 2: domain: {times: [{time, spaces: {name: grid}}]}. Format 1 is read and upgraded in memory (transpose_collections), never written.
  • append_step(path, instant): one record per instant, so a killed run loses a whole instant. The old (path, collection, step) form still works and is joined into instants on read.
  • ymf2xmf / read_xdmf transpose back: .xmf output is byte-identical to the pre-change code (checked on both example archives and a two-space fixture, from format 1 and format 2).
  • New API: add_instant, uniform_grid, spatial_grid, space_names, series, time_collections. new_domain(name) / add_collection / add_uniform_step(collection=) keep working.
  • Not done: ymf2xmf --upgrade (format 1 reads forever).
  • 533 passed, 6 skipped.

Draft, and do not merge yet. read_ymf now returns the new shape, and Proteus has readers of ["time_collections"] (scripts/clearh5.py, which would silently loop over nothing, and four test modules). Proteus CI installs ymf from @main. Order: Proteus PR whose readers accept either shape, then this, then the Proteus writer PR. See "Implementation notes" in the design doc.

🤖 Generated with Claude Code

cekees and others added 2 commits October 25, 2026 17:42
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The domain is one list of instants with the spaces inside each (times /
spaces), per docs/design-time-outside-space.md. Format 1 is read and
upgraded in memory; append_step takes a whole instant; ymf2xmf writes the
same XDMF as before, one temporal collection per space.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cekees
cekees marked this pull request as ready for review October 25, 2026 19:58
@cekees
cekees merged commit 0cd2775 into main Oct 26, 2026
7 checks passed
@cekees
cekees deleted the ymf-nesting branch October 26, 2026 08:59
cekees referenced this pull request in proteustoolkit/proteus Oct 27, 2026
ymf is moving its archive domain from time_collections (one per space) to
times (one list of instants, spaces inside each; cekees/ymf#23). Add
Archiver.archive_collections, which gives the per-space view of either, and
use it in findArchiveGrid, readMeshFromArchive, archived_times, clearh5 and
the tests that read a domain back. No dependence on the new ymf: the same
tests pass with the current ymf main and with ymf#23.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cekees referenced this pull request in proteustoolkit/proteus Oct 27, 2026
assemble_domain walks steps outermost and lets each collection join the
instant at its time; the live append writes one record per instant, so a
killed run loses a whole instant, never one space of it; inline archives
build instants directly; archived_times is the instants; gatherTimes
truncates instants. The HDF5 metadata layout and METADATA_FORMAT_VERSION
are unchanged. A space first archived late is now found by a reader that
does not know the step count (it used to stop at the first gap).

Needs ymf archive format 2 (cekees/ymf#23).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cekees added a commit that referenced this pull request Nov 2, 2026
The docs directory mixed the two guides with superseded drafts, a session
log and unverified research, and the index called the v0.1 draft "the best
statement of the design principles" after two of them were dropped. This
sorts them by what they are, with no change to any guide's content beyond
moving closed gaps out.

- design/time-outside-space.md: status says implemented (ymf#22/#23,
  proteus#109/#110) and that both § 8 questions were answered by
  cekees/proteus#121.
- history/: schema-v0.1, schema-v0.2-delta, session-2026-07-29, each with
  a header saying what replaced it.
- research/: units, data-sources, csdms-bmi; the csdms errors move from
  the index into the file's own header.
- changes.md (new): the closed Known-gaps entries, dated, with the commit
  that closed each, plus the two C27 decisions recorded only outside the
  repo until now (composition may remove; numbers and expressions
  treated uniformly).
- problem-specification.md: Known gaps keeps only open gaps (5, two of
  them the remnants left inside closed entries). The boundary-condition
  behaviour that lived there (Neumann sign, Robin, series) moves into the
  body. "Only on a box" was stale: only periodic needs a box.
- archive-format.md, README: Proteus writes this on its 2.0 line, not "the
  ymf_io branch"; say that the solver's tree is called domain in a solver
  document and approximation in an output.
- Doc paths in source comments updated. No code changed.

Checked: every relative link and anchor in README.md and docs/ resolves
(0 broken). Tests: 596 passed, 2 skipped, before and after (petsc-dev env,
macOS arm64).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant