!Switch
[mu_s, mu_d, d_c]: !ConstantMap
  map:
    mu_s: 0.41
    mu_d: 0.12
    d_c: 0.8
[cohesion, forced_rupture_time]: !FunctionMap
  map:
    cohesion: |
      if (z >= -10000.0) {
        return -400000-15000000*(z+10000)/10000;      
      }
      return -400000;
    forced_rupture_time: |
      r = sqrt(pow(x-804628.0, 2.0) + pow(y-348919.0, 2.0) + pow(z+29446.0, 2.0));
      r_crit = 12000.0;
      Vs = 3800.0;
      if (r <= r_crit) {
        return r/(0.7*Vs)+(0.081*r_crit/(0.7*Vs))*(1.0/(1.0-pow(r/r_crit, 2.0))-1.0);
      }
      return 1000000000.0;
[s_xx, s_yy, s_zz, s_xy, s_yz, s_xz]: !EvalModel
  parameters: [Omega, s_zz0, Pf, b_xx, b_yy, b_xy, b_xz, b_yz]
  model: !FunctionMap
    map:
      Omega: |
       if (z > -23000.0){
         return 1.0;
       }
       if (z < -49000.0){
         return 0.0;
       }
        return (-49000.0-z)/(-49000.0+23000.0);
      s_zz0: |
       Rh = 3330;
       if (z >= -23000) {
        Rh = 3050;
       } 
       if (z >= -12000) {
        Rh = 2860;
       }
       if (z >= -6000) {
        Rh = 2720;
       }
        return Rh*9.8*z;
      Pf: |
       Rh = 3330;
       if (z >= -23000) {
        Rh = 3050;
       }
       if (z >= -12000) {
        Rh = 2860;
       }
       if (z >= -6000) {
        Rh = 2720;
       }
        return -0.93*Rh*9.8*z;
      b_xx: |
        return 1.7428;
      b_yy: |
        return 1.7660;
      b_xy: |
        return 0.2595;
      b_xz: |
        return 0.1352;
      b_yz: |
        return 0.0458;
  components: !FunctionMap
    map:
      s_xx:     return (Omega*(b_xx*(s_zz0+Pf)-Pf)+(1.0-Omega)*s_zz0) + Pf;
      s_yy:     return (Omega*(b_yy*(s_zz0+Pf)-Pf)+(1.0-Omega)*s_zz0) + Pf;
      s_zz:     return (Omega*(1.00*(s_zz0+Pf)-Pf)+(1.0-Omega)*s_zz0) + Pf;
      s_xy:     return Omega*(b_xy*(s_zz0+Pf));
      s_yz:     return Omega*(b_yz*(s_zz0+Pf));
      s_xz:     return Omega*(b_xz*(s_zz0+Pf));
