org.opensha.sha.earthquake.rupForecastImpl.Frankel02
Class Frankel02_TypeB_EqkSource

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

public class Frankel02_TypeB_EqkSource
extends ProbEqkSource

Title: Frankel02_TypeB_EqkSource

Description: This implements Frankel's floating-rupture Gutenberg Richter source used in the 2002 version of his code. We made this, rather than using the more general FloatingPoissonFaultSource only for enhanced performance (e.g., no need to float down dip or to support Area(Mag) uncertainties.

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
Nitin Gupta & Vipin Gupta
See Also:
Serialized Form

Field Summary
protected  double duration
           
 
Fields inherited from class org.opensha.sha.earthquake.ProbEqkSource
isPoissonian, name
 
Constructor Summary
Frankel02_TypeB_EqkSource()
          empty constructor
Frankel02_TypeB_EqkSource(IncrementalMagFreqDist magFreqDist, AbstractEvenlyGriddedSurfaceWithSubsets surface, double rupOffset, double rake, double duration, String sourceName)
          constructor specifying the values needed for the 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.
 String getName()
          get the name of this class
 int getNumRuptures()
          Get the number of ruptures for this source
 ProbEqkRupture getRupture(int nthRupture)
          This gets the ProbEqkRupture object for the nth Rupture
 AbstractEvenlyGriddedSurfaceWithSubsets getSourceSurface()
          This gives the entire surface of the source
static void main(String[] args)
          this is to test the code
 void setAll(IncrementalMagFreqDist magFreqDist, AbstractEvenlyGriddedSurfaceWithSubsets surface, double rupOffset, double rake, double duration, String sourceName)
           
 void setAll(IncrementalMagFreqDist magFreqDist, AbstractEvenlyGriddedSurfaceWithSubsets surface, double rupOffset, double rake, double duration, String sourceName, MagAreaRelationship magAreaRel)
           
 void setDuration(double yrs)
          Set the time span in years
 
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

duration

protected double duration
Constructor Detail

Frankel02_TypeB_EqkSource

public Frankel02_TypeB_EqkSource()
empty constructor


Frankel02_TypeB_EqkSource

public Frankel02_TypeB_EqkSource(IncrementalMagFreqDist magFreqDist,
                                 AbstractEvenlyGriddedSurfaceWithSubsets surface,
                                 double rupOffset,
                                 double rake,
                                 double duration,
                                 String sourceName)
constructor specifying the values needed for the source

Parameters:
magFreqDist - - any IncrementalMagFreqDist
surface - - any EvenlyGriddedSurface
rupOffset - - floating rupture offset (km)
rake - - rake for all ruptures
duration - - forecast duration (yrs)
sourceName - - source name
Method Detail

setAll

public void setAll(IncrementalMagFreqDist magFreqDist,
                   AbstractEvenlyGriddedSurfaceWithSubsets surface,
                   double rupOffset,
                   double rake,
                   double duration,
                   String sourceName)

setAll

public void setAll(IncrementalMagFreqDist magFreqDist,
                   AbstractEvenlyGriddedSurfaceWithSubsets surface,
                   double rupOffset,
                   double rake,
                   double duration,
                   String sourceName,
                   MagAreaRelationship magAreaRel)

getSourceSurface

public AbstractEvenlyGriddedSurfaceWithSubsets getSourceSurface()
Description copied from interface: EqkSource
This gives the entire surface of the source

Returns:

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:
returns an integer value specifying the number of ruptures for this source

getRupture

public ProbEqkRupture getRupture(int nthRupture)
This gets the ProbEqkRupture object for the nth Rupture

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

setDuration

public void setDuration(double yrs)
Set the time span in years

Parameters:
yrs - : timeSpan as specified in Number of years

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.

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

getName

public String getName()
get the name of this class

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

main

public static void main(String[] args)
this is to test the code

Parameters:
args -

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