org.opensha.sha.earthquake.rupForecastImpl
Class FaultRuptureSource

java.lang.Object
  extended by org.opensha.sha.earthquake.ProbEqkSource
      extended by org.opensha.sha.earthquake.rupForecastImpl.FaultRuptureSource
All Implemented Interfaces:
Serializable, Iterable<ProbEqkRupture>, Named, EqkSource

public class FaultRuptureSource
extends ProbEqkSource

Title: FaultRuptureSource

Description: This implements a basic fault source for arbitrary:

If magnitude/probability are given the source is set as non poissonian (and duration is meaningless); If a mag-freq-dist and duration is given then the source is assumed to be Poissonian. If a mag-freq-dist and prob is given then the source is non Poissonian, and the mag-freq-dist is treated as a PDF (relative prob of different mag/rups, such that the sum of these matches the total given). The entire surface ruptures for all cases (no floating of events). Note that duration is the only constructor argument saved internally in order to conserve memory (this is why there are no associated get/set methods for anything besides duration).

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
Ned Field
See Also:
Serialized Form

Field Summary
protected  double duration
           
protected  String NAME
           
 
Fields inherited from class org.opensha.sha.earthquake.ProbEqkSource
isPoissonian, name
 
Constructor Summary
FaultRuptureSource(DiscretizedFunc magDist, RuptureSurface ruptureSurface, double rake, double duration)
          Constructor - this produces a separate rupture for each mag in the mag-freq-dist.
FaultRuptureSource(double prob, IncrementalMagFreqDist magDist, RuptureSurface ruptureSurface, double rake)
          Constructor - this treats the input "magDist" as a PDF (not absolute rates), and assigns a probability to each rupture (one for each mag magnitude) such that the total probabiulity is that given (as "prob").
FaultRuptureSource(double magnitude, RuptureSurface ruptureSurface, double rake, double probability)
          Constructor - this is for a single mag, non-poissonian rupture.
FaultRuptureSource(double magnitude, RuptureSurface ruptureSurface, double rake, double probability, boolean isPoisson)
          Constructor - this is for a single mag source.
 
Method Summary
 LocationList getAllSourceLocs()
          It returns a list of all the locations which make up the surface for this source.
 double getMinDistance(Site site)
          This returns the shortest dist to either end of the fault trace, or to the mid point of the fault trace (done also for the bottom edge of the fault).
 String getName()
          get the name of this class
 int getNumRuptures()
          Get the number of ruptures for this source
 ProbEqkRupture getRupture(int nthRupture)
          This method returns the nth Rupture in the list
 RuptureSurface getSourceSurface()
          Returns the Source Surface.
 void scaleRupProbs(double value)
          This method scales (multiplies) the probability of each rupture by the given value.
 void scaleRupRates(double value)
          This method scales (multiplies) the rate of each rupture by the given value.
 void setDuration(double newDuration)
          This changes the duration for the case where a mag-freq dist was given in the constructor (for the Poisson) case.
 void setName(String name)
          set the name of this class
 
Methods inherited from class org.opensha.sha.earthquake.ProbEqkSource
computeApproxTotalProbAbove, computeEquivTotalMomentRate, computeTotalEquivMeanAnnualRate, computeTotalProb, computeTotalProbAbove, computeTotalProbAbove, drawRandomEqkRuptureIndices, drawRandomEqkRuptures, drawSingleRandomEqkRuptureIndex, getInfo, getRuptureClone, getRuptureList, getRupturesIterator, getSourceMetadata, getTectonicRegionType, isPoissonianSource, isSourcePoissonian, iterator, setInfo, setTectonicRegionType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

protected String NAME

duration

protected double duration
Constructor Detail

FaultRuptureSource

public FaultRuptureSource(double magnitude,
                          RuptureSurface ruptureSurface,
                          double rake,
                          double probability)
Constructor - this is for a single mag, non-poissonian rupture.

Parameters:
magnitude -
ruptureSurface - - any EvenlyGriddedSurface representation of the fault
rake - - average rake of the ruptures
probability - - the probability of the source/rupture

FaultRuptureSource

public FaultRuptureSource(double magnitude,
                          RuptureSurface ruptureSurface,
                          double rake,
                          double probability,
                          boolean isPoisson)
Constructor - this is for a single mag source.

Parameters:
magnitude -
ruptureSurface - - any EvenlyGriddedSurface representation of the fault
rake - - average rake of the ruptures
probability - - the probability of the source/rupture
isPoissonian - - whether or not it's a poisson source

FaultRuptureSource

public FaultRuptureSource(DiscretizedFunc magDist,
                          RuptureSurface ruptureSurface,
                          double rake,
                          double duration)
Constructor - this produces a separate rupture for each mag in the mag-freq-dist. This source is set as Poissonian.

Parameters:
magnitude-frequency - distribution
ruptureSurface - - any EvenlyGriddedSurface representation of the fault
rake - - average rake of the ruptures
duration - - the duration in years

FaultRuptureSource

public FaultRuptureSource(double prob,
                          IncrementalMagFreqDist magDist,
                          RuptureSurface ruptureSurface,
                          double rake)
Constructor - this treats the input "magDist" as a PDF (not absolute rates), and assigns a probability to each rupture (one for each mag magnitude) such that the total probabiulity is that given (as "prob"). This source is set as non Poissonian.

Parameters:
prob - - total probability of an event
magDist - - magnitude-frequency distribution
ruptureSurface - - any EvenlyGriddedSurface representation of the fault
rake - - average rake of the ruptures
Method Detail

getSourceSurface

public RuptureSurface getSourceSurface()
Returns the Source Surface. As all ruptures of this source have the same dimensions, so Source Surface is similar to Rupture Surface.

Returns:
GriddedSurfaceAPI

getAllSourceLocs

public LocationList getAllSourceLocs()
It returns a list of all the locations which make up the surface for this source.

Returns:
LocationList - List of all the locations which constitute the surface of this source

setDuration

public void setDuration(double newDuration)
This changes the duration for the case where a mag-freq dist was given in the constructor (for the Poisson) case.

Parameters:
newDuration -

getNumRuptures

public int getNumRuptures()
Description copied from class: ProbEqkSource
Get the number of ruptures for this source

Specified by:
getNumRuptures in interface EqkSource
Specified by:
getNumRuptures in class ProbEqkSource
Returns:
the total num of rutures for all magnitudes

getRupture

public ProbEqkRupture getRupture(int nthRupture)
This method returns the nth Rupture in the list

Specified by:
getRupture in interface EqkSource
Specified by:
getRupture in class ProbEqkSource

getMinDistance

public double getMinDistance(Site site)
This returns the shortest dist to either end of the fault trace, or to the mid point of the fault trace (done also for the bottom edge of the fault).

Specified by:
getMinDistance in class ProbEqkSource
Parameters:
site -
Returns:
minimum distance in km

setName

public void setName(String name)
set the name of this class


getName

public String getName()
get the name of this class

Specified by:
getName in interface Named
Overrides:
getName in class ProbEqkSource
Returns:

scaleRupRates

public void scaleRupRates(double value)
This method scales (multiplies) the rate of each rupture by the given value.


scaleRupProbs

public void scaleRupProbs(double value)
This method scales (multiplies) the probability of each rupture by the given value.