Skip to content
Snippets Groups Projects
Commit 22640381 authored by Powers, Peter M.'s avatar Powers, Peter M.
Browse files

inlining locals

parent 6a8d3017
No related branches found
No related tags found
1 merge request!436Prvi gmm 251
...@@ -305,20 +305,17 @@ public class AbrahamsonEtAl_2014 implements GroundMotionModel { ...@@ -305,20 +305,17 @@ public class AbrahamsonEtAl_2014 implements GroundMotionModel {
// Site term -- Equation 7 // Site term -- Equation 7
double saRock = 0.0; // calc Sa1180 (rock reference) if necessary double saRock = 0.0; // calc Sa1180 (rock reference) if necessary
double c_Vlin = c.Vlin; if (vs30 < c.Vlin) {
double c_b = c.b;
double c_c = c.c;
if (vs30 < c_Vlin) {
// soil term (f10) for Sa1180 is zero per R. Kamai's code where // soil term (f10) for Sa1180 is zero per R. Kamai's code where
// Z1 < 0 for Sa1180 loop // Z1 < 0 for Sa1180 loop
double vs30s_rk = (VS_RK < v1) ? VS_RK : v1; double vs30s_rk = (VS_RK < v1) ? VS_RK : v1;
// use this f5 form for Sa1180 Vlin is always < 1180 // use this f5 form for Sa1180 Vlin is always < 1180
double f5_rk = (c.a10 + c_b * N) * log(vs30s_rk / c_Vlin); double f5_rk = (c.a10 + c.b * N) * log(vs30s_rk / c.Vlin);
saRock = exp(f1 + f78 + f5_rk + f4 + f6); saRock = exp(f1 + f78 + f5_rk + f4 + f6);
f5 = c.a10 * log(vs30s / c_Vlin) - c_b * log(saRock + c_c) + c_b * f5 = c.a10 * log(vs30s / c.Vlin) - c.b * log(saRock + c.c) + c.b *
log(saRock + c_c * pow(vs30s / c_Vlin, N)); log(saRock + c.c * pow(vs30s / c.Vlin, N));
} else { } else {
f5 = (c.a10 + c_b * N) * log(vs30s / c_Vlin); f5 = (c.a10 + c.b * N) * log(vs30s / c.Vlin);
} }
// total model (no aftershock f11) -- Equation 1 // total model (no aftershock f11) -- Equation 1
...@@ -338,7 +335,7 @@ public class AbrahamsonEtAl_2014 implements GroundMotionModel { ...@@ -338,7 +335,7 @@ public class AbrahamsonEtAl_2014 implements GroundMotionModel {
// Parital deriv. of ln(soil amp) w.r.t. ln(SA1180) -- Equation 30 // Parital deriv. of ln(soil amp) w.r.t. ln(SA1180) -- Equation 30
// saRock subject to same vs30 < Vlin test as in mean model // saRock subject to same vs30 < Vlin test as in mean model
double dAmp_p1 = get_dAmp(c_b, c_c, c_Vlin, vs30, saRock) + 1.0; double dAmp_p1 = get_dAmp(c.b, c.c, c.Vlin, vs30, saRock) + 1.0;
// phi squared, with non-linear effects -- Equation 28 // phi squared, with non-linear effects -- Equation 28
double phiSq = phiBsq * dAmp_p1 * dAmp_p1 + PHI_AMP_SQ; double phiSq = phiBsq * dAmp_p1 * dAmp_p1 + PHI_AMP_SQ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment