org.opensha.sha.cybershake.openshaAPIs
Class CyberShakeEvenlyGriddedSurface

java.lang.Object
  extended by org.opensha.commons.data.Container2DImpl<Location>
      extended by org.opensha.sha.faultSurface.AbstractEvenlyGriddedSurface
          extended by org.opensha.sha.faultSurface.AbstractEvenlyGriddedSurfaceWithSubsets
              extended by org.opensha.sha.cybershake.openshaAPIs.CyberShakeEvenlyGriddedSurface
All Implemented Interfaces:
Serializable, Iterable<Location>, Container2D<Location>, Named, CacheEnabledSurface, EvenlyGriddedSurface, RuptureSurface

public class CyberShakeEvenlyGriddedSurface
extends AbstractEvenlyGriddedSurfaceWithSubsets

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opensha.sha.faultSurface.AbstractEvenlyGriddedSurface
C, D, gridSpacingAlong, gridSpacingDown, sameGridSpacing
 
Fields inherited from class org.opensha.commons.data.Container2DImpl
data, name, numCols, numRows, size, TAB
 
Constructor Summary
CyberShakeEvenlyGriddedSurface(int numRows, int numCols, double gridSpacing)
           
 
Method Summary
 double getAveDip()
          Average dip (degrees) of rupture surface
 double getAveDipDirection()
          Average dip direction (degrees) of rupture surface
 double getAveRupTopDepth()
          Average depth (km) to top of rupture (always a positive number)
 double getAveStrike()
          Average strike (degrees) of rupture surface
protected  AbstractEvenlyGriddedSurface getNewInstance()
          Creates a new instance with the correct sub-class type, used for copying methods
 LocationList getPerimeter()
          Get a list of locations that constitutes the perimeter of the surface (not necessarily evenly spaced)
 FaultTrace getUpperEdge()
          This returns the upper edge of the rupture surface (where the locations are not necessarily equally spaced).
 void set(int row, int column, Location loc)
          Places a Java object into one cell in this two dimensional matrix specified by the row and column indices.
 void setAllLocations(ArrayList<Location> locs)
           
 
Methods inherited from class org.opensha.sha.faultSurface.AbstractEvenlyGriddedSurfaceWithSubsets
getNthSubsetSurface, getNthSubsetSurface, getNthSubsetSurfaceCenteredDownDip, getNumSubsetSurfaces, getNumSubsetSurfacesAlongLength, getSubsetSurfacesIterator, getSubsetSurfacesIterator
 
Methods inherited from class org.opensha.sha.faultSurface.AbstractEvenlyGriddedSurface
calcDistances, calcDistanceX, copyShallow, getArea, getAveGridSpacing, getAveLength, getAveWidth, getDistanceJB, getDistanceRup, getDistanceSeis, getDistanceX, getEvenlyDiscritizedListOfLocsOnSurface, getEvenlyDiscritizedLowerEdge, getEvenlyDiscritizedPerimeter, getEvenlyDiscritizedUpperEdge, getFirstLocOnUpperEdge, getFractionOfSurfaceInRegion, getGridSpacingAlongStrike, getGridSpacingDownDip, getInfo, getLastLocOnUpperEdge, getLocation, getLocationsIterator, getMinDistance, getMoved, getRowAsTrace, isGridSpacingSame, isPointSurface
 
Methods inherited from class org.opensha.commons.data.Container2DImpl
checkBounds, clear, clone, exist, get, getAllByColumnsIterator, getAllByRowsIterator, getColumnIterator, getName, getNumCols, getNumRows, getRowIterator, iterator, listIterator, main, setName, setNumRowsAndNumCols, size, toJava2D, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opensha.commons.data.Container2D
clear, exist, get, getAllByColumnsIterator, getAllByRowsIterator, getColumnIterator, getNumCols, getNumRows, getRowIterator, listIterator, setName, size, toString
 
Methods inherited from interface org.opensha.commons.data.Named
getName
 
Methods inherited from interface java.lang.Iterable
iterator
 

Constructor Detail

CyberShakeEvenlyGriddedSurface

public CyberShakeEvenlyGriddedSurface(int numRows,
                                      int numCols,
                                      double gridSpacing)
Method Detail

setAllLocations

public void setAllLocations(ArrayList<Location> locs)

set

public void set(int row,
                int column,
                Location loc)
         throws ArrayIndexOutOfBoundsException
Description copied from class: Container2DImpl
Places a Java object into one cell in this two dimensional matrix specified by the row and column indices.

Specified by:
set in interface Container2D<Location>
Overrides:
set in class Container2DImpl<Location>
Parameters:
row - The x coordinate of the cell.
column - The y coordinate of the cell.
loc - The Java object to place in the cell.
Throws:
ArrayIndexOutOfBoundsException - Thrown if the row and column are beyond the two dimensional matrix range.

getAveDip

public double getAveDip()
Description copied from interface: RuptureSurface
Average dip (degrees) of rupture surface

Returns:

getAveDipDirection

public double getAveDipDirection()
Description copied from interface: RuptureSurface
Average dip direction (degrees) of rupture surface

Returns:

getAveRupTopDepth

public double getAveRupTopDepth()
Description copied from interface: RuptureSurface
Average depth (km) to top of rupture (always a positive number)

Returns:

getAveStrike

public double getAveStrike()
Description copied from interface: RuptureSurface
Average strike (degrees) of rupture surface

Returns:

getPerimeter

public LocationList getPerimeter()
Description copied from interface: RuptureSurface
Get a list of locations that constitutes the perimeter of the surface (not necessarily evenly spaced)

Specified by:
getPerimeter in interface RuptureSurface
Overrides:
getPerimeter in class AbstractEvenlyGriddedSurface

getUpperEdge

public FaultTrace getUpperEdge()
Description copied from interface: RuptureSurface
This returns the upper edge of the rupture surface (where the locations are not necessarily equally spaced). This may be the original Fault Trace used to define the surface, but not necessarily.

Specified by:
getUpperEdge in interface RuptureSurface
Overrides:
getUpperEdge in class AbstractEvenlyGriddedSurface
Returns:

getNewInstance

protected AbstractEvenlyGriddedSurface getNewInstance()
Description copied from class: AbstractEvenlyGriddedSurface
Creates a new instance with the correct sub-class type, used for copying methods

Specified by:
getNewInstance in class AbstractEvenlyGriddedSurface
Returns: