edwardkort/WWIDesigner — pull request #8 by bhp1 (2012-08-08 14:09:09+00:00)
Title: Modelling

As promised, I've re-factored the instrument calculators to remove the cyclic coupling with the Instrument class. I've also removed unnecessary calls to updateComponents(). Since I know Edward feels strongly about this, I'm sending this as a pull request from a branch, rather than a push to the master branch.

All cases except NafOptimizationTest still pass. ChalumeauOptimizationTest passes only because SimpleReedCalculator overrides the default calculator with the original version of calcReflectionCoefficient. ChalumeauOptimizationTest is underconstrained--there are many "perfect" solutions, with slightly different position/diameter combinations for specific holes--and which solution it chooses is very sensitive to tiny changes in floating-point round-off. I'd like to remove the override from SimpleReedCalculator, and re-visit this test.