Package gov.usgs.earthquake.nshmp.gmm
Class GmmInput.Builder
- java.lang.Object
-
- gov.usgs.earthquake.nshmp.gmm.GmmInput.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GmmInput
build()
Return a newly created GmmInput.GmmInput.Builder
dip(double dip)
Set the rupture dip.GmmInput.Builder
distances(double rJB, double rRup, double rX)
Set the Joyner-Boore distance, rupture distance, and distance X.GmmInput.Builder
distances(Distance distances)
Set the Joyner-Boore distance, rupture distance, and distance X with aDistance
object.GmmInput.Builder
fromCopy(GmmInput model)
Return aBuilder
prepopulated with values copied from the supplied model.GmmInput.Builder
mag(double Mw)
Set the moment magnitude.GmmInput.Builder
rake(double rake)
Set the rupture rake.GmmInput.Builder
rJB(double rJB)
Set the Joyner-Boore distance (distance to surface projection of rupture).GmmInput.Builder
rRup(double rRup)
Set the rupture distance (distance to rupture plane).GmmInput.Builder
rX(double rX)
Set the distance X (shortest distance to extended strike of rupture).GmmInput.Builder
vs30(double vs30)
Set the vs30 at site.GmmInput.Builder
width(double width)
Set the rupture width.GmmInput.Builder
withDefaults()
Return aBuilder
prepopulated with default values.GmmInput.Builder
z1p0(double z1p0)
Set the depth to 1.0 km/s (in km).GmmInput.Builder
z2p5(double z2p5)
Set the depth to 2.5 km/s (in km).GmmInput.Builder
zHyp(double zHyp)
Set the depth to rupture hypocenter.GmmInput.Builder
zSed(double zSed)
Set the sediment thickness (in km).GmmInput.Builder
zTor(double zTor)
Set the depth to top of rupture.
-
-
-
Method Detail
-
fromCopy
public GmmInput.Builder fromCopy(GmmInput model)
Return aBuilder
prepopulated with values copied from the supplied model.- Parameters:
model
- to copy- Throws:
IllegalStateException
- if any other builder method has already been called without first callingbuild()
-
withDefaults
public GmmInput.Builder withDefaults()
Return aBuilder
prepopulated with default values. Builder has the following presets:- Mw: 6.5
- rJB: 10.0 (km)
- rRup: 10.3 (km)
- rX: 10.0 (km)
- dip: 90˚
- width: 14.0 (km)
- zTor: 0.5 (km)
- zHyp: 7.5 (km)
- rake: 0˚
- vs30: 760 (m/s)
- z1p0: NaN (
null
when serialized)
- z2p5: NaN (
null
when serialized)- zSed: NaN (
null
when serialized)- Throws:
IllegalStateException
- if any other builder method has already been called without first callingbuild()
-
mag
public GmmInput.Builder mag(double Mw)
Set the moment magnitude.
-
rJB
public GmmInput.Builder rJB(double rJB)
Set the Joyner-Boore distance (distance to surface projection of rupture).
-
rRup
public GmmInput.Builder rRup(double rRup)
Set the rupture distance (distance to rupture plane).
-
rX
public GmmInput.Builder rX(double rX)
Set the distance X (shortest distance to extended strike of rupture).
-
distances
public GmmInput.Builder distances(double rJB, double rRup, double rX)
Set the Joyner-Boore distance, rupture distance, and distance X.
-
distances
public GmmInput.Builder distances(Distance distances)
Set the Joyner-Boore distance, rupture distance, and distance X with aDistance
object.
-
dip
public GmmInput.Builder dip(double dip)
Set the rupture dip.
-
width
public GmmInput.Builder width(double width)
Set the rupture width.
-
zTor
public GmmInput.Builder zTor(double zTor)
Set the depth to top of rupture.
-
zHyp
public GmmInput.Builder zHyp(double zHyp)
Set the depth to rupture hypocenter.
-
rake
public GmmInput.Builder rake(double rake)
Set the rupture rake.
-
vs30
public GmmInput.Builder vs30(double vs30)
Set the vs30 at site.
-
z1p0
public GmmInput.Builder z1p0(double z1p0)
Set the depth to 1.0 km/s (in km).
-
z2p5
public GmmInput.Builder z2p5(double z2p5)
Set the depth to 2.5 km/s (in km).
-
zSed
public GmmInput.Builder zSed(double zSed)
Set the sediment thickness (in km).
-
build
public GmmInput build()
Return a newly created GmmInput.
-
-