Exemplo n.º 1
0
 @Test
 public void medianInslabSoftTable() {
   double hypoDepth = 80.0;
   double vs30 = 300.0;
   String tectRegType = TectonicRegionType.SUBDUCTION_SLAB.toString();
   validateMedian(hypoDepth, vs30, tectRegType, medianInslabSoftTable);
 }
Exemplo n.º 2
0
  /** Check median pga for Mw = 6.0, intraslab event, site type NEHRP D, hypocentral depth 60 km. */
  @Test
  public final void pgaMw6IntraSlabNerphDHypodepth60() {

    String tectonicRegionType = TectonicRegionType.SUBDUCTION_SLAB.toString();
    double hypocentralDepth = INTRA_SLAB_HYPO_DEPTH;
    int periodIndex = 0;
    int magnitudeIndex = 2;
    int siteTypeIndex = 2;
    double magnitude = INTRASLAB_MAGNITUDE_VALUES[magnitudeIndex];
    double vs30 = VS_30[siteTypeIndex];
    int expectedResultIndex = 3;

    validateAgainstTable(
        tectonicRegionType,
        hypocentralDepth,
        periodIndex,
        magnitude,
        vs30,
        expectedResultIndex,
        pgaIntraSlabTable);
  }
  /**
   * Reads logic tree data and instantiates {@link LogicTree} objects for each {@link
   * TectonicRegionType}. Each {@link LogicTree} contains {@link AttenuationRelationship} objects
   * with the given parameters set up.
   */
  public void parse_tree(
      String component,
      String intensityMeasureType,
      double period,
      double damping,
      String truncType,
      double truncLevel,
      String stdType,
      double vs30) {

    LogicTreeReader logicTreeReader = new LogicTreeReader(bufferedReader);

    Map<String, LogicTree> logicTreeMap = logicTreeReader.read();

    if (logicTreeMap.get(TectonicRegionType.ACTIVE_SHALLOW.toString()) != null) {
      setGMPELogicTree(
          TectonicRegionType.ACTIVE_SHALLOW.toString(),
          component,
          intensityMeasureType,
          period,
          damping,
          truncType,
          truncLevel,
          stdType,
          vs30,
          logicTreeMap);
    }

    if (logicTreeMap.get(TectonicRegionType.STABLE_SHALLOW.toString()) != null) {
      setGMPELogicTree(
          TectonicRegionType.STABLE_SHALLOW.toString(),
          component,
          intensityMeasureType,
          period,
          damping,
          truncType,
          truncLevel,
          stdType,
          vs30,
          logicTreeMap);
    }

    if (logicTreeMap.get(TectonicRegionType.SUBDUCTION_INTERFACE.toString()) != null) {
      setGMPELogicTree(
          TectonicRegionType.SUBDUCTION_INTERFACE.toString(),
          component,
          intensityMeasureType,
          period,
          damping,
          truncType,
          truncLevel,
          stdType,
          vs30,
          logicTreeMap);
    }

    if (logicTreeMap.get(TectonicRegionType.SUBDUCTION_SLAB.toString()) != null) {
      setGMPELogicTree(
          TectonicRegionType.SUBDUCTION_SLAB.toString(),
          component,
          intensityMeasureType,
          period,
          damping,
          truncType,
          truncLevel,
          stdType,
          vs30,
          logicTreeMap);
    }
  }