Skip to content

feat(gui): UserTally editor#14

Open
dhanavanthesh wants to merge 1 commit into
ir2-lab:mainfrom
dhanavanthesh:feat/usertally-editor-clean
Open

feat(gui): UserTally editor#14
dhanavanthesh wants to merge 1 commit into
ir2-lab:mainfrom
dhanavanthesh:feat/usertally-editor-clean

Conversation

@dhanavanthesh
Copy link
Copy Markdown
Contributor

Closes TODO.md line 46.

  • Implement UserTally options/definition in GUI

The // TODO !! at simulationoptionsview.cpp:74 replaced with a full UserTallyView widget.

Tally management

  • Add, remove, rename, duplicate from toolbar
  • Duplicate produces collision-safe id: _copy, _copy2, ...
  • Event picker: IonStop, IonExit, Vacancy, Replacement, CascadeComplete, BoundaryCrossing
  • Disables during simulation run, reloads on revert

Bin variable table

  • 14 variables in a dropdown with name + description
  • [~] - linspace dialog per row: enter min, max, N, live edge preview
  • [×] - removes that variable
  • Non-monotonic edges turn the cell red

Live summary

  • "2D tally: x × E (100 × 50 = 5000 bins)"
  • Amber at 10 000 bins, red at 200 000
  • Memory shown as ~40.0 KB / ~2.30 MB
  • Warning text at 500 000 bins

Coordinate system

  • "Use lab frame" checkbox hides origin/z-axis/xz-vector fields when not needed

Templates

  • 6 presets: Depth Profile, Angular Distribution, Energy Spectrum, Implantation Map, Vacancy Depth Profile, Lateral Spread
  • Preview shows x : 0 → 100 (100 bins) per variable
  • If no tallies exist, one is created automatically before the dialog opens
  • Template JSON cached after first parse

Also fixed a latent issue in OptionsModel to setData(idx, QVariant()) was silently reaching ojson::parse("") on every array edit from the GUI. Replaced with notifyDataChanged() across all call sites in materialsdefview.cpp and regionsview.cpp. Empty string guard added in parse_json::set_impl_. Container nodes marked non-editable in flags().

Closes TODO.md line 46.

- Replace // TODO !! with full UserTallyView widget
- Add/remove/rename/duplicate tallies, 14 bin variables, linspace generator
- Live summary, traffic-light colors, memory estimate, 6 templates
- notifyDataChanged() replaces setData(idx, QVariant()) across gui views
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