Opened 12 years ago
Closed 12 years ago
#71 closed defect (fixed)
problem with AS 2008 when rupWidth=0
Reported by: | Kevin Milner | Owned by: | Peter Powers |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | sha | Version: | |
Keywords: | Cc: | Ned Field |
Description
AS 2008 gives NaN's when rupWidth=0 due to this code. How should it be modified to fix this?
When rupWidth=0, then rXtest=0, and T2 becomes NaN because of a div by zero.
in getMean from trunk/src/org/opensha/sha/imr/attenRelImpl/AS_2008_AttenRel.java@7151#L1110
//T2 (Eq. 9) - rewritten 2009-01-29 to be consistent with ES paper double rXtest = rupWidth*Math.cos(Math.toRadians(dip)); if (rX>rXtest || dip==90.0) { // if site is beyond the surface projection T2 = 1.0; } else { T2 = 0.5 + rX / (2.0*rXtest); }
Note: See
TracTickets for help on using
tickets.
Fixed in [7172] based on e-mail from Ned, 12/27/2010 (changed "rX>rXtest" to "rX>=rXtest").
Merged fix into release 1.0.x branch with [7173], re-released applications (as 1.0.2).