Skip to content

New feature observation - #415

Draft
adrianarce-elemwave wants to merge 15 commits into
devfrom
new-feature-observation
Draft

New feature observation#415
adrianarce-elemwave wants to merge 15 commits into
devfrom
new-feature-observation

Conversation

@adrianarce-elemwave

Copy link
Copy Markdown
Collaborator

Observation Module Capabilities

This PR introduces and validates the current observation subsystem capabilities for storing, updating, and flushing FDTD probe data.

The observation module currently supports:

  • Structured storage for time-domain and frequency-domain probe data.
  • Allocation and cleanup helpers for serialized observation buffers.
  • Time-domain scalar and vector field storage.
  • Frequency-domain complex field storage.
  • Serialized current metadata storage, including cell indices, current type, and material/tag id.
  • Observation preprocessing through preprocess_observation.
  • Reset of observation state flags: done, begun, and flushed.
  • Clamping and correction of observation time windows.
  • Normalisation of invalid or excessive frequency steps.
  • SaveAll handling for non-volumic probes.
  • Special handling for volumic probes and mapvtk observations.
  • Observation initialisation through InitObservation.
  • Allocation of per-request and per-probe output structures.
  • MPI-aware clipping or disabling of probes outside the local subdomain.
  • Output path and file-unit setup.
  • Duplicate output filename handling.
  • Initialisation of volumic binary outputs.
  • Initialisation of point, block-current, wire, charge, line-integral, far-field, and map-VTK style probe metadata.
  • Runtime updates through UpdateObservation.
  • Point electric and magnetic field probes.
  • Block electric and magnetic current probes.
  • Wire current and charge probes.
  • Line-integral probes.
  • Volumic scalar and component field probes.
  • Volumic current and map-VTK serialisation.
  • Frequency-domain accumulation using DTFT-style complex updates.
  • Optional MTLN probe initialisation, update, and close paths when compiled with MTLN support.
  • Output flushing through FlushObservationFiles.
  • ASCII time-domain probe output.
  • Binary volumic output.
  • Frequency-domain binary output.
  • Incident-field output columns when plane waves are present.
  • MPI synchronisation for block-current outputs.
  • Far-field flushing.
  • Resource cleanup through DestroyObservation.
  • Access to observation output state through GetOutput.
  • Field-to-storage mapping through fieldo.
  • DTFT computation through dtft.

Test Coverage Added

The current test coverage includes:

  • Allocation/deallocation tests for Serialized_t time-domain buffers.
  • Allocation/deallocation tests for Serialized_t frequency-domain buffers.
  • Allocation/deallocation tests for serialized current metadata.
  • Preprocessing tests for initial-time correction.
  • Preprocessing tests for mapvtk time-window handling.
  • Preprocessing tests for timestep larger than the requested observation window.
  • Preprocessing tests for zero or oversized frequency steps.
  • Preprocessing tests for volumic and non-volumic SaveAll behaviour.
  • Preprocessing tests for SaveAll time-window expansion.
  • Preprocessing tests for final-time correction when it is earlier than initial time.
  • Preprocessing tests for protection against excessively large time ranges.
  • Initialisation smoke coverage for a volumic time-movie observation.
  • Update smoke coverage for a volumic time-movie observation.
  • Output metadata/path validation for the volumic time-movie initialisation path.

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