org.opensha.sha.gcim.calc
Interface GcimCalculatorAPI

All Superinterfaces:
java.rmi.Remote

public interface GcimCalculatorAPI
extends java.rmi.Remote

Title: GcimCalculatorAPI

Description: This class defines interface for Gcim calculator. Implementation of this interface computes GCIM distributions for various IMi's conditioned on a hazard curve for IMj based on the input parameters imr, site and eqkRupforecast. See Bradley (2010, Earthquake Engineering and Structural Dynamics, in press) for a complete discussion of GCIM.

Version:
1.0
Author:
: Brendon Bradley

Method Summary
 double[] getApproxCDFvalues()
          This method gets the Approx CDFvalues
 boolean getMultipleGcims(int numIMi, java.util.ArrayList<java.util.HashMap<TectonicRegionType,ScalarIMR>> imiAttenRels, java.util.ArrayList<java.lang.String> imiTypes, java.util.ArrayList<java.util.HashMap<TectonicRegionType,ImCorrelationRelationship>> imijCorrRels, double maxDist, ArbitrarilyDiscretizedFunc magDistFilter)
          this function obtains the GCIM distributions for multiple IMs by successively calling the getSingleGcim method Returns true if it was successfully else return false
 void getRuptureContributions(double iml, Site site, java.util.HashMap<TectonicRegionType,ScalarIMR> imrjMap, AbstractERF eqkRupForecast, double maxDist, ArbitrarilyDiscretizedFunc magDistFilter)
          This method gets the contribution of each rupture in the ERF toward the probability of IML=iml
 boolean getSingleGcim(int imiNumber, java.util.HashMap<TectonicRegionType,ScalarIMR> imriMap, java.util.HashMap<TectonicRegionType,ImCorrelationRelationship> imijCorrRelMap, double maxDist, ArbitrarilyDiscretizedFunc magDistFilter)
          this function performs the GCIM computations to obtain the conditional distribution of a single input intensity measure.
 void setApproxCDFvalues()
          This method sets the approximate CDF values for which the gcim distributions are calculated for using defaults zmin=-3, zmax=3, and dz=0.2 which gives 51 points
 void setApproxCDFvalues(double zmin, double zmax, double dz)
          This method sets the approximate CDF values for which the gcim distributions are calculated for
 void setGcimOutputDimensions()
          This method sets the dimensions of the imiArray and cdfIMi_IMjArrays
 

Method Detail

getRuptureContributions

void getRuptureContributions(double iml,
                             Site site,
                             java.util.HashMap<TectonicRegionType,ScalarIMR> imrjMap,
                             AbstractERF eqkRupForecast,
                             double maxDist,
                             ArbitrarilyDiscretizedFunc magDistFilter)
                             throws java.rmi.RemoteException
This method gets the contribution of each rupture in the ERF toward the probability of IML=iml

Throws:
java.rmi.RemoteException
java.io.IOException

getMultipleGcims

boolean getMultipleGcims(int numIMi,
                         java.util.ArrayList<java.util.HashMap<TectonicRegionType,ScalarIMR>> imiAttenRels,
                         java.util.ArrayList<java.lang.String> imiTypes,
                         java.util.ArrayList<java.util.HashMap<TectonicRegionType,ImCorrelationRelationship>> imijCorrRels,
                         double maxDist,
                         ArbitrarilyDiscretizedFunc magDistFilter)
this function obtains the GCIM distributions for multiple IMs by successively calling the getSingleGcim method Returns true if it was successfully else return false

Parameters:
imri: - selected IMRi object (that for which the distribution is desired i.e. IMi)
imCorrelationRelationship: - selected correlation object for IMi and IMj
maxDist: - maxDist of sources to consider
magDistFilter: - Magnitude-Distance filter for sources
Returns:
boolean

getSingleGcim

boolean getSingleGcim(int imiNumber,
                      java.util.HashMap<TectonicRegionType,ScalarIMR> imriMap,
                      java.util.HashMap<TectonicRegionType,ImCorrelationRelationship> imijCorrRelMap,
                      double maxDist,
                      ArbitrarilyDiscretizedFunc magDistFilter)
this function performs the GCIM computations to obtain the conditional distribution of a single input intensity measure. Returns true if it was successfully else return false

Parameters:
imiNumber - - the imi counter used for storing results in array
imri: - selected IMRi object (that for which the distribution is desired i.e. IMi)
imCorrelationRelationship: - selected correlation object for IMi and IMj
maxDist: - maxDist of sources to consider
magDistFilter: - Magnitude-Distance filter for sources
Returns:
boolean

setApproxCDFvalues

void setApproxCDFvalues(double zmin,
                        double zmax,
                        double dz)
This method sets the approximate CDF values for which the gcim distributions are calculated for

Parameters:
zmin - - the minimum z (normalised CDF value) to compute gcim for
zmax - - the maximum z (normalised CDF value) to compute gcim for
dz - - the increment of z (normalised CDF value) which determines the number of points

setApproxCDFvalues

void setApproxCDFvalues()
This method sets the approximate CDF values for which the gcim distributions are calculated for using defaults zmin=-3, zmax=3, and dz=0.2 which gives 51 points


getApproxCDFvalues

double[] getApproxCDFvalues()
This method gets the Approx CDFvalues


setGcimOutputDimensions

void setGcimOutputDimensions()
This method sets the dimensions of the imiArray and cdfIMi_IMjArrays