def test_strike_shear():
    ss = strike_shear(strike=strike,
                      dip=dip,
                      rho=rho,
                      g=g,
                      mxx=mxx,
                      myy=myy,
                      mxy=mxy,
                      mzz=mzz,
                      mxz=mxz,
                      myz=myz,
                      txx=txx,
                      tyy=tyy,
                      txy=txy,
                      depth=depth)

    ss = np.int(np.round(ss))

    assert ss == -23234845, 'dip shear stress'
Beispiel #2
0
lms_reps = np.tile(lms_col_array, [n_trials, 1])
search_df[lms_fill_cols] = lms_reps
search_df.depth *= 1000
del lms_reps

search_df[['mxx', 'myy', 'mxy', 'mzz', 'mxz', 'myz']] *= 1e6

# OK, now let's do some calculationsi
print('calculating fault stresses')
search_df['tau_s'] = scv.strike_shear(strike=search_df.strike,
                                      dip=search_df.dip,
                                      rho=rho,
                                      g=g,
                                      mxx=search_df.mxx,
                                      myy=search_df.myy,
                                      mxy=search_df.mxy,
                                      mzz=search_df.mzz,
                                      mxz=search_df.mxz,
                                      myz=search_df.myz,
                                      txx=search_df.txx,
                                      tyy=search_df.tyy,
                                      txy=search_df.txy,
                                      depth=search_df.depth)

search_df['tau_d'] = scv.dip_shear(strike=search_df.strike,
                                   dip=search_df.dip,
                                   rho=rho,
                                   g=g,
                                   mxx=search_df.mxx,
                                   myy=search_df.myy,
                                   mxy=search_df.mxy,
                                   mzz=search_df.mzz,
lms_col_array = lms[lms_copy_cols].values
lms_reps = np.tile(lms_col_array, [n_trials, 1])
search_df[lms_fill_cols] = lms_reps
search_df.depth *= 1000
del lms_reps

search_df[['mxx', 'myy', 'mxy', 'mzz', 'mxz', 'myz']] *= 1e6


# OK, now let's do some calculationsi
print('calculating fault stresses')
search_df['tau_s'] = scv.strike_shear(strike = search_df.strike, 
                                      dip=search_df.dip, rho=rho, g=g,
                                      mxx=search_df.mxx, myy=search_df.myy,
                                      mxy=search_df.mxy, mzz=search_df.mzz,
                                      mxz=search_df.mxz, myz=search_df.myz,
                                      txx=search_df.txx, tyy=search_df.tyy,
                                      txy=search_df.txy, depth=search_df.depth)

search_df['tau_d'] = scv.dip_shear(strike = search_df.strike, 
                                   dip=search_df.dip, rho=rho, g=g,
                                   mxx=search_df.mxx, myy=search_df.myy,
                                   mxy=search_df.mxy, mzz=search_df.mzz,
                                   mxz=search_df.mxz, myz=search_df.myz,
                                   txx=search_df.txx, tyy=search_df.tyy,
                                   txy=search_df.txy, depth=search_df.depth)

print("dropping columns that won't be used more")
search_df.drop(labels=['mxx', 'myy', 'mxy', 'mzz', 'mxz', 'myz', 'depth',
                       'strike', 'dip'], axis=1, inplace=True)