VirtualPhotonics / Vts.Gui.Wpf

WPF Application using the Vts library
Other
3 stars 0 forks source link

Two Layer SDA solver with top layer thickness less than 1 lstar causes GUI to crash #20

Closed hayakawa16 closed 5 years ago

hayakawa16 commented 5 years ago

To replicate: Select Forward Solver/Analysis Panel, Fwd Solver: Two Layer SDA. In TissueInput set Layer 0 Layer Height End to be 0.2 and math Layer 1 Height Begin to 0.2. Click Plot Reflectance.

It would nice if a notification was output to the textbox stating that the two layer SDA solution key assumption is that the top layer thickness is greater than lstar, ask to have new inputs entered and not crash.

hayakawa16 commented 5 years ago

Modified code in: 1) TwoLayerSDAForwardSolver to pass an ArgumentException for fluence solutions, 2) ForwardSolverViewModel and FluenceSolverViewModel to catch exception, output ERROR to textbox and carry on (not crash!).