コード例 #1
0
 public EqkRuptureDataForNrml(EqkRupture rup) {
   averageRake = rup.getAveRake();
   if (rup.getTectRegType() != null) {
     tectonicRegion = rup.getTectRegType().toString();
   } else {
     tectonicRegion = unknownTectonicRegionType;
   }
   magRupture = rup.getMag();
   EvenlyGriddedSurfaceAPI grid = rup.getRuptureSurface();
   /*
    * the site data
    */
   numberOfColumns = grid.getNumCols();
   numberOfRows = grid.getNumRows();
   int countSites = numberOfColumns * numberOfRows;
   latGrid = new double[countSites];
   lonGrid = new double[countSites];
   depthGrid = new double[countSites];
   for (int row = 0; row < numberOfRows; row++) {
     for (int col = 0; col < numberOfColumns; col++) {
       Location l = grid.get(row, col);
       int index = (row) * numberOfColumns + (col);
       latGrid[index] = l.getLatitude();
       lonGrid[index] = l.getLongitude();
       depthGrid[index] = l.getDepth();
     } // for columns
   } // for rows
 } // constructor()
コード例 #2
0
 public String toString() {
   String str = new String();
   str += "sectionId = " + this.getSectionId() + "\n";
   str += "sectionName = " + this.getSectionName() + "\n";
   str += "shortName = " + this.getShortName() + "\n";
   str += "aveLongTermSlipRate = " + this.getOrigAveSlipRate() + "\n";
   str += "slipRateStdDev = " + this.getOrigSlipRateStdDev() + "\n";
   str += "aveDip = " + this.getAveDip() + "\n";
   str += "aveRake = " + this.getAveRake() + "\n";
   str += "aveUpperDepth = " + this.getOrigAveUpperDepth() + "\n";
   str += "aveLowerDepth = " + this.getAveLowerDepth() + "\n";
   str += "aseismicSlipFactor = " + this.getAseismicSlipFactor() + "\n";
   str += "couplingCoeff = " + this.getCouplingCoeff() + "\n";
   str += "dipDirection = " + this.getDipDirection() + "\n";
   str += "dateOfLastEventMillis = " + this.getDateOfLastEvent() + "\n";
   str += "slipInLastEvent = " + this.getSlipInLastEvent() + "\n";
   str += "faultTrace:\n";
   for (int i = 0; i < this.getFaultTrace().size(); i++) {
     Location loc = this.getFaultTrace().get(i);
     str += "\t" + loc.getLatitude() + ", " + loc.getLongitude() + ", " + loc.getDepth() + "\n";
   }
   return str;
 }