/** Instantiates logic tree for a given tectonic region type */
 private void setGMPELogicTree(
     String tectReg,
     String component,
     String intensityMeasureType,
     double period,
     double damping,
     String truncType,
     double truncLevel,
     String stdType,
     double vs30,
     Map<String, LogicTree> logicTreeMap) {
   LogicTree logicTree = logicTreeMap.get(tectReg);
   String gmpeNames = "";
   String weights = "";
   for (int i = 0; i < logicTree.getBranchingLevel(0).getBranchList().size(); i++) {
     gmpeNames = gmpeNames + logicTree.getBranchingLevel(0).getBranch(i).getBranchingValue() + " ";
     weights = weights + logicTree.getBranchingLevel(0).getBranch(i).getWeight() + " ";
   }
   gmpeNames = gmpeNames.trim();
   weights = weights.trim();
   gmpeLogicTreeHashMap.put(
       TectonicRegionType.getTypeForName(tectReg),
       createGmpeLogicTree(
           gmpeNames,
           weights,
           component,
           intensityMeasureType,
           period,
           damping,
           truncType,
           truncLevel,
           stdType,
           vs30));
 }
Ejemplo n.º 2
0
 /** Returns the type of the tectonic region of the given element. */
 private TectonicRegionType extractTectonicRegionFrom(Element elem) {
   return TectonicRegionType.getTypeForName((String) elem.element(TECTONIC_REGION).getData());
 }