Site spectrum at the first quadrature order that agrees with the previous
refineSiteSpectrum.RdEvaluates integrateSiteSpectrum() at the increasing Gauss-Legendre
orders and returns the site spectrum of the first order whose ordinates
agree with those of the previous order, together with the order and the
agreement reached, so that the numerical error of the result is visible.
Arguments
- spectrum
The rock quantile spectrum, see
integrateSiteSpectrum().- VS30
One target velocity in m/s.
- Vref
One reference velocity in m/s.
- model
Site factor model of
evaluateSiteFactor(),"ST20"or"ST17".- orders
At least two increasing integers, each at least 4.
- tolerance
One positive relative change.
Value
A list with spectrum (the site spectrum of the accepted order,
as integrateSiteSpectrum() returns it), order (the accepted order)
and change (\(\delta\) of that order).
Mathematics
With \(S_i\) the site ordinates (SaF, every period and level) at
order \(n_i\) and the relative change
\(\delta_i = \max |S_{i-1} - S_i| / \max(|S_i|, \epsilon)\)
(\(\epsilon\) the smallest positive double), order \(n_i\),
\(i \ge 2\), is accepted when \(\delta_i\) is finite and at most
tolerance. No order accepted is an error.
Examples
P <- c("0.05", "0.10", "0.16", "0.50", "0.84", "0.90", "0.95", "mean")
Factor <- c(0.45, 0.60, 0.72, 0.95, 1.30, 1.48, 1.78, 1.00)
Spectrum <- data.table::data.table(Tn = rep(c(0, 0.2, 1), each = 8), p = rep(P, 3),
Sa = rep(c(0.30, 0.45, 0.24), each = 8) * rep(Factor, 3))
refineSiteSpectrum(Spectrum, VS30 = 270, Vref = 760, model = "ST20",
orders = c(32, 64, 128), tolerance = 2e-3)[c("order", "change")]
#> $order
#> [1] 64
#>
#> $change
#> [1] 0.0002114338
#>