UNPKG

dirtybomb

Version:
125 lines (104 loc) 7.19 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <base data-ice="baseUrl" href="../../"> <title data-ice="title">test/GaussianPuff.Spec.js | API Document</title> <link type="text/css" rel="stylesheet" href="css/style.css"> <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css"> <script src="script/prettify/prettify.js"></script> <script src="script/manual.js"></script> </head> <body class="layout-container" data-ice="rootContainer"> <header> <a href="./">Home</a> <a href="identifiers.html">Reference</a> <a href="source.html">Source</a> <a href="test.html" data-ice="testLink">Test</a> <a data-ice="repoURL" href="https://github.com/austincawley/dirtybomb" class="repo-url-github">Repository</a> <div class="search-box"> <span> <img src="./image/search.png"> <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span> </span> <ul class="search-result"></ul> </div> </header> <nav class="navigation" data-ice="nav"><div> <ul> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Bomb.js~Bomb.html">Bomb</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Dirtybomb.js~Dirtybomb.html">Dirtybomb</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/NuclearMaterial.js~NuclearMaterial.html">NuclearMaterial</a></span></span></li> <li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">Dispersion</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Dispersion/Atmosphere.js~Atmosphere.html">Atmosphere</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Dispersion/DynamicGaussianDecayPuff.js~DynamicGaussianDecayPuff.html">DynamicGaussianDecayPuff</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Dispersion/DynamicGaussianPuff.js~DynamicGaussianPuff.html">DynamicGaussianPuff</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Dispersion/GaussianDecayPlume.js~GaussianDecayPlume.html">GaussianDecayPlume</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Dispersion/GaussianDecayPuff.js~GaussianDecayPuff.html">GaussianDecayPuff</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Dispersion/GaussianPlume.js~GaussianPlume.html">GaussianPlume</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Dispersion/GaussianPuff.js~GaussianPuff.html">GaussianPuff</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Dispersion/Source.js~Source.html">Source</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-Vector">Vector</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-integrate">integrate</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-Dispersion">Dispersion</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-SourceType">SourceType</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-Coord">Coord</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-STD_Y_COEFF">STD_Y_COEFF</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-STD_Z_COEFF">STD_Z_COEFF</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-Stat">Stat</a></span></span></li> </ul> </div> </nav> <div class="content" data-ice="content"><h1 data-ice="title">test/GaussianPuff.Spec.js</h1> <pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">/** * Created by austin on 6/15/16. */ &quot;use strict&quot;; import chai from &apos;chai&apos;; import Atmosphere from &apos;../src/Dispersion/Atmosphere&apos;; import Source, { SourceType } from &apos;../src/Dispersion/Source&apos;; import GaussianPuff from &apos;../src/Dispersion/GaussianPuff&apos;; import {integrate} from &apos;../src/Dispersion/utils&apos;; chai.should(); describe(&apos;GaussianPuff&apos;, function() { let puff; describe(&apos;Constructor&apos;, () =&gt; { it(&apos;should import correctly&apos;, () =&gt; { let atm = new Atmosphere(10, 1, 65, 300); let source = new Source(SourceType.POINT, 2, 150, 5, 400, 4); puff = new GaussianPuff(atm, source, 20); }); }); describe(&apos;CenterX functions&apos;, () =&gt; { it(&apos;should have a center at 0,0,0 before release&apos;, () =&gt; { puff.getCenterX(0).should.be.equal(0); }); it(&apos;should move in the x direction with constant wind&apos;, () =&gt; { puff.getCenterX(3600).should.be.above(0); }); it(&apos;should move at the rate of the wind&apos;, () =&gt; { console.log(puff.windSpeedAtSourceHeight); puff.getCenterX(3600).should.be.closeTo(3600 * puff.windSpeedAtSourceHeight, 0.01) }); }); describe(&apos;Concentration functions&apos;, () =&gt; { it(&apos;should have 0 concentration before release&apos;, () =&gt; { isNaN(puff.getConcentration(0, 0, 0, 0)).should.be.true; puff.getConcentration(0, 0, 0, 10).should.be.above(0); }); }); });</code></pre> </div> <footer class="footer"> Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.4.7)</span></a> </footer> <script src="script/search_index.js"></script> <script src="script/search.js"></script> <script src="script/pretty-print.js"></script> <script src="script/inherited-summary.js"></script> <script src="script/test-summary.js"></script> <script src="script/inner-link.js"></script> <script src="script/patch-for-local.js"></script> </body> </html>