Skip to content

v1.1.1#8

Merged
dobrienphd merged 16 commits into
mainfrom
v1.1.1
Mar 29, 2026
Merged

v1.1.1#8
dobrienphd merged 16 commits into
mainfrom
v1.1.1

Conversation

@dobrienphd

Copy link
Copy Markdown
Owner

What's Changed in v1.1.1

Bug Fixes

Uninitialized Variable Fixes

  • Fixed uninitialized member variables in PhaseSpaceFileWriter (flipXDirection_, flipYDirection_, flipZDirection_ now value-initialized in constructor)
  • Fixed uninitialized constant member variables in IAEAHeader (constantX_ through constantWeight_ now value-initialized)
  • Fixed uninitialized latchOption_ in EGSphspFile::Writer (now initialized to LATCH_OPTION_2 in constructor) and added missing --EGS-latch-option CLI parsing, which was previously ignored by the Writer

Parallel Reader Robustness & API Improvements

New Format Capability Queries on PhaseSpaceFileReader

  • hasNativeRepresentedHistoryCount() — returns true if the format can provide the represented history count without scanning the file (overridden by TOPAS ASCII/BINARY)
  • hasNativeIncrementalHistoryCounters() — returns true if the format directly stores incremental history numbers per-particle (overridden by IAEA, penEasy, and ROOT readers)
  • These replace internal try/catch blocks with explicit capability checks for cleaner, more predictable logic

HistoryBalancedParallelReader Improvements

  • getParticlesRead(threadIndex) — new method returning the number of particles read by a specific thread
  • getTotalParticlesRead() — new method returning the total particles read across all threads
  • getTotalHistoriesRead() — new method returning the total original histories read across all threads
  • getNumberOfThreads() — new method returning the number of parallel threads
  • Constructor refactored to use a single-pass scan to find per-thread starting particle indices, replacing the previous multi-threaded seek approach with sequential moveToParticle() calls for more efficient initialization
  • Removed unused totalHistoriesToRead_ member variable
  • Replaced try/catch-based represented history detection with hasNativeRepresentedHistoryCount() check

ParticleBalancedParallelReader Improvements

  • getHistoriesRead(threadIndex) — new method returning the number of original histories covered by a specific thread, using one of two computation modes:
    • RATIO mode: maps per-thread represented history count to original histories via the known original/represented ratio (used when hasNativeRepresentedHistoryCount() is true)
    • INCREMENTAL mode: uses per-particle incremental history sums (used when native represented count is unavailable)
  • getTotalParticlesRead() — new method returning the total particles read across all threads
  • getTotalHistoriesRead() — new method returning the total original histories read across all threads; returns numberOfOriginalHistories when all particles have been consumed
  • Per-particle tracking of representedHistoriesRead_ and incrementalHistorySum_ counters per thread
  • Early detection of history counting mode during construction based on format capabilities
  • Replaced try/catch-based represented history detection with hasNativeRepresentedHistoryCount() check

Python Bindings

Parallel Reader Bindings

  • HistoryBalancedParallelReader and ParticleBalancedParallelReader now fully exposed to Python with all public methods (get_next_particle, peek_next_particle, has_more_particles, get_histories_read, get_particles_read, get_total_histories_read, get_number_of_threads, close, etc.)
  • Parallel reader source files added to setup.py build

Version Introspection

  • particlezoo.__version__ attribute exposing the version string (e.g. "1.1.1")
  • get_version_string() function returning the full version string (e.g. "ParticleZoo v1.1.1")

Documentation

  • Reference manual updated to v1.1.1

Full Changelog: v1.1.0...v1.1.1

@dobrienphd dobrienphd merged commit 272d23d into main Mar 29, 2026
6 checks passed
@dobrienphd dobrienphd deleted the v1.1.1 branch March 29, 2026 19:02
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