Commit Graph
44 Commits
Author SHA1 Message Date
Zaher Salman 93f0b1c4d5 Fix parIRL=1 crash: zero recoil cutoff makes the cascade diverge
parIRL=1 crashed the engine with SIGSEGV (CGI exitCode 139) at both GUI
defaults, so the sputtering path has never actually worked.

The first diagnosis blamed KO(600,MAXNL5,2) being shallower than the
2000-wide recoil lists. That is wrong: enlarging KO to 2000 does not help,
because the cascade overruns all of them. The real cause is parERC=0, which
is the GUI default and what tests/Si_1layer/Si_1layer_E19000.inp carries. The
primary knock-on test is IF(DEN(IV).LE.ERC) GO TO 6, so with no cutoff every
atom receiving any energy is respawned as a recoil on each cascade
generation; the branching ratio exceeds one and NREC1/NREC2 grow
geometrically (81, 153, 269, 455, 773, 1317, ...) instead of draining, so the
list-2/list-1 loop at label 83 never terminates. Forcing a real cutoff
converges, with a peak depth of only 103, so KO was left at 600.

fortran/trimspNL.F:
- Refuse parIRL>=1 with parERC<=0 after readGuiInput, before any transport
  work, with a message naming the field to change.
- The IF(NREC2.GT.2000) guard now stops non-zero instead of falling through
  into the out-of-bounds write loop, so any future non-convergent cascade
  fails cleanly instead of corrupting memory.

TrimSPlib.js / TrimSP.html, so this is caught before the engine is invoked:
- handleRecoilModeChange, wired to the parIRL widget, fills parERC with
  TRIMSP_MIN_RECOIL_CUTOFF = 0.02 when recoils are switched on with a cutoff
  of 0, and says so.
- A pre-run check refuses the run if the user then insists on parIRL=1 with
  parERC=0, reporting via the status bar and a transient warning and focusing
  parERC. Deliberately not wired to parERC, so retyping the cutoff is what
  insisting means and is not silently overridden; this also covers shared
  config links, which assign widget values directly.
- The parIRL tooltip documents the requirement.

Tests: tests/recoil-cutoff-test.js (12 cases) lifts the shipped cutoff code
out of TrimSPlib.js and runs it against a document stub. Verified against a
fresh build: parERC=0/parIRL=1 now exits 1 with the new message instead of
139, parERC=0.02 completes with parIRL=0 or 1, and parERC=0/parIRL=0 output
is unchanged (.rge byte-identical). tests/cgi-tests.sh 18/18.
2026-09-26 18:55:38 +02:00
salman 46dc388a56 Add Workbench citation, gitea link, and Quick Start contact 2026-09-06 21:37:27 +02:00
salman 4236f9450a Release Workbench 1.5.0 with sharing help 2026-08-28 15:04:02 +02:00
salman 8061f389fe Improve web results and diagnostics 2026-08-27 21:42:31 +02:00
salman 1f6ecc7982 Modernize scan workflow and web deployment 2026-08-27 19:24:27 +02:00
salman 65aeddd0ef Modernize application layout 2026-08-27 17:25:33 +02:00
salman 19b9eacf53 Fixed small final bug. 2026-08-27 15:22:15 +02:00
salman aa82948bbd Updated software links and version. 2026-08-27 15:09:24 +02:00
salman cae1271788 Update names following the modernized version and associated paper. 2026-08-14 16:03:27 +02:00
salman dffbd1f6ea Adapt the web backend for the rng selection. 2026-06-25 23:53:10 +02:00
salman e54a8e4f6d Bump up version with rng features. Include citation instructions. 2026-06-25 09:50:42 +02:00
salman d4cdb1dd65 Expose RNG selcetion from GUI 2026-06-25 09:42:41 +02:00
salman e06884b55e Maximum number of threads should not exceed available number 2026-06-17 17:04:41 +02:00
salman 0ea6f27019 Expose type of scan and threads for both loop and set of values. 2026-06-14 22:33:55 +02:00
salman f8ecbae99d Make scans run on multiple threads. Speedup gain on local runs is fantastic. 2026-06-14 22:28:29 +02:00
salman 28ff33814e Minor changes 2026-04-22 10:51:00 +02:00
salman b1f35b4c26 Add status bar 2026-04-16 16:11:54 +02:00
salman aeef88480e Add Be-11 option and RuO2 density 2026-04-15 13:57:04 +02:00
salman 0e4ff38b64 Use cwd as default dialog path 2026-04-14 13:16:25 +02:00
salman d6297cee94 Add browse folder fallback 2026-04-14 13:04:49 +02:00
ext-mcfadd_r b3685ec6e4 move text outside of ordered list 2024-08-12 16:52:05 -07:00
ext-mcfadd_r 1129ae00a5 clarify the default behaviour in the tooltip text 2024-08-12 16:46:53 -07:00
ext-mcfadd_r 391c25ef93 more stopping power coefficient options
This patch modularizes the code responsible for selecting the stopping power coefficients. Specifically, it:

- moves the data in `elemPars` to seperate JSON files in the `data/` directory. This makes it easier to modify the existing data or add new data sources. Note that this refactoring does not alter the previous functionality - the contents of each file are simply read and deep-merged into an initially empty `elemPars` object.
- adds the original Varelas-Biersack parameters from Anderson & Ziegler (1977).
- updates the "Other Parameters" tab in the GUI for easy toggling between the different stopping power coefficient data sources.
2024-08-12 16:24:42 -07:00
salman c44af3b4d6 Added Ar projectile. 2023-04-20 17:28:59 +02:00
salman 0eab71ca40 Code reorganization and fix regresion. 2023-01-12 11:14:57 +01:00
salman ac3e1ea0d6 First working version for both web and node.js 2023-01-11 21:53:42 +01:00
salman 274cd54133 More work towards unification of online and standalone versions. 2023-01-10 21:52:34 +01:00
salman 2836b178ba Simplify javascript code, towards unification of online and standalone versions. 2023-01-09 11:41:12 +01:00
salman dc2d5dd866 Use tooltips instead of <details>. 2023-01-04 14:42:08 +01:00
salman c7d29781ee Add option to force the use of the old ICRU parameters. 2023-01-04 11:46:40 +01:00
salman db0389de8b Revert to standardarized elemnt naming to allow expanding to any projectile element. Give warning when density is estimated from weighted average to make sure the user is are aware. 2023-01-04 11:29:49 +01:00
salman 281f4e1e02 Merge branch 'master' of bitbucket.org:zaher-salman/trimsp 2023-01-04 09:50:44 +01:00
salman 87682645bc Different path handeling 2023-01-04 09:50:29 +01:00
ext-mcfadd_r debb193247 further refinement to the "other parameters" tab
- expand/improve parameter descriptions
- use ordered lists to display value options
- allow text wrapping in table cells
2022-12-31 20:04:46 -04:00
ext-mcfadd_r 7fc4cb06e7 Merge branch 'master' of https://bitbucket.org/zaher-salman/trimsp 2022-12-29 18:48:15 -04:00
ext-mcfadd_r eb3aac43e6 add explanatory text for the "other" simulation parameters
- also include link to Eckstein's book
2022-12-28 12:45:48 -04:00
ext-mcfadd_r 29da5776af add better labelling of internals/externals
- use clearer notation for isotope-specific projectiles
- harmonize formatting of GUI labels (consistent naming, add missing units, fix typos, etc.)
- use more verbose/descriptive naming of the function/dictionary handelling the electronic stopping coefficients (for easier extension later).
2022-12-27 17:06:52 -04:00
salman 7ac303a99e Better handeling of working path 2022-12-13 13:29:37 +01:00
salman 630f3b742d Added He projectiles. 2022-09-16 20:06:12 +02:00
ext-mcfadd_r 838de27298 fix typo 2021-09-29 11:27:03 -07:00
ext-mcfadd_r c2d8618bd2 add magnesium-31 as a projectile option
- use its AME2020 mass
2021-09-29 09:28:44 -07:00
Zaher Salman 47a135b1ee Use app path to determine where trimspNL binary is. 2021-06-14 22:46:07 +02:00
salman 8b8e163b78 Added browse folder button. 2021-06-11 17:22:01 +02:00
Zaher Salman 7735c3d78d First upload 2021-06-06 18:34:29 +02:00