w-geo 1.1.20 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/w-geo.umd.js +2 -2
- package/dist/w-geo.umd.js.map +1 -1
- package/docs/-_class.mjs.html +1 -1
- package/docs/calcDepthByDepthStartEnd.mjs.html +1 -1
- package/docs/calcDepthStartEndByConnect.mjs.html +1 -1
- package/docs/calcDepthStartEndByDepth.mjs.html +1 -1
- package/docs/calcDepthStartEndByGroup.mjs.html +1 -1
- package/docs/calcLiquefaction.mjs.html +1 -1
- package/docs/calcVerticalStress.mjs.html +1 -1
- package/docs/checkDepth.mjs.html +1 -1
- package/docs/checkDepthStartEnd.mjs.html +1 -1
- package/docs/complementDepthData.mjs.html +1 -1
- package/docs/groupByDepthStartEnd.mjs.html +1 -1
- package/docs/index.html +1 -1
- package/docs/mergeByDepthStartEnd.mjs.html +1 -1
- package/docs/relaPlasticityParams.mjs.html +1 -1
- package/docs/relaPorousParams.mjs.html +1 -1
- package/docs/sepDepthStartEndByDepth.mjs.html +1 -1
- package/docs/smoothDepthByKey.mjs.html +1 -1
- package/docs/w-geo.html +1 -1
- package/g_7_1-intrpPsdBySize.mjs +52 -0
- package/{g_7_9-calcPropInterfaceFrictionAngle.mjs → g_7_a1-calcPropInterfaceFrictionAngle.mjs} +1 -1
- package/g_8_1-dtIntrpPsdBySize.mjs +50 -0
- package/package.json +1 -1
- package/src/WGeo.mjs +2 -0
- package/src/dtIntrpPsdBySize.mjs +137 -0
- package/src/intrpPsdBySize.mjs +125 -0
- package/test/dtIntrpPsdBySize.test.mjs +50 -0
- package/test/intrpPsdBySize.test.mjs +29 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import assert from 'assert'
|
|
2
|
+
import _ from 'lodash-es'
|
|
3
|
+
import w from 'wsemi'
|
|
4
|
+
import intrpPsdBySize from '../src/intrpPsdBySize.mjs'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
describe(`intrpPsdBySize`, function() {
|
|
8
|
+
|
|
9
|
+
let psd = [101.6, 76.2, 50.8, 25.4, 19.0, 9.5, 4.75, 2.0, 0.85, 0.425, 0.25, 0.15, 0.106, 0.075, 0.027, 0.018, 0.011, 0.008, 0.006, 0.003, 0.001, 0.0, 0.0, 0.0]
|
|
10
|
+
let psf = [100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, -1.0, 100.0, 99.0, 96.0, 86.0, 74.0, 61.0, 51.0, 32.0, 16.0, 0.0, 0.0, 0.0]
|
|
11
|
+
let pfss = _.map(psd, (_v, k) => {
|
|
12
|
+
let s = _.get(psd, k)
|
|
13
|
+
let f = _.get(psf, k)
|
|
14
|
+
return {
|
|
15
|
+
size: s,
|
|
16
|
+
fraction: f,
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
let psizes = 0.063
|
|
20
|
+
// let r = intrpPsdBySize(pfss, psizes)
|
|
21
|
+
|
|
22
|
+
let out1 = 98.4880247416152
|
|
23
|
+
it(`should return ${out1} when intrpPsdBySize(pfss, ${psizes})`, function() {
|
|
24
|
+
let r = intrpPsdBySize(pfss, psizes)
|
|
25
|
+
let rr = out1
|
|
26
|
+
assert.strict.deepStrictEqual(r, rr)
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
})
|