Opened 13 years ago
Closed 13 years ago
#272 closed defect (fixed)
Error in Frankel 2002 forecast
Reported by: | Kevin Milner | Owned by: | Peter Powers |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | sha | Version: | |
Keywords: | Cc: |
Description
Peter, I think this might be due to some of your recent changes?
To reproduce, just call updateForecast on Frankel02_AdjustableEqkRupForecast (or try to calculate a curve in an application).
java.lang.UnsupportedOperationException at org.opensha.sha.magdist.SingleMagFreqDist.set(SingleMagFreqDist.java:189) at org.opensha.sha.magdist.SingleMagFreqDist.setMagAndRate(SingleMagFreqDist.java:113) at org.opensha.sha.magdist.SingleMagFreqDist.<init>(SingleMagFreqDist.java:85) at org.opensha.sha.earthquake.rupForecastImpl.Frankel02.Frankel02_AdjustableEqkRupForecast.makeFaultSources(Frankel02_AdjustableEqkRupForecast.java:520) at org.opensha.sha.earthquake.rupForecastImpl.Frankel02.Frankel02_AdjustableEqkRupForecast.makeAllFaultSources(Frankel02_AdjustableEqkRupForecast.java:341) at org.opensha.sha.earthquake.rupForecastImpl.Frankel02.Frankel02_AdjustableEqkRupForecast.updateForecast(Frankel02_AdjustableEqkRupForecast.java:1113) at org.opensha.sha.gui.beans.ERF_GuiBean.getSelectedERF(ERF_GuiBean.java:428) at org.opensha.sha.gui.HazardCurveServerModeApplication.computeHazardCurve(HazardCurveServerModeApplication.java:1288) at org.opensha.sha.gui.HazardCurveServerModeApplication.run(HazardCurveServerModeApplication.java:944) at java.lang.Thread.run(Thread.java:662)
Note: See
TracTickets for help on using
tickets.
Yes; it appeared to me that the use of SingleMagFreqDist? would be similar to GaussianMFD etc is that once created, you really wouldn't want people mucking around with the values. Clearly this was not the case and the set() method overrides that I added have ben removed in [7848].
I'd argue that we may want to change the MFD classes to be more immutable thereby limiting complexity and as yet nonexistent unit tests, excepting add (summing multiple mfd) operations and similar. For later. Closed.