tUpdate documentation, fix adjustWall docstring, remove unused parameter - sphe… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 0b74ae13b8d8456b5d9a4331cd7d12a4fa21baba | |
parent 1688082747c477334c7b8e07f41b8dbb44964279 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 2 Sep 2019 11:28:19 +0200 | |
Update documentation, fix adjustWall docstring, remove unused parameter | |
Diffstat: | |
M doc/html/.buildinfo | 2 +- | |
D doc/html/_images/math/0001d02b63ed… | 0 | |
D doc/html/_images/math/0027034d8a10… | 0 | |
A doc/html/_images/math/011d67708963… | 0 | |
D doc/html/_images/math/01be15303939… | 0 | |
D doc/html/_images/math/023a7668d083… | 0 | |
A doc/html/_images/math/035491a28db4… | 0 | |
A doc/html/_images/math/0362550f7158… | 0 | |
D doc/html/_images/math/038474380a07… | 0 | |
A doc/html/_images/math/0464a071da32… | 0 | |
D doc/html/_images/math/048938dfaa2d… | 0 | |
D doc/html/_images/math/04e9e1fe54cb… | 0 | |
D doc/html/_images/math/07ff47f8ccf9… | 0 | |
D doc/html/_images/math/082bced08237… | 0 | |
A doc/html/_images/math/088383ea56b6… | 0 | |
D doc/html/_images/math/092e364e1d9d… | 0 | |
A doc/html/_images/math/0ad7b3053489… | 0 | |
A doc/html/_images/math/0b33acc067ea… | 0 | |
D doc/html/_images/math/0b557fe795a3… | 0 | |
A doc/html/_images/math/0d439c4a5603… | 0 | |
D doc/html/_images/math/0dd32d7f3a00… | 0 | |
D doc/html/_images/math/0e0f0c7e69e0… | 0 | |
D doc/html/_images/math/0e86ca4660ab… | 0 | |
D doc/html/_images/math/0f06d8c03699… | 0 | |
D doc/html/_images/math/0f1c7bcfd657… | 0 | |
D doc/html/_images/math/0fdafcde7733… | 0 | |
D doc/html/_images/math/1053df745e2d… | 0 | |
D doc/html/_images/math/10e009bdb83f… | 0 | |
D doc/html/_images/math/11cfb4109b5e… | 0 | |
D doc/html/_images/math/13e4be57cf47… | 0 | |
A doc/html/_images/math/141bbefb7401… | 0 | |
D doc/html/_images/math/16ef95610462… | 0 | |
A doc/html/_images/math/1768cb6067e2… | 0 | |
D doc/html/_images/math/177b8a21bb3d… | 0 | |
D doc/html/_images/math/17c2d34ded49… | 0 | |
D doc/html/_images/math/188c175aac0a… | 0 | |
D doc/html/_images/math/188c20d52c0d… | 0 | |
D doc/html/_images/math/18950ecc92ec… | 0 | |
D doc/html/_images/math/19ab21e013e1… | 0 | |
D doc/html/_images/math/19bc0073dde1… | 0 | |
D doc/html/_images/math/1aa208937d18… | 0 | |
A doc/html/_images/math/1b4e9fe95951… | 0 | |
A doc/html/_images/math/1b5e577d6216… | 0 | |
A doc/html/_images/math/1b6eba43d66e… | 0 | |
D doc/html/_images/math/1beccd9a659c… | 0 | |
D doc/html/_images/math/1c7a111b8952… | 0 | |
A doc/html/_images/math/1cc93350d8f6… | 0 | |
D doc/html/_images/math/1cce9b2c774a… | 0 | |
D doc/html/_images/math/1d24d160d606… | 0 | |
D doc/html/_images/math/1dafb53fb664… | 0 | |
D doc/html/_images/math/1eb29f9de375… | 0 | |
A doc/html/_images/math/1ecc9f3eb9f6… | 0 | |
D doc/html/_images/math/1ee5b5b2fe53… | 0 | |
D doc/html/_images/math/1ef7ab23d6fc… | 0 | |
D doc/html/_images/math/1f9530e95b98… | 0 | |
D doc/html/_images/math/213a272621ce… | 0 | |
D doc/html/_images/math/22176d770731… | 0 | |
A doc/html/_images/math/225ec667f659… | 0 | |
D doc/html/_images/math/22b6d9dab340… | 0 | |
D doc/html/_images/math/249d76d0a5d3… | 0 | |
D doc/html/_images/math/24edc4190580… | 0 | |
D doc/html/_images/math/25586671e456… | 0 | |
D doc/html/_images/math/257ee6442468… | 0 | |
D doc/html/_images/math/259614407018… | 0 | |
A doc/html/_images/math/265d2a4158e8… | 0 | |
D doc/html/_images/math/26eeb5258ca5… | 0 | |
D doc/html/_images/math/274ad002c530… | 0 | |
A doc/html/_images/math/27dc86f9f1b1… | 0 | |
D doc/html/_images/math/2822d1531935… | 0 | |
D doc/html/_images/math/28d83ccd3281… | 0 | |
A doc/html/_images/math/2990374fde94… | 0 | |
D doc/html/_images/math/29bbcc61ff8f… | 0 | |
D doc/html/_images/math/2ab5affb5906… | 0 | |
D doc/html/_images/math/2c175f60eece… | 0 | |
D doc/html/_images/math/2cb4dea80c94… | 0 | |
D doc/html/_images/math/2da5f268da80… | 0 | |
D doc/html/_images/math/2e399494a982… | 0 | |
A doc/html/_images/math/2e91d0a31e3d… | 0 | |
D doc/html/_images/math/2e9b3638163a… | 0 | |
D doc/html/_images/math/2eb2a179a616… | 0 | |
A doc/html/_images/math/2ebe57143bfa… | 0 | |
D doc/html/_images/math/2ede365ad144… | 0 | |
A doc/html/_images/math/2f3dd2fc9072… | 0 | |
A doc/html/_images/math/2fc641eba6a1… | 0 | |
D doc/html/_images/math/2feb7aaab806… | 0 | |
D doc/html/_images/math/30c34e7f1dd4… | 0 | |
D doc/html/_images/math/30d3be82eb9b… | 0 | |
D doc/html/_images/math/30d5d726338d… | 0 | |
D doc/html/_images/math/3118edbae1a8… | 0 | |
A doc/html/_images/math/321ea56397cc… | 0 | |
D doc/html/_images/math/32e2ba09618e… | 0 | |
D doc/html/_images/math/32e3fe27ac98… | 0 | |
D doc/html/_images/math/3357706feda9… | 0 | |
D doc/html/_images/math/33deba163d5e… | 0 | |
D doc/html/_images/math/3426034f2cd7… | 0 | |
D doc/html/_images/math/34857b3ba74c… | 0 | |
D doc/html/_images/math/3536b174c0e2… | 0 | |
D doc/html/_images/math/35ff36083d20… | 0 | |
D doc/html/_images/math/3640b174f15a… | 0 | |
A doc/html/_images/math/36e047f01517… | 0 | |
D doc/html/_images/math/36f73fc1312e… | 0 | |
A doc/html/_images/math/36f8efcaa2b3… | 0 | |
D doc/html/_images/math/376d888029b6… | 0 | |
A doc/html/_images/math/37759601d93b… | 0 | |
D doc/html/_images/math/377d34017898… | 0 | |
D doc/html/_images/math/37a9e7fca70e… | 0 | |
D doc/html/_images/math/37c89c22a072… | 0 | |
D doc/html/_images/math/38a6d1fc5607… | 0 | |
A doc/html/_images/math/38d819f488f6… | 0 | |
D doc/html/_images/math/399743cbf7c4… | 0 | |
D doc/html/_images/math/3a94e291e910… | 0 | |
D doc/html/_images/math/3b432b0e58de… | 0 | |
D doc/html/_images/math/3b6d032ddaf9… | 0 | |
D doc/html/_images/math/3be873955a77… | 0 | |
A doc/html/_images/math/3c1524f2029c… | 0 | |
D doc/html/_images/math/3c93d2ecf99a… | 0 | |
D doc/html/_images/math/3cbd1baf03f1… | 0 | |
D doc/html/_images/math/3cd61688849a… | 0 | |
D doc/html/_images/math/3d41adff4943… | 0 | |
A doc/html/_images/math/3daf2a856e4e… | 0 | |
D doc/html/_images/math/3eca8557203e… | 0 | |
D doc/html/_images/math/40075695a073… | 0 | |
D doc/html/_images/math/402b1a3c2564… | 0 | |
D doc/html/_images/math/41babe6999c8… | 0 | |
D doc/html/_images/math/42ea00932c36… | 0 | |
A doc/html/_images/math/4397f45ed8f1… | 0 | |
D doc/html/_images/math/43e42baf6cef… | 0 | |
D doc/html/_images/math/44fafcf5a158… | 0 | |
D doc/html/_images/math/458d3955e23e… | 0 | |
D doc/html/_images/math/45abe7dac102… | 0 | |
D doc/html/_images/math/46a84b389d8f… | 0 | |
D doc/html/_images/math/46bc9db8fc24… | 0 | |
D doc/html/_images/math/470d00b97569… | 0 | |
A doc/html/_images/math/472f5505e817… | 0 | |
D doc/html/_images/math/474638ec351b… | 0 | |
D doc/html/_images/math/47bc1263e44f… | 0 | |
D doc/html/_images/math/48431e4412db… | 0 | |
D doc/html/_images/math/486938d1819d… | 0 | |
A doc/html/_images/math/48bdffae0ccb… | 0 | |
A doc/html/_images/math/48e1ca5e30bd… | 0 | |
D doc/html/_images/math/49a90589ae1e… | 0 | |
A doc/html/_images/math/4a54c15fca98… | 0 | |
D doc/html/_images/math/4b1fcbd538ee… | 0 | |
D doc/html/_images/math/4d35bf3d410f… | 0 | |
D doc/html/_images/math/4d3f01b8ca8b… | 0 | |
D doc/html/_images/math/4f7d0530f193… | 0 | |
D doc/html/_images/math/4fd7ec1b618d… | 0 | |
D doc/html/_images/math/507deb1ebb53… | 0 | |
A doc/html/_images/math/510c4529ac8a… | 0 | |
A doc/html/_images/math/5151250a36ca… | 0 | |
A doc/html/_images/math/51aabda11b1f… | 0 | |
D doc/html/_images/math/522c9c96bc63… | 0 | |
D doc/html/_images/math/52f771ea3758… | 0 | |
A doc/html/_images/math/53f1505c53f0… | 0 | |
A doc/html/_images/math/5470b3e5faee… | 0 | |
D doc/html/_images/math/552e279b5cf6… | 0 | |
D doc/html/_images/math/55f6b5380d46… | 0 | |
D doc/html/_images/math/571952df1029… | 0 | |
D doc/html/_images/math/587f41674d8c… | 0 | |
A doc/html/_images/math/589f894e7bdd… | 0 | |
A doc/html/_images/math/5aa339d4daf4… | 0 | |
D doc/html/_images/math/5b4271afe7fc… | 0 | |
D doc/html/_images/math/5b46624e0dc3… | 0 | |
D doc/html/_images/math/5b7072008fcf… | 0 | |
A doc/html/_images/math/5b7752c757e0… | 0 | |
D doc/html/_images/math/5c4e627793fb… | 0 | |
A doc/html/_images/math/5c79b34fe936… | 0 | |
D doc/html/_images/math/5dfeda3ba68d… | 0 | |
D doc/html/_images/math/5ed37435199e… | 0 | |
A doc/html/_images/math/5f25ea5b87a3… | 0 | |
D doc/html/_images/math/5fb7b1a39363… | 0 | |
A doc/html/_images/math/6076ef182923… | 0 | |
A doc/html/_images/math/6087536f1e28… | 0 | |
D doc/html/_images/math/6089fb1f882f… | 0 | |
D doc/html/_images/math/6160e3f2050b… | 0 | |
A doc/html/_images/math/61a00fe9b190… | 0 | |
D doc/html/_images/math/66a1d8738af5… | 0 | |
A doc/html/_images/math/68132fbd6f41… | 0 | |
D doc/html/_images/math/68e0c54203bc… | 0 | |
D doc/html/_images/math/6922b3e4505e… | 0 | |
D doc/html/_images/math/697df1516660… | 0 | |
D doc/html/_images/math/69881326e514… | 0 | |
D doc/html/_images/math/69b1fdf87f9a… | 0 | |
D doc/html/_images/math/6adfb975053f… | 0 | |
D doc/html/_images/math/6b038d0d06f6… | 0 | |
A doc/html/_images/math/6b2a5284ab10… | 0 | |
D doc/html/_images/math/6ba1c18c095f… | 0 | |
D doc/html/_images/math/6d3199b492cb… | 0 | |
D doc/html/_images/math/6d9528f9b5d0… | 0 | |
D doc/html/_images/math/6d9a9e0ef32e… | 0 | |
D doc/html/_images/math/6e1feb8f41fb… | 0 | |
D doc/html/_images/math/6e62843666dc… | 0 | |
D doc/html/_images/math/6ed2751b928f… | 0 | |
A doc/html/_images/math/6f7750f46960… | 0 | |
D doc/html/_images/math/701df29c5482… | 0 | |
D doc/html/_images/math/70b8f6d66306… | 0 | |
A doc/html/_images/math/70bdb5c509a5… | 0 | |
A doc/html/_images/math/70f3b255df6b… | 0 | |
A doc/html/_images/math/7138dad9ac96… | 0 | |
D doc/html/_images/math/7181906596d0… | 0 | |
D doc/html/_images/math/73b4e0024361… | 0 | |
D doc/html/_images/math/74958bc18d01… | 0 | |
D doc/html/_images/math/74c081db590f… | 0 | |
A doc/html/_images/math/753a91bd77f2… | 0 | |
D doc/html/_images/math/754decd65558… | 0 | |
D doc/html/_images/math/7572a9bb14a9… | 0 | |
D doc/html/_images/math/767762b2cd83… | 0 | |
D doc/html/_images/math/769bfdcb2a43… | 0 | |
A doc/html/_images/math/76c074e79b0a… | 0 | |
D doc/html/_images/math/7727554a4dfa… | 0 | |
D doc/html/_images/math/7774004c6a33… | 0 | |
D doc/html/_images/math/778fcaedc9db… | 0 | |
D doc/html/_images/math/7851cf79108d… | 0 | |
A doc/html/_images/math/79a3d439d286… | 0 | |
D doc/html/_images/math/79c874e814b2… | 0 | |
A doc/html/_images/math/79f896fdeda4… | 0 | |
D doc/html/_images/math/7b1a510ad1f3… | 0 | |
A doc/html/_images/math/7c3282642d86… | 0 | |
A doc/html/_images/math/7d5308c191e1… | 0 | |
A doc/html/_images/math/7e2e127f90d1… | 0 | |
D doc/html/_images/math/7ee03c7bfc1e… | 0 | |
D doc/html/_images/math/7f7495bf6b7e… | 0 | |
D doc/html/_images/math/7fe490dcbc6c… | 0 | |
A doc/html/_images/math/8036f7734790… | 0 | |
D doc/html/_images/math/80ba696b882e… | 0 | |
A doc/html/_images/math/80f029074944… | 0 | |
D doc/html/_images/math/8122aa89ea6e… | 0 | |
A doc/html/_images/math/81ace2a5e8f4… | 0 | |
D doc/html/_images/math/8245434fa793… | 0 | |
D doc/html/_images/math/84bb71d071d3… | 0 | |
D doc/html/_images/math/852f6a447b7c… | 0 | |
A doc/html/_images/math/857e62557f76… | 0 | |
D doc/html/_images/math/860ab918d3e4… | 0 | |
A doc/html/_images/math/888f7c323ac0… | 0 | |
D doc/html/_images/math/88fd92ee9e46… | 0 | |
D doc/html/_images/math/89542f863347… | 0 | |
D doc/html/_images/math/8a2e0d0a28c9… | 0 | |
D doc/html/_images/math/8a89933fcdf0… | 0 | |
D doc/html/_images/math/8ad4d2540ea2… | 0 | |
A doc/html/_images/math/8bba708bfd9e… | 0 | |
D doc/html/_images/math/8bf1a4afd4cd… | 0 | |
D doc/html/_images/math/8c325612684d… | 0 | |
D doc/html/_images/math/8ce03f78ed94… | 0 | |
D doc/html/_images/math/8cfa62046b3a… | 0 | |
A doc/html/_images/math/8d051150f866… | 0 | |
D doc/html/_images/math/8d0831e0e18a… | 0 | |
A doc/html/_images/math/8d47777d070e… | 0 | |
D doc/html/_images/math/8dbae01b96ab… | 0 | |
D doc/html/_images/math/8f28cef89dfa… | 0 | |
D doc/html/_images/math/900be94839e1… | 0 | |
D doc/html/_images/math/9035b87959dc… | 0 | |
D doc/html/_images/math/90c8bfc206db… | 0 | |
D doc/html/_images/math/910a79b832c4… | 0 | |
A doc/html/_images/math/91106df67966… | 0 | |
A doc/html/_images/math/91499159f828… | 0 | |
A doc/html/_images/math/9219f7822d26… | 0 | |
A doc/html/_images/math/935dede8fc5c… | 0 | |
D doc/html/_images/math/93ddc61f81c0… | 0 | |
D doc/html/_images/math/945e8fc1c1e4… | 0 | |
A doc/html/_images/math/94847c4d2838… | 0 | |
D doc/html/_images/math/954afa1fc1c8… | 0 | |
D doc/html/_images/math/95b885fe932d… | 0 | |
A doc/html/_images/math/9630132210b9… | 0 | |
D doc/html/_images/math/964fa43eb7c2… | 0 | |
D doc/html/_images/math/967116fa65cb… | 0 | |
D doc/html/_images/math/98a432864561… | 0 | |
D doc/html/_images/math/99b2691ddceb… | 0 | |
D doc/html/_images/math/9a0695dca61f… | 0 | |
D doc/html/_images/math/9c2a28916b33… | 0 | |
A doc/html/_images/math/9cc677554b62… | 0 | |
D doc/html/_images/math/9d0d9139c35e… | 0 | |
D doc/html/_images/math/9d3cd4785fd2… | 0 | |
A doc/html/_images/math/9d7283875d4b… | 0 | |
D doc/html/_images/math/9d909a12ad66… | 0 | |
D doc/html/_images/math/9ec27d87740d… | 0 | |
D doc/html/_images/math/9f60d76fad5e… | 0 | |
D doc/html/_images/math/a00f5eb30a7a… | 0 | |
D doc/html/_images/math/a18e167e42f3… | 0 | |
D doc/html/_images/math/a1a25b9ae9dc… | 0 | |
D doc/html/_images/math/a1e91a45b485… | 0 | |
D doc/html/_images/math/a1ffc0a01262… | 0 | |
A doc/html/_images/math/a25fbe2b1d2c… | 0 | |
D doc/html/_images/math/a31485573165… | 0 | |
D doc/html/_images/math/a32f407296c4… | 0 | |
A doc/html/_images/math/a3471ecd78cc… | 0 | |
A doc/html/_images/math/a349ae092fc2… | 0 | |
A doc/html/_images/math/a528060f65c9… | 0 | |
D doc/html/_images/math/a581f053bbfa… | 0 | |
A doc/html/_images/math/a5d04fe388b8… | 0 | |
D doc/html/_images/math/a60e2d788aa8… | 0 | |
D doc/html/_images/math/a6c493a071c2… | 0 | |
A doc/html/_images/math/a74a3c3e364a… | 0 | |
A doc/html/_images/math/a928c6f40866… | 0 | |
D doc/html/_images/math/aad9832dd455… | 0 | |
D doc/html/_images/math/ab2209a9dd14… | 0 | |
D doc/html/_images/math/ac40b5914589… | 0 | |
D doc/html/_images/math/ac73c7c8c596… | 0 | |
D doc/html/_images/math/ad3d39eb3e45… | 0 | |
A doc/html/_images/math/ad8a19ed2553… | 0 | |
A doc/html/_images/math/ae12ade90e16… | 0 | |
A doc/html/_images/math/af12689d82b1… | 0 | |
D doc/html/_images/math/b124ff74afb0… | 0 | |
D doc/html/_images/math/b13f21416d84… | 0 | |
D doc/html/_images/math/b143c2df6dd4… | 0 | |
D doc/html/_images/math/b2cd17a83bb8… | 0 | |
A doc/html/_images/math/b2d579d8b04e… | 0 | |
A doc/html/_images/math/b3939293c919… | 0 | |
A doc/html/_images/math/b3a2c5ab22c7… | 0 | |
D doc/html/_images/math/b3cb421b6b32… | 0 | |
D doc/html/_images/math/b4104067dcc5… | 0 | |
D doc/html/_images/math/b4264aa4a69b… | 0 | |
A doc/html/_images/math/b4ed9c2e208e… | 0 | |
D doc/html/_images/math/b4f82fd61e3f… | 0 | |
D doc/html/_images/math/b51a1f74e439… | 0 | |
D doc/html/_images/math/b531a865c773… | 0 | |
D doc/html/_images/math/b55687e1799d… | 0 | |
D doc/html/_images/math/b55ca7a0aa88… | 0 | |
D doc/html/_images/math/b588eea9cec4… | 0 | |
D doc/html/_images/math/b5e8dba2403c… | 0 | |
D doc/html/_images/math/b70dd9c116fc… | 0 | |
D doc/html/_images/math/b770d151d770… | 0 | |
D doc/html/_images/math/b7dd9f89843e… | 0 | |
A doc/html/_images/math/b9068a1e8869… | 0 | |
D doc/html/_images/math/b95363838d60… | 0 | |
D doc/html/_images/math/baa542966f41… | 0 | |
D doc/html/_images/math/bb2c93730dbb… | 0 | |
A doc/html/_images/math/bb8cd3151bb3… | 0 | |
A doc/html/_images/math/bc86cfac20bf… | 0 | |
A doc/html/_images/math/bd5938eba662… | 0 | |
D doc/html/_images/math/bdc15139139f… | 0 | |
A doc/html/_images/math/bdf3ad94aa38… | 0 | |
A doc/html/_images/math/be6144b74fc7… | 0 | |
A doc/html/_images/math/be9a4fc94d92… | 0 | |
D doc/html/_images/math/bf3f9bbcfd5e… | 0 | |
D doc/html/_images/math/bf7f4ceb6fce… | 0 | |
D doc/html/_images/math/bfdb965399e4… | 0 | |
D doc/html/_images/math/c15067d0b245… | 0 | |
A doc/html/_images/math/c17d332a01b1… | 0 | |
A doc/html/_images/math/c19adb8434d3… | 0 | |
D doc/html/_images/math/c305e13251e6… | 0 | |
A doc/html/_images/math/c3233a1342e9… | 0 | |
D doc/html/_images/math/c323bf28746b… | 0 | |
D doc/html/_images/math/c42a32017c99… | 0 | |
A doc/html/_images/math/c46baa2a60c4… | 0 | |
D doc/html/_images/math/c4bb40dd65ea… | 0 | |
D doc/html/_images/math/c4f23b63471b… | 0 | |
D doc/html/_images/math/c51284f727b4… | 0 | |
D doc/html/_images/math/c5446f5064cc… | 0 | |
D doc/html/_images/math/c5671cc4a4d9… | 0 | |
D doc/html/_images/math/c65f07031d99… | 0 | |
D doc/html/_images/math/c6e0b5935589… | 0 | |
A doc/html/_images/math/c713414d12f1… | 0 | |
D doc/html/_images/math/c78863bcf0ad… | 0 | |
D doc/html/_images/math/c8094929c952… | 0 | |
A doc/html/_images/math/c831f45c0dbc… | 0 | |
D doc/html/_images/math/c8e734bf3818… | 0 | |
D doc/html/_images/math/c9264cc70365… | 0 | |
D doc/html/_images/math/cb8fa4f65175… | 0 | |
D doc/html/_images/math/cbac43e2c13c… | 0 | |
A doc/html/_images/math/cbb779e005d2… | 0 | |
D doc/html/_images/math/cbe3f817ae97… | 0 | |
D doc/html/_images/math/cd19c19fc5bc… | 0 | |
D doc/html/_images/math/ce4f41d90f3f… | 0 | |
A doc/html/_images/math/cebafd792667… | 0 | |
D doc/html/_images/math/cf699492db92… | 0 | |
D doc/html/_images/math/cfe0e96f0049… | 0 | |
D doc/html/_images/math/d0b4b390a480… | 0 | |
D doc/html/_images/math/d18b93994f64… | 0 | |
D doc/html/_images/math/d1c6b35072ca… | 0 | |
D doc/html/_images/math/d1e970327c74… | 0 | |
A doc/html/_images/math/d28d84975888… | 0 | |
D doc/html/_images/math/d32c78b75990… | 0 | |
D doc/html/_images/math/d34109b1b68b… | 0 | |
D doc/html/_images/math/d3b6fc67523d… | 0 | |
D doc/html/_images/math/d4ba00bbbae4… | 0 | |
D doc/html/_images/math/d5a65ff91df0… | 0 | |
D doc/html/_images/math/d5ba56a40217… | 0 | |
D doc/html/_images/math/d6a7ccf879c4… | 0 | |
A doc/html/_images/math/d8278c7c03b0… | 0 | |
A doc/html/_images/math/d860033316d4… | 0 | |
D doc/html/_images/math/d86c22303458… | 0 | |
D doc/html/_images/math/da419aab4b72… | 0 | |
D doc/html/_images/math/db94af9f89e3… | 0 | |
D doc/html/_images/math/dbb95aa092c1… | 0 | |
D doc/html/_images/math/dbcdbe7c53fa… | 0 | |
A doc/html/_images/math/dc895ec2bd63… | 0 | |
D doc/html/_images/math/dcf5762fe2b4… | 0 | |
D doc/html/_images/math/dd84cb843a3b… | 0 | |
D doc/html/_images/math/de27eb4f973d… | 0 | |
A doc/html/_images/math/df18cfb7be27… | 0 | |
D doc/html/_images/math/dfa75235bbe9… | 0 | |
D doc/html/_images/math/dfc85915a4cd… | 0 | |
D doc/html/_images/math/dfebf8b683f7… | 0 | |
D doc/html/_images/math/e0ee7c8be01c… | 0 | |
D doc/html/_images/math/e12eccdaacf4… | 0 | |
D doc/html/_images/math/e170ccb91735… | 0 | |
D doc/html/_images/math/e29be0a3b865… | 0 | |
D doc/html/_images/math/e31584cdce0b… | 0 | |
D doc/html/_images/math/e35ec9f12692… | 0 | |
D doc/html/_images/math/e3c6f9fd144c… | 0 | |
D doc/html/_images/math/e3de9b8fce0b… | 0 | |
A doc/html/_images/math/e3fc28292267… | 0 | |
A doc/html/_images/math/e497b0cd9de2… | 0 | |
D doc/html/_images/math/e4ca401f97df… | 0 | |
D doc/html/_images/math/e4cd0999828f… | 0 | |
D doc/html/_images/math/e4cd5b31b960… | 0 | |
D doc/html/_images/math/e5101484e2ac… | 0 | |
A doc/html/_images/math/e525a4923850… | 0 | |
D doc/html/_images/math/e6eadc1093d6… | 0 | |
A doc/html/_images/math/e721d97e515c… | 0 | |
A doc/html/_images/math/e8048524abc8… | 0 | |
D doc/html/_images/math/e8522a3d29a2… | 0 | |
A doc/html/_images/math/e8638c038759… | 0 | |
D doc/html/_images/math/e9203da50e10… | 0 | |
A doc/html/_images/math/e9bc7da808d3… | 0 | |
D doc/html/_images/math/e9e9403195bb… | 0 | |
D doc/html/_images/math/eaf4418fbe93… | 0 | |
D doc/html/_images/math/eb1910746ff1… | 0 | |
D doc/html/_images/math/ec1ce56da064… | 0 | |
A doc/html/_images/math/ed974cb6e5fa… | 0 | |
D doc/html/_images/math/edd52ffa94a4… | 0 | |
D doc/html/_images/math/ee1817a60aae… | 0 | |
D doc/html/_images/math/eeae8ea2feac… | 0 | |
D doc/html/_images/math/eee8ed92791a… | 0 | |
D doc/html/_images/math/ef18200849af… | 0 | |
D doc/html/_images/math/f04823ba99f1… | 0 | |
A doc/html/_images/math/f1a012eea74b… | 0 | |
D doc/html/_images/math/f5047d1e0cbb… | 0 | |
D doc/html/_images/math/f574498915fa… | 0 | |
D doc/html/_images/math/f5c280d551f6… | 0 | |
D doc/html/_images/math/f5d499efbd23… | 0 | |
A doc/html/_images/math/f5e23af6a7c6… | 0 | |
D doc/html/_images/math/f8f0dc31c5c1… | 0 | |
D doc/html/_images/math/f9147d34f15a… | 0 | |
D doc/html/_images/math/f915ce7b55e8… | 0 | |
D doc/html/_images/math/f94ccd83304b… | 0 | |
D doc/html/_images/math/f99450c7a885… | 0 | |
A doc/html/_images/math/fa44d7cdd2d3… | 0 | |
A doc/html/_images/math/fa500507a3f7… | 0 | |
D doc/html/_images/math/fa8a7b2fb896… | 0 | |
D doc/html/_images/math/faee932adbe0… | 0 | |
A doc/html/_images/math/fb7d5a70e844… | 0 | |
A doc/html/_images/math/fb9c8157d9c1… | 0 | |
D doc/html/_images/math/fc64cd1ec99f… | 0 | |
D doc/html/_images/math/fca2f0caf945… | 0 | |
D doc/html/_images/math/fd26dda3f4f5… | 0 | |
D doc/html/_images/math/fdb63b9e51ab… | 0 | |
D doc/html/_images/math/ff29b7920019… | 0 | |
D doc/html/_images/math/ff9078c25826… | 0 | |
A doc/html/_images/math/fffd2357ee88… | 0 | |
D doc/html/_sources/cfd.txt | 589 -----------------------------… | |
D doc/html/_sources/dem.txt | 217 -----------------------------… | |
D doc/html/_sources/index.txt | 41 -----------------------------… | |
D doc/html/_sources/introduction.txt | 199 -----------------------------… | |
D doc/html/_sources/python_api.txt | 27 --------------------------- | |
D doc/html/_sources/sphere_internals… | 215 ---------------------------… | |
D doc/html/_static/ajax-loader.gif | 0 | |
M doc/html/_static/basic.css | 197 +++++++++++++++++++++++++++--… | |
D doc/html/_static/comment-bright.png | 0 | |
D doc/html/_static/comment-close.png | 0 | |
D doc/html/_static/comment.png | 0 | |
M doc/html/_static/doctools.js | 66 +++++++++++++++++++++--------… | |
D doc/html/_static/down-pressed.png | 0 | |
D doc/html/_static/down.png | 0 | |
M doc/html/_static/file.png | 0 | |
M doc/html/_static/jquery.js | 10221 +----------------------------… | |
M doc/html/_static/minus.png | 0 | |
M doc/html/_static/plus.png | 0 | |
M doc/html/_static/searchtools.js | 408 ++++++-----------------------… | |
M doc/html/_static/sidebar.js | 2 +- | |
M doc/html/_static/underscore.js | 1579 +----------------------------… | |
D doc/html/_static/up-pressed.png | 0 | |
D doc/html/_static/up.png | 0 | |
D doc/html/_static/websupport.js | 808 -----------------------------… | |
M doc/html/cfd.html | 237 +++++++++++++++--------------… | |
M doc/html/dem.html | 123 ++++++++++++++---------------… | |
M doc/html/genindex.html | 1230 +++++++++++------------------… | |
M doc/html/index.html | 51 ++++++++++++-----------------… | |
M doc/html/introduction.html | 188 +++++++++++++++--------------… | |
M doc/html/objects.inv | 0 | |
M doc/html/py-modindex.html | 37 +++++++++++------------------… | |
M doc/html/python_api.html | 3703 ++++++++++++++---------------… | |
M doc/html/search.html | 34 +++++++++--------------------… | |
M doc/html/searchindex.js | 4 ++-- | |
M doc/html/sphere_internals.html | 234 +++++++++++++----------------… | |
D doc/pdf/darcy.pdf | 0 | |
M doc/pdf/sphere.pdf | 0 | |
M python/sphere.py | 9 +++------ | |
488 files changed, 2818 insertions(+), 17603 deletions(-) | |
--- | |
diff --git a/doc/html/.buildinfo b/doc/html/.buildinfo | |
t@@ -1,4 +1,4 @@ | |
# Sphinx build info version 1 | |
# This file hashes the configuration used when building these files. When it i… | |
-config: f6a3bc901e2eb5ac86d94b7ac7732d4c | |
+config: c4e84a3d2c04280d43617251d14cbd96 | |
tags: 645f666f9bcd5a90fca523b33c5a78b7 | |
diff --git a/doc/html/_images/math/0001d02b63ede2fe3219e05a7cd09c82ae6298b6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0027034d8a10372a06deaf4f4084c01956587479.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/011d677089639d8644f24fbf40d370cecdeddf3f.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/01be15303939c78ee40a848a717482d046a9ad48.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/023a7668d083165ce2aa65b49e876b83c9cb97f9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/035491a28db4f5849a4e9487e6a4231a2922e308.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0362550f715837c65115e59846809a42dfba49d1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/038474380a078000f31889a32a1dcf79ac38c223.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0464a071da3203b9d565701f510a766ae52f3016.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/048938dfaa2dd837058556eec573df345d984e62.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/04e9e1fe54cb1328e049a45b0acb8c3ccb0ab888.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/07ff47f8ccf9ac490e023817a9241de75c30340c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/082bced08237667a772227c2e3eb8359ff9d4af8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/088383ea56b643f441d56879639a41ababbd360b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/092e364e1d9d19ad5fffb0b46ef4cc7f2da02c1c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0ad7b30534898f253002222f998f38001e604648.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0b33acc067eabb49e01dc6f7a834abfd10c67f03.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0b557fe795a3a7d8b91ff1360e5610ffd6f1445f.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0d439c4a5603a28bc8b077cee61479c42337b5f4.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0dd32d7f3a000398f4982bdbe7cb1da880e33298.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0e0f0c7e69e0f315aed6d1762a66bf27dd9a155a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0e86ca4660ab213ac57b980a736e32499978d2dc.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0f06d8c03699aa966cd6c94d11850ede3c97dc41.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0f1c7bcfd65708b716b8817c2e31029f9af2eedf.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/0fdafcde7733804669f8df4846e5bfdb36c7afa7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1053df745e2d73fc7ee27d39a01ad228c360072e.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/10e009bdb83f96c5f47c58b34d5d4b12ef268d5b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/11cfb4109b5e8ad4a3bc8b07fe844e437d139b46.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/13e4be57cf47de5302fc2e1746d965a6ee0f332c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/141bbefb74014fc5e43499901bf78607ae335583.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/16ef95610462b9c2c03cba4c272fe84208bf3c61.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1768cb6067e2811bb6240abd9a2ed5d0a75fba05.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/177b8a21bb3d0e2a33950cd8ceec4f96f5950bd6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/17c2d34ded49c3a5cca11a4f1f20d5fe7117f964.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/188c175aac0a8a9c22499336711b5d7256407254.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/188c20d52c0d5acf0ddac670950204c93791be45.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/18950ecc92ecc7397337b5f39323453647e6434a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/19ab21e013e12d69147e0e08c69dc7acd69d1977.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/19bc0073dde1bcd1a8e6a32b251e80cced668f04.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1aa208937d18ff999c2b86535c86f4dd4705c3a4.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1b4e9fe95951a29e190acb2405cba9b530aca182.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1b5e577d6216dca3af7d87aa122a0b9b360d6cb3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1b6eba43d66e5a04885cc0147dc7f757b297c95a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1beccd9a659ce57a6a8083a589fe91ad33fa3b06.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1c7a111b8952b4162797cce2cbd426d74083b834.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1cc93350d8f6add165eff5f513eaa626e1c8c16c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1cce9b2c774a84cb5198a2f138beddb46e6658b5.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1d24d160d60604202abbae47aba869e96fb450aa.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1dafb53fb664c1e6576fc49adc4ef6db8f31a789.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1eb29f9de3753a59530941141fcb5c7aa3fa2e38.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1ecc9f3eb9f630270af6c89a67d8e95b5c55014a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1ee5b5b2fe535711338cab9fde51ba86968186e2.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1ef7ab23d6fc7d336379d457f66aa6ed57d72ec9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/1f9530e95b98c17e8dd3ed5756dd58c4ca46d46f.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/213a272621ce146fc9f90ce519bc3dc1ac3337e8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/22176d7707317572382e54a12e13095b61d90c26.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/225ec667f659f2a77a57ca0ad93706b28b847601.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/22b6d9dab340bfe13993da20589e4720449fe391.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/249d76d0a5d3773b138ce498e5df46c870f402b5.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/24edc419058015022fc9ef15fb0f5d8ec3109f73.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/25586671e456c2d987cd75cefd64d9cee69f50b9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/257ee6442468d7529f036a8a81e6050c3832fdbf.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/25961440701892ff5417a2474f7f52bb353e5d98.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/265d2a4158e84e0fc8246b1ce6a4e53f1a6891b3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/26eeb5258ca5099acf8fe96b2a1049c48c89a5e6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/274ad002c5303a0a45fb61cc2949cfd0e65402cd.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/27dc86f9f1b1c3435b2403a869b5870c582facea.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2822d1531935f7a072ebaa08533f4c5695731465.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/28d83ccd32811c0455355169ed8f6978d8d24dbe.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2990374fde94f327b7f4f669dc47cb1224709586.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/29bbcc61ff8f993f8eca2f33c8faf0c7ad80defc.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2ab5affb59066624277032c5076d7227db701fd9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2c175f60eecef1de7560c3bdea495d69f26f719d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2cb4dea80c947c94642b08f6a92ad5aa939dc9f3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2da5f268da80c66e332f2a8d4520f7d6685699b6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2e399494a98253eb4f7d0cfb51994059389bc825.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2e91d0a31e3dfb269c8af110ef9d87cca141c921.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2e9b3638163af9fc450acac1aba9911e57a5c691.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2eb2a179a6165db84b51c4dc8066b31cd012594f.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2ebe57143bfac54b7d13d59297affe6ce4e0490e.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2ede365ad144ab396916ec60458da03860803078.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2f3dd2fc907238254bb45cc2427997659c2a1336.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2fc641eba6a1d6e4cd948e7e48341561e69fbf10.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/2feb7aaab8068a8c48febc6a15a008f5dfcea9f7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/30c34e7f1dd419d28236bdff05af10a01cdd635c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/30d3be82eb9bf820400a3dc3e46e84fe58e9f2c9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/30d5d726338d5b3ac9d9b0003c564594fd6176ce.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3118edbae1a8f9f568f293112ccb85a253fb3608.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/321ea56397cc9e6cf05b895883258025af46a885.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/32e2ba09618e2d303d91d673a25ef66e29e94750.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/32e3fe27ac9815b323560775c3f6fcb2b6111edc.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3357706feda99b545e69da682825a94b64782cb6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/33deba163d5e5027dea810eec538e06a1683ddf1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3426034f2cd72ab441922edec729ae5d5212f047.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/34857b3ba74ce5cd8607f3ebd23e9015908ada71.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3536b174c0e21a837eb33434bbcdfc2ab566d161.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/35ff36083d208f671a3ed540e1b95395aa2ae10c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3640b174f15a44d33ad8f0622bc44dce8d8f1692.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/36e047f01517c90d6122694bfff5f7f18630b788.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/36f73fc1312ee0349b3f3a0f3bd9eb5504339011.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/36f8efcaa2b30e4c33847b988de9ebefad7c0f8a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/376d888029b69634b51a843c71cf75ba713b4821.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/37759601d93bbc73c7ce9a2a516909c8bf49a7d8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/377d34017898a24f5ba5ee9eba0c1d4d8834d456.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/37a9e7fca70e2dce829d902af2088735306bc1a3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/37c89c22a0720d39bbe2dbbc72749255662437dc.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/38a6d1fc56073806115322bcd179578f05c88c02.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/38d819f488f689e73fab8521008fad71f406dc78.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/399743cbf7c481198eba2ac4794bf67ef9d5c294.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3a94e291e91082dc48a18009bdd3fd70ebedec76.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3b432b0e58dea7c6cc143bf67184fc19b8cd4336.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3b6d032ddaf923f920fc753c9259dfc5cb626837.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3be873955a777b3d292f2477e3cc7ba40d1e7897.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3c1524f2029c88a3186b303042ffef4ec5916196.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3c93d2ecf99a3c5ee161c98a3ac0040e1b446e09.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3cbd1baf03f10cad8678746742cebc8176bdb593.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3cd61688849a22b05ca6c56c937561798da99ef8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3d41adff4943d60236fa626d0bae8e238483278a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3daf2a856e4e741d27444b532b2fff5a9d58b1db.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/3eca8557203e86160952e1c0f735f7417f3285b1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/40075695a073185f493a613d8dc7560042b2ae57.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/402b1a3c25643899cdefbe2e62d33eab43b4f616.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/41babe6999c89406f22db1ce5ed5e05ce939ed49.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/42ea00932c36940fb8965e6e7f4fb2de5d616ee7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/4397f45ed8f18be640b692425a8419f5cb72ada3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/43e42baf6cef7e9620082be300b7622d524b3a65.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/44fafcf5a158459730d0dd7c293b93cdcf62f0a4.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/458d3955e23ef7ba378c27f284a2e426f756bd3e.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/45abe7dac102080bf806c2bb40d20c9dab2e4fcb.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/46a84b389d8f594cd16c800ba4267f3cac5e2f30.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/46bc9db8fc244ad2bbb5de57bfd7e8a595298471.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/470d00b97569e3a8976841debcd99aaf9c78d7a8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/472f5505e817f5744478c6086f93e90e478f6111.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/474638ec351b4bfa321564aa3ea75c6a6b16b24c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/47bc1263e44f1b74fd90da02d9e7c26bf4b9edbe.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/48431e4412db6b2ffa7904f013daf5c0d6c61949.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/486938d1819df5972cb80ef2d101517b20412366.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/48bdffae0ccbc9ae14526c24bde0b5ce156d6b46.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/48e1ca5e30bd21cd906af9ed5130d80d272dd215.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/49a90589ae1e8a839b1ae6afb3dd1d162b6a094c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/4a54c15fca98536e1ec23aabecf9d69de1e92aa3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/4b1fcbd538ee9de974b2fbde2b253dfe843ab0e7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/4d35bf3d410f89d028f8652665f0950344b89f41.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/4d3f01b8ca8bdab3543eda695ff7e565bcb66381.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/4f7d0530f1939c40a7c9e65b7ecee0e476ac4817.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/4fd7ec1b618d0e036da7606d6876e79d81480584.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/507deb1ebb53483473057e3bcb372d5c8553148b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/510c4529ac8afe31da328659a626a9a5cd725133.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5151250a36caedcbd152476e5afd1e192b708d3f.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/51aabda11b1f09c36be43c63f1a3363920f6d2ba.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/522c9c96bc63142fa2b83abe960622dcafd75875.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/52f771ea3758e7653af6c471262bbc0ff0d9cf5a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/53f1505c53f0face6b8b68cb4b5919ec39f84592.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5470b3e5faeecda0a5d86db97b337c268cbe1a46.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/552e279b5cf6a34bb7787589bb4d4e67df465e7d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/55f6b5380d462f954b65d7a2cd05e02ff8cc832e.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/571952df10295a1251ad68112796e94f3fc54598.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/587f41674d8c1e5f151655cc5567c7f12cfea34a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/589f894e7bddf7ae1a4b9dcb40762fc87b0f01f3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5aa339d4daf45a810dda332e3c80a0698e526e04.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5b4271afe7fc7c0ee84172e0ad19b82caf450c00.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5b46624e0dc3d79b64f388898e2dff17d232656c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5b7072008fcf4dedaeed4d537fe5c808adedb826.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5b7752c757e0b691a80ab8227eadb8a8389dc58a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5c4e627793fb72f14a14540abaf5b0789767498b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5c79b34fe936898cd55bfd2dfd9b85d58bd66fad.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5dfeda3ba68db3f629c37ad0b4cc75095c2d6570.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5ed37435199e280338e0e6dc0c225e4230719b0a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5f25ea5b87a38722f651c7e8edeffd568fc2c9c0.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/5fb7b1a39363304fc1fb9172ecd46e2f39274384.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6076ef1829231552335cb26d3c29933d537bafe1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6087536f1e28c80ec705866fefe5d1760e121703.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6089fb1f882f20c5b7ccbf543244d38b88c99494.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6160e3f2050b4cd56b336ff552386a169aa51db8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/61a00fe9b19055ba2dd54bc5792a1993c782967a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/66a1d8738af515286414e18d76a6e7f86b989afc.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/68132fbd6f413bd35c80cc0f70f464cb95921a0c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/68e0c54203bc81b45ebe5dbf7d89fc61aa794c1e.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6922b3e4505e825344dc326ade5f0c4be45ddd2f.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/697df15166603b27c129b6191e2c96c022ea7932.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/69881326e5149864bc6319edea6786188e8d9a94.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/69b1fdf87f9a78aaef8057a34aea7a6c17dad726.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6adfb975053fd90151158bd3317e9b2a04f20d14.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6b038d0d06f6fa38bcb85df9e6f8bed4155ded47.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6b2a5284ab108ffbc0f8c4ca77742171e86a285d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6ba1c18c095ff64c7d7b9eaa38630f7ae5dd31e3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6d3199b492cb754c4cc895caf129a6e9c0f82f44.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6d9528f9b5d0a2feda7dca87d5d1e8523d7cc4b1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6d9a9e0ef32ea9506bb55413b682112d0f3308a6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6e1feb8f41fb33ffbf60f657c5e095c2bb780e4d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6e62843666dcc0fe9a45a1c69c532c82a95a9451.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6ed2751b928fdd78923983eb490cb347a1eac8b8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/6f7750f469603b161d82a2f6dc04817714fa1805.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/701df29c5482cdf1e577052c537c176f5a12caf5.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/70b8f6d6630631ad7de5c587e511247f1ce2afe9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/70bdb5c509a569e9fc814299f3f8d27e4c1f57b9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/70f3b255df6b95c6eccdddaf26e814efbb21a482.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7138dad9ac96835665b17f5817eacfcaa9b834c9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7181906596d0aaac14cbde44ec57dd7e5866c81b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/73b4e0024361fb95f692baa527cca76a384fdae0.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/74958bc18d017328dd0fac99816d2184296bfd3d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/74c081db590f3d35421c1f6b9afd4cdda36ee210.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/753a91bd77f2126e848dd6d0d8a4ba663dcb2dc4.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/754decd655584a824e0979fc2df27ae24379558e.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7572a9bb14a95da7f7b42fd4b5bec33c42800556.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/767762b2cd832672331c1421813b919298d7e3b8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/769bfdcb2a43bde2cd368d82a6f64bd68c876c99.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/76c074e79b0a4187ccedcd40bf4147aa3551e819.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7727554a4dfa1572695dec332d6f6ee255815c96.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7774004c6a3397305cc7616b705accbbbfb28632.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/778fcaedc9db6a87be6c2b7feac7164e55090c5b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7851cf79108da000ebe09e52f7a34a7fa2092517.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/79a3d439d28652c547386f39b555d90d3aaf102d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/79c874e814b2550448c61e2627dc072653b68197.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/79f896fdeda423ba71fb697a6a2d83f16ed50b5b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7b1a510ad1f355daa1f756cfd47f75a3a29f5660.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7c3282642d867109f551c02c4946b913e5c0a430.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7d5308c191e1fc1e95701accdd5e5ef125461f33.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7e2e127f90d156e3e20b4f4c36f3dd5a660fbc5e.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7ee03c7bfc1e46255c9d2d47d9b733a068c9ec2b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7f7495bf6b7e8e4c468863b6fd083f72f3a844ac.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/7fe490dcbc6c9eb978f05b3334d2a5856dc66149.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8036f77347902c41196821bdf54abad2180ee217.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/80ba696b882e52c7e4d833039710ff8b4005e777.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/80f029074944a89a2802f326da11b4fea65b1b2d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8122aa89ea6e80784c6513d22787ad86e36ad0cc.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/81ace2a5e8f4b657995ec7b8059f33de5a5efff3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8245434fa7935d53a0382eb3cc425ce09de36913.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/84bb71d071d3747a4a76292f75c6bb6c2ac15243.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/852f6a447b7ccf231f8e43dbcce1ae99280f8020.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/857e62557f767500fdff1bb017a6a5771a10af6f.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/860ab918d3e4c8f25b17d691cca049073dab88a0.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/888f7c323ac0341871e867220ae2d76467d74d6e.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/88fd92ee9e463bf55236c5ffe73c46480533b1dd.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/89542f86334781895f1f8146368f4a6a3fa58986.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8a2e0d0a28c9ebec91bd12def7b3b36dd9e92da7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8a89933fcdf0cde2a59b18d267abc2ce124940d0.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8ad4d2540ea2fe0c871b3eb896b64f22018d9bdf.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8bba708bfd9e1df2575d817c79ab6ae0139b20c6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8bf1a4afd4cdf42bf3f7b27c9d9c99377a5d1898.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8c325612684d41304b9751c175df7bcc0f61f64f.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8ce03f78ed945f2ef3dac87c8799b55b393527e7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8cfa62046b3a57f37068f027941acea702d9bd8a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8d051150f8669295ecdbe92367941012175a824d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8d0831e0e18af6fd3f3f1060516faab8016dc054.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8d47777d070e3b1ae6a9ea0d4918309bc8c942fe.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8dbae01b96ab8dd591a50213f55caa3ac5958631.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/8f28cef89dfa1989be5e263ac228a61a92736da9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/900be94839e1ee03a8aa1134961912314905eb27.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9035b87959dc0646562a6d53308049cc922156bb.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/90c8bfc206db2d9f4d0dd102507c9646a70755db.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/910a79b832c4678163ca0d7ec5285ed700df12da.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/91106df679664eb0437c2180a142140457aff53d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/91499159f82810f02d6b4e1403f836c510b79421.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9219f7822d26600e1170a020e204c434c313d2ea.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/935dede8fc5c0f449ff3f1d91a038d4c2000030e.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/93ddc61f81c056650ee9c02c3e62ed84e4a5327f.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/945e8fc1c1e499c337c7dcdd142bb39604d56309.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/94847c4d283861cea52ea3928c632de4c4062427.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/954afa1fc1c88d82f51ab22e64b4a7450a89f755.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/95b885fe932dd6fbab3f54e7ed819923deea95fb.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9630132210b904754c9ab272b61cb527d12263ca.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/964fa43eb7c25fa23b82daf41b1b9e16e998ab55.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/967116fa65cb7eb073c2f71309b21af6aca77a09.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/98a432864561550105d4de621bc0a9b61068c043.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/99b2691ddceb12733ac3509c90c732bed0c96e77.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9a0695dca61ffb4f70433158cdbfcd205c439e26.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9c2a28916b33bc70a170729d2f237eabae96c0c0.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9cc677554b62a84edc8937d747d04d117f715112.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9d0d9139c35e749d7b4698592c91045d086d8b99.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9d3cd4785fd2621936d97aa60cb5005a7e95b5b7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9d7283875d4be9fca20b3d8c2289a89763a3b38e.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9d909a12ad669a49e201a6d94b4211c7aeebb68c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9ec27d87740d654f43e3238d5bfe718e521368ce.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/9f60d76fad5e82e626deca0a8d7c986640b417f3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a00f5eb30a7a379b737fd4fafa61160bc0fce4a8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a18e167e42f3575a85b73c2e10114ff027067640.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a1a25b9ae9dc5911e30e15d5ca2fc5ee8234f1f1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a1e91a45b4858dfcbacc9b0d3b28418f1a990df1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a1ffc0a012620941fe660cedabff822ce7162eca.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a25fbe2b1d2c99f6e93bb0c16b422a16d706f479.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a314855731651c7f7c4be200464c677d127f9015.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a32f407296c4d7fd42fe568d2ad7e8fa81f2df27.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a3471ecd78ccfe91e0db3d5a607624380afb04d1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a349ae092fc26f86f454abfacb40ce0ed9cd2ac9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a528060f65c96db30e29fe0792ecee736ec290c3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a581f053bbfa5115f42c13094857cdd12a37ec49.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a5d04fe388b8b273356584389cb4a1358bb90ad1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a60e2d788aa8bf7ab909fe82a1cca56107dd12e5.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a6c493a071c2c31758bc2bc9adc2beb10d7acfd0.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a74a3c3e364aec16c0c7ebe002cad3214b489460.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/a928c6f408661dd8d6860f7c924635e2ae9bce96.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/aad9832dd45598090e4be6aaeeaa038dfc093751.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ab2209a9dd144b06f80bd8b7426bd8b1549be50a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ac40b59145892a5a3c0141c5f35023ad85972855.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ac73c7c8c596c32306e6ea203ebd039dd3538f06.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ad3d39eb3e45536da2964b7ddf2bc114090510a6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ad8a19ed2553a83794270f0a35f29f66b15c0bb7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ae12ade90e1697e54f0a857eaaa83de8c1b11dea.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/af12689d82b180a54e5362ae95a2865118c0331c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b124ff74afb0914bb434e8fb849eb56d734412f8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b13f21416d84e13708696f34dea81026cda583c9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b143c2df6dd4371fa6776f781e9b531868607b86.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b2cd17a83bb89dc6b4ff954979dba3b2fbc8e043.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b2d579d8b04e5bb645239dd2e5d8dfe4d8d7b472.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b3939293c919512ab5328d9dfacb76aa0a46a7bd.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b3a2c5ab22c7b99459b17e5880b0a77558e77144.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b3cb421b6b325deff2bde26de2fa150f94c73246.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b4104067dcc504da8eada0697129bcae9f7cf9b6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b4264aa4a69bcd11064747964ae4d69f61174136.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b4ed9c2e208e08edeca8b1550ec0840acd090276.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b4f82fd61e3f0ad9fbe9067bcf126248eb498b74.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b51a1f74e439e8b3b84c8fe25870d53a571391ef.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b531a865c77331b7c227b22a91e1aa74a8746db3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b55687e1799df2d682b5ba0c207ca16fa9c014fe.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b55ca7a0aa88ab7d58f4fc035317fdac39b17861.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b588eea9cec4513a3be72255d8d3df214546bfe7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b5e8dba2403c0723e1ff60ac53116252af8aeb64.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b70dd9c116fc5a16341030868952b58cd10afa88.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b770d151d770160624bb46bf874ebf6f508cf50f.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b7dd9f89843eb79d04a50776ab962d81e72223e6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b9068a1e88690142dca1c6a74091348e8064b9ca.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/b95363838d60e863c4cb530ba409fa56dd735728.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/baa542966f410097c2b4894388e41db6aa3cd996.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/bb2c93730dbb48558bb3c4738c956c4e8f816437.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/bb8cd3151bb302b4dbd7107bc23240b7a1f86d80.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/bc86cfac20bf315a60bfd00614d9e5dd192c6dd5.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/bd5938eba6625b76607b0ac2ceb37453e8a67105.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/bdc15139139f2cc22f5656d0456d7b432a72c4e8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/bdf3ad94aa38c155154e3286b79db56b1731afba.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/be6144b74fc7e34c2a42af2bf1993b8ea1556f63.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/be9a4fc94d921be9480d891b5c38b77e187b630a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/bf3f9bbcfd5ec66f5d3cf9863e4ff0f76834a7ab.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/bf7f4ceb6fce455ca0347cd7b704321b92e04f8c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/bfdb965399e4a77f861930aaf9123ed14f72c98c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c15067d0b2458f2c3bfd62743d7309f7e48213f9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c17d332a01b1635dd5d3b5c297e9d44c5b742c04.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c19adb8434d3b9c150be8c8ab3939958c8edaba9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c305e13251e69e8ce59b2908f84afbbd085b5103.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c3233a1342e903c75d1e7983d6d3b12acc11d806.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c323bf28746b8e2634c8d9fcf563736b0fa3f8d7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c42a32017c99646f19bb5807728595d4526c3b30.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c46baa2a60c45bb8746615b3d8b545cf4a6523f6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c4bb40dd65eae6c11b325989b14e0b8d35e4e3ef.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c4f23b63471bb0807346dc89db91e3a684cfa236.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c51284f727b4cb7dac214d351742114146795074.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c5446f5064ccacb0879e4de7125d4ba077989b35.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c5671cc4a4d93628081c7bf7c0fd2cc6ff6c1cd3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c65f07031d99ff5cc529d9ed7df0c615e9a4f1d3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c6e0b5935589b4f8948c91faa0de425bf2791db4.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c713414d12f194f3fab98645df441d23d54164ec.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c78863bcf0ada3d17f98c21c00ca8b115f6b61de.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c8094929c9526b00e767a432d17e2668a910af82.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c831f45c0dbc852540dc9d70bed0d2c034929af8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c8e734bf3818506e254ebfa35047a7957546c2f8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/c9264cc703654b5651cb89a1c9f5e178b5d15cd0.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/cb8fa4f651751e20465cefe0f4795667b8b948fa.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/cbac43e2c13c3cbcec9f19adc7d3fd94eaf6c15e.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/cbb779e005d215d86d8205eaf0134147d1a5650d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/cbe3f817ae974accdf9d422c0df8f6c90721037c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/cd19c19fc5bc5f4d74c11dbaf2e135eb5d6a0ed5.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ce4f41d90f3fea6e5313ad3c0e8aac4f969ef16b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/cebafd792667b403a21a4f507d003102d369ebfe.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/cf699492db927585a503d73d1c8a8e93d3fd1567.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/cfe0e96f004950d55bc7f58233eedae9f8b6abc1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d0b4b390a4806bb739c6b4adbdf572347ecda952.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d18b93994f644beb72edf4196d4efed3caf5b19c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d1c6b35072ca09fd5e1086a11c0a176d2e3340bf.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d1e970327c74ae0d8249c6283d2e3134d042f6ff.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d28d849758880f28a8cc59ef17f116c79b66bc13.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d32c78b759903e3f4bd4fd2ce0b86358f7500c5d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d34109b1b68b9bfbd209053492066ff04075aa16.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d3b6fc67523d073c5f5a8ef0911bd24af5a24c7f.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d4ba00bbbae4f7118119ee537685dcf90c0fc27c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d5a65ff91df0d520048831e9320e60b4b8d6ce50.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d5ba56a402179916023ef587910f0beff5ea1608.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d6a7ccf879c4a4fe694033606332cb83806db296.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d8278c7c03b0669fb61f2460a5a6e24ceff4f94a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d860033316d4db0b552f2e4441ef5b3fd2b58d76.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/d86c223034583bbd6c0fb7533a09ea48e931cb9b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/da419aab4b72e8996af952ad9802b6773a6e9135.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/db94af9f89e3d01956eca6e0dc1be147b0bd4246.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/dbb95aa092c199cb518b2fdf22908d217988c251.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/dbcdbe7c53fa70f8517907ca1b3c440b28512dfc.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/dc895ec2bd6380cb07f0f5d723025eee92f7c09c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/dcf5762fe2b4b81adb93ee084951f42a2f1eadbc.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/dd84cb843a3b1f44c09b5e49fb02ad7ff526920d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/de27eb4f973d27763dc4d176bf2453607ecaae42.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/df18cfb7be27872e85cfca746a5b65aeec27187a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/dfa75235bbe9a4311f49a1644137fd212ea3f4bb.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/dfc85915a4cda974f3bd5c3c52b7d2e59598a1eb.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/dfebf8b683f78ab2f777eb73b12281d973e058a6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e0ee7c8be01c715a4e719394a4086ba228cbf51b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e12eccdaacf4bf3867a4e39d2f0be9eb7720060c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e170ccb91735f4ecee2e5ad7821bf13f8c888c12.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e29be0a3b86507644c82abbc0adfcb22f0edb5e3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e31584cdce0b50ee39c63081564f6e2ec5a7dcbf.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e35ec9f12692dad5164f15f68fc16f969099e241.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e3c6f9fd144c9ed47b5f4dcc9c8ee3574efa18e4.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e3de9b8fce0b12c8459947bd22c727e379512fcc.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e3fc28292267f066fee7718c64f4bbfece521f24.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e497b0cd9de2666c43ccf2e42b7636cde6238dba.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e4ca401f97df40e3568bc0624774cafa02d77cc1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e4cd0999828f4c050af89db8654fce53c3f98231.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e4cd5b31b960f1b94e98198a94b62e3680c17867.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e5101484e2acde007f2471ef3379937d4bd30d14.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e525a4923850629a39c3abc0a0b46b85eeb8eab6.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e6eadc1093d6e4f5a41f86b8301c0d7559d2c609.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e721d97e515c11c9ef7209be37e1c98029ffdfa2.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e8048524abc8cd9b1c09c0ae40329ed61f57c719.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e8522a3d29a2f0f886fe156c30351ba0489992b9.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e8638c03875910e3365dac845714a84af13cffeb.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e9203da50e1059455123460d4e716c9c7f440cc3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e9bc7da808d33a16a8347f27a519bd067186aa66.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/e9e9403195bb7daf89830f82a342b060c4e39b45.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/eaf4418fbe935c15a606516d8f55dc380cd8e822.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/eb1910746ff128b185d49f778c89d74ca1df54d1.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ec1ce56da06483e62a9456229761ff166b345ed2.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ed974cb6e5fa97a3471d7769a1403cac3c2aa6ba.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/edd52ffa94a411e3a7b271caf0a9d1ea6fda0f4c.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ee1817a60aae189024fe864c85bf32c1e92a699a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/eeae8ea2feacb63d810fdd882d2472f6323a6874.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/eee8ed92791a9c140bb435f75178642c8bc57146.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ef18200849afb857a3845934c4967bf7c2366755.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f04823ba99f1452d779894f7a0745da23b55fbef.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f1a012eea74b7fa4510651ff6c338287fb01e182.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f5047d1e0cbb50ec208923a22cd517c55100fa7b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f574498915fa9e02eeb5141c24835d077eba3e75.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f5c280d551f620f1d0b5abc5b7e9c6bc481cf27b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f5d499efbd23360f6e9229bdccf14e0951954730.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f5e23af6a7c6ad3147e01a647b26ac8d4ce72811.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f8f0dc31c5c12bc6e3da6fc71519fa78ea04190b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f9147d34f15a498240d3232622111204005e72d3.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f915ce7b55e81645409daf9d1458f32462dfcdf8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f94ccd83304b6a8e5d454843c2d462d9bb6cba57.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/f99450c7a8851772907f28ffd58be080f18894ae.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/fa44d7cdd2d3f90f81820cfe85818a142149d124.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/fa500507a3f7011763a17911535a4e66fc06b7c7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/fa8a7b2fb896adf1c9f17077664691e511aeb8e5.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/faee932adbe0b3f8663c9be6fa88d65f456385a7.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/fb7d5a70e84450d796cf4499cf923fa360b0d35b.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/fb9c8157d9c1c87673619af0faf8dc55f256353a.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/fc64cd1ec99f3144a0bc0590d0f67e6411cb8a7d.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/fca2f0caf945233a44e5c1c1479f13d636edbf42.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/fd26dda3f4f507f3fdfaff4fe0b468bee54e7c09.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/fdb63b9e51abe6bbb16acfb5d7b773ddbb5bf4a8.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ff29b7920019a21a45545381f042a08acfba3530.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/ff9078c258266635e46b9767b0c7e248c865e4ab.png… | |
Binary files differ. | |
diff --git a/doc/html/_images/math/fffd2357ee88a9c50ba9e831ed64c39c73d54a07.png… | |
Binary files differ. | |
diff --git a/doc/html/_sources/cfd.txt b/doc/html/_sources/cfd.txt | |
t@@ -1,589 +0,0 @@ | |
-Fluid simulation and particle-fluid interaction | |
-=============================================== | |
-A new and experimental addition to *sphere* is the ability to simulate a mixtu… | |
-of particles and a Newtonian fluid. The fluid is simulated using an Eulerian | |
-continuum approach, using a custom CUDA solver for GPU computation. This | |
-approach allows for fast simulations due to the limited need for GPU-CPU | |
-communications, as well as a flexible code base. | |
- | |
-The following sections will describe the theoretical background, as well as the | |
-solution procedure and the numerical implementation. | |
- | |
-Derivation of the Navier Stokes equations with porosity | |
-------------------------------------------------------- | |
-Following the outline presented by `Limache and Idelsohn (2006)`_, the | |
-continuity equation for an incompressible fluid material is given by: | |
- | |
-.. math:: | |
- \nabla \cdot \boldsymbol{v} = 0 | |
- | |
-and the momentum equation: | |
- | |
-.. math:: | |
- \rho \frac{\partial \boldsymbol{v}}{\partial t} | |
- + \rho (\boldsymbol{v} \cdot \nabla \boldsymbol{v}) | |
- = \nabla \cdot \boldsymbol{\sigma} | |
- - \boldsymbol{f}^i | |
- + \rho \boldsymbol{g} | |
- | |
-Here, :math:`\boldsymbol{v}` is the fluid velocity, :math:`\rho` is the | |
-fluid density, :math:`\boldsymbol{\sigma}` is the `Cauchy stress tensor`_, | |
-:math:`\boldsymbol{f}^i` is the particle-fluid interaction vector and | |
-:math:`\boldsymbol{g}` is the gravitational acceleration. For incompressible | |
-Newtonian fluids, the Cauchy stress is given by: | |
- | |
-.. math:: | |
- \boldsymbol{\sigma} = -p \boldsymbol{I} + \boldsymbol{\tau} | |
- | |
-:math:`p` is the fluid pressure, :math:`\boldsymbol{I}` is the identity | |
-tensor, and :math:`\boldsymbol{\tau}` is the deviatoric stress tensor, given | |
-by: | |
- | |
-.. math:: | |
- \boldsymbol{\tau} = | |
- \mu_f \nabla \boldsymbol{v} | |
- + \mu_f (\nabla \boldsymbol{v})^T | |
- | |
-By using the following vector identities: | |
- | |
-.. math:: | |
- \nabla \cdot (p \boldsymbol{I}) = \nabla p | |
- | |
- \nabla \cdot (\nabla \boldsymbol{v}) = \nabla^2 \boldsymbol{v} | |
- | |
- \nabla \cdot (\nabla \boldsymbol{v})^T | |
- = \nabla (\nabla \cdot \boldsymbol{v}) | |
- | |
-the deviatoric component of the Cauchy stress tensor simplifies to the | |
-following, assuming that spatial variations in the viscosity can be neglected: | |
- | |
-.. math:: | |
- = -\nabla p | |
- + \mu_f \nabla^2 \boldsymbol{v} | |
- | |
-Since we are dealing with fluid flow in a porous medium, additional terms are | |
-introduced to the equations for conservation of mass and momentum. In the | |
-following, the equations are derived for the first spatial component. The | |
-solution for the other components is trivial. | |
- | |
-The porosity value (in the saturated porous medium the volumetric fraction of | |
-the fluid phase) denoted :math:`\phi` is incorporated in the continuity and | |
-momentum equations. The continuity equation becomes: | |
- | |
-.. math:: | |
- \frac{\partial \phi}{\partial t} | |
- + \nabla \cdot (\phi \boldsymbol{v}) = 0 | |
- | |
-For the :math:`x` component, the Lagrangian formulation of the momentum equati… | |
-with a body force :math:`\boldsymbol{f}` becomes: | |
- | |
-.. math:: | |
- \frac{D (\phi v_x)}{D t} | |
- = \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\sigma}) \right]_x | |
- - \frac{1}{\rho} f^i_x | |
- + \phi g | |
- | |
-In the Eulerian formulation, an advection term is added, and the Cauchy stress | |
-tensor is represented as isotropic and deviatoric components individually: | |
- | |
-.. math:: | |
- \frac{\partial (\phi v_x)}{\partial t} | |
- + \boldsymbol{v} \cdot \nabla (\phi v_x) | |
- = \frac{1}{\rho} \left[ \nabla \cdot (-\phi p \boldsymbol{I}) | |
- + \phi \boldsymbol{\tau}) \right]_x | |
- - \frac{1}{\rho} f^i_x | |
- + \phi g_x | |
- | |
-Using vector identities to rewrite the advection term, and expanding the fluid | |
-stress tensor term: | |
- | |
-.. math:: | |
- \frac{\partial (\phi v_x)}{\partial t} | |
- + \nabla \cdot (\phi v_x \boldsymbol{v}) | |
- - \phi v_x (\nabla \cdot \boldsymbol{v}) | |
- = \frac{1}{\rho} \left[ -\nabla \phi p \right]_x | |
- + \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\tau}) \right]_x | |
- - \frac{1}{\rho} f^i_x | |
- + \phi g_x | |
- | |
-Spatial variations in the porosity are neglected, | |
- | |
-.. math:: | |
- \nabla \phi := 0 | |
- | |
-and the pressure is attributed to the fluid phase alone (model B in Zhu et al. | |
-2007 and Zhou et al. 2010). The divergence of fluid velocities is defined to be | |
-zero: | |
- | |
-.. math:: | |
- \nabla \cdot \boldsymbol{v} := 0 | |
- | |
-With these assumptions, the momentum equation simplifies to: | |
- | |
-.. math:: | |
- \frac{\partial (\phi v_x)}{\partial t} | |
- + \nabla \cdot (\phi v_x \boldsymbol{v}) | |
- = -\frac{1}{\rho} \frac{\partial p}{\partial x} | |
- + \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\tau}) \right]_x | |
- - \frac{1}{\rho} f^i_x | |
- + \phi g_x | |
- | |
-The remaining part of the advection term is for the :math:`x` component | |
-found as: | |
- | |
-.. math:: | |
- \nabla \cdot (\phi v_x \boldsymbol{v}) = | |
- \left[ | |
- \frac{\partial}{\partial x}, | |
- \frac{\partial}{\partial y}, | |
- \frac{\partial}{\partial z} | |
- \right] | |
- \left[ | |
- \begin{array}{c} | |
- \phi v_x v_x\\ | |
- \phi v_x v_y\\ | |
- \phi v_x v_z\\ | |
- \end{array} | |
- \right] | |
- = | |
- \frac{\partial (\phi v_x v_x)}{\partial x} + | |
- \frac{\partial (\phi v_x v_y)}{\partial y} + | |
- \frac{\partial (\phi v_x v_z)}{\partial z} | |
- | |
-The deviatoric stress tensor is in this case symmetrical, i.e. :math:`\tau_{ij} | |
-= \tau_{ji}`, and is found by: | |
- | |
-.. math:: | |
- \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\tau}) \right]_x | |
- = \frac{1}{\rho} | |
- \left[ | |
- \left[ | |
- \frac{\partial}{\partial x}, | |
- \frac{\partial}{\partial y}, | |
- \frac{\partial}{\partial z} | |
- \right] | |
- \phi | |
- \left[ | |
- \begin{matrix} | |
- \tau_{xx} & \tau_{xy} & \tau_{xz}\\ | |
- \tau_{yx} & \tau_{yy} & \tau_{yz}\\ | |
- \tau_{zx} & \tau_{zy} & \tau_{zz}\\ | |
- \end{matrix} | |
- \right] | |
- \right]_x | |
- | |
- = \frac{1}{\rho} | |
- \left[ | |
- \begin{array}{c} | |
- \frac{\partial (\phi \tau_{xx})}{\partial x} | |
- + \frac{\partial (\phi \tau_{xy})}{\partial y} | |
- + \frac{\partial (\phi \tau_{xz})}{\partial z}\\ | |
- \frac{\partial (\phi \tau_{yx})}{\partial x} | |
- + \frac{\partial (\phi \tau_{yy})}{\partial y} | |
- + \frac{\partial (\phi \tau_{yz})}{\partial z}\\ | |
- \frac{\partial (\phi \tau_{zx})}{\partial x} | |
- + \frac{\partial (\phi \tau_{zy})}{\partial y} | |
- + \frac{\partial (\phi \tau_{zz})}{\partial z}\\ | |
- \end{array} | |
- \right]_x | |
- = \frac{1}{\rho} | |
- \left( | |
- \frac{\partial (\phi \tau_{xx})}{\partial x} | |
- + \frac{\partial (\phi \tau_{xy})}{\partial y} | |
- + \frac{\partial (\phi \tau_{xz})}{\partial z} | |
- \right) | |
- | |
-In a linear viscous fluid, the stress and strain rate | |
-(:math:`\dot{\boldsymbol{\epsilon}}`) is linearly dependent, scaled by the | |
-viscosity parameter :math:`\mu_f`: | |
- | |
-.. math:: | |
- \tau_{ij} = 2 \mu_f \dot{\epsilon}_{ij} | |
- = \mu_f \left( | |
- \frac{\partial v_i}{\partial x_j} + \frac{\partial v_j}{\partial x_i} | |
- \right) | |
- | |
-With this relationship, the deviatoric stress tensor components can be | |
-calculated as: | |
- | |
-.. math:: | |
- \tau_{xx} = 2 \mu_f \frac{\partial v_x}{\partial x} \qquad | |
- \tau_{yy} = 2 \mu_f \frac{\partial v_y}{\partial y} \qquad | |
- \tau_{zz} = 2 \mu_f \frac{\partial v_z}{\partial z} | |
- | |
- \tau_{xy} = \mu_f \left( | |
- \frac{\partial v_x}{\partial y} + \frac{\partial v_y}{\partial x} \right) | |
- | |
- \tau_{xz} = \mu_f \left( | |
- \frac{\partial v_x}{\partial z} + \frac{\partial v_z}{\partial x} \right) | |
- | |
- \tau_{yz} = \mu_f \left( | |
- \frac{\partial v_y}{\partial z} + \frac{\partial v_z}{\partial y} \right) | |
- | |
-where :math:`\mu_f` is the dynamic viscosity. The above formulation of the | |
-fluid rheology assumes identical bulk and shear viscosities. The derivation of | |
-the equations for the other spatial components is trivial. | |
- | |
-Porosity estimation | |
-------------------- | |
-The solid volume in each fluid cell is determined by the ratio of the | |
-a cell-centered spherical cell volume (:math:`V_c`) and the sum of intersecting | |
-particle volumes (:math:`V_s`). The spherical cell volume has a center at | |
-:math:`\boldsymbol{x}_i`, and a radius of :math:`R_i`, which is equal to half | |
-the fluid cell width. The nearby particles are characterized by position | |
-:math:`\boldsymbol{x}_j` and radius :math:`r_j`. The center distance is defined | |
-as: | |
- | |
-.. math:: | |
- d_{ij} = ||\boldsymbol{x}_i - \boldsymbol{x}_j|| | |
- | |
-The common volume of the two intersecting spheres is zero if the volumes aren't | |
-intersecting, lens shaped if they are intersecting, and spherical if the | |
-particle is fully contained by the spherical cell volume: | |
- | |
-.. math:: | |
- V^s_{i} = \sum_j | |
- \begin{cases} | |
- 0 & \textit{if } R_i + r_j \leq d_{ij} \\ | |
- \frac{1}{12d_{ij}} \left[ \pi (R_i + r_j - d_{ij})^2 | |
- (d_{ij}^2 + 2d_{ij}r_j - 3r_j^2 + 2d_{ij} R_i + 6r_j R_i - 3R_i^2) | |
- \right] & \textit{if } R_i - r_j < d_{ij} < R_i + r_j \\ | |
- \frac{4}{3} \pi r^3_j & \textit{if } d_{ij} \leq R_i - r_j | |
- \end{cases} | |
- | |
-Using this method, the cell porosity values are continuous through time as | |
-particles enter and exit the cell volume. The rate of porosity change | |
-(:math:`d\phi/dt`) is estimated by the backwards Euler method | |
-by considering the previous and current porosity. | |
- | |
-Particle-fluid interaction | |
--------------------------- | |
-The momentum exchange of the granular and fluid phases follows the procedure | |
-outlined by Gidaspow 1992 and Shamy and Zhegal 2005. The fluid and particle | |
-interaction is based on the concept of drag, where the magnitude is based on | |
-semi-empirical relationships. The drag force scales linearly with the relative | |
-difference in velocity between the fluid and particle phase. On the base of | |
-Newton's third law, the resulting drag force is applied with opposite signs to | |
-the particle and fluid. | |
- | |
-For fluid cells with porosities (:math:`\phi`) less or equal to 0.8, the drag | |
-force is based on the Ergun (1952) equation: | |
- | |
-.. math:: | |
- \bar{\boldsymbol{f}}_d = \left( | |
- 150 \frac{\mu_f (1-\phi)^2}{\phi\bar{d}^2} | |
- + 1.75 \frac{(1-\phi)\rho_f | |
- ||\boldsymbol{v}_f - \bar{\boldsymbol{v}}_p||}{\bar{d}} | |
- \right) | |
- (\boldsymbol{v}_f - \bar{\boldsymbol{v}}_p) | |
- | |
-here, :math:`\bar{d}` denotes the average particle diameter in the cell, | |
-:math:`\boldsymbol{v}_f` is the fluid flow velocity, and | |
-:math:`\bar{\boldsymbol{v}}_p` is the average particle velocity in the cell. A… | |
-particles in contact with the previously mentioned cell-centered sphere for | |
-porosity estimation contribute to the average particle velocity and diameter in | |
-the fluid cell. | |
- | |
-If the porosity is greater than 0.8, the cell-averaged drag force | |
-(:math:`\bar{\boldsymbol{f}}_d` is found from the Wen and Yu (1966) equation, | |
-which considers the fluid flow situation: | |
- | |
-.. math:: | |
- \bar{\boldsymbol{f}}_d = \left( | |
- \frac{3}{4} | |
- \frac{C_d (1-\phi) \phi^{-2.65} \mu_f \rho_f | |
- ||\boldsymbol{v}_f - \bar{\boldsymbol{v}}_p||}{\bar{d}} | |
- \right) | |
- (\boldsymbol{v}_f - \bar{\boldsymbol{v}}_p) | |
- | |
-The drag coefficient :math:`C_d` is evaluated depending on the magnitude of the | |
-Reynolds number :math:`Re`: | |
- | |
-.. math:: | |
- C_d = | |
- \begin{cases} | |
- \frac{24}{Re} (1+0.15 (Re)^{0.687} & \textit{if } Re < 1,000 \\ | |
- 0.44 & \textit{if } Re \geq 1,000 | |
- \end{cases} | |
- | |
-where the Reynold's number is found by: | |
- | |
-.. math:: | |
- Re = \frac{\phi\rho_f\bar{d}}{\mu_f} | |
- ||\boldsymbol{v}_f - \bar{\boldsymbol{v}}_p|| | |
- | |
-The interaction force is applied to the fluid with negative sign as a | |
-contribution to the body force :math:`\boldsymbol{f}`. The fluid interaction | |
-force applied particles in the fluid cell is: | |
- | |
-.. math:: | |
- \boldsymbol{f}_i = \frac{\bar{\boldsymbol{f}}_d V_p}{1-\phi} | |
- | |
-where :math:`V_p` denotes the particle volume. Optionally, the above | |
-interaction force could be expanded to include the force induced by the fluid | |
-pressure gradient: | |
- | |
-.. math:: | |
- \boldsymbol{f}_i = \left( | |
- -\nabla p + | |
- \frac{\bar{\boldsymbol{f}}_d}{1-\phi} | |
- \right) V_p | |
- | |
- | |
-Fluid dynamics solution procedure by operator splitting | |
-------------------------------------------------------- | |
-The partial differential terms in the previously described equations are found | |
-using finite central differences. Modifying the operator splitting methodology | |
-presented by Langtangen et al. (2002), the predicted velocity | |
-:math:`\boldsymbol{v}^*` after a finite time step | |
-:math:`\Delta t` is found by explicit integration of the momentum equation. | |
- | |
-.. math:: | |
- \frac{\Delta (\phi v_x)}{\Delta t} | |
- + \nabla \cdot (\phi v_x \boldsymbol{v}) | |
- = - \frac{1}{\rho} \frac{\Delta p}{\Delta x} | |
- + \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\tau}) \right]_x | |
- - \frac{1}{\rho} f^i_x | |
- + \phi g_x | |
- | |
- \Downarrow | |
- | |
- \phi \frac{\Delta v_x}{\Delta t} | |
- + v_x \frac{\Delta \phi}{\Delta t} | |
- + \nabla \cdot (\phi v_x \boldsymbol{v}) | |
- = - \frac{1}{\rho} \frac{\Delta p}{\Delta x} | |
- + \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\tau}) \right]_x | |
- - \frac{1}{\rho} f^i_x | |
- + \phi g_x | |
- | |
-We want to isolate :math:`\Delta v_x` in the above equation in order to project | |
-the new velocity. | |
- | |
-.. math:: | |
- \phi \frac{\Delta v_x}{\Delta t} | |
- = - \frac{1}{\rho} \frac{\Delta p}{\Delta x} | |
- + \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\tau}) \right]_x | |
- - \frac{1}{\rho} f^i_x | |
- + \phi g_x | |
- - v_x \frac{\Delta \phi}{\Delta t} | |
- - \nabla \cdot (\phi v_x \boldsymbol{v}) | |
- | |
- \Delta v_x | |
- = - \frac{1}{\rho} \frac{\Delta p}{\Delta x} \frac{\Delta t}{\phi} | |
- + \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\tau}) \right]_x | |
- \frac{\Delta t}{\phi} | |
- - \frac{\Delta t}{\rho\phi} f^i_x | |
- + \Delta t g_x | |
- - v_x \frac{\Delta \phi}{\phi} | |
- - \nabla \cdot (\phi v_x \boldsymbol{v}) \frac{\Delta t}{\phi} | |
- | |
-The term :math:`\beta` is introduced as an adjustable, dimensionless parameter | |
-in the range :math:`[0;1]`, and determines the importance of the old pressure | |
-values in the solution procedure (Langtangen et al. 2002). A value of 0 | |
-corresponds to `Chorin's projection method`_ originally described | |
-in `Chorin (1968)`_. | |
- | |
-.. math:: | |
- v_x^* = v_x^t + \Delta v_x | |
- | |
- v_x^* = v_x^t | |
- - \frac{\beta}{\rho} \frac{\Delta p^t}{\Delta x} \frac{\Delta t}{\phi^t} | |
- + \frac{1}{\rho} \left[ \nabla \cdot (\phi^t \boldsymbol{\tau}^t) \right]_x | |
- \frac{\Delta t}{\phi} | |
- - \frac{\Delta t}{\rho\phi} f^i_x | |
- + \Delta t g_x | |
- - v^t_x \frac{\Delta \phi}{\phi^t} | |
- - \nabla \cdot (\phi^t v_x^t \boldsymbol{v}^t) \frac{\Delta t}{\phi^t} | |
- | |
-Here, :math:`\Delta x` denotes the cell spacing. The velocity found | |
-(:math:`v_x^*`) is only a prediction of the fluid velocity at time | |
-:math:`t+\Delta t`, since the estimate isn't constrained by the continuity | |
-equation: | |
- | |
-.. math:: | |
- \frac{\Delta \phi^t}{\Delta t} + \nabla \cdot (\phi^t | |
- \boldsymbol{v}^{t+\Delta t}) = 0 | |
- | |
-The divergence of a scalar and vector can be `split`_: | |
- | |
-.. math:: | |
- \phi^t \nabla \cdot \boldsymbol{v}^{t+\Delta t} + | |
- \boldsymbol{v}^{t+\Delta t} \cdot \nabla \phi^t | |
- + \frac{\Delta \phi^t}{\Delta t} = 0 | |
- | |
-The predicted velocity is corrected using the new pressure (Langtangen et al. | |
-2002): | |
- | |
-.. math:: | |
- \boldsymbol{v}^{t+\Delta t} = \boldsymbol{v}^* | |
- %- \frac{\Delta t}{\rho} \nabla \epsilon | |
- - \frac{\Delta t}{\rho \phi^t} \nabla \epsilon | |
- \quad \text{where} \quad | |
- \epsilon = p^{t+\Delta t} - \beta p^t | |
- | |
-The above formulation of the future velocity is put into the continuity | |
-equation: | |
- | |
-.. math:: | |
- \Rightarrow | |
- \phi^t \nabla \cdot | |
- \left( \boldsymbol{v}^* - \frac{\Delta t}{\rho \phi^t} \nabla \epsilon \ri… | |
- + | |
- \left( \boldsymbol{v}^* - \frac{\Delta t}{\rho \phi^t} \nabla \epsilon \ri… | |
- \cdot \nabla \phi^t + \frac{\Delta \phi^t}{\Delta t} = 0 | |
- | |
-.. math:: | |
- \Rightarrow | |
- \phi^t \nabla \cdot | |
- \boldsymbol{v}^* - \frac{\Delta t}{\rho \phi^t} \phi^t \nabla^2 \epsilon | |
- + \nabla \phi^t \cdot \boldsymbol{v}^* | |
- - \nabla \phi^t \cdot \nabla \epsilon \frac{\Delta t}{\rho \phi^t} | |
- + \frac{\Delta \phi^t}{\Delta t} = 0 | |
- | |
-.. math:: | |
- \Rightarrow | |
- \frac{\Delta t}{\rho} \nabla^2 \epsilon | |
- = \phi^t \nabla \cdot \boldsymbol{v}^* | |
- + \nabla \phi^t \cdot \boldsymbol{v}^* | |
- - \nabla \phi^t \cdot \nabla \epsilon \frac{\Delta t}{\rho \phi^t} | |
- + \frac{\Delta \phi^t}{\Delta t} | |
- | |
-The pressure difference in time becomes a `Poisson equation`_ with added terms: | |
- | |
-.. math:: | |
- \Rightarrow | |
- \nabla^2 \epsilon | |
- = \frac{\nabla \cdot \boldsymbol{v}^* \phi^t \rho}{\Delta t} | |
- + \frac{\nabla \phi^t \cdot \boldsymbol{v}^* \rho}{\Delta t} | |
- - \frac{\nabla \phi^t \cdot \nabla \epsilon}{\phi^t} | |
- + \frac{\Delta \phi^t \rho}{\Delta t^2} | |
- | |
-The right hand side of the above equation is termed the *forcing function* | |
-:math:`f`, which is decomposed into two terms, :math:`f_1` and :math:`f_2`: | |
- | |
-.. math:: | |
- f_1 | |
- = \frac{\nabla \cdot \boldsymbol{v}^* \phi^t \rho}{\Delta t} | |
- + \frac{\nabla \phi^t \cdot \boldsymbol{v}^* \rho}{\Delta t} | |
- + \frac{\Delta \phi^t \rho}{\Delta t^2} | |
- | |
- f_2 = | |
- \frac{\nabla \phi^t \cdot \nabla \epsilon}{\phi^t} | |
- | |
- | |
-During the `Jacobi iterative solution procedure`_ :math:`f_1` remains constant, | |
-while :math:`f_2` changes value. For this reason, :math:`f_1` is found only | |
-during the first iteration, while :math:`f_2` is updated every time. The value | |
-of the forcing function is found as: | |
- | |
-.. math:: | |
- f = f_1 - f_2 | |
- | |
-Using second-order finite difference approximations of the Laplace operator | |
-second-order partial derivatives, the differential equations become a system of | |
-equations that is solved using `iteratively`_ using Jacobi updates. The total | |
-number of unknowns is :math:`(n_x - 1)(n_y - 1)(n_z - 1)`. | |
- | |
-The discrete Laplacian (approximation of the Laplace operator) can be obtained | |
-by a finite-difference seven-point stencil in a three-dimensional, cubic | |
-grid with cell spacing :math:`\Delta x, \Delta y, \Delta z`, considering the s… | |
-face neighbors: | |
- | |
-.. math:: | |
- \nabla^2 \epsilon_{i_x,i_y,i_z} \approx | |
- \frac{\epsilon_{i_x-1,i_y,i_z} - 2 \epsilon_{i_x,i_y,i_z} | |
- + \epsilon_{i_x+1,i_y,i_z}}{\Delta x^2} | |
- + \frac{\epsilon_{i_x,i_y-1,i_z} - 2 \epsilon_{i_x,i_y,i_z} | |
- + \epsilon_{i_x,i_y+1,i_z}}{\Delta y^2} | |
- | |
- + \frac{\epsilon_{i_x,i_y,i_z-1} - 2 \epsilon_{i_x,i_y,i_z} | |
- + \epsilon_{i_x,i_y,i_z+1}}{\Delta z^2} | |
- \approx f_{i_x,i_y,i_z} | |
- | |
-Within a Jacobi iteration, the value of the unknowns (:math:`\epsilon^n`) is | |
-used to find an updated solution estimate (:math:`\epsilon^{n+1}`). | |
-The solution for the updated value takes the form: | |
- | |
-.. math:: | |
- \epsilon^{n+1}_{i_x,i_y,i_z} | |
- = \frac{-\Delta x^2 \Delta y^2 \Delta z^2 f_{i_x,i_y,i_z} | |
- + \Delta y^2 \Delta z^2 (\epsilon^n_{i_x-1,i_y,i_z} + | |
- \epsilon^n_{i_x+1,i_y,i_z}) | |
- + \Delta x^2 \Delta z^2 (\epsilon^n_{i_x,i_y-1,i_z} + | |
- \epsilon^n_{i_x,i_y+1,i_z}) | |
- + \Delta x^2 \Delta y^2 (\epsilon^n_{i_x,i_y,i_z-1} + | |
- \epsilon^n_{i_x,i_y,i_z+1})} | |
- {2 (\Delta x^2 \Delta y^2 | |
- + \Delta x^2 \Delta z^2 | |
- + \Delta y^2 \Delta z^2) } | |
- | |
-The difference between the current and updated value is termed the *normalized | |
-residual*: | |
- | |
-.. math:: | |
- r_{i_x,i_y,i_z} = \frac{(\epsilon^{n+1}_{i_x,i_y,i_z} | |
- - \epsilon^n_{i_x,i_y,i_z})^2}{(\epsilon^{n+1}_{i_x,i_y,i_z})^2} | |
- | |
-Note that the :math:`\epsilon` values cannot be 0 due to the above normalizati… | |
-of the residual. | |
- | |
-The updated values are at the end of the iteration stored as the current value… | |
-and the maximal value of the normalized residual is found. If this value is | |
-larger than a tolerance criteria, the procedure is repeated. The iterative | |
-procedure is ended if the number of iterations exceeds a defined limit. | |
- | |
-After the values of :math:`\epsilon` are found, they are used to find the new | |
-pressures and velocities: | |
- | |
-.. math:: | |
- \bar{p}^{t+\Delta t} = \beta \bar{p}^t + \epsilon | |
- | |
-.. math:: | |
- \bar{\boldsymbol{v}}^{t+\Delta t} = | |
- \bar{\boldsymbol{v}}^* - \frac{\Delta t}{\rho\phi} \nabla \epsilon | |
- | |
- | |
-Boundary conditions | |
-------------------- | |
-The lateral boundaries are periodic. This cannot be changed in the current | |
-version of ``sphere``. This means that the fluid properties at the paired, | |
-parallel lateral (:math:`x` and :math:`y`) boundaries are identical. A flow | |
-leaving through one side reappears on the opposite side. | |
- | |
-The top and bottom boundary conditions of the fluid grid can be either: | |
-prescribed pressure (Dirichlet), or prescribed velocity (Neumann). The | |
-(horizontal) velocities parallel to the boundaries are free to attain other | |
-values (free slip). The Dirichlet boundary condition is enforced by keeping the | |
-value of :math:`\epsilon` constant at the boundaries, e.g.: | |
- | |
-.. math:: | |
- \epsilon^{n+1}_{i_x,i_y,i_z = 1 \vee n_z} | |
- = | |
- \epsilon^{n}_{i_x,i_y,i_z = 1 \vee n_z} | |
- | |
-The Neumann boundary condition of no flow across the boundary is enforced by | |
-setting the gradient of :math:`\epsilon` perpendicular to the boundary to zero, | |
-e.g.: | |
- | |
-.. math:: | |
- \nabla_z \epsilon^{n+1}_{i_x,i_y,i_z = 1 \vee n_z} = 0 | |
- | |
- | |
-Numerical implementation | |
------------------------- | |
-Ghost nodes | |
- | |
---- | |
- | |
- | |
- | |
- | |
-.. _Limache and Idelsohn (2006): http://www.cimec.org.ar/ojs/index.php/mc/arti… | |
-.. _Cauchy stress tensor: https://en.wikipedia.org/wiki/Cauchy_stress_tensor | |
-.. _`Chorin's projection method`: https://en.wikipedia.org/wiki/Projection_met… | |
-.. _`Chorin (1968)`: http://www.ams.org/journals/mcom/1968-22-104/S0025-5718-1… | |
-.. _split: http://www.wolframalpha.com/input/?i=div(p+v) | |
-.. _Poisson equation: https://en.wikipedia.org/wiki/Poisson's_equation | |
-.. _`Jacobi iterative solution procedure`: http://www.rsmas.miami.edu/personal… | |
-.. _iteratively: https://en.wikipedia.org/wiki/Relaxation_(iterative_method) | |
- | |
diff --git a/doc/html/_sources/dem.txt b/doc/html/_sources/dem.txt | |
t@@ -1,217 +0,0 @@ | |
-Discrete element method | |
-======================= | |
-Granular material is a very common form of matter, both in nature and industry. | |
-It can be defined as material consisting of interacting, discrete particles. | |
-Common granular materials include gravels, sands and soils, ice bergs, | |
-asteroids, powders, seeds, and other foods. Over 75% of the raw materials that | |
-pass through industry are granular. This wide occurrence has driven the desire | |
-to understand the fundamental mechanics of the material. | |
- | |
-Contrary to other common materials such as gases, liquids and solids, a general | |
-mathematical formulation of it's behavior hasn't yet been found. Granular | |
-material can, however, display states that somewhat resemble gases, fluids and | |
-solids. | |
- | |
-.. The discrete element method (or distinct element method) was initially | |
- formulated by Cundall and Strack (1979). It simulates the physical behavio… | |
- interaction of discrete, unbreakable particles, with their own mass and in… | |
- under the influence of e.g. gravity and boundary conditions such as moving | |
- walls. By discretizing time into small time steps, explicit integration of | |
- Newton's second law of motion is used to predict the new position and kine… | |
- values for each particle from the previous sums of forces. This Lagrangian | |
- approach is ideal for simulating discontinuous materials, such as granular | |
- matter. | |
- The complexity of the computations is kept low by representing the particl… | |
- spheres, which keeps contact-searching algorithms simple. | |
- | |
-The `Discrete Element Method | |
-<https://en.wikipedia.org/wiki/Discrete_element_method>`_ (DEM) is a numerical | |
-method that can be used to | |
-simulate the interaction of particles. Originally derived from | |
-`Molecular Dynamics <https://en.wikipedia.org/wiki/Molecular_dynamics>`_, | |
-it simulates particles as separate entities, and calculates their positions, | |
-velocities, and accelerations through time. See Cundall and Strack (1979) and | |
-`this blog post | |
-<http://anders-dc.github.io/2013/10/16/the-discrete-element-method/>`_ for | |
-general introduction to the DEM. The following sections will highlight the | |
-DEM implementation in ``sphere``. Some of the details are also described in | |
-Damsgaard et al. 2013. In the used notation, a bold symbol denotes a | |
-three-dimensional vector, and a dot denotes that the entity is a temporal | |
-derivative. | |
- | |
-Contact search | |
--------------- | |
-Homogeneous cubic grid. | |
- | |
-.. math:: | |
- \delta_n^{ij} = ||\boldsymbol{x}^i - \boldsymbol{x}^j|| - (r^i + r^j) | |
- | |
-where :math:`r` is the particle radius, and :math:`\boldsymbol{x}` denotes the | |
-positional vector of a particle, and :math:`i` and :math:`j` denote the indexes | |
-of two particles. Negative values of :math:`\delta_n` denote that the particles | |
-are overlapping. | |
- | |
- | |
-Contact interaction | |
-------------------- | |
-Now that the inter-particle contacts have been identified and characterized by | |
-their overlap, the resulting forces from the interaction can be resolved. The | |
-interaction is decomposed into normal and tangential components, relative to t… | |
-contact interface orientation. The normal vector to the contact interface is | |
-found by: | |
- | |
-.. math:: | |
- \boldsymbol{n}^{ij} = | |
- \frac{\boldsymbol{x}^i - \boldsymbol{x}^j} | |
- {||\boldsymbol{x}^i - \boldsymbol{x}^j||} | |
- | |
-The contact velocity :math:`\dot{\boldsymbol{\delta}}` is found by: | |
- | |
-.. math:: | |
- \dot{\boldsymbol{\delta}}^{ij} = | |
- (\boldsymbol{x}^i - \boldsymbol{x}^j) | |
- + (r^i + \frac{\delta_n^{ij}}{2}) | |
- (\boldsymbol{n}^{ij} \times \boldsymbol{\omega}^{i}) | |
- + (r^j + \frac{\delta_n^{ij}}{2}) | |
- (\boldsymbol{n}^{ij} \times \boldsymbol{\omega}^{j}) | |
- | |
-The contact velocity is decomposed into normal and tangential components, | |
-relative to the contact interface. The normal component is: | |
- | |
-.. math:: | |
- \dot{\delta}^{ij}_n = | |
- -(\dot{\boldsymbol{\delta}}^{ij} \cdot \boldsymbol{n}^{ij}) | |
- | |
-and the tangential velocity component is found as: | |
- | |
-.. math:: | |
- \dot{\boldsymbol{\delta}}^{ij}_t = | |
- \dot{\boldsymbol{\delta}}^{ij} | |
- - \boldsymbol{n}^{ij} | |
- (\boldsymbol{n}^{ij} \cdot \dot{\boldsymbol{\delta}}^{ij}) | |
- | |
-where :math:`\boldsymbol{\omega}` is the rotational velocity vector of a | |
-particle. The total tangential displacement on the contact plane is found | |
-incrementally: | |
- | |
-.. math:: | |
- \boldsymbol{\delta}_{t,\text{uncorrected}}^{ij} = | |
- \int_0^{t_c} | |
- \dot{\boldsymbol{\delta}}^{ij}_t \Delta t | |
- | |
-where :math:`t_c` is the duration of the contact and :math:`\Delta t` is the | |
-computational time step length. The tangential contact interface displacement … | |
-set to zero when a contact pair no longer overlaps. At each time step, the val… | |
-of :math:`\boldsymbol{\delta}_t` is corrected for rotation of the contact | |
-interface: | |
- | |
-.. math:: | |
- \boldsymbol{\delta}_t^{ij} = \boldsymbol{\delta}_{t,\text{uncorrected}}^{ij} | |
- - (\boldsymbol{n} | |
- (\boldsymbol{n} \cdot \boldsymbol{\delta}_{t,\text{uncorrected}}^{ij}) | |
- | |
-With all the geometrical and kinetic components determined, the resulting forc… | |
-of the particle interaction can be determined using a contact model. ``sphere`` | |
-features only one contact model in the normal direction to the contact; the | |
-linear-elastic-viscous (*Hookean* with viscous damping, or *Kelvin-Voigt*) | |
-contact model. The resulting force in the normal direction of the contact | |
-interface on particle :math:`i` is: | |
- | |
-.. math:: | |
- \boldsymbol{f}_n^{ij} = \left( | |
- -k_n \delta_n^{ij} -\gamma_n \dot{\delta_n}^{ij} | |
- \right) \boldsymbol{n}^{ij} | |
- | |
-The parameter :math:`k_n` is the defined `spring coefficient | |
-<https://en.wikipedia.org/wiki/Hooke's_law>`_ in the normal direction of the | |
-contact interface, and :math:`\gamma_n` is the defined contact interface | |
-viscosity, also in the normal direction. The loss of energy in this interaction | |
-due to the viscous component is for particle :math:`i` calculated as: | |
- | |
-.. math:: | |
- \dot{e}^i_v = \gamma_n (\dot{\delta}^{ij}_n)^2 | |
- | |
-The tangential force is determined by either a viscous-frictional contact mode… | |
-or a elastic-viscous-frictional contact model. The former contact model is very | |
-computationally efficient, but somewhat inaccurate relative to the mechanics of | |
-real materials. The latter contact model is therefore the default, even though | |
-it results in longer computational times. The tangential force in the | |
-visco-frictional contact model: | |
- | |
-.. math:: | |
- \boldsymbol{f}_t^{ij} = -\gamma_t \dot{\boldsymbol{\delta}_t}^{ij} | |
- | |
-:math:`\gamma_n` is the defined contact interface viscosity in the tangential | |
-direction. The tangential displacement along the contact interface | |
-(:math:`\boldsymbol{\delta}_t`) is not calculated and stored for this contact | |
-model. The tangential force in the more realistic elastic-viscous-frictional | |
-contact model: | |
- | |
-.. math:: | |
- \boldsymbol{f}_t^{ij} = | |
- -k_t \boldsymbol{\delta}_t^{ij} -\gamma_t \dot{\boldsymbol{\delta}_t}^{ij} | |
- | |
-The parameter :math:`k_n` is the defined spring coefficient in the tangential | |
-direction of the contact interface. Note that the tangential force is only | |
-found if the tangential displacement (:math:`\delta_t`) or the tangential | |
-velocity (:math:`\dot{\delta}_t`) is non-zero, in order to avoid division by | |
-zero. Otherwise it is defined as being :math:`[0,0,0]`. | |
- | |
-For both types of contact model, the tangential force is limited by the Coulomb | |
-criterion of static and dynamic friction: | |
- | |
-.. math:: | |
- ||\boldsymbol{f}^{ij}_t|| \leq | |
- \begin{cases} | |
- \mu_s ||\boldsymbol{f}^{ij}_n|| & | |
- \text{if} \quad ||\boldsymbol{f}_t^{ij}|| = 0 \\ | |
- \mu_d ||\boldsymbol{f}^{ij}_n|| & | |
- \text{if} \quad ||\boldsymbol{f}_t^{ij}|| > 0 | |
- \end{cases} | |
- | |
-If the elastic-viscous-frictional contact model is used and the Coulomb limit … | |
-reached, the tangential displacement along the contact interface is limited to | |
-this value: | |
- | |
-.. math:: | |
- \boldsymbol{\delta}_t^{ij} = | |
- \frac{1}{k_t} \left( | |
- \mu_d ||\boldsymbol{f}_n^{ij}|| | |
- \frac{\boldsymbol{f}^{ij}_t}{||\boldsymbol{f}^{ij}_t||} | |
- + \gamma_t \dot{\boldsymbol{\delta}}_t^{ij} \right) | |
- | |
-If the tangential force reaches the Coulomb limit, the energy lost due to | |
-frictional dissipation is calculated as: | |
- | |
-.. math:: | |
- \dot{e}^i_s = \frac{||\boldsymbol{f}^{ij}_t | |
- \dot{\boldsymbol{\delta}}_t^{ij} \Delta t||}{\Delta t} | |
- | |
-The loss of energy by viscous dissipation in the tangential direction is not | |
-found. | |
- | |
- | |
-Temporal integration | |
--------------------- | |
-In the DEM, the time is discretized into small steps (:math:`\Delta t`). For e… | |
-step, the entire network of contacts is resolved, and the resulting forces and | |
-torques for each particle are found. With these values at hand, the new | |
-linear and rotational accelerations can be found using | |
-`Newton's second law <https://en.wikipedia.org/wiki/Newton%27s_laws_of_motion>… | |
-of the motion of solid bodies. If a particle with mass :math:`m` at a point in… | |
-experiences a sum of forces denoted :math:`\boldsymbol{F}`, the resultant acce… | |
-(:math:`\boldsymbol{a}`) can be found by rearranging Newton's second law: | |
- | |
-.. math:: | |
- \boldsymbol{F} = m \boldsymbol{a} \Rightarrow \boldsymbol{a} = \frac{\bolds… | |
- | |
-The new velocity and position is found by integrating the above equation | |
-with regards to time. The simplest integration scheme in this regard is the | |
-`Euler method <https://en.wikipedia.org/wiki/Euler_method>`_: | |
- | |
-.. math:: | |
- \boldsymbol{v} = \boldsymbol{v}_{old} + \boldsymbol{a} \Delta t | |
- | |
-.. math:: | |
- \boldsymbol{p} = \boldsymbol{p}_{old} + \boldsymbol{v} \Delta t | |
- | |
diff --git a/doc/html/_sources/index.txt b/doc/html/_sources/index.txt | |
t@@ -1,41 +0,0 @@ | |
-.. sphere documentation master file, created by | |
- sphinx-quickstart on Wed Nov 14 12:56:58 2012. | |
- You can adapt this file completely to your liking, but it should at least | |
- contain the root `toctree` directive. | |
- | |
-The sphere documentation | |
-======================== | |
-This is the official documentation for the ``sphere`` discrete element modelli… | |
-software. This document aims at guiding the installation process, documenting | |
-the usage, and explaining the relevant theory. | |
- | |
-``sphere`` is developed by Anders Damsgaard as part as his Ph.D. project, under | |
-supervision of David Lundbek Egholm and Jan A. Piotrowski, all of the Departme… | |
-of Geoscience, Aarhus University, Denmark. The author welcomes interested third | |
-party developers. This document is a work in progress. | |
- | |
-Contact: Anders Damsgaard, `<https://adamsgaard.dk>`_, | |
-`<[email protected]>`_ | |
- | |
- | |
-Contents | |
--------- | |
-.. toctree:: | |
- :maxdepth: 2 | |
- | |
- introduction | |
- dem | |
- cfd | |
- python_api | |
- sphere_internals | |
- | |
- | |
- | |
-Indices and tables | |
------------------- | |
- | |
-.. * :ref:`modindex` | |
- | |
-* :ref:`genindex` | |
-* :ref:`search` | |
- | |
diff --git a/doc/html/_sources/introduction.txt b/doc/html/_sources/introductio… | |
t@@ -1,199 +0,0 @@ | |
-Introduction and Installation | |
-============================= | |
- | |
-The ``sphere``-software is used for three-dimensional discrete element method | |
-(DEM) particle simulations. The source code is written in C++, CUDA C and | |
-Python, and is compiled by the user. The main computations are performed on the | |
-graphics processing unit (GPU) using NVIDIA's general purpose parallel computi… | |
-architecture, CUDA. Simulation setup and data analysis is performed with the | |
-included Python API. | |
- | |
-The ultimate aim of the ``sphere`` software is to simulate soft-bedded subglac… | |
-conditions, while retaining the flexibility to perform simulations of granular | |
-material in other environments. | |
- | |
-The purpose of this documentation is to provide the user with a walk-through of | |
-the installation, work-flow, data-analysis and visualization methods of | |
-``sphere``. In addition, the ``sphere`` internals are exposed to provide a way… | |
-understanding of the discrete element method numerical routines taking place. | |
- | |
-.. note:: Command examples in this document starting with the symbol ``$`` are | |
- meant to be executed in the shell of the operational system, and ``>>>`` | |
- means execution in Python. `IPython <http://ipython.org>`_ is an excellent, | |
- interactive Python shell. | |
- | |
-All numerical values in this document, the source code, and the configuration | |
-files are typeset with strict respect to the SI unit system. | |
- | |
- | |
-Requirements | |
------------- | |
- | |
-The build requirements are: | |
- | |
- * A Nvidia CUDA-supported version of Linux or Mac OS X (see the `CUDA toolkit | |
- release notes <http://docs.nvidia.com/cuda/cuda-toolkit-release-notes/inde… | |
- * `GNU Make <https://www.gnu.org/software/make/>`_ | |
- * `CMake <http://www.cmake.org>`_, version 2.8 or newer | |
- * The `GNU Compiler Collection <http://gcc.gnu.org/>`_ (GCC) | |
- * The `Nvidia CUDA toolkit <https://developer.nvidia.com/cuda-downloads>`_, | |
- version 8.0 or newer | |
- | |
-In Debian GNU/Linux, these dependencies can be installed by running:: | |
- | |
- $ sudo apt-get install build-essential cmake nvidia-cuda-toolkit clang-3.8 | |
- | |
-Unfortunately, the Nvidia Toolkit is shipped under a non-free license. In order | |
-to install it in Debian GNU/Linux, add ``non-free`` archives to your | |
-``/etc/apt/sources.list``. | |
- | |
-The runtime requirements are: | |
- | |
- * A `CUDA-enabled GPU <http://www.nvidia.com/object/cuda_gpus.html>`_ with | |
- compute capability 2.0 or greater. | |
- * A Nvidia CUDA-enabled GPU and device driver | |
- | |
-Optional tools, required for simulation setup and data processing: | |
- | |
- * `Python <http://www.python.org/>`_ | |
- * `Numpy <http://numpy.scipy.org>`_ | |
- * `Matplotlib <http://matplotlib.org>`_ | |
- * `Python bindings for VTK <http://www.vtk.org>`_ | |
- * `Imagemagick <http://www.imagemagick.org/script/index.php>`_ | |
- * `ffmpeg <http://ffmpeg.org/>`_. Soon to be replaced by avconv! | |
- | |
-In Debian GNU/Linux, these dependencies can be installed by running:: | |
- | |
- $ sudo apt-get install python python-numpy python-matplotlib python-vtk \ | |
- imagemagick libav-tools | |
- | |
-``sphere`` is distributed with a HTML and PDF build of the documentation. The | |
-following tools are required for building the documentation: | |
- | |
- * `Sphinx <http://sphinx-doc.org>`_ | |
- | |
- * `sphinxcontrib-programoutput <http://packages.python.org/sphinxcontrib-p… | |
- | |
- * `Doxygen <http://www.stack.nl/~dimitri/doxygen/>`_ | |
- * `Breathe <http://michaeljones.github.com/breathe/>`_ | |
- * `dvipng <http://www.nongnu.org/dvipng/>`_ | |
- * `TeX Live <http://www.tug.org/texlive/>`_, including ``pdflatex`` | |
- | |
-In Debian GNU/Linux, these dependencies can be installed by running:: | |
- | |
- $ sudo apt-get install python-sphinx python-pip doxygen dvipng \ | |
- python-sphinxcontrib-programoutput texlive-full | |
- $ sudo pip install breathe | |
- | |
-`Git <http://git-scm.com>`_ is used as the distributed version control system | |
-platform, and the source code is maintained at `Github | |
-<https://github.com/anders-dc/sphere/>`_. ``sphere`` is licensed under the `GNU | |
-Public License, v.3 <https://www.gnu.org/licenses/gpl.html>`_. | |
- | |
-.. note:: All Debian GNU/Linux runtime, optional, and documentation dependenci… | |
- mentioned above can be installed by executing the following command from the | |
- ``doc/`` folder:: | |
- | |
- $ make install-debian-pkgs | |
- | |
- | |
-Obtaining sphere | |
----------------- | |
- | |
-The best way to keep up to date with subsequent updates, bugfixes and | |
-development, is to use the Git version control system. To obtain a local | |
-copy, execute:: | |
- | |
- $ git clone [email protected]:anders-dc/sphere.git | |
- | |
- | |
-Building ``sphere`` | |
-------------------- | |
- | |
-``sphere`` is built using ``cmake``, the platform-specific C/C++ compilers, | |
-and ``nvcc`` from the Nvidia CUDA toolkit. | |
- | |
-If you instead plan to execute it on a Fermi GPU, change ``set(GPU_GENERATION | |
-1)`` to ``set(GPU_GENERATION 0`` in ``CMakeLists.txt``. | |
- | |
-In some cases the CMake FindCUDA module will have troubles locating the | |
-CUDA samples directory, and will complain about ``helper_math.h`` not being | |
-found. | |
- | |
-In that case, modify the ``CUDA_SDK_ROOT_DIR`` variable in | |
-``src/CMakeLists.txt`` to the path where you installed the CUDA samples, and r… | |
-``cmake . && make`` again. Alternatively, copy ``helper_math.h`` from the CUDA | |
-sample subdirectory ``common/inc/helper_math.h`` into the sphere ``src/`` | |
-directory, and run ``cmake`` and ``make`` again. Due to license restrictions, | |
-sphere cannot be distributed with this file. | |
- | |
-If you plan to run ``sphere`` on a Kepler GPU, execute the following commands | |
-from the root directory:: | |
- | |
- $ cmake . && make | |
- | |
-NOTE: If your system does not have a GCC compiler compatible with the installed | |
-CUDA version (e.g. GCC-5 for CUDA 8), you will see errors at the linker stage.… | |
-In that case, try using ``clang-3.8`` as the C and C++ compiler instead:: | |
- | |
- $ rm -rf CMakeCache.txt CMakeFiles/ | |
- $ export CC=$(which clang-3.8) && export CXX=$(which clang++-3.8) && cmake . … | |
- | |
-After a successfull installation, the ``sphere`` executable will be located | |
-in the root folder. To make sure that all components are working correctly, | |
-execute:: | |
- | |
- $ make test | |
- | |
-Disclaimer: On some systems the Navier-Stokes related tests will fail. If you | |
-do encounter these problems, but do not plan on using the Navier Stokes solver | |
-for fluid dynamics, carry on. | |
- | |
-If successful the Makefiles will create the required data folders, object | |
-files, as well as the ``sphere`` executable in the root folder. Issue the | |
-following commands to check the executable:: | |
- | |
- $ ./sphere --version | |
- | |
-The output should look similar to this: | |
- | |
-.. program-output:: ../../sphere --version | |
- | |
-The documentation can be read in the `reStructuredText | |
-<http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html>`_-format … | |
-the ``doc/sphinx/`` folder, or in the HTML or PDF formats in the folders | |
-``doc/html`` and ``doc/pdf``. | |
- | |
-Optionally, the documentation can be built using the following commands:: | |
- | |
- $ cd doc/sphinx | |
- $ make html | |
- $ make latexpdf | |
- | |
-To see all available output formats, execute:: | |
- | |
- $ make help | |
- | |
- | |
-Updating sphere | |
---------------- | |
- | |
-To update your local version, type the following commands in the ``sphere`` ro… | |
-directory:: | |
- | |
- $ git pull && cmake . && make | |
- | |
- | |
-Work flow | |
---------- | |
- | |
-After compiling the ``sphere`` binary, the procedure of a creating and handling | |
-a simulation is typically arranged in the following order: | |
- | |
- * Setup of particle assemblage, physical properties and conditions using the | |
- Python API (``python/sphere.py``). | |
- * Execution of ``sphere`` software, which simulates the particle behavior as… | |
- function of time, as a result of the conditions initially specified in the | |
- input file. | |
- * Inspection, analysis, interpretation and visualization of ``sphere`` output | |
- in Python, and/or scene rendering using the built-in ray tracer. | |
diff --git a/doc/html/_sources/python_api.txt b/doc/html/_sources/python_api.txt | |
t@@ -1,27 +0,0 @@ | |
-Python API | |
-========== | |
-The Python module ``sphere`` is intended as the main interface to the ``sphere… | |
-application. It is recommended to use this module for simulation setup, | |
-simulation execution, and analysis of the simulation output data. | |
- | |
-In order to use the API, the file ``sphere.py`` must be placed in the same | |
-directory as the Python files. | |
- | |
-Sample usage | |
------------- | |
-Below is a simple, annotated example of how to setup, execute, and post-process | |
-a ``sphere`` simulation. The example is also found in the ``python/`` folder … | |
-``collision.py``. | |
- | |
-.. literalinclude:: ../../python/collision.py | |
- :language: python | |
- :linenos: | |
- | |
-The full documentation of the ``sphere`` Python API can be found below. | |
- | |
- | |
-The ``sphere`` module | |
---------------------- | |
-.. automodule:: sphere | |
- :members: | |
- | |
diff --git a/doc/html/_sources/sphere_internals.txt b/doc/html/_sources/sphere_… | |
t@@ -1,215 +0,0 @@ | |
-sphere internals | |
-================ | |
- | |
-The *sphere* executable has the following options: | |
- | |
-.. command-output:: ../../sphere --help | |
- | |
-The most common way to invoke *sphere* is however via the Python API (e.g. :py… | |
- | |
- | |
- | |
- | |
-\subsection{The *sphere* algorithm} | |
-\label{subsec:spherealgo} | |
-The *sphere*-binary is launched from the system terminal by passing the simula… | |
-#. System check, including search for NVIDIA CUDA compatible devices (\texttt{… | |
- | |
-#. Initial data import from binary input file (\texttt{main.cpp}). | |
- | |
-#. Allocation of memory for all host variables (particles, grid, walls, etc.) … | |
- | |
-#. Continued import from binary input file (\texttt{main.cpp}). | |
- | |
-#. Control handed to GPU-specific function \texttt{gpuMain(\ldots)} (\texttt{d… | |
- | |
-#. Memory allocation of device memory (\texttt{device.cu}). | |
- | |
-#. Transfer of data from host to device variables (\texttt{device.cu}). | |
- | |
-#. Initialization of Thrust\footnote{\url{https://code.google.com/p/thrust/}} … | |
- | |
-#. Calculation of GPU workload configuration (thread and block layout) (\textt… | |
- | |
-#. Status and data written to \verb"<simulation_ID>.status.dat" and \verb"<sim… | |
- | |
-#. Main loop (while \texttt{time.current <= time.total}) (functions called in … | |
- | |
- | |
- #. \label{loopstart}CUDA thread synchronization point. | |
- | |
- #. \texttt{calcParticleCellID<<<,>>>(\ldots)}: Particle-grid hash value calc… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. \texttt{thrust::sort\_by\_key(\ldots)}: Thrust radix sort of particle-gri… | |
- | |
- #. \texttt{cudaMemset(\ldots)}: Writing zero value (\texttt{0xffffffff}) to … | |
- | |
- #. \texttt{reorderArrays<<<,>>>(\ldots)}: Reordering of particle arrays, bas… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. Optional: \texttt{topology<<<,>>>(\ldots)}: If particle contact history i… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. \texttt{interact<<<,>>>(\ldots)}: For each particle: Search of contacts i… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. \texttt{integrate<<<,>>>(\ldots)}: Updating of spatial degrees of freedom… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. \texttt{summation<<<,>>>(\ldots)}: Particle contributions to the net forc… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. \texttt{integrateWalls<<<,>>>(\ldots)}: Updating of spatial degrees of fr… | |
- | |
- #. Update of timers and loop-related counters (e.g. \texttt{time.current}), … | |
- | |
- #. If file output interval is reached: | |
- | |
- \item Optional write of data to output binary (\verb"<simulation_ID>.o… | |
- \item Update of \verb"<simulation_ID>.status#..bin" (\texttt{device.cu… | |
- | |
- \item Return to point \ref{loopstart}, unless \texttt{time.current >= ti… | |
- | |
- | |
-#. \label{loopend}Liberation of device memory (\texttt{device.cu}). | |
- | |
-#. Control returned to \texttt{main(\ldots)}, liberation of host memory (\text… | |
- | |
-#. End of program, return status equal to zero (0) if no problems where encoun… | |
- | |
- | |
-Numerical algorithm | |
-------------------- | |
-The *sphere*-binary is launched from the system terminal by passing the simula… | |
- | |
-#. System check, including search for NVIDIA CUDA compatible devices (\texttt{… | |
- | |
-#. Initial data import from binary input file (\texttt{main.cpp}). | |
- | |
-#. Allocation of memory for all host variables (particles, grid, walls, etc.) … | |
- | |
-#. Continued import from binary input file (\texttt{main.cpp}). | |
- | |
-#. Control handed to GPU-specific function \texttt{gpuMain(\ldots)} (\texttt{d… | |
- | |
-#. Memory allocation of device memory (\texttt{device.cu}). | |
- | |
-#. Transfer of data from host to device variables (\texttt{device.cu}). | |
- | |
-#. Initialization of Thrust\footnote{\url{https://code.google.com/p/thrust/}} … | |
- | |
-#. Calculation of GPU workload configuration (thread and block layout) (\textt… | |
- | |
-#. Status and data written to \verb"<simulation_ID>.status.dat" and \verb"<sim… | |
- | |
-#. Main loop (while \texttt{time.current <= time.total}) (functions called in … | |
- | |
- | |
- #. \label{loopstart}CUDA thread synchronization point. | |
- | |
- #. \texttt{calcParticleCellID<<<,>>>(\ldots)}: Particle-grid hash value calc… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. \texttt{thrust::sort\_by\_key(\ldots)}: Thrust radix sort of particle-gri… | |
- | |
- #. \texttt{cudaMemset(\ldots)}: Writing zero value (\texttt{0xffffffff}) to … | |
- | |
- #. \texttt{reorderArrays<<<,>>>(\ldots)}: Reordering of particle arrays, bas… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. Optional: \texttt{topology<<<,>>>(\ldots)}: If particle contact history i… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. \texttt{interact<<<,>>>(\ldots)}: For each particle: Search of contacts i… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. \texttt{integrate<<<,>>>(\ldots)}: Updating of spatial degrees of freedom… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. \texttt{summation<<<,>>>(\ldots)}: Particle contributions to the net forc… | |
- | |
- #. CUDA thread synchronization point. | |
- | |
- #. \texttt{integrateWalls<<<,>>>(\ldots)}: Updating of spatial degrees of fr… | |
- | |
- #. Update of timers and loop-related counters (e.g. \texttt{time.current}), … | |
- | |
- #. If file output interval is reached: | |
- | |
- * Optional write of data to output binary (\verb"<simulation_ID>.outpu… | |
- * Update of \verb"<simulation_ID>.status#..bin" (\texttt{device.cu}). | |
- | |
- #. Return to point \ref{loopstart}, unless \texttt{time.current >= time.tota… | |
- | |
- | |
-#. \label{loopend}Liberation of device memory (\texttt{device.cu}). | |
- | |
-#. Control returned to \texttt{main(\ldots)}, liberation of host memory (\text… | |
- | |
-#. End of program, return status equal to zero (0) if no problems where encoun… | |
- | |
- | |
- | |
-The length of the computational time steps (\texttt{time.dt}) is calculated vi… | |
- | |
-.. math:: | |
- \Delta t = 0.075 \min \left( m/\max(k_n,k_t) \right) | |
- | |
-where :math:`m` is the particle mass, and :math:`k` are the elastic stiffnesse… | |
-The time step is set by this relationship in :py:func:`initTemporal`. | |
-This equation ensures that the elastic wave (traveling at the speed of sound) … | |
- | |
-\subsubsection{Host and device memory types} | |
-\label{subsubsec:memorytypes} | |
-A full, listed description of the *sphere* source code variables can be found … | |
- | |
-The floating point precision operating internally in *sphere* is defined in \t… | |
- | |
-Three-dimensional variables (e.g. spatial vectors in `E^3`) are in global memo… | |
- | |
- | |
-\paragraph{Host memory} is the main random-access computer memory (RAM), i.e. … | |
- | |
- | |
-\paragraph{Device memory} is the main, global device memory. It resides off-ch… | |
- | |
-\marginpar{Todo: Expand section on device memory types} | |
- | |
-\paragraph{Constant memory} values cannot be changed after they are set, and a… | |
- | |
- | |
- | |
-%\subsection{The main loop} | |
-%\label{subsec:mainloop} | |
-%The *sphere* software calculates particle movement and rotation based on the … | |
- | |
- | |
-\subsection{Performance} | |
-\marginpar{Todo: insert graph of performance vs. np and performance vs. `\Delt… | |
-\subsubsection{Particles and computational time} | |
- | |
-\subsection{Compilation} | |
-\label{subsec:compilation} | |
-An important note is that the \texttt{C} examples of the NVIDIA CUDA SDK shoul… | |
- | |
-*sphere* is supplied with several Makefiles, which automate the compilation pr… | |
- | |
- | |
-C++ reference | |
-------------- | |
-.. doxygenclass:: DEM | |
- :members: | |
- | |
- | |
diff --git a/doc/html/_static/ajax-loader.gif b/doc/html/_static/ajax-loader.gif | |
Binary files differ. | |
diff --git a/doc/html/_static/basic.css b/doc/html/_static/basic.css | |
t@@ -4,7 +4,7 @@ | |
* | |
* Sphinx stylesheet -- basic theme. | |
* | |
- * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. | |
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. | |
* :license: BSD, see LICENSE for details. | |
* | |
*/ | |
t@@ -81,10 +81,26 @@ div.sphinxsidebar input { | |
font-size: 1em; | |
} | |
+div.sphinxsidebar #searchbox form.search { | |
+ overflow: hidden; | |
+} | |
+ | |
div.sphinxsidebar #searchbox input[type="text"] { | |
- width: 170px; | |
+ float: left; | |
+ width: 80%; | |
+ padding: 0.25em; | |
+ box-sizing: border-box; | |
} | |
+div.sphinxsidebar #searchbox input[type="submit"] { | |
+ float: left; | |
+ width: 20%; | |
+ border-left: none; | |
+ padding: 0.25em; | |
+ box-sizing: border-box; | |
+} | |
+ | |
+ | |
img { | |
border: 0; | |
max-width: 100%; | |
t@@ -122,6 +138,8 @@ ul.keywordmatches li.goodmatch a { | |
table.contentstable { | |
width: 90%; | |
+ margin-left: auto; | |
+ margin-right: auto; | |
} | |
table.contentstable p.biglink { | |
t@@ -149,9 +167,14 @@ table.indextable td { | |
vertical-align: top; | |
} | |
-table.indextable dl, table.indextable dd { | |
+table.indextable ul { | |
margin-top: 0; | |
margin-bottom: 0; | |
+ list-style-type: none; | |
+} | |
+ | |
+table.indextable > tbody > tr > td > ul { | |
+ padding-left: 0em; | |
} | |
table.indextable tr.pcap { | |
t@@ -183,8 +206,20 @@ div.genindex-jumpbox { | |
padding: 0.4em; | |
} | |
+/* -- domain module index --------------------------------------------------- … | |
+ | |
+table.modindextable td { | |
+ padding: 2px; | |
+ border-collapse: collapse; | |
+} | |
+ | |
/* -- general body styles --------------------------------------------------- … | |
+div.body { | |
+ min-width: 450px; | |
+ max-width: 800px; | |
+} | |
+ | |
div.body p, div.body dd, div.body li, div.body blockquote { | |
-moz-hyphens: auto; | |
-ms-hyphens: auto; | |
t@@ -196,6 +231,16 @@ a.headerlink { | |
visibility: hidden; | |
} | |
+a.brackets:before, | |
+span.brackets > a:before{ | |
+ content: "["; | |
+} | |
+ | |
+a.brackets:after, | |
+span.brackets > a:after { | |
+ content: "]"; | |
+} | |
+ | |
h1:hover > a.headerlink, | |
h2:hover > a.headerlink, | |
h3:hover > a.headerlink, | |
t@@ -217,10 +262,6 @@ div.body td { | |
text-align: left; | |
} | |
-.field-list ul { | |
- padding-left: 1em; | |
-} | |
- | |
.first { | |
margin-top: 0 !important; | |
} | |
t@@ -248,6 +289,12 @@ img.align-center, .figure.align-center, object.align-cent… | |
margin-right: auto; | |
} | |
+img.align-default, .figure.align-default { | |
+ display: block; | |
+ margin-left: auto; | |
+ margin-right: auto; | |
+} | |
+ | |
.align-left { | |
text-align: left; | |
} | |
t@@ -256,6 +303,10 @@ img.align-center, .figure.align-center, object.align-cent… | |
text-align: center; | |
} | |
+.align-default { | |
+ text-align: center; | |
+} | |
+ | |
.align-right { | |
text-align: right; | |
} | |
t@@ -322,6 +373,16 @@ table.docutils { | |
border-collapse: collapse; | |
} | |
+table.align-center { | |
+ margin-left: auto; | |
+ margin-right: auto; | |
+} | |
+ | |
+table.align-default { | |
+ margin-left: auto; | |
+ margin-right: auto; | |
+} | |
+ | |
table caption span.caption-number { | |
font-style: italic; | |
} | |
t@@ -337,10 +398,6 @@ table.docutils td, table.docutils th { | |
border-bottom: 1px solid #aaa; | |
} | |
-table.field-list td, table.field-list th { | |
- border: 0 !important; | |
-} | |
- | |
table.footnote td, table.footnote th { | |
border: 0 !important; | |
} | |
t@@ -359,6 +416,16 @@ table.citation td { | |
border-bottom: none; | |
} | |
+th > p:first-child, | |
+td > p:first-child { | |
+ margin-top: 0px; | |
+} | |
+ | |
+th > p:last-child, | |
+td > p:last-child { | |
+ margin-bottom: 0px; | |
+} | |
+ | |
/* -- figures --------------------------------------------------------------- … | |
div.figure { | |
t@@ -377,6 +444,34 @@ div.figure p.caption span.caption-number { | |
div.figure p.caption span.caption-text { | |
} | |
+/* -- field list styles ----------------------------------------------------- … | |
+ | |
+table.field-list td, table.field-list th { | |
+ border: 0 !important; | |
+} | |
+ | |
+.field-list ul { | |
+ margin: 0; | |
+ padding-left: 1em; | |
+} | |
+ | |
+.field-list p { | |
+ margin: 0; | |
+} | |
+ | |
+.field-name { | |
+ -moz-hyphens: manual; | |
+ -ms-hyphens: manual; | |
+ -webkit-hyphens: manual; | |
+ hyphens: manual; | |
+} | |
+ | |
+/* -- hlist styles ---------------------------------------------------------- … | |
+ | |
+table.hlist td { | |
+ vertical-align: top; | |
+} | |
+ | |
/* -- other body styles ----------------------------------------------------- … | |
t@@ -400,11 +495,58 @@ ol.upperroman { | |
list-style: upper-roman; | |
} | |
+li > p:first-child { | |
+ margin-top: 0px; | |
+} | |
+ | |
+li > p:last-child { | |
+ margin-bottom: 0px; | |
+} | |
+ | |
+dl.footnote > dt, | |
+dl.citation > dt { | |
+ float: left; | |
+} | |
+ | |
+dl.footnote > dd, | |
+dl.citation > dd { | |
+ margin-bottom: 0em; | |
+} | |
+ | |
+dl.footnote > dd:after, | |
+dl.citation > dd:after { | |
+ content: ""; | |
+ clear: both; | |
+} | |
+ | |
+dl.field-list { | |
+ display: grid; | |
+ grid-template-columns: fit-content(30%) auto; | |
+} | |
+ | |
+dl.field-list > dt { | |
+ font-weight: bold; | |
+ word-break: break-word; | |
+ padding-left: 0.5em; | |
+ padding-right: 5px; | |
+} | |
+ | |
+dl.field-list > dt:after { | |
+ content: ":"; | |
+} | |
+ | |
+dl.field-list > dd { | |
+ padding-left: 0.5em; | |
+ margin-top: 0em; | |
+ margin-left: 0em; | |
+ margin-bottom: 0em; | |
+} | |
+ | |
dl { | |
margin-bottom: 15px; | |
} | |
-dd p { | |
+dd > p:first-child { | |
margin-top: 0px; | |
} | |
t@@ -418,24 +560,19 @@ dd { | |
margin-left: 30px; | |
} | |
-dt:target, .highlighted { | |
+dt:target, span.highlighted { | |
background-color: #fbe54e; | |
} | |
+rect.highlighted { | |
+ fill: #fbe54e; | |
+} | |
+ | |
dl.glossary dt { | |
font-weight: bold; | |
font-size: 1.1em; | |
} | |
-.field-list ul { | |
- margin: 0; | |
- padding-left: 1em; | |
-} | |
- | |
-.field-list p { | |
- margin: 0; | |
-} | |
- | |
.optional { | |
font-size: 1.3em; | |
} | |
t@@ -482,6 +619,12 @@ dl.glossary dt { | |
font-style: oblique; | |
} | |
+.classifier:before { | |
+ font-style: normal; | |
+ margin: 0.5em; | |
+ content: ":"; | |
+} | |
+ | |
abbr, acronym { | |
border-bottom: dotted 1px; | |
cursor: help; | |
t@@ -592,6 +735,16 @@ span.eqno { | |
float: right; | |
} | |
+span.eqno a.headerlink { | |
+ position: relative; | |
+ left: 0px; | |
+ z-index: 1; | |
+} | |
+ | |
+div.math:hover a.headerlink { | |
+ visibility: visible; | |
+} | |
+ | |
/* -- printout stylesheet --------------------------------------------------- … | |
@media print { | |
diff --git a/doc/html/_static/comment-bright.png b/doc/html/_static/comment-bri… | |
Binary files differ. | |
diff --git a/doc/html/_static/comment-close.png b/doc/html/_static/comment-clos… | |
Binary files differ. | |
diff --git a/doc/html/_static/comment.png b/doc/html/_static/comment.png | |
Binary files differ. | |
diff --git a/doc/html/_static/doctools.js b/doc/html/_static/doctools.js | |
t@@ -4,7 +4,7 @@ | |
* | |
* Sphinx JavaScript utilities for all documentation. | |
* | |
- * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. | |
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. | |
* :license: BSD, see LICENSE for details. | |
* | |
*/ | |
t@@ -45,7 +45,7 @@ jQuery.urlencode = encodeURIComponent; | |
* it will always return arrays of strings for the value parts. | |
*/ | |
jQuery.getQueryParameters = function(s) { | |
- if (typeof s == 'undefined') | |
+ if (typeof s === 'undefined') | |
s = document.location.search; | |
var parts = s.substr(s.indexOf('?') + 1).split('&'); | |
var result = {}; | |
t@@ -66,29 +66,54 @@ jQuery.getQueryParameters = function(s) { | |
* span elements with the given class name. | |
*/ | |
jQuery.fn.highlightText = function(text, className) { | |
- function highlight(node) { | |
- if (node.nodeType == 3) { | |
+ function highlight(node, addItems) { | |
+ if (node.nodeType === 3) { | |
var val = node.nodeValue; | |
var pos = val.toLowerCase().indexOf(text); | |
- if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { | |
- var span = document.createElement("span"); | |
- span.className = className; | |
+ if (pos >= 0 && | |
+ !jQuery(node.parentNode).hasClass(className) && | |
+ !jQuery(node.parentNode).hasClass("nohighlight")) { | |
+ var span; | |
+ var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg… | |
+ if (isInSVG) { | |
+ span = document.createElementNS("http://www.w3.org/2000/svg", "tspan… | |
+ } else { | |
+ span = document.createElement("span"); | |
+ span.className = className; | |
+ } | |
span.appendChild(document.createTextNode(val.substr(pos, text.length))… | |
node.parentNode.insertBefore(span, node.parentNode.insertBefore( | |
document.createTextNode(val.substr(pos + text.length)), | |
node.nextSibling)); | |
node.nodeValue = val.substr(0, pos); | |
+ if (isInSVG) { | |
+ var rect = document.createElementNS("http://www.w3.org/2000/svg", "r… | |
+ var bbox = node.parentElement.getBBox(); | |
+ rect.x.baseVal.value = bbox.x; | |
+ rect.y.baseVal.value = bbox.y; | |
+ rect.width.baseVal.value = bbox.width; | |
+ rect.height.baseVal.value = bbox.height; | |
+ rect.setAttribute('class', className); | |
+ addItems.push({ | |
+ "parent": node.parentNode, | |
+ "target": rect}); | |
+ } | |
} | |
} | |
else if (!jQuery(node).is("button, select, textarea")) { | |
jQuery.each(node.childNodes, function() { | |
- highlight(this); | |
+ highlight(this, addItems); | |
}); | |
} | |
} | |
- return this.each(function() { | |
- highlight(this); | |
+ var addItems = []; | |
+ var result = this.each(function() { | |
+ highlight(this, addItems); | |
}); | |
+ for (var i = 0; i < addItems.length; ++i) { | |
+ jQuery(addItems[i].parent).before(addItems[i].target); | |
+ } | |
+ return result; | |
}; | |
/* | |
t@@ -124,28 +149,30 @@ var Documentation = { | |
this.fixFirefoxAnchorBug(); | |
this.highlightSearchWords(); | |
this.initIndexTable(); | |
- | |
+ if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { | |
+ this.initOnKeyListeners(); | |
+ } | |
}, | |
/** | |
* i18n support | |
*/ | |
TRANSLATIONS : {}, | |
- PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, | |
+ PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, | |
LOCALE : 'unknown', | |
// gettext and ngettext don't access this so that the functions | |
// can safely bound to a different name (_ = Documentation.gettext) | |
gettext : function(string) { | |
var translated = Documentation.TRANSLATIONS[string]; | |
- if (typeof translated == 'undefined') | |
+ if (typeof translated === 'undefined') | |
return string; | |
- return (typeof translated == 'string') ? translated : translated[0]; | |
+ return (typeof translated === 'string') ? translated : translated[0]; | |
}, | |
ngettext : function(singular, plural, n) { | |
var translated = Documentation.TRANSLATIONS[singular]; | |
- if (typeof translated == 'undefined') | |
+ if (typeof translated === 'undefined') | |
return (n == 1) ? singular : plural; | |
return translated[Documentation.PLURALEXPR(n)]; | |
}, | |
t@@ -180,7 +207,7 @@ var Documentation = { | |
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 | |
*/ | |
fixFirefoxAnchorBug : function() { | |
- if (document.location.hash) | |
+ if (document.location.hash && $.browser.mozilla) | |
window.setTimeout(function() { | |
document.location.href += ''; | |
}, 10); | |
t@@ -216,7 +243,7 @@ var Documentation = { | |
var src = $(this).attr('src'); | |
var idnum = $(this).attr('id').substr(7); | |
$('tr.cg-' + idnum).toggle(); | |
- if (src.substr(-9) == 'minus.png') | |
+ if (src.substr(-9) === 'minus.png') | |
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); | |
else | |
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); | |
t@@ -248,7 +275,7 @@ var Documentation = { | |
var path = document.location.pathname; | |
var parts = path.split(/\//); | |
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { | |
- if (this == '..') | |
+ if (this === '..') | |
parts.pop(); | |
}); | |
var url = parts.join('/'); | |
t@@ -284,4 +311,4 @@ _ = Documentation.gettext; | |
$(document).ready(function() { | |
Documentation.init(); | |
-}); | |
-\ No newline at end of file | |
+}); | |
diff --git a/doc/html/_static/down-pressed.png b/doc/html/_static/down-pressed.… | |
Binary files differ. | |
diff --git a/doc/html/_static/down.png b/doc/html/_static/down.png | |
Binary files differ. | |
diff --git a/doc/html/_static/file.png b/doc/html/_static/file.png | |
Binary files differ. | |
diff --git a/doc/html/_static/jquery.js b/doc/html/_static/jquery.js | |
t@@ -1,10219 +1,2 @@ | |
-/*! | |
- * jQuery JavaScript Library v3.1.1 | |
- * https://jquery.com/ | |
- * | |
- * Includes Sizzle.js | |
- * https://sizzlejs.com/ | |
- * | |
- * Copyright jQuery Foundation and other contributors | |
- * Released under the MIT license | |
- * https://jquery.org/license | |
- * | |
- * Date: 2016-12-11T15:18Z | |
- */ | |
-( function( global, factory ) { | |
- | |
- "use strict"; | |
- | |
- if ( typeof module === "object" && typeof module.exports === "object" … | |
- | |
- // For CommonJS and CommonJS-like environments where a proper … | |
- // is present, execute the factory and get jQuery. | |
- // For environments that do not have a `window` with a `docume… | |
- // (such as Node.js), expose a factory as module.exports. | |
- // This accentuates the need for the creation of a real `windo… | |
- // e.g. var jQuery = require("jquery")(window); | |
- // See ticket #14549 for more info. | |
- module.exports = global.document ? | |
- factory( global, true ) : | |
- function( w ) { | |
- if ( !w.document ) { | |
- throw new Error( "jQuery requires a wi… | |
- } | |
- return factory( w ); | |
- }; | |
- } else { | |
- factory( global ); | |
- } | |
- | |
-// Pass this if window is not defined yet | |
-} )( typeof window !== "undefined" ? window : this, function( window, noGlobal… | |
- | |
-// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - … | |
-// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict m… | |
-// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict m… | |
-// enough that all such attempts are guarded in a try block. | |
- | |
- | |
-var arr = []; | |
- | |
-var document = window.document; | |
- | |
-var getProto = Object.getPrototypeOf; | |
- | |
-var slice = arr.slice; | |
- | |
-var concat = arr.concat; | |
- | |
-var push = arr.push; | |
- | |
-var indexOf = arr.indexOf; | |
- | |
-var class2type = {}; | |
- | |
-var toString = class2type.toString; | |
- | |
-var hasOwn = class2type.hasOwnProperty; | |
- | |
-var fnToString = hasOwn.toString; | |
- | |
-var ObjectFunctionString = fnToString.call( Object ); | |
- | |
-var support = {}; | |
- | |
- | |
- | |
- function DOMEval( code, doc ) { | |
- doc = doc || document; | |
- | |
- var script = doc.createElement( "script" ); | |
- | |
- script.text = code; | |
- doc.head.appendChild( script ).parentNode.removeChild( script … | |
- } | |
-/* global Symbol */ | |
-// Defining this global in .eslintrc.json would create a danger of using the g… | |
-// unguarded in another place, it seems safer to define global only for this m… | |
- | |
- | |
- | |
-var | |
- version = "3.1.1", | |
- | |
- // Define a local copy of jQuery | |
- jQuery = function( selector, context ) { | |
- | |
- // The jQuery object is actually just the init constructor 'en… | |
- // Need init if jQuery is called (just allow error to be throw… | |
- return new jQuery.fn.init( selector, context ); | |
- }, | |
- | |
- // Support: Android <=4.0 only | |
- // Make sure we trim BOM and NBSP | |
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, | |
- | |
- // Matches dashed string for camelizing | |
- rmsPrefix = /^-ms-/, | |
- rdashAlpha = /-([a-z])/g, | |
- | |
- // Used by jQuery.camelCase as callback to replace() | |
- fcamelCase = function( all, letter ) { | |
- return letter.toUpperCase(); | |
- }; | |
- | |
-jQuery.fn = jQuery.prototype = { | |
- | |
- // The current version of jQuery being used | |
- jquery: version, | |
- | |
- constructor: jQuery, | |
- | |
- // The default length of a jQuery object is 0 | |
- length: 0, | |
- | |
- toArray: function() { | |
- return slice.call( this ); | |
- }, | |
- | |
- // Get the Nth element in the matched element set OR | |
- // Get the whole matched element set as a clean array | |
- get: function( num ) { | |
- | |
- // Return all the elements in a clean array | |
- if ( num == null ) { | |
- return slice.call( this ); | |
- } | |
- | |
- // Return just the one element from the set | |
- return num < 0 ? this[ num + this.length ] : this[ num ]; | |
- }, | |
- | |
- // Take an array of elements and push it onto the stack | |
- // (returning the new matched element set) | |
- pushStack: function( elems ) { | |
- | |
- // Build a new jQuery matched element set | |
- var ret = jQuery.merge( this.constructor(), elems ); | |
- | |
- // Add the old object onto the stack (as a reference) | |
- ret.prevObject = this; | |
- | |
- // Return the newly-formed element set | |
- return ret; | |
- }, | |
- | |
- // Execute a callback for every element in the matched set. | |
- each: function( callback ) { | |
- return jQuery.each( this, callback ); | |
- }, | |
- | |
- map: function( callback ) { | |
- return this.pushStack( jQuery.map( this, function( elem, i ) { | |
- return callback.call( elem, i, elem ); | |
- } ) ); | |
- }, | |
- | |
- slice: function() { | |
- return this.pushStack( slice.apply( this, arguments ) ); | |
- }, | |
- | |
- first: function() { | |
- return this.eq( 0 ); | |
- }, | |
- | |
- last: function() { | |
- return this.eq( -1 ); | |
- }, | |
- | |
- eq: function( i ) { | |
- var len = this.length, | |
- j = +i + ( i < 0 ? len : 0 ); | |
- return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] … | |
- }, | |
- | |
- end: function() { | |
- return this.prevObject || this.constructor(); | |
- }, | |
- | |
- // For internal use only. | |
- // Behaves like an Array's method, not like a jQuery method. | |
- push: push, | |
- sort: arr.sort, | |
- splice: arr.splice | |
-}; | |
- | |
-jQuery.extend = jQuery.fn.extend = function() { | |
- var options, name, src, copy, copyIsArray, clone, | |
- target = arguments[ 0 ] || {}, | |
- i = 1, | |
- length = arguments.length, | |
- deep = false; | |
- | |
- // Handle a deep copy situation | |
- if ( typeof target === "boolean" ) { | |
- deep = target; | |
- | |
- // Skip the boolean and the target | |
- target = arguments[ i ] || {}; | |
- i++; | |
- } | |
- | |
- // Handle case when target is a string or something (possible in deep … | |
- if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { | |
- target = {}; | |
- } | |
- | |
- // Extend jQuery itself if only one argument is passed | |
- if ( i === length ) { | |
- target = this; | |
- i--; | |
- } | |
- | |
- for ( ; i < length; i++ ) { | |
- | |
- // Only deal with non-null/undefined values | |
- if ( ( options = arguments[ i ] ) != null ) { | |
- | |
- // Extend the base object | |
- for ( name in options ) { | |
- src = target[ name ]; | |
- copy = options[ name ]; | |
- | |
- // Prevent never-ending loop | |
- if ( target === copy ) { | |
- continue; | |
- } | |
- | |
- // Recurse if we're merging plain objects or a… | |
- if ( deep && copy && ( jQuery.isPlainObject( c… | |
- ( copyIsArray = jQuery.isArray( copy )… | |
- | |
- if ( copyIsArray ) { | |
- copyIsArray = false; | |
- clone = src && jQuery.isArray(… | |
- | |
- } else { | |
- clone = src && jQuery.isPlainO… | |
- } | |
- | |
- // Never move original objects, clone … | |
- target[ name ] = jQuery.extend( deep, … | |
- | |
- // Don't bring in undefined values | |
- } else if ( copy !== undefined ) { | |
- target[ name ] = copy; | |
- } | |
- } | |
- } | |
- } | |
- | |
- // Return the modified object | |
- return target; | |
-}; | |
- | |
-jQuery.extend( { | |
- | |
- // Unique for each copy of jQuery on the page | |
- expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), | |
- | |
- // Assume jQuery is ready without the ready module | |
- isReady: true, | |
- | |
- error: function( msg ) { | |
- throw new Error( msg ); | |
- }, | |
- | |
- noop: function() {}, | |
- | |
- isFunction: function( obj ) { | |
- return jQuery.type( obj ) === "function"; | |
- }, | |
- | |
- isArray: Array.isArray, | |
- | |
- isWindow: function( obj ) { | |
- return obj != null && obj === obj.window; | |
- }, | |
- | |
- isNumeric: function( obj ) { | |
- | |
- // As of jQuery 3.0, isNumeric is limited to | |
- // strings and numbers (primitives or objects) | |
- // that can be coerced to finite numbers (gh-2662) | |
- var type = jQuery.type( obj ); | |
- return ( type === "number" || type === "string" ) && | |
- | |
- // parseFloat NaNs numeric-cast false positives ("") | |
- // ...but misinterprets leading-number strings, partic… | |
- // subtraction forces infinities to NaN | |
- !isNaN( obj - parseFloat( obj ) ); | |
- }, | |
- | |
- isPlainObject: function( obj ) { | |
- var proto, Ctor; | |
- | |
- // Detect obvious negatives | |
- // Use toString instead of jQuery.type to catch host objects | |
- if ( !obj || toString.call( obj ) !== "[object Object]" ) { | |
- return false; | |
- } | |
- | |
- proto = getProto( obj ); | |
- | |
- // Objects with no prototype (e.g., `Object.create( null )`) a… | |
- if ( !proto ) { | |
- return true; | |
- } | |
- | |
- // Objects with prototype are plain iff they were constructed … | |
- Ctor = hasOwn.call( proto, "constructor" ) && proto.constructo… | |
- return typeof Ctor === "function" && fnToString.call( Ctor ) =… | |
- }, | |
- | |
- isEmptyObject: function( obj ) { | |
- | |
- /* eslint-disable no-unused-vars */ | |
- // See https://github.com/eslint/eslint/issues/6125 | |
- var name; | |
- | |
- for ( name in obj ) { | |
- return false; | |
- } | |
- return true; | |
- }, | |
- | |
- type: function( obj ) { | |
- if ( obj == null ) { | |
- return obj + ""; | |
- } | |
- | |
- // Support: Android <=2.3 only (functionish RegExp) | |
- return typeof obj === "object" || typeof obj === "function" ? | |
- class2type[ toString.call( obj ) ] || "object" : | |
- typeof obj; | |
- }, | |
- | |
- // Evaluates a script in a global context | |
- globalEval: function( code ) { | |
- DOMEval( code ); | |
- }, | |
- | |
- // Convert dashed to camelCase; used by the css and data modules | |
- // Support: IE <=9 - 11, Edge 12 - 13 | |
- // Microsoft forgot to hump their vendor prefix (#9572) | |
- camelCase: function( string ) { | |
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha,… | |
- }, | |
- | |
- nodeName: function( elem, name ) { | |
- return elem.nodeName && elem.nodeName.toLowerCase() === name.t… | |
- }, | |
- | |
- each: function( obj, callback ) { | |
- var length, i = 0; | |
- | |
- if ( isArrayLike( obj ) ) { | |
- length = obj.length; | |
- for ( ; i < length; i++ ) { | |
- if ( callback.call( obj[ i ], i, obj[ i ] ) ==… | |
- break; | |
- } | |
- } | |
- } else { | |
- for ( i in obj ) { | |
- if ( callback.call( obj[ i ], i, obj[ i ] ) ==… | |
- break; | |
- } | |
- } | |
- } | |
- | |
- return obj; | |
- }, | |
- | |
- // Support: Android <=4.0 only | |
- trim: function( text ) { | |
- return text == null ? | |
- "" : | |
- ( text + "" ).replace( rtrim, "" ); | |
- }, | |
- | |
- // results is for internal usage only | |
- makeArray: function( arr, results ) { | |
- var ret = results || []; | |
- | |
- if ( arr != null ) { | |
- if ( isArrayLike( Object( arr ) ) ) { | |
- jQuery.merge( ret, | |
- typeof arr === "string" ? | |
- [ arr ] : arr | |
- ); | |
- } else { | |
- push.call( ret, arr ); | |
- } | |
- } | |
- | |
- return ret; | |
- }, | |
- | |
- inArray: function( elem, arr, i ) { | |
- return arr == null ? -1 : indexOf.call( arr, elem, i ); | |
- }, | |
- | |
- // Support: Android <=4.0 only, PhantomJS 1 only | |
- // push.apply(_, arraylike) throws on ancient WebKit | |
- merge: function( first, second ) { | |
- var len = +second.length, | |
- j = 0, | |
- i = first.length; | |
- | |
- for ( ; j < len; j++ ) { | |
- first[ i++ ] = second[ j ]; | |
- } | |
- | |
- first.length = i; | |
- | |
- return first; | |
- }, | |
- | |
- grep: function( elems, callback, invert ) { | |
- var callbackInverse, | |
- matches = [], | |
- i = 0, | |
- length = elems.length, | |
- callbackExpect = !invert; | |
- | |
- // Go through the array, only saving the items | |
- // that pass the validator function | |
- for ( ; i < length; i++ ) { | |
- callbackInverse = !callback( elems[ i ], i ); | |
- if ( callbackInverse !== callbackExpect ) { | |
- matches.push( elems[ i ] ); | |
- } | |
- } | |
- | |
- return matches; | |
- }, | |
- | |
- // arg is for internal usage only | |
- map: function( elems, callback, arg ) { | |
- var length, value, | |
- i = 0, | |
- ret = []; | |
- | |
- // Go through the array, translating each of the items to thei… | |
- if ( isArrayLike( elems ) ) { | |
- length = elems.length; | |
- for ( ; i < length; i++ ) { | |
- value = callback( elems[ i ], i, arg ); | |
- | |
- if ( value != null ) { | |
- ret.push( value ); | |
- } | |
- } | |
- | |
- // Go through every key on the object, | |
- } else { | |
- for ( i in elems ) { | |
- value = callback( elems[ i ], i, arg ); | |
- | |
- if ( value != null ) { | |
- ret.push( value ); | |
- } | |
- } | |
- } | |
- | |
- // Flatten any nested arrays | |
- return concat.apply( [], ret ); | |
- }, | |
- | |
- // A global GUID counter for objects | |
- guid: 1, | |
- | |
- // Bind a function to a context, optionally partially applying any | |
- // arguments. | |
- proxy: function( fn, context ) { | |
- var tmp, args, proxy; | |
- | |
- if ( typeof context === "string" ) { | |
- tmp = fn[ context ]; | |
- context = fn; | |
- fn = tmp; | |
- } | |
- | |
- // Quick check to determine if target is callable, in the spec | |
- // this throws a TypeError, but we will just return undefined. | |
- if ( !jQuery.isFunction( fn ) ) { | |
- return undefined; | |
- } | |
- | |
- // Simulated bind | |
- args = slice.call( arguments, 2 ); | |
- proxy = function() { | |
- return fn.apply( context || this, args.concat( slice.c… | |
- }; | |
- | |
- // Set the guid of unique handler to the same of original hand… | |
- proxy.guid = fn.guid = fn.guid || jQuery.guid++; | |
- | |
- return proxy; | |
- }, | |
- | |
- now: Date.now, | |
- | |
- // jQuery.support is not used in Core but other projects attach their | |
- // properties to it so it needs to exist. | |
- support: support | |
-} ); | |
- | |
-if ( typeof Symbol === "function" ) { | |
- jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; | |
-} | |
- | |
-// Populate the class2type map | |
-jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Sy… | |
-function( i, name ) { | |
- class2type[ "[object " + name + "]" ] = name.toLowerCase(); | |
-} ); | |
- | |
-function isArrayLike( obj ) { | |
- | |
- // Support: real iOS 8.2 only (not reproducible in simulator) | |
- // `in` check used to prevent JIT error (gh-2145) | |
- // hasOwn isn't used here due to false negatives | |
- // regarding Nodelist length in IE | |
- var length = !!obj && "length" in obj && obj.length, | |
- type = jQuery.type( obj ); | |
- | |
- if ( type === "function" || jQuery.isWindow( obj ) ) { | |
- return false; | |
- } | |
- | |
- return type === "array" || length === 0 || | |
- typeof length === "number" && length > 0 && ( length - 1 ) in … | |
-} | |
-var Sizzle = | |
-/*! | |
- * Sizzle CSS Selector Engine v2.3.3 | |
- * https://sizzlejs.com/ | |
- * | |
- * Copyright jQuery Foundation and other contributors | |
- * Released under the MIT license | |
- * http://jquery.org/license | |
- * | |
- * Date: 2016-08-08 | |
- */ | |
-(function( window ) { | |
- | |
-var i, | |
- support, | |
- Expr, | |
- getText, | |
- isXML, | |
- tokenize, | |
- compile, | |
- select, | |
- outermostContext, | |
- sortInput, | |
- hasDuplicate, | |
- | |
- // Local document vars | |
- setDocument, | |
- document, | |
- docElem, | |
- documentIsHTML, | |
- rbuggyQSA, | |
- rbuggyMatches, | |
- matches, | |
- contains, | |
- | |
- // Instance-specific data | |
- expando = "sizzle" + 1 * new Date(), | |
- preferredDoc = window.document, | |
- dirruns = 0, | |
- done = 0, | |
- classCache = createCache(), | |
- tokenCache = createCache(), | |
- compilerCache = createCache(), | |
- sortOrder = function( a, b ) { | |
- if ( a === b ) { | |
- hasDuplicate = true; | |
- } | |
- return 0; | |
- }, | |
- | |
- // Instance methods | |
- hasOwn = ({}).hasOwnProperty, | |
- arr = [], | |
- pop = arr.pop, | |
- push_native = arr.push, | |
- push = arr.push, | |
- slice = arr.slice, | |
- // Use a stripped-down indexOf as it's faster than native | |
- // https://jsperf.com/thor-indexof-vs-for/5 | |
- indexOf = function( list, elem ) { | |
- var i = 0, | |
- len = list.length; | |
- for ( ; i < len; i++ ) { | |
- if ( list[i] === elem ) { | |
- return i; | |
- } | |
- } | |
- return -1; | |
- }, | |
- | |
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|d… | |
- | |
- // Regular expressions | |
- | |
- // http://www.w3.org/TR/css3-selectors/#whitespace | |
- whitespace = "[\\x20\\t\\r\\n\\f]", | |
- | |
- // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier | |
- identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", | |
- | |
- // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-sele… | |
- attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitesp… | |
- // Operator (capture 2) | |
- "*([*^$|!~]?=)" + whitespace + | |
- // "Attribute values must be CSS identifiers [capture 5] or st… | |
- "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + i… | |
- "*\\]", | |
- | |
- pseudos = ":(" + identifier + ")(?:\\((" + | |
- // To reduce the number of selectors needing tokenize in the p… | |
- // 1. quoted (capture 3; capture 4 or capture 5) | |
- "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + | |
- // 2. simple (capture 6) | |
- "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + | |
- // 3. anything else (capture 2) | |
- ".*" + | |
- ")\\)|)", | |
- | |
- // Leading and non-escaped trailing whitespace, capturing some non-whi… | |
- rwhitespace = new RegExp( whitespace + "+", "g" ), | |
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +… | |
- | |
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), | |
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace … | |
- | |
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + w… | |
- | |
- rpseudo = new RegExp( pseudos ), | |
- ridentifier = new RegExp( "^" + identifier + "$" ), | |
- | |
- matchExpr = { | |
- "ID": new RegExp( "^#(" + identifier + ")" ), | |
- "CLASS": new RegExp( "^\\.(" + identifier + ")" ), | |
- "TAG": new RegExp( "^(" + identifier + "|[*])" ), | |
- "ATTR": new RegExp( "^" + attributes ), | |
- "PSEUDO": new RegExp( "^" + pseudos ), | |
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|… | |
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+… | |
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), | |
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), | |
- // For use in libraries implementing .is() | |
- // We use this for POS matching in `select` | |
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|… | |
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)… | |
- }, | |
- | |
- rinputs = /^(?:input|select|textarea|button)$/i, | |
- rheader = /^h\d$/i, | |
- | |
- rnative = /^[^{]+\{\s*\[native \w/, | |
- | |
- // Easily-parseable/retrievable ID or TAG or CLASS selectors | |
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, | |
- | |
- rsibling = /[+~]/, | |
- | |
- // CSS escapes | |
- // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters | |
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + wh… | |
- funescape = function( _, escaped, escapedWhitespace ) { | |
- var high = "0x" + escaped - 0x10000; | |
- // NaN means non-codepoint | |
- // Support: Firefox<24 | |
- // Workaround erroneous numeric interpretation of +"0x" | |
- return high !== high || escapedWhitespace ? | |
- escaped : | |
- high < 0 ? | |
- // BMP codepoint | |
- String.fromCharCode( high + 0x10000 ) : | |
- // Supplemental Plane codepoint (surrogate pai… | |
- String.fromCharCode( high >> 10 | 0xD800, high… | |
- }, | |
- | |
- // CSS string/identifier serialization | |
- // https://drafts.csswg.org/cssom/#common-serializing-idioms | |
- rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, | |
- fcssescape = function( ch, asCodePoint ) { | |
- if ( asCodePoint ) { | |
- | |
- // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER | |
- if ( ch === "\0" ) { | |
- return "\uFFFD"; | |
- } | |
- | |
- // Control characters and (dependent upon position) nu… | |
- return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.le… | |
- } | |
- | |
- // Other potentially-special ASCII characters get backslash-es… | |
- return "\\" + ch; | |
- }, | |
- | |
- // Used for iframes | |
- // See setDocument() | |
- // Removing the function wrapper causes a "Permission Denied" | |
- // error in IE | |
- unloadHandler = function() { | |
- setDocument(); | |
- }, | |
- | |
- disabledAncestor = addCombinator( | |
- function( elem ) { | |
- return elem.disabled === true && ("form" in elem || "l… | |
- }, | |
- { dir: "parentNode", next: "legend" } | |
- ); | |
- | |
-// Optimize for push.apply( _, NodeList ) | |
-try { | |
- push.apply( | |
- (arr = slice.call( preferredDoc.childNodes )), | |
- preferredDoc.childNodes | |
- ); | |
- // Support: Android<4.0 | |
- // Detect silently failing push.apply | |
- arr[ preferredDoc.childNodes.length ].nodeType; | |
-} catch ( e ) { | |
- push = { apply: arr.length ? | |
- | |
- // Leverage slice if possible | |
- function( target, els ) { | |
- push_native.apply( target, slice.call(els) ); | |
- } : | |
- | |
- // Support: IE<9 | |
- // Otherwise append directly | |
- function( target, els ) { | |
- var j = target.length, | |
- i = 0; | |
- // Can't trust NodeList.length | |
- while ( (target[j++] = els[i++]) ) {} | |
- target.length = j - 1; | |
- } | |
- }; | |
-} | |
- | |
-function Sizzle( selector, context, results, seed ) { | |
- var m, i, elem, nid, match, groups, newSelector, | |
- newContext = context && context.ownerDocument, | |
- | |
- // nodeType defaults to 9, since context defaults to document | |
- nodeType = context ? context.nodeType : 9; | |
- | |
- results = results || []; | |
- | |
- // Return early from calls with invalid selector or context | |
- if ( typeof selector !== "string" || !selector || | |
- nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { | |
- | |
- return results; | |
- } | |
- | |
- // Try to shortcut find operations (as opposed to filters) in HTML doc… | |
- if ( !seed ) { | |
- | |
- if ( ( context ? context.ownerDocument || context : preferredD… | |
- setDocument( context ); | |
- } | |
- context = context || document; | |
- | |
- if ( documentIsHTML ) { | |
- | |
- // If the selector is sufficiently simple, try using a… | |
- // (excepting DocumentFragment context, where the meth… | |
- if ( nodeType !== 11 && (match = rquickExpr.exec( sele… | |
- | |
- // ID selector | |
- if ( (m = match[1]) ) { | |
- | |
- // Document context | |
- if ( nodeType === 9 ) { | |
- if ( (elem = context.getElemen… | |
- | |
- // Support: IE, Opera,… | |
- // TODO: identify vers… | |
- // getElementById can … | |
- if ( elem.id === m ) { | |
- results.push( … | |
- return results; | |
- } | |
- } else { | |
- return results; | |
- } | |
- | |
- // Element context | |
- } else { | |
- | |
- // Support: IE, Opera, Webkit | |
- // TODO: identify versions | |
- // getElementById can match el… | |
- if ( newContext && (elem = new… | |
- contains( context, ele… | |
- elem.id === m ) { | |
- | |
- results.push( elem ); | |
- return results; | |
- } | |
- } | |
- | |
- // Type selector | |
- } else if ( match[2] ) { | |
- push.apply( results, context.getElemen… | |
- return results; | |
- | |
- // Class selector | |
- } else if ( (m = match[3]) && support.getEleme… | |
- context.getElementsByClassName ) { | |
- | |
- push.apply( results, context.getElemen… | |
- return results; | |
- } | |
- } | |
- | |
- // Take advantage of querySelectorAll | |
- if ( support.qsa && | |
- !compilerCache[ selector + " " ] && | |
- (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { | |
- | |
- if ( nodeType !== 1 ) { | |
- newContext = context; | |
- newSelector = selector; | |
- | |
- // qSA looks outside Element context, which is… | |
- // Thanks to Andrew Dupont for this workaround… | |
- // Support: IE <=8 | |
- // Exclude object elements | |
- } else if ( context.nodeName.toLowerCase() !==… | |
- | |
- // Capture the context ID, setting it … | |
- if ( (nid = context.getAttribute( "id"… | |
- nid = nid.replace( rcssescape,… | |
- } else { | |
- context.setAttribute( "id", (n… | |
- } | |
- | |
- // Prefix every selector in the list | |
- groups = tokenize( selector ); | |
- i = groups.length; | |
- while ( i-- ) { | |
- groups[i] = "#" + nid + " " + … | |
- } | |
- newSelector = groups.join( "," ); | |
- | |
- // Expand context for sibling selectors | |
- newContext = rsibling.test( selector )… | |
- context; | |
- } | |
- | |
- if ( newSelector ) { | |
- try { | |
- push.apply( results, | |
- newContext.querySelect… | |
- ); | |
- return results; | |
- } catch ( qsaError ) { | |
- } finally { | |
- if ( nid === expando ) { | |
- context.removeAttribut… | |
- } | |
- } | |
- } | |
- } | |
- } | |
- } | |
- | |
- // All others | |
- return select( selector.replace( rtrim, "$1" ), context, results, seed… | |
-} | |
- | |
-/** | |
- * Create key-value caches of limited size | |
- * @returns {function(string, object)} Returns the Object data after storing i… | |
- * property name the (space-suffixed) string and (if the cache is large… | |
- * deleting the oldest entry | |
- */ | |
-function createCache() { | |
- var keys = []; | |
- | |
- function cache( key, value ) { | |
- // Use (key + " ") to avoid collision with native prototype pr… | |
- if ( keys.push( key + " " ) > Expr.cacheLength ) { | |
- // Only keep the most recent entries | |
- delete cache[ keys.shift() ]; | |
- } | |
- return (cache[ key + " " ] = value); | |
- } | |
- return cache; | |
-} | |
- | |
-/** | |
- * Mark a function for special use by Sizzle | |
- * @param {Function} fn The function to mark | |
- */ | |
-function markFunction( fn ) { | |
- fn[ expando ] = true; | |
- return fn; | |
-} | |
- | |
-/** | |
- * Support testing using an element | |
- * @param {Function} fn Passed the created element and returns a boolean result | |
- */ | |
-function assert( fn ) { | |
- var el = document.createElement("fieldset"); | |
- | |
- try { | |
- return !!fn( el ); | |
- } catch (e) { | |
- return false; | |
- } finally { | |
- // Remove from its parent by default | |
- if ( el.parentNode ) { | |
- el.parentNode.removeChild( el ); | |
- } | |
- // release memory in IE | |
- el = null; | |
- } | |
-} | |
- | |
-/** | |
- * Adds the same handler for all of the specified attrs | |
- * @param {String} attrs Pipe-separated list of attributes | |
- * @param {Function} handler The method that will be applied | |
- */ | |
-function addHandle( attrs, handler ) { | |
- var arr = attrs.split("|"), | |
- i = arr.length; | |
- | |
- while ( i-- ) { | |
- Expr.attrHandle[ arr[i] ] = handler; | |
- } | |
-} | |
- | |
-/** | |
- * Checks document order of two siblings | |
- * @param {Element} a | |
- * @param {Element} b | |
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a … | |
- */ | |
-function siblingCheck( a, b ) { | |
- var cur = b && a, | |
- diff = cur && a.nodeType === 1 && b.nodeType === 1 && | |
- a.sourceIndex - b.sourceIndex; | |
- | |
- // Use IE sourceIndex if available on both nodes | |
- if ( diff ) { | |
- return diff; | |
- } | |
- | |
- // Check if b follows a | |
- if ( cur ) { | |
- while ( (cur = cur.nextSibling) ) { | |
- if ( cur === b ) { | |
- return -1; | |
- } | |
- } | |
- } | |
- | |
- return a ? 1 : -1; | |
-} | |
- | |
-/** | |
- * Returns a function to use in pseudos for input types | |
- * @param {String} type | |
- */ | |
-function createInputPseudo( type ) { | |
- return function( elem ) { | |
- var name = elem.nodeName.toLowerCase(); | |
- return name === "input" && elem.type === type; | |
- }; | |
-} | |
- | |
-/** | |
- * Returns a function to use in pseudos for buttons | |
- * @param {String} type | |
- */ | |
-function createButtonPseudo( type ) { | |
- return function( elem ) { | |
- var name = elem.nodeName.toLowerCase(); | |
- return (name === "input" || name === "button") && elem.type ==… | |
- }; | |
-} | |
- | |
-/** | |
- * Returns a function to use in pseudos for :enabled/:disabled | |
- * @param {Boolean} disabled true for :disabled; false for :enabled | |
- */ | |
-function createDisabledPseudo( disabled ) { | |
- | |
- // Known :disabled false positives: fieldset[disabled] > legend:nth-of… | |
- return function( elem ) { | |
- | |
- // Only certain elements can match :enabled or :disabled | |
- // https://html.spec.whatwg.org/multipage/scripting.html#selec… | |
- // https://html.spec.whatwg.org/multipage/scripting.html#selec… | |
- if ( "form" in elem ) { | |
- | |
- // Check for inherited disabledness on relevant non-di… | |
- // * listed form-associated elements in a disabled fie… | |
- // https://html.spec.whatwg.org/multipage/forms.html… | |
- // https://html.spec.whatwg.org/multipage/forms.html… | |
- // * option elements in a disabled optgroup | |
- // https://html.spec.whatwg.org/multipage/forms.html… | |
- // All such elements have a "form" property. | |
- if ( elem.parentNode && elem.disabled === false ) { | |
- | |
- // Option elements defer to a parent optgroup … | |
- if ( "label" in elem ) { | |
- if ( "label" in elem.parentNode ) { | |
- return elem.parentNode.disable… | |
- } else { | |
- return elem.disabled === disab… | |
- } | |
- } | |
- | |
- // Support: IE 6 - 11 | |
- // Use the isDisabled shortcut property to che… | |
- return elem.isDisabled === disabled || | |
- | |
- // Where there is no isDisabled, check… | |
- /* jshint -W018 */ | |
- elem.isDisabled !== !disabled && | |
- disabledAncestor( elem ) === d… | |
- } | |
- | |
- return elem.disabled === disabled; | |
- | |
- // Try to winnow out elements that can't be disabled before tr… | |
- // Some victims get caught in our net (label, legend, menu, tr… | |
- // even exist on them, let alone have a boolean value. | |
- } else if ( "label" in elem ) { | |
- return elem.disabled === disabled; | |
- } | |
- | |
- // Remaining elements are neither :enabled nor :disabled | |
- return false; | |
- }; | |
-} | |
- | |
-/** | |
- * Returns a function to use in pseudos for positionals | |
- * @param {Function} fn | |
- */ | |
-function createPositionalPseudo( fn ) { | |
- return markFunction(function( argument ) { | |
- argument = +argument; | |
- return markFunction(function( seed, matches ) { | |
- var j, | |
- matchIndexes = fn( [], seed.length, argument ), | |
- i = matchIndexes.length; | |
- | |
- // Match elements found at the specified indexes | |
- while ( i-- ) { | |
- if ( seed[ (j = matchIndexes[i]) ] ) { | |
- seed[j] = !(matches[j] = seed[j]); | |
- } | |
- } | |
- }); | |
- }); | |
-} | |
- | |
-/** | |
- * Checks a node for validity as a Sizzle context | |
- * @param {Element|Object=} context | |
- * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a… | |
- */ | |
-function testContext( context ) { | |
- return context && typeof context.getElementsByTagName !== "undefined" … | |
-} | |
- | |
-// Expose support vars for convenience | |
-support = Sizzle.support = {}; | |
- | |
-/** | |
- * Detects XML nodes | |
- * @param {Element|Object} elem An element or a document | |
- * @returns {Boolean} True iff elem is a non-HTML XML node | |
- */ | |
-isXML = Sizzle.isXML = function( elem ) { | |
- // documentElement is verified for cases where it doesn't yet exist | |
- // (such as loading iframes in IE - #4833) | |
- var documentElement = elem && (elem.ownerDocument || elem).documentEle… | |
- return documentElement ? documentElement.nodeName !== "HTML" : false; | |
-}; | |
- | |
-/** | |
- * Sets document-related variables once based on the current document | |
- * @param {Element|Object} [doc] An element or document object to use to set t… | |
- * @returns {Object} Returns the current document | |
- */ | |
-setDocument = Sizzle.setDocument = function( node ) { | |
- var hasCompare, subWindow, | |
- doc = node ? node.ownerDocument || node : preferredDoc; | |
- | |
- // Return early if doc is invalid or already selected | |
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { | |
- return document; | |
- } | |
- | |
- // Update global variables | |
- document = doc; | |
- docElem = document.documentElement; | |
- documentIsHTML = !isXML( document ); | |
- | |
- // Support: IE 9-11, Edge | |
- // Accessing iframe documents after unload throws "permission denied" … | |
- if ( preferredDoc !== document && | |
- (subWindow = document.defaultView) && subWindow.top !== subWin… | |
- | |
- // Support: IE 11, Edge | |
- if ( subWindow.addEventListener ) { | |
- subWindow.addEventListener( "unload", unloadHandler, f… | |
- | |
- // Support: IE 9 - 10 only | |
- } else if ( subWindow.attachEvent ) { | |
- subWindow.attachEvent( "onunload", unloadHandler ); | |
- } | |
- } | |
- | |
- /* Attributes | |
- ----------------------------------------------------------------------… | |
- | |
- // Support: IE<8 | |
- // Verify that getAttribute really returns attributes and not properti… | |
- // (excepting IE8 booleans) | |
- support.attributes = assert(function( el ) { | |
- el.className = "i"; | |
- return !el.getAttribute("className"); | |
- }); | |
- | |
- /* getElement(s)By* | |
- ----------------------------------------------------------------------… | |
- | |
- // Check if getElementsByTagName("*") returns only elements | |
- support.getElementsByTagName = assert(function( el ) { | |
- el.appendChild( document.createComment("") ); | |
- return !el.getElementsByTagName("*").length; | |
- }); | |
- | |
- // Support: IE<9 | |
- support.getElementsByClassName = rnative.test( document.getElementsByC… | |
- | |
- // Support: IE<10 | |
- // Check if getElementById returns elements by name | |
- // The broken getElementById methods don't pick up programmatically-se… | |
- // so use a roundabout getElementsByName test | |
- support.getById = assert(function( el ) { | |
- docElem.appendChild( el ).id = expando; | |
- return !document.getElementsByName || !document.getElementsByN… | |
- }); | |
- | |
- // ID filter and find | |
- if ( support.getById ) { | |
- Expr.filter["ID"] = function( id ) { | |
- var attrId = id.replace( runescape, funescape ); | |
- return function( elem ) { | |
- return elem.getAttribute("id") === attrId; | |
- }; | |
- }; | |
- Expr.find["ID"] = function( id, context ) { | |
- if ( typeof context.getElementById !== "undefined" && … | |
- var elem = context.getElementById( id ); | |
- return elem ? [ elem ] : []; | |
- } | |
- }; | |
- } else { | |
- Expr.filter["ID"] = function( id ) { | |
- var attrId = id.replace( runescape, funescape ); | |
- return function( elem ) { | |
- var node = typeof elem.getAttributeNode !== "u… | |
- elem.getAttributeNode("id"); | |
- return node && node.value === attrId; | |
- }; | |
- }; | |
- | |
- // Support: IE 6 - 7 only | |
- // getElementById is not reliable as a find shortcut | |
- Expr.find["ID"] = function( id, context ) { | |
- if ( typeof context.getElementById !== "undefined" && … | |
- var node, i, elems, | |
- elem = context.getElementById( id ); | |
- | |
- if ( elem ) { | |
- | |
- // Verify the id attribute | |
- node = elem.getAttributeNode("id"); | |
- if ( node && node.value === id ) { | |
- return [ elem ]; | |
- } | |
- | |
- // Fall back on getElementsByName | |
- elems = context.getElementsByName( id … | |
- i = 0; | |
- while ( (elem = elems[i++]) ) { | |
- node = elem.getAttributeNode("… | |
- if ( node && node.value === id… | |
- return [ elem ]; | |
- } | |
- } | |
- } | |
- | |
- return []; | |
- } | |
- }; | |
- } | |
- | |
- // Tag | |
- Expr.find["TAG"] = support.getElementsByTagName ? | |
- function( tag, context ) { | |
- if ( typeof context.getElementsByTagName !== "undefine… | |
- return context.getElementsByTagName( tag ); | |
- | |
- // DocumentFragment nodes don't have gEBTN | |
- } else if ( support.qsa ) { | |
- return context.querySelectorAll( tag ); | |
- } | |
- } : | |
- | |
- function( tag, context ) { | |
- var elem, | |
- tmp = [], | |
- i = 0, | |
- // By happy coincidence, a (broken) gEBTN appe… | |
- results = context.getElementsByTagName( tag ); | |
- | |
- // Filter out possible comments | |
- if ( tag === "*" ) { | |
- while ( (elem = results[i++]) ) { | |
- if ( elem.nodeType === 1 ) { | |
- tmp.push( elem ); | |
- } | |
- } | |
- | |
- return tmp; | |
- } | |
- return results; | |
- }; | |
- | |
- // Class | |
- Expr.find["CLASS"] = support.getElementsByClassName && function( class… | |
- if ( typeof context.getElementsByClassName !== "undefined" && … | |
- return context.getElementsByClassName( className ); | |
- } | |
- }; | |
- | |
- /* QSA/matchesSelector | |
- ----------------------------------------------------------------------… | |
- | |
- // QSA and matchesSelector support | |
- | |
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5) | |
- rbuggyMatches = []; | |
- | |
- // qSa(:focus) reports false when true (Chrome 21) | |
- // We allow this because of a bug in IE8/9 that throws an error | |
- // whenever `document.activeElement` is accessed on an iframe | |
- // So, we allow :focus to pass through QSA all the time to avoid the I… | |
- // See https://bugs.jquery.com/ticket/13378 | |
- rbuggyQSA = []; | |
- | |
- if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { | |
- // Build QSA regex | |
- // Regex strategy adopted from Diego Perini | |
- assert(function( el ) { | |
- // Select is set to empty string on purpose | |
- // This is to test IE's treatment of not explicitly | |
- // setting a boolean content attribute, | |
- // since its presence should be enough | |
- // https://bugs.jquery.com/ticket/12359 | |
- docElem.appendChild( el ).innerHTML = "<a id='" + expa… | |
- "<select id='" + expando + "-\r\\' msallowcapt… | |
- "<option selected=''></option></select>"; | |
- | |
- // Support: IE8, Opera 11-12.16 | |
- // Nothing should be selected when empty strings follo… | |
- // The test attribute must be unknown in Opera but "sa… | |
- // https://msdn.microsoft.com/en-us/library/ie/hh46538… | |
- if ( el.querySelectorAll("[msallowcapture^='']").lengt… | |
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:'… | |
- } | |
- | |
- // Support: IE8 | |
- // Boolean attributes and "value" are not treated corr… | |
- if ( !el.querySelectorAll("[selected]").length ) { | |
- rbuggyQSA.push( "\\[" + whitespace + "*(?:valu… | |
- } | |
- | |
- // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7… | |
- if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).… | |
- rbuggyQSA.push("~="); | |
- } | |
- | |
- // Webkit/Opera - :checked should return selected opti… | |
- // http://www.w3.org/TR/2011/REC-css3-selectors-201109… | |
- // IE8 throws error here and will not see later tests | |
- if ( !el.querySelectorAll(":checked").length ) { | |
- rbuggyQSA.push(":checked"); | |
- } | |
- | |
- // Support: Safari 8+, iOS 8+ | |
- // https://bugs.webkit.org/show_bug.cgi?id=136851 | |
- // In-page `selector#id sibling-combinator selector` f… | |
- if ( !el.querySelectorAll( "a#" + expando + "+*" ).len… | |
- rbuggyQSA.push(".#.+[+~]"); | |
- } | |
- }); | |
- | |
- assert(function( el ) { | |
- el.innerHTML = "<a href='' disabled='disabled'></a>" + | |
- "<select disabled='disabled'><option/></select… | |
- | |
- // Support: Windows 8 Native Apps | |
- // The type and name attributes are restricted during … | |
- var input = document.createElement("input"); | |
- input.setAttribute( "type", "hidden" ); | |
- el.appendChild( input ).setAttribute( "name", "D" ); | |
- | |
- // Support: IE8 | |
- // Enforce case-sensitivity of name attribute | |
- if ( el.querySelectorAll("[name=d]").length ) { | |
- rbuggyQSA.push( "name" + whitespace + "*[*^$|!… | |
- } | |
- | |
- // FF 3.5 - :enabled/:disabled and hidden elements (hi… | |
- // IE8 throws error here and will not see later tests | |
- if ( el.querySelectorAll(":enabled").length !== 2 ) { | |
- rbuggyQSA.push( ":enabled", ":disabled" ); | |
- } | |
- | |
- // Support: IE9-11+ | |
- // IE's :disabled selector does not pick up the childr… | |
- docElem.appendChild( el ).disabled = true; | |
- if ( el.querySelectorAll(":disabled").length !== 2 ) { | |
- rbuggyQSA.push( ":enabled", ":disabled" ); | |
- } | |
- | |
- // Opera 10-11 does not throw on post-comma invalid ps… | |
- el.querySelectorAll("*,:x"); | |
- rbuggyQSA.push(",.*:"); | |
- }); | |
- } | |
- | |
- if ( (support.matchesSelector = rnative.test( (matches = docElem.match… | |
- docElem.webkitMatchesSelector || | |
- docElem.mozMatchesSelector || | |
- docElem.oMatchesSelector || | |
- docElem.msMatchesSelector) )) ) { | |
- | |
- assert(function( el ) { | |
- // Check to see if it's possible to do matchesSelector | |
- // on a disconnected node (IE 9) | |
- support.disconnectedMatch = matches.call( el, "*" ); | |
- | |
- // This should fail with an exception | |
- // Gecko does not error, returns false instead | |
- matches.call( el, "[s!='']:x" ); | |
- rbuggyMatches.push( "!=", pseudos ); | |
- }); | |
- } | |
- | |
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); | |
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join… | |
- | |
- /* Contains | |
- ----------------------------------------------------------------------… | |
- hasCompare = rnative.test( docElem.compareDocumentPosition ); | |
- | |
- // Element contains another | |
- // Purposefully self-exclusive | |
- // As in, an element does not contain itself | |
- contains = hasCompare || rnative.test( docElem.contains ) ? | |
- function( a, b ) { | |
- var adown = a.nodeType === 9 ? a.documentElement : a, | |
- bup = b && b.parentNode; | |
- return a === bup || !!( bup && bup.nodeType === 1 && ( | |
- adown.contains ? | |
- adown.contains( bup ) : | |
- a.compareDocumentPosition && a.compare… | |
- )); | |
- } : | |
- function( a, b ) { | |
- if ( b ) { | |
- while ( (b = b.parentNode) ) { | |
- if ( b === a ) { | |
- return true; | |
- } | |
- } | |
- } | |
- return false; | |
- }; | |
- | |
- /* Sorting | |
- ----------------------------------------------------------------------… | |
- | |
- // Document order sorting | |
- sortOrder = hasCompare ? | |
- function( a, b ) { | |
- | |
- // Flag for duplicate removal | |
- if ( a === b ) { | |
- hasDuplicate = true; | |
- return 0; | |
- } | |
- | |
- // Sort on method existence if only one input has compareDocum… | |
- var compare = !a.compareDocumentPosition - !b.compareDocumentP… | |
- if ( compare ) { | |
- return compare; | |
- } | |
- | |
- // Calculate position if both inputs belong to the same docume… | |
- compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b … | |
- a.compareDocumentPosition( b ) : | |
- | |
- // Otherwise we know they are disconnected | |
- 1; | |
- | |
- // Disconnected nodes | |
- if ( compare & 1 || | |
- (!support.sortDetached && b.compareDocumentPosition( a… | |
- | |
- // Choose the first element that is related to our pre… | |
- if ( a === document || a.ownerDocument === preferredDo… | |
- return -1; | |
- } | |
- if ( b === document || b.ownerDocument === preferredDo… | |
- return 1; | |
- } | |
- | |
- // Maintain original order | |
- return sortInput ? | |
- ( indexOf( sortInput, a ) - indexOf( sortInput… | |
- 0; | |
- } | |
- | |
- return compare & 4 ? -1 : 1; | |
- } : | |
- function( a, b ) { | |
- // Exit early if the nodes are identical | |
- if ( a === b ) { | |
- hasDuplicate = true; | |
- return 0; | |
- } | |
- | |
- var cur, | |
- i = 0, | |
- aup = a.parentNode, | |
- bup = b.parentNode, | |
- ap = [ a ], | |
- bp = [ b ]; | |
- | |
- // Parentless nodes are either documents or disconnected | |
- if ( !aup || !bup ) { | |
- return a === document ? -1 : | |
- b === document ? 1 : | |
- aup ? -1 : | |
- bup ? 1 : | |
- sortInput ? | |
- ( indexOf( sortInput, a ) - indexOf( sortInput… | |
- 0; | |
- | |
- // If the nodes are siblings, we can do a quick check | |
- } else if ( aup === bup ) { | |
- return siblingCheck( a, b ); | |
- } | |
- | |
- // Otherwise we need full lists of their ancestors for compari… | |
- cur = a; | |
- while ( (cur = cur.parentNode) ) { | |
- ap.unshift( cur ); | |
- } | |
- cur = b; | |
- while ( (cur = cur.parentNode) ) { | |
- bp.unshift( cur ); | |
- } | |
- | |
- // Walk down the tree looking for a discrepancy | |
- while ( ap[i] === bp[i] ) { | |
- i++; | |
- } | |
- | |
- return i ? | |
- // Do a sibling check if the nodes have a common ances… | |
- siblingCheck( ap[i], bp[i] ) : | |
- | |
- // Otherwise nodes in our document sort first | |
- ap[i] === preferredDoc ? -1 : | |
- bp[i] === preferredDoc ? 1 : | |
- 0; | |
- }; | |
- | |
- return document; | |
-}; | |
- | |
-Sizzle.matches = function( expr, elements ) { | |
- return Sizzle( expr, null, null, elements ); | |
-}; | |
- | |
-Sizzle.matchesSelector = function( elem, expr ) { | |
- // Set document vars if needed | |
- if ( ( elem.ownerDocument || elem ) !== document ) { | |
- setDocument( elem ); | |
- } | |
- | |
- // Make sure that attribute selectors are quoted | |
- expr = expr.replace( rattributeQuotes, "='$1']" ); | |
- | |
- if ( support.matchesSelector && documentIsHTML && | |
- !compilerCache[ expr + " " ] && | |
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && | |
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { | |
- | |
- try { | |
- var ret = matches.call( elem, expr ); | |
- | |
- // IE 9's matchesSelector returns false on disconnecte… | |
- if ( ret || support.disconnectedMatch || | |
- // As well, disconnected nodes are sai… | |
- // fragment in IE 9 | |
- elem.document && elem.document.nodeTyp… | |
- return ret; | |
- } | |
- } catch (e) {} | |
- } | |
- | |
- return Sizzle( expr, document, null, [ elem ] ).length > 0; | |
-}; | |
- | |
-Sizzle.contains = function( context, elem ) { | |
- // Set document vars if needed | |
- if ( ( context.ownerDocument || context ) !== document ) { | |
- setDocument( context ); | |
- } | |
- return contains( context, elem ); | |
-}; | |
- | |
-Sizzle.attr = function( elem, name ) { | |
- // Set document vars if needed | |
- if ( ( elem.ownerDocument || elem ) !== document ) { | |
- setDocument( elem ); | |
- } | |
- | |
- var fn = Expr.attrHandle[ name.toLowerCase() ], | |
- // Don't get fooled by Object.prototype properties (jQuery #13… | |
- val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() )… | |
- fn( elem, name, !documentIsHTML ) : | |
- undefined; | |
- | |
- return val !== undefined ? | |
- val : | |
- support.attributes || !documentIsHTML ? | |
- elem.getAttribute( name ) : | |
- (val = elem.getAttributeNode(name)) && val.specified ? | |
- val.value : | |
- null; | |
-}; | |
- | |
-Sizzle.escape = function( sel ) { | |
- return (sel + "").replace( rcssescape, fcssescape ); | |
-}; | |
- | |
-Sizzle.error = function( msg ) { | |
- throw new Error( "Syntax error, unrecognized expression: " + msg ); | |
-}; | |
- | |
-/** | |
- * Document sorting and removing duplicates | |
- * @param {ArrayLike} results | |
- */ | |
-Sizzle.uniqueSort = function( results ) { | |
- var elem, | |
- duplicates = [], | |
- j = 0, | |
- i = 0; | |
- | |
- // Unless we *know* we can detect duplicates, assume their presence | |
- hasDuplicate = !support.detectDuplicates; | |
- sortInput = !support.sortStable && results.slice( 0 ); | |
- results.sort( sortOrder ); | |
- | |
- if ( hasDuplicate ) { | |
- while ( (elem = results[i++]) ) { | |
- if ( elem === results[ i ] ) { | |
- j = duplicates.push( i ); | |
- } | |
- } | |
- while ( j-- ) { | |
- results.splice( duplicates[ j ], 1 ); | |
- } | |
- } | |
- | |
- // Clear input after sorting to release objects | |
- // See https://github.com/jquery/sizzle/pull/225 | |
- sortInput = null; | |
- | |
- return results; | |
-}; | |
- | |
-/** | |
- * Utility function for retrieving the text value of an array of DOM nodes | |
- * @param {Array|Element} elem | |
- */ | |
-getText = Sizzle.getText = function( elem ) { | |
- var node, | |
- ret = "", | |
- i = 0, | |
- nodeType = elem.nodeType; | |
- | |
- if ( !nodeType ) { | |
- // If no nodeType, this is expected to be an array | |
- while ( (node = elem[i++]) ) { | |
- // Do not traverse comment nodes | |
- ret += getText( node ); | |
- } | |
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { | |
- // Use textContent for elements | |
- // innerText usage removed for consistency of new lines (jQuer… | |
- if ( typeof elem.textContent === "string" ) { | |
- return elem.textContent; | |
- } else { | |
- // Traverse its children | |
- for ( elem = elem.firstChild; elem; elem = elem.nextSi… | |
- ret += getText( elem ); | |
- } | |
- } | |
- } else if ( nodeType === 3 || nodeType === 4 ) { | |
- return elem.nodeValue; | |
- } | |
- // Do not include comment or processing instruction nodes | |
- | |
- return ret; | |
-}; | |
- | |
-Expr = Sizzle.selectors = { | |
- | |
- // Can be adjusted by the user | |
- cacheLength: 50, | |
- | |
- createPseudo: markFunction, | |
- | |
- match: matchExpr, | |
- | |
- attrHandle: {}, | |
- | |
- find: {}, | |
- | |
- relative: { | |
- ">": { dir: "parentNode", first: true }, | |
- " ": { dir: "parentNode" }, | |
- "+": { dir: "previousSibling", first: true }, | |
- "~": { dir: "previousSibling" } | |
- }, | |
- | |
- preFilter: { | |
- "ATTR": function( match ) { | |
- match[1] = match[1].replace( runescape, funescape ); | |
- | |
- // Move the given value to match[3] whether quoted or … | |
- match[3] = ( match[3] || match[4] || match[5] || "" ).… | |
- | |
- if ( match[2] === "~=" ) { | |
- match[3] = " " + match[3] + " "; | |
- } | |
- | |
- return match.slice( 0, 4 ); | |
- }, | |
- | |
- "CHILD": function( match ) { | |
- /* matches from matchExpr["CHILD"] | |
- 1 type (only|nth|...) | |
- 2 what (child|of-type) | |
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) | |
- 4 xn-component of xn+y argument ([+-]?\d*n|) | |
- 5 sign of xn-component | |
- 6 x of xn-component | |
- 7 sign of y-component | |
- 8 y of y-component | |
- */ | |
- match[1] = match[1].toLowerCase(); | |
- | |
- if ( match[1].slice( 0, 3 ) === "nth" ) { | |
- // nth-* requires argument | |
- if ( !match[3] ) { | |
- Sizzle.error( match[0] ); | |
- } | |
- | |
- // numeric x and y parameters for Expr.filter.… | |
- // remember that false/true cast respectively … | |
- match[4] = +( match[4] ? match[5] + (match[6] … | |
- match[5] = +( ( match[7] + match[8] ) || match… | |
- | |
- // other types prohibit arguments | |
- } else if ( match[3] ) { | |
- Sizzle.error( match[0] ); | |
- } | |
- | |
- return match; | |
- }, | |
- | |
- "PSEUDO": function( match ) { | |
- var excess, | |
- unquoted = !match[6] && match[2]; | |
- | |
- if ( matchExpr["CHILD"].test( match[0] ) ) { | |
- return null; | |
- } | |
- | |
- // Accept quoted arguments as-is | |
- if ( match[3] ) { | |
- match[2] = match[4] || match[5] || ""; | |
- | |
- // Strip excess characters from unquoted arguments | |
- } else if ( unquoted && rpseudo.test( unquoted ) && | |
- // Get excess from tokenize (recursively) | |
- (excess = tokenize( unquoted, true )) && | |
- // advance to the next closing parenthesis | |
- (excess = unquoted.indexOf( ")", unquoted.leng… | |
- | |
- // excess is a negative index | |
- match[0] = match[0].slice( 0, excess ); | |
- match[2] = unquoted.slice( 0, excess ); | |
- } | |
- | |
- // Return only captures needed by the pseudo filter me… | |
- return match.slice( 0, 3 ); | |
- } | |
- }, | |
- | |
- filter: { | |
- | |
- "TAG": function( nodeNameSelector ) { | |
- var nodeName = nodeNameSelector.replace( runescape, fu… | |
- return nodeNameSelector === "*" ? | |
- function() { return true; } : | |
- function( elem ) { | |
- return elem.nodeName && elem.nodeName.… | |
- }; | |
- }, | |
- | |
- "CLASS": function( className ) { | |
- var pattern = classCache[ className + " " ]; | |
- | |
- return pattern || | |
- (pattern = new RegExp( "(^|" + whitespace + ")… | |
- classCache( className, function( elem ) { | |
- return pattern.test( typeof elem.class… | |
- }); | |
- }, | |
- | |
- "ATTR": function( name, operator, check ) { | |
- return function( elem ) { | |
- var result = Sizzle.attr( elem, name ); | |
- | |
- if ( result == null ) { | |
- return operator === "!="; | |
- } | |
- if ( !operator ) { | |
- return true; | |
- } | |
- | |
- result += ""; | |
- | |
- return operator === "=" ? result === check : | |
- operator === "!=" ? result !== check : | |
- operator === "^=" ? check && result.in… | |
- operator === "*=" ? check && result.in… | |
- operator === "$=" ? check && result.sl… | |
- operator === "~=" ? ( " " + result.rep… | |
- operator === "|=" ? result === check |… | |
- false; | |
- }; | |
- }, | |
- | |
- "CHILD": function( type, what, argument, first, last ) { | |
- var simple = type.slice( 0, 3 ) !== "nth", | |
- forward = type.slice( -4 ) !== "last", | |
- ofType = what === "of-type"; | |
- | |
- return first === 1 && last === 0 ? | |
- | |
- // Shortcut for :nth-*(n) | |
- function( elem ) { | |
- return !!elem.parentNode; | |
- } : | |
- | |
- function( elem, context, xml ) { | |
- var cache, uniqueCache, outerCache, no… | |
- dir = simple !== forward ? "ne… | |
- parent = elem.parentNode, | |
- name = ofType && elem.nodeName… | |
- useCache = !xml && !ofType, | |
- diff = false; | |
- | |
- if ( parent ) { | |
- | |
- // :(first|last|only)-(child|o… | |
- if ( simple ) { | |
- while ( dir ) { | |
- node = elem; | |
- while ( (node … | |
- if ( o… | |
- … | |
- … | |
- | |
- … | |
- } | |
- } | |
- // Reverse dir… | |
- start = dir = … | |
- } | |
- return true; | |
- } | |
- | |
- start = [ forward ? parent.fir… | |
- | |
- // non-xml :nth-child(...) sto… | |
- if ( forward && useCache ) { | |
- | |
- // Seek `elem` from a … | |
- | |
- // ...in a gzip-friend… | |
- node = parent; | |
- outerCache = node[ exp… | |
- | |
- // Support: IE <9 only | |
- // Defend against clon… | |
- uniqueCache = outerCac… | |
- (outerCache[ n… | |
- | |
- cache = uniqueCache[ t… | |
- nodeIndex = cache[ 0 ]… | |
- diff = nodeIndex && ca… | |
- node = nodeIndex && pa… | |
- | |
- while ( (node = ++node… | |
- | |
- // Fallback to… | |
- (diff = nodeIn… | |
- | |
- // When found,… | |
- if ( node.node… | |
- unique… | |
- break; | |
- } | |
- } | |
- | |
- } else { | |
- // Use previously-cach… | |
- if ( useCache ) { | |
- // ...in a gzi… | |
- node = elem; | |
- outerCache = n… | |
- | |
- // Support: IE… | |
- // Defend agai… | |
- uniqueCache = … | |
- (outer… | |
- | |
- cache = unique… | |
- nodeIndex = ca… | |
- diff = nodeInd… | |
- } | |
- | |
- // xml :nth-child(...) | |
- // or :nth-last-child(… | |
- if ( diff === false ) { | |
- // Use the sam… | |
- while ( (node … | |
- (diff … | |
- | |
- if ( (… | |
- … | |
- … | |
- … | |
- | |
- … | |
- … | |
- … | |
- | |
- … | |
- … | |
- … | |
- … | |
- | |
- … | |
- … | |
- | |
- … | |
- … | |
- … | |
- } | |
- } | |
- } | |
- } | |
- | |
- // Incorporate the offset, the… | |
- diff -= last; | |
- return diff === first || ( dif… | |
- } | |
- }; | |
- }, | |
- | |
- "PSEUDO": function( pseudo, argument ) { | |
- // pseudo-class names are case-insensitive | |
- // http://www.w3.org/TR/selectors/#pseudo-classes | |
- // Prioritize by case sensitivity in case custom pseud… | |
- // Remember that setFilters inherits from pseudos | |
- var args, | |
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters… | |
- Sizzle.error( "unsupported pseudo: " +… | |
- | |
- // The user may use createPseudo to indicate that | |
- // arguments are needed to create the filter function | |
- // just as Sizzle does | |
- if ( fn[ expando ] ) { | |
- return fn( argument ); | |
- } | |
- | |
- // But maintain support for old signatures | |
- if ( fn.length > 1 ) { | |
- args = [ pseudo, pseudo, "", argument ]; | |
- return Expr.setFilters.hasOwnProperty( pseudo.… | |
- markFunction(function( seed, matches )… | |
- var idx, | |
- matched = fn( seed, ar… | |
- i = matched.length; | |
- while ( i-- ) { | |
- idx = indexOf( seed, m… | |
- seed[ idx ] = !( match… | |
- } | |
- }) : | |
- function( elem ) { | |
- return fn( elem, 0, args ); | |
- }; | |
- } | |
- | |
- return fn; | |
- } | |
- }, | |
- | |
- pseudos: { | |
- // Potentially complex pseudos | |
- "not": markFunction(function( selector ) { | |
- // Trim the selector passed to compile | |
- // to avoid treating leading and trailing | |
- // spaces as combinators | |
- var input = [], | |
- results = [], | |
- matcher = compile( selector.replace( rtrim, "$… | |
- | |
- return matcher[ expando ] ? | |
- markFunction(function( seed, matches, context,… | |
- var elem, | |
- unmatched = matcher( seed, nul… | |
- i = seed.length; | |
- | |
- // Match elements unmatched by `matche… | |
- while ( i-- ) { | |
- if ( (elem = unmatched[i]) ) { | |
- seed[i] = !(matches[i]… | |
- } | |
- } | |
- }) : | |
- function( elem, context, xml ) { | |
- input[0] = elem; | |
- matcher( input, null, xml, results ); | |
- // Don't keep the element (issue #299) | |
- input[0] = null; | |
- return !results.pop(); | |
- }; | |
- }), | |
- | |
- "has": markFunction(function( selector ) { | |
- return function( elem ) { | |
- return Sizzle( selector, elem ).length > 0; | |
- }; | |
- }), | |
- | |
- "contains": markFunction(function( text ) { | |
- text = text.replace( runescape, funescape ); | |
- return function( elem ) { | |
- return ( elem.textContent || elem.innerText ||… | |
- }; | |
- }), | |
- | |
- // "Whether an element is represented by a :lang() selector | |
- // is based solely on the element's language value | |
- // being equal to the identifier C, | |
- // or beginning with the identifier C immediately followed by … | |
- // The matching of C against the element's language value is p… | |
- // The identifier C does not have to be a valid language name." | |
- // http://www.w3.org/TR/selectors/#lang-pseudo | |
- "lang": markFunction( function( lang ) { | |
- // lang value must be a valid identifier | |
- if ( !ridentifier.test(lang || "") ) { | |
- Sizzle.error( "unsupported lang: " + lang ); | |
- } | |
- lang = lang.replace( runescape, funescape ).toLowerCas… | |
- return function( elem ) { | |
- var elemLang; | |
- do { | |
- if ( (elemLang = documentIsHTML ? | |
- elem.lang : | |
- elem.getAttribute("xml:lang") … | |
- | |
- elemLang = elemLang.toLowerCas… | |
- return elemLang === lang || el… | |
- } | |
- } while ( (elem = elem.parentNode) && elem.nod… | |
- return false; | |
- }; | |
- }), | |
- | |
- // Miscellaneous | |
- "target": function( elem ) { | |
- var hash = window.location && window.location.hash; | |
- return hash && hash.slice( 1 ) === elem.id; | |
- }, | |
- | |
- "root": function( elem ) { | |
- return elem === docElem; | |
- }, | |
- | |
- "focus": function( elem ) { | |
- return elem === document.activeElement && (!document.h… | |
- }, | |
- | |
- // Boolean properties | |
- "enabled": createDisabledPseudo( false ), | |
- "disabled": createDisabledPseudo( true ), | |
- | |
- "checked": function( elem ) { | |
- // In CSS3, :checked should return both checked and se… | |
- // http://www.w3.org/TR/2011/REC-css3-selectors-201109… | |
- var nodeName = elem.nodeName.toLowerCase(); | |
- return (nodeName === "input" && !!elem.checked) || (no… | |
- }, | |
- | |
- "selected": function( elem ) { | |
- // Accessing this property makes selected-by-default | |
- // options in Safari work properly | |
- if ( elem.parentNode ) { | |
- elem.parentNode.selectedIndex; | |
- } | |
- | |
- return elem.selected === true; | |
- }, | |
- | |
- // Contents | |
- "empty": function( elem ) { | |
- // http://www.w3.org/TR/selectors/#empty-pseudo | |
- // :empty is negated by element (1) or content nodes (… | |
- // but not by others (comment: 8; processing instruc… | |
- // nodeType < 6 works because attributes (2) do not ap… | |
- for ( elem = elem.firstChild; elem; elem = elem.nextSi… | |
- if ( elem.nodeType < 6 ) { | |
- return false; | |
- } | |
- } | |
- return true; | |
- }, | |
- | |
- "parent": function( elem ) { | |
- return !Expr.pseudos["empty"]( elem ); | |
- }, | |
- | |
- // Element/input types | |
- "header": function( elem ) { | |
- return rheader.test( elem.nodeName ); | |
- }, | |
- | |
- "input": function( elem ) { | |
- return rinputs.test( elem.nodeName ); | |
- }, | |
- | |
- "button": function( elem ) { | |
- var name = elem.nodeName.toLowerCase(); | |
- return name === "input" && elem.type === "button" || n… | |
- }, | |
- | |
- "text": function( elem ) { | |
- var attr; | |
- return elem.nodeName.toLowerCase() === "input" && | |
- elem.type === "text" && | |
- | |
- // Support: IE<8 | |
- // New HTML5 attribute values (e.g., "search")… | |
- ( (attr = elem.getAttribute("type")) == null |… | |
- }, | |
- | |
- // Position-in-collection | |
- "first": createPositionalPseudo(function() { | |
- return [ 0 ]; | |
- }), | |
- | |
- "last": createPositionalPseudo(function( matchIndexes, length … | |
- return [ length - 1 ]; | |
- }), | |
- | |
- "eq": createPositionalPseudo(function( matchIndexes, length, a… | |
- return [ argument < 0 ? argument + length : argument ]; | |
- }), | |
- | |
- "even": createPositionalPseudo(function( matchIndexes, length … | |
- var i = 0; | |
- for ( ; i < length; i += 2 ) { | |
- matchIndexes.push( i ); | |
- } | |
- return matchIndexes; | |
- }), | |
- | |
- "odd": createPositionalPseudo(function( matchIndexes, length )… | |
- var i = 1; | |
- for ( ; i < length; i += 2 ) { | |
- matchIndexes.push( i ); | |
- } | |
- return matchIndexes; | |
- }), | |
- | |
- "lt": createPositionalPseudo(function( matchIndexes, length, a… | |
- var i = argument < 0 ? argument + length : argument; | |
- for ( ; --i >= 0; ) { | |
- matchIndexes.push( i ); | |
- } | |
- return matchIndexes; | |
- }), | |
- | |
- "gt": createPositionalPseudo(function( matchIndexes, length, a… | |
- var i = argument < 0 ? argument + length : argument; | |
- for ( ; ++i < length; ) { | |
- matchIndexes.push( i ); | |
- } | |
- return matchIndexes; | |
- }) | |
- } | |
-}; | |
- | |
-Expr.pseudos["nth"] = Expr.pseudos["eq"]; | |
- | |
-// Add button/input type pseudos | |
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: t… | |
- Expr.pseudos[ i ] = createInputPseudo( i ); | |
-} | |
-for ( i in { submit: true, reset: true } ) { | |
- Expr.pseudos[ i ] = createButtonPseudo( i ); | |
-} | |
- | |
-// Easy API for creating new setFilters | |
-function setFilters() {} | |
-setFilters.prototype = Expr.filters = Expr.pseudos; | |
-Expr.setFilters = new setFilters(); | |
- | |
-tokenize = Sizzle.tokenize = function( selector, parseOnly ) { | |
- var matched, match, tokens, type, | |
- soFar, groups, preFilters, | |
- cached = tokenCache[ selector + " " ]; | |
- | |
- if ( cached ) { | |
- return parseOnly ? 0 : cached.slice( 0 ); | |
- } | |
- | |
- soFar = selector; | |
- groups = []; | |
- preFilters = Expr.preFilter; | |
- | |
- while ( soFar ) { | |
- | |
- // Comma and first run | |
- if ( !matched || (match = rcomma.exec( soFar )) ) { | |
- if ( match ) { | |
- // Don't consume trailing commas as valid | |
- soFar = soFar.slice( match[0].length ) || soFa… | |
- } | |
- groups.push( (tokens = []) ); | |
- } | |
- | |
- matched = false; | |
- | |
- // Combinators | |
- if ( (match = rcombinators.exec( soFar )) ) { | |
- matched = match.shift(); | |
- tokens.push({ | |
- value: matched, | |
- // Cast descendant combinators to space | |
- type: match[0].replace( rtrim, " " ) | |
- }); | |
- soFar = soFar.slice( matched.length ); | |
- } | |
- | |
- // Filters | |
- for ( type in Expr.filter ) { | |
- if ( (match = matchExpr[ type ].exec( soFar )) && (!pr… | |
- (match = preFilters[ type ]( match ))) ) { | |
- matched = match.shift(); | |
- tokens.push({ | |
- value: matched, | |
- type: type, | |
- matches: match | |
- }); | |
- soFar = soFar.slice( matched.length ); | |
- } | |
- } | |
- | |
- if ( !matched ) { | |
- break; | |
- } | |
- } | |
- | |
- // Return the length of the invalid excess | |
- // if we're just parsing | |
- // Otherwise, throw an error or return tokens | |
- return parseOnly ? | |
- soFar.length : | |
- soFar ? | |
- Sizzle.error( selector ) : | |
- // Cache the tokens | |
- tokenCache( selector, groups ).slice( 0 ); | |
-}; | |
- | |
-function toSelector( tokens ) { | |
- var i = 0, | |
- len = tokens.length, | |
- selector = ""; | |
- for ( ; i < len; i++ ) { | |
- selector += tokens[i].value; | |
- } | |
- return selector; | |
-} | |
- | |
-function addCombinator( matcher, combinator, base ) { | |
- var dir = combinator.dir, | |
- skip = combinator.next, | |
- key = skip || dir, | |
- checkNonElements = base && key === "parentNode", | |
- doneName = done++; | |
- | |
- return combinator.first ? | |
- // Check against closest ancestor/preceding element | |
- function( elem, context, xml ) { | |
- while ( (elem = elem[ dir ]) ) { | |
- if ( elem.nodeType === 1 || checkNonElements )… | |
- return matcher( elem, context, xml ); | |
- } | |
- } | |
- return false; | |
- } : | |
- | |
- // Check against all ancestor/preceding elements | |
- function( elem, context, xml ) { | |
- var oldCache, uniqueCache, outerCache, | |
- newCache = [ dirruns, doneName ]; | |
- | |
- // We can't set arbitrary data on XML nodes, so they d… | |
- if ( xml ) { | |
- while ( (elem = elem[ dir ]) ) { | |
- if ( elem.nodeType === 1 || checkNonEl… | |
- if ( matcher( elem, context, x… | |
- return true; | |
- } | |
- } | |
- } | |
- } else { | |
- while ( (elem = elem[ dir ]) ) { | |
- if ( elem.nodeType === 1 || checkNonEl… | |
- outerCache = elem[ expando ] |… | |
- | |
- // Support: IE <9 only | |
- // Defend against cloned attro… | |
- uniqueCache = outerCache[ elem… | |
- | |
- if ( skip && skip === elem.nod… | |
- elem = elem[ dir ] || … | |
- } else if ( (oldCache = unique… | |
- oldCache[ 0 ] === dirr… | |
- | |
- // Assign to newCache … | |
- return (newCache[ 2 ] … | |
- } else { | |
- // Reuse newcache so r… | |
- uniqueCache[ key ] = n… | |
- | |
- // A match means we're… | |
- if ( (newCache[ 2 ] = … | |
- return true; | |
- } | |
- } | |
- } | |
- } | |
- } | |
- return false; | |
- }; | |
-} | |
- | |
-function elementMatcher( matchers ) { | |
- return matchers.length > 1 ? | |
- function( elem, context, xml ) { | |
- var i = matchers.length; | |
- while ( i-- ) { | |
- if ( !matchers[i]( elem, context, xml ) ) { | |
- return false; | |
- } | |
- } | |
- return true; | |
- } : | |
- matchers[0]; | |
-} | |
- | |
-function multipleContexts( selector, contexts, results ) { | |
- var i = 0, | |
- len = contexts.length; | |
- for ( ; i < len; i++ ) { | |
- Sizzle( selector, contexts[i], results ); | |
- } | |
- return results; | |
-} | |
- | |
-function condense( unmatched, map, filter, context, xml ) { | |
- var elem, | |
- newUnmatched = [], | |
- i = 0, | |
- len = unmatched.length, | |
- mapped = map != null; | |
- | |
- for ( ; i < len; i++ ) { | |
- if ( (elem = unmatched[i]) ) { | |
- if ( !filter || filter( elem, context, xml ) ) { | |
- newUnmatched.push( elem ); | |
- if ( mapped ) { | |
- map.push( i ); | |
- } | |
- } | |
- } | |
- } | |
- | |
- return newUnmatched; | |
-} | |
- | |
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, pos… | |
- if ( postFilter && !postFilter[ expando ] ) { | |
- postFilter = setMatcher( postFilter ); | |
- } | |
- if ( postFinder && !postFinder[ expando ] ) { | |
- postFinder = setMatcher( postFinder, postSelector ); | |
- } | |
- return markFunction(function( seed, results, context, xml ) { | |
- var temp, i, elem, | |
- preMap = [], | |
- postMap = [], | |
- preexisting = results.length, | |
- | |
- // Get initial elements from seed or context | |
- elems = seed || multipleContexts( selector || "*", con… | |
- | |
- // Prefilter to get matcher input, preserving a map fo… | |
- matcherIn = preFilter && ( seed || !selector ) ? | |
- condense( elems, preMap, preFilter, context, x… | |
- elems, | |
- | |
- matcherOut = matcher ? | |
- // If we have a postFinder, or filtered seed, … | |
- postFinder || ( seed ? preFilter : preexisting… | |
- | |
- // ...intermediate processing is neces… | |
- [] : | |
- | |
- // ...otherwise use results directly | |
- results : | |
- matcherIn; | |
- | |
- // Find primary matches | |
- if ( matcher ) { | |
- matcher( matcherIn, matcherOut, context, xml ); | |
- } | |
- | |
- // Apply postFilter | |
- if ( postFilter ) { | |
- temp = condense( matcherOut, postMap ); | |
- postFilter( temp, [], context, xml ); | |
- | |
- // Un-match failing elements by moving them back to ma… | |
- i = temp.length; | |
- while ( i-- ) { | |
- if ( (elem = temp[i]) ) { | |
- matcherOut[ postMap[i] ] = !(matcherIn… | |
- } | |
- } | |
- } | |
- | |
- if ( seed ) { | |
- if ( postFinder || preFilter ) { | |
- if ( postFinder ) { | |
- // Get the final matcherOut by condens… | |
- temp = []; | |
- i = matcherOut.length; | |
- while ( i-- ) { | |
- if ( (elem = matcherOut[i]) ) { | |
- // Restore matcherIn s… | |
- temp.push( (matcherIn[… | |
- } | |
- } | |
- postFinder( null, (matcherOut = []), t… | |
- } | |
- | |
- // Move matched elements from seed to results … | |
- i = matcherOut.length; | |
- while ( i-- ) { | |
- if ( (elem = matcherOut[i]) && | |
- (temp = postFinder ? indexOf( … | |
- | |
- seed[temp] = !(results[temp] =… | |
- } | |
- } | |
- } | |
- | |
- // Add elements to results, through postFinder if defined | |
- } else { | |
- matcherOut = condense( | |
- matcherOut === results ? | |
- matcherOut.splice( preexisting, matche… | |
- matcherOut | |
- ); | |
- if ( postFinder ) { | |
- postFinder( null, results, matcherOut, xml ); | |
- } else { | |
- push.apply( results, matcherOut ); | |
- } | |
- } | |
- }); | |
-} | |
- | |
-function matcherFromTokens( tokens ) { | |
- var checkContext, matcher, j, | |
- len = tokens.length, | |
- leadingRelative = Expr.relative[ tokens[0].type ], | |
- implicitRelative = leadingRelative || Expr.relative[" "], | |
- i = leadingRelative ? 1 : 0, | |
- | |
- // The foundational matcher ensures that elements are reachabl… | |
- matchContext = addCombinator( function( elem ) { | |
- return elem === checkContext; | |
- }, implicitRelative, true ), | |
- matchAnyContext = addCombinator( function( elem ) { | |
- return indexOf( checkContext, elem ) > -1; | |
- }, implicitRelative, true ), | |
- matchers = [ function( elem, context, xml ) { | |
- var ret = ( !leadingRelative && ( xml || context !== o… | |
- (checkContext = context).nodeType ? | |
- matchContext( elem, context, xml ) : | |
- matchAnyContext( elem, context, xml ) … | |
- // Avoid hanging onto element (issue #299) | |
- checkContext = null; | |
- return ret; | |
- } ]; | |
- | |
- for ( ; i < len; i++ ) { | |
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) { | |
- matchers = [ addCombinator(elementMatcher( matchers ),… | |
- } else { | |
- matcher = Expr.filter[ tokens[i].type ].apply( null, t… | |
- | |
- // Return special upon seeing a positional matcher | |
- if ( matcher[ expando ] ) { | |
- // Find the next relative operator (if any) fo… | |
- j = ++i; | |
- for ( ; j < len; j++ ) { | |
- if ( Expr.relative[ tokens[j].type ] )… | |
- break; | |
- } | |
- } | |
- return setMatcher( | |
- i > 1 && elementMatcher( matchers ), | |
- i > 1 && toSelector( | |
- // If the preceding token was … | |
- tokens.slice( 0, i - 1 ).conca… | |
- ).replace( rtrim, "$1" ), | |
- matcher, | |
- i < j && matcherFromTokens( tokens.sli… | |
- j < len && matcherFromTokens( (tokens … | |
- j < len && toSelector( tokens ) | |
- ); | |
- } | |
- matchers.push( matcher ); | |
- } | |
- } | |
- | |
- return elementMatcher( matchers ); | |
-} | |
- | |
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) { | |
- var bySet = setMatchers.length > 0, | |
- byElement = elementMatchers.length > 0, | |
- superMatcher = function( seed, context, xml, results, outermos… | |
- var elem, j, matcher, | |
- matchedCount = 0, | |
- i = "0", | |
- unmatched = seed && [], | |
- setMatched = [], | |
- contextBackup = outermostContext, | |
- // We must always have either seed elements or… | |
- elems = seed || byElement && Expr.find["TAG"](… | |
- // Use integer dirruns iff this is the outermo… | |
- dirrunsUnique = (dirruns += contextBackup == n… | |
- len = elems.length; | |
- | |
- if ( outermost ) { | |
- outermostContext = context === document || con… | |
- } | |
- | |
- // Add elements passing elementMatchers directly to re… | |
- // Support: IE<9, Safari | |
- // Tolerate NodeList properties (IE: "length"; Safari:… | |
- for ( ; i !== len && (elem = elems[i]) != null; i++ ) { | |
- if ( byElement && elem ) { | |
- j = 0; | |
- if ( !context && elem.ownerDocument !=… | |
- setDocument( elem ); | |
- xml = !documentIsHTML; | |
- } | |
- while ( (matcher = elementMatchers[j++… | |
- if ( matcher( elem, context ||… | |
- results.push( elem ); | |
- break; | |
- } | |
- } | |
- if ( outermost ) { | |
- dirruns = dirrunsUnique; | |
- } | |
- } | |
- | |
- // Track unmatched elements for set filters | |
- if ( bySet ) { | |
- // They will have gone through all pos… | |
- if ( (elem = !matcher && elem) ) { | |
- matchedCount--; | |
- } | |
- | |
- // Lengthen the array for every elemen… | |
- if ( seed ) { | |
- unmatched.push( elem ); | |
- } | |
- } | |
- } | |
- | |
- // `i` is now the count of elements visited above, and… | |
- // makes the latter nonnegative. | |
- matchedCount += i; | |
- | |
- // Apply set filters to unmatched elements | |
- // NOTE: This can be skipped if there are no unmatched… | |
- // equals `i`), unless we didn't visit _any_ elements … | |
- // no element matchers and no seed. | |
- // Incrementing an initially-string "0" `i` allows `i`… | |
- // case, which will result in a "00" `matchedCount` th… | |
- // numerically zero. | |
- if ( bySet && i !== matchedCount ) { | |
- j = 0; | |
- while ( (matcher = setMatchers[j++]) ) { | |
- matcher( unmatched, setMatched, contex… | |
- } | |
- | |
- if ( seed ) { | |
- // Reintegrate element matches to elim… | |
- if ( matchedCount > 0 ) { | |
- while ( i-- ) { | |
- if ( !(unmatched[i] ||… | |
- setMatched[i] … | |
- } | |
- } | |
- } | |
- | |
- // Discard index placeholder values to… | |
- setMatched = condense( setMatched ); | |
- } | |
- | |
- // Add matches to results | |
- push.apply( results, setMatched ); | |
- | |
- // Seedless set matches succeeding multiple su… | |
- if ( outermost && !seed && setMatched.length >… | |
- ( matchedCount + setMatchers.length ) … | |
- | |
- Sizzle.uniqueSort( results ); | |
- } | |
- } | |
- | |
- // Override manipulation of globals by nested matchers | |
- if ( outermost ) { | |
- dirruns = dirrunsUnique; | |
- outermostContext = contextBackup; | |
- } | |
- | |
- return unmatched; | |
- }; | |
- | |
- return bySet ? | |
- markFunction( superMatcher ) : | |
- superMatcher; | |
-} | |
- | |
-compile = Sizzle.compile = function( selector, match /* Internal Use Only */ )… | |
- var i, | |
- setMatchers = [], | |
- elementMatchers = [], | |
- cached = compilerCache[ selector + " " ]; | |
- | |
- if ( !cached ) { | |
- // Generate a function of recursive functions that can be used… | |
- if ( !match ) { | |
- match = tokenize( selector ); | |
- } | |
- i = match.length; | |
- while ( i-- ) { | |
- cached = matcherFromTokens( match[i] ); | |
- if ( cached[ expando ] ) { | |
- setMatchers.push( cached ); | |
- } else { | |
- elementMatchers.push( cached ); | |
- } | |
- } | |
- | |
- // Cache the compiled function | |
- cached = compilerCache( selector, matcherFromGroupMatchers( el… | |
- | |
- // Save selector and tokenization | |
- cached.selector = selector; | |
- } | |
- return cached; | |
-}; | |
- | |
-/** | |
- * A low-level selection function that works with Sizzle's compiled | |
- * selector functions | |
- * @param {String|Function} selector A selector or a pre-compiled | |
- * selector function built with Sizzle.compile | |
- * @param {Element} context | |
- * @param {Array} [results] | |
- * @param {Array} [seed] A set of elements to match against | |
- */ | |
-select = Sizzle.select = function( selector, context, results, seed ) { | |
- var i, tokens, token, type, find, | |
- compiled = typeof selector === "function" && selector, | |
- match = !seed && tokenize( (selector = compiled.selector || se… | |
- | |
- results = results || []; | |
- | |
- // Try to minimize operations if there is only one selector in the lis… | |
- // (the latter of which guarantees us context) | |
- if ( match.length === 1 ) { | |
- | |
- // Reduce context if the leading compound selector is an ID | |
- tokens = match[0] = match[0].slice( 0 ); | |
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && | |
- context.nodeType === 9 && documentIsHTML && Ex… | |
- | |
- context = ( Expr.find["ID"]( token.matches[0].replace(… | |
- if ( !context ) { | |
- return results; | |
- | |
- // Precompiled matchers will still verify ancestry, so… | |
- } else if ( compiled ) { | |
- context = context.parentNode; | |
- } | |
- | |
- selector = selector.slice( tokens.shift().value.length… | |
- } | |
- | |
- // Fetch a seed set for right-to-left matching | |
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.le… | |
- while ( i-- ) { | |
- token = tokens[i]; | |
- | |
- // Abort if we hit a combinator | |
- if ( Expr.relative[ (type = token.type) ] ) { | |
- break; | |
- } | |
- if ( (find = Expr.find[ type ]) ) { | |
- // Search, expanding context for leading sibli… | |
- if ( (seed = find( | |
- token.matches[0].replace( runescape, f… | |
- rsibling.test( tokens[0].type ) && tes… | |
- )) ) { | |
- | |
- // If seed is empty or no tokens remai… | |
- tokens.splice( i, 1 ); | |
- selector = seed.length && toSelector( … | |
- if ( !selector ) { | |
- push.apply( results, seed ); | |
- return results; | |
- } | |
- | |
- break; | |
- } | |
- } | |
- } | |
- } | |
- | |
- // Compile and execute a filtering function if one is not provided | |
- // Provide `match` to avoid retokenization if we modified the selector… | |
- ( compiled || compile( selector, match ) )( | |
- seed, | |
- context, | |
- !documentIsHTML, | |
- results, | |
- !context || rsibling.test( selector ) && testContext( context.… | |
- ); | |
- return results; | |
-}; | |
- | |
-// One-time assignments | |
- | |
-// Sort stability | |
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; | |
- | |
-// Support: Chrome 14-35+ | |
-// Always assume duplicates if they aren't passed to the comparison function | |
-support.detectDuplicates = !!hasDuplicate; | |
- | |
-// Initialize against the default document | |
-setDocument(); | |
- | |
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) | |
-// Detached nodes confoundingly follow *each other* | |
-support.sortDetached = assert(function( el ) { | |
- // Should return 1, but returns 4 (following) | |
- return el.compareDocumentPosition( document.createElement("fieldset") … | |
-}); | |
- | |
-// Support: IE<8 | |
-// Prevent attribute/property "interpolation" | |
-// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx | |
-if ( !assert(function( el ) { | |
- el.innerHTML = "<a href='#'></a>"; | |
- return el.firstChild.getAttribute("href") === "#" ; | |
-}) ) { | |
- addHandle( "type|href|height|width", function( elem, name, isXML ) { | |
- if ( !isXML ) { | |
- return elem.getAttribute( name, name.toLowerCase() ===… | |
- } | |
- }); | |
-} | |
- | |
-// Support: IE<9 | |
-// Use defaultValue in place of getAttribute("value") | |
-if ( !support.attributes || !assert(function( el ) { | |
- el.innerHTML = "<input/>"; | |
- el.firstChild.setAttribute( "value", "" ); | |
- return el.firstChild.getAttribute( "value" ) === ""; | |
-}) ) { | |
- addHandle( "value", function( elem, name, isXML ) { | |
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { | |
- return elem.defaultValue; | |
- } | |
- }); | |
-} | |
- | |
-// Support: IE<9 | |
-// Use getAttributeNode to fetch booleans when getAttribute lies | |
-if ( !assert(function( el ) { | |
- return el.getAttribute("disabled") == null; | |
-}) ) { | |
- addHandle( booleans, function( elem, name, isXML ) { | |
- var val; | |
- if ( !isXML ) { | |
- return elem[ name ] === true ? name.toLowerCase() : | |
- (val = elem.getAttributeNode( name )) … | |
- val.value : | |
- null; | |
- } | |
- }); | |
-} | |
- | |
-return Sizzle; | |
- | |
-})( window ); | |
- | |
- | |
- | |
-jQuery.find = Sizzle; | |
-jQuery.expr = Sizzle.selectors; | |
- | |
-// Deprecated | |
-jQuery.expr[ ":" ] = jQuery.expr.pseudos; | |
-jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; | |
-jQuery.text = Sizzle.getText; | |
-jQuery.isXMLDoc = Sizzle.isXML; | |
-jQuery.contains = Sizzle.contains; | |
-jQuery.escapeSelector = Sizzle.escape; | |
- | |
- | |
- | |
- | |
-var dir = function( elem, dir, until ) { | |
- var matched = [], | |
- truncate = until !== undefined; | |
- | |
- while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { | |
- if ( elem.nodeType === 1 ) { | |
- if ( truncate && jQuery( elem ).is( until ) ) { | |
- break; | |
- } | |
- matched.push( elem ); | |
- } | |
- } | |
- return matched; | |
-}; | |
- | |
- | |
-var siblings = function( n, elem ) { | |
- var matched = []; | |
- | |
- for ( ; n; n = n.nextSibling ) { | |
- if ( n.nodeType === 1 && n !== elem ) { | |
- matched.push( n ); | |
- } | |
- } | |
- | |
- return matched; | |
-}; | |
- | |
- | |
-var rneedsContext = jQuery.expr.match.needsContext; | |
- | |
-var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1… | |
- | |
- | |
- | |
-var risSimple = /^.[^:#\[\.,]*$/; | |
- | |
-// Implement the identical functionality for filter and not | |
-function winnow( elements, qualifier, not ) { | |
- if ( jQuery.isFunction( qualifier ) ) { | |
- return jQuery.grep( elements, function( elem, i ) { | |
- return !!qualifier.call( elem, i, elem ) !== not; | |
- } ); | |
- } | |
- | |
- // Single element | |
- if ( qualifier.nodeType ) { | |
- return jQuery.grep( elements, function( elem ) { | |
- return ( elem === qualifier ) !== not; | |
- } ); | |
- } | |
- | |
- // Arraylike of elements (jQuery, arguments, Array) | |
- if ( typeof qualifier !== "string" ) { | |
- return jQuery.grep( elements, function( elem ) { | |
- return ( indexOf.call( qualifier, elem ) > -1 ) !== no… | |
- } ); | |
- } | |
- | |
- // Simple selector that can be filtered directly, removing non-Elements | |
- if ( risSimple.test( qualifier ) ) { | |
- return jQuery.filter( qualifier, elements, not ); | |
- } | |
- | |
- // Complex selector, compare the two sets, removing non-Elements | |
- qualifier = jQuery.filter( qualifier, elements ); | |
- return jQuery.grep( elements, function( elem ) { | |
- return ( indexOf.call( qualifier, elem ) > -1 ) !== not && ele… | |
- } ); | |
-} | |
- | |
-jQuery.filter = function( expr, elems, not ) { | |
- var elem = elems[ 0 ]; | |
- | |
- if ( not ) { | |
- expr = ":not(" + expr + ")"; | |
- } | |
- | |
- if ( elems.length === 1 && elem.nodeType === 1 ) { | |
- return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : … | |
- } | |
- | |
- return jQuery.find.matches( expr, jQuery.grep( elems, function( elem )… | |
- return elem.nodeType === 1; | |
- } ) ); | |
-}; | |
- | |
-jQuery.fn.extend( { | |
- find: function( selector ) { | |
- var i, ret, | |
- len = this.length, | |
- self = this; | |
- | |
- if ( typeof selector !== "string" ) { | |
- return this.pushStack( jQuery( selector ).filter( func… | |
- for ( i = 0; i < len; i++ ) { | |
- if ( jQuery.contains( self[ i ], this … | |
- return true; | |
- } | |
- } | |
- } ) ); | |
- } | |
- | |
- ret = this.pushStack( [] ); | |
- | |
- for ( i = 0; i < len; i++ ) { | |
- jQuery.find( selector, self[ i ], ret ); | |
- } | |
- | |
- return len > 1 ? jQuery.uniqueSort( ret ) : ret; | |
- }, | |
- filter: function( selector ) { | |
- return this.pushStack( winnow( this, selector || [], false ) ); | |
- }, | |
- not: function( selector ) { | |
- return this.pushStack( winnow( this, selector || [], true ) ); | |
- }, | |
- is: function( selector ) { | |
- return !!winnow( | |
- this, | |
- | |
- // If this is a positional/relative selector, check me… | |
- // so $("p:first").is("p:last") won't return true for … | |
- typeof selector === "string" && rneedsContext.test( se… | |
- jQuery( selector ) : | |
- selector || [], | |
- false | |
- ).length; | |
- } | |
-} ); | |
- | |
- | |
-// Initialize a jQuery object | |
- | |
- | |
-// A central reference to the root jQuery(document) | |
-var rootjQuery, | |
- | |
- // A simple way to check for HTML strings | |
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) | |
- // Strict HTML recognition (#11290: must start with <) | |
- // Shortcut simple #id case for speed | |
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, | |
- | |
- init = jQuery.fn.init = function( selector, context, root ) { | |
- var match, elem; | |
- | |
- // HANDLE: $(""), $(null), $(undefined), $(false) | |
- if ( !selector ) { | |
- return this; | |
- } | |
- | |
- // Method init() accepts an alternate rootjQuery | |
- // so migrate can support jQuery.sub (gh-2101) | |
- root = root || rootjQuery; | |
- | |
- // Handle HTML strings | |
- if ( typeof selector === "string" ) { | |
- if ( selector[ 0 ] === "<" && | |
- selector[ selector.length - 1 ] === ">" && | |
- selector.length >= 3 ) { | |
- | |
- // Assume that strings that start and end with… | |
- match = [ null, selector, null ]; | |
- | |
- } else { | |
- match = rquickExpr.exec( selector ); | |
- } | |
- | |
- // Match html or make sure no context is specified for… | |
- if ( match && ( match[ 1 ] || !context ) ) { | |
- | |
- // HANDLE: $(html) -> $(array) | |
- if ( match[ 1 ] ) { | |
- context = context instanceof jQuery ? … | |
- | |
- // Option to run scripts is true for b… | |
- // Intentionally let the error be thro… | |
- jQuery.merge( this, jQuery.parseHTML( | |
- match[ 1 ], | |
- context && context.nodeType ? … | |
- true | |
- ) ); | |
- | |
- // HANDLE: $(html, props) | |
- if ( rsingleTag.test( match[ 1 ] ) && … | |
- for ( match in context ) { | |
- | |
- // Properties of conte… | |
- if ( jQuery.isFunction… | |
- this[ match ](… | |
- | |
- // ...and otherwise se… | |
- } else { | |
- this.attr( mat… | |
- } | |
- } | |
- } | |
- | |
- return this; | |
- | |
- // HANDLE: $(#id) | |
- } else { | |
- elem = document.getElementById( match[… | |
- | |
- if ( elem ) { | |
- | |
- // Inject the element directly… | |
- this[ 0 ] = elem; | |
- this.length = 1; | |
- } | |
- return this; | |
- } | |
- | |
- // HANDLE: $(expr, $(...)) | |
- } else if ( !context || context.jquery ) { | |
- return ( context || root ).find( selector ); | |
- | |
- // HANDLE: $(expr, context) | |
- // (which is just equivalent to: $(context).find(expr) | |
- } else { | |
- return this.constructor( context ).find( selec… | |
- } | |
- | |
- // HANDLE: $(DOMElement) | |
- } else if ( selector.nodeType ) { | |
- this[ 0 ] = selector; | |
- this.length = 1; | |
- return this; | |
- | |
- // HANDLE: $(function) | |
- // Shortcut for document ready | |
- } else if ( jQuery.isFunction( selector ) ) { | |
- return root.ready !== undefined ? | |
- root.ready( selector ) : | |
- | |
- // Execute immediately if ready is not present | |
- selector( jQuery ); | |
- } | |
- | |
- return jQuery.makeArray( selector, this ); | |
- }; | |
- | |
-// Give the init function the jQuery prototype for later instantiation | |
-init.prototype = jQuery.fn; | |
- | |
-// Initialize central reference | |
-rootjQuery = jQuery( document ); | |
- | |
- | |
-var rparentsprev = /^(?:parents|prev(?:Until|All))/, | |
- | |
- // Methods guaranteed to produce a unique set when starting from a uni… | |
- guaranteedUnique = { | |
- children: true, | |
- contents: true, | |
- next: true, | |
- prev: true | |
- }; | |
- | |
-jQuery.fn.extend( { | |
- has: function( target ) { | |
- var targets = jQuery( target, this ), | |
- l = targets.length; | |
- | |
- return this.filter( function() { | |
- var i = 0; | |
- for ( ; i < l; i++ ) { | |
- if ( jQuery.contains( this, targets[ i ] ) ) { | |
- return true; | |
- } | |
- } | |
- } ); | |
- }, | |
- | |
- closest: function( selectors, context ) { | |
- var cur, | |
- i = 0, | |
- l = this.length, | |
- matched = [], | |
- targets = typeof selectors !== "string" && jQuery( sel… | |
- | |
- // Positional selectors never match, since there's no _selecti… | |
- if ( !rneedsContext.test( selectors ) ) { | |
- for ( ; i < l; i++ ) { | |
- for ( cur = this[ i ]; cur && cur !== context;… | |
- | |
- // Always skip document fragments | |
- if ( cur.nodeType < 11 && ( targets ? | |
- targets.index( cur ) > -1 : | |
- | |
- // Don't pass non-elements to … | |
- cur.nodeType === 1 && | |
- jQuery.find.matchesSel… | |
- | |
- matched.push( cur ); | |
- break; | |
- } | |
- } | |
- } | |
- } | |
- | |
- return this.pushStack( matched.length > 1 ? jQuery.uniqueSort(… | |
- }, | |
- | |
- // Determine the position of an element within the set | |
- index: function( elem ) { | |
- | |
- // No argument, return index in parent | |
- if ( !elem ) { | |
- return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.fi… | |
- } | |
- | |
- // Index in selector | |
- if ( typeof elem === "string" ) { | |
- return indexOf.call( jQuery( elem ), this[ 0 ] ); | |
- } | |
- | |
- // Locate the position of the desired element | |
- return indexOf.call( this, | |
- | |
- // If it receives a jQuery object, the first element i… | |
- elem.jquery ? elem[ 0 ] : elem | |
- ); | |
- }, | |
- | |
- add: function( selector, context ) { | |
- return this.pushStack( | |
- jQuery.uniqueSort( | |
- jQuery.merge( this.get(), jQuery( selector, co… | |
- ) | |
- ); | |
- }, | |
- | |
- addBack: function( selector ) { | |
- return this.add( selector == null ? | |
- this.prevObject : this.prevObject.filter( selector ) | |
- ); | |
- } | |
-} ); | |
- | |
-function sibling( cur, dir ) { | |
- while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} | |
- return cur; | |
-} | |
- | |
-jQuery.each( { | |
- parent: function( elem ) { | |
- var parent = elem.parentNode; | |
- return parent && parent.nodeType !== 11 ? parent : null; | |
- }, | |
- parents: function( elem ) { | |
- return dir( elem, "parentNode" ); | |
- }, | |
- parentsUntil: function( elem, i, until ) { | |
- return dir( elem, "parentNode", until ); | |
- }, | |
- next: function( elem ) { | |
- return sibling( elem, "nextSibling" ); | |
- }, | |
- prev: function( elem ) { | |
- return sibling( elem, "previousSibling" ); | |
- }, | |
- nextAll: function( elem ) { | |
- return dir( elem, "nextSibling" ); | |
- }, | |
- prevAll: function( elem ) { | |
- return dir( elem, "previousSibling" ); | |
- }, | |
- nextUntil: function( elem, i, until ) { | |
- return dir( elem, "nextSibling", until ); | |
- }, | |
- prevUntil: function( elem, i, until ) { | |
- return dir( elem, "previousSibling", until ); | |
- }, | |
- siblings: function( elem ) { | |
- return siblings( ( elem.parentNode || {} ).firstChild, elem ); | |
- }, | |
- children: function( elem ) { | |
- return siblings( elem.firstChild ); | |
- }, | |
- contents: function( elem ) { | |
- return elem.contentDocument || jQuery.merge( [], elem.childNod… | |
- } | |
-}, function( name, fn ) { | |
- jQuery.fn[ name ] = function( until, selector ) { | |
- var matched = jQuery.map( this, fn, until ); | |
- | |
- if ( name.slice( -5 ) !== "Until" ) { | |
- selector = until; | |
- } | |
- | |
- if ( selector && typeof selector === "string" ) { | |
- matched = jQuery.filter( selector, matched ); | |
- } | |
- | |
- if ( this.length > 1 ) { | |
- | |
- // Remove duplicates | |
- if ( !guaranteedUnique[ name ] ) { | |
- jQuery.uniqueSort( matched ); | |
- } | |
- | |
- // Reverse order for parents* and prev-derivatives | |
- if ( rparentsprev.test( name ) ) { | |
- matched.reverse(); | |
- } | |
- } | |
- | |
- return this.pushStack( matched ); | |
- }; | |
-} ); | |
-var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); | |
- | |
- | |
- | |
-// Convert String-formatted options into Object-formatted ones | |
-function createOptions( options ) { | |
- var object = {}; | |
- jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag )… | |
- object[ flag ] = true; | |
- } ); | |
- return object; | |
-} | |
- | |
-/* | |
- * Create a callback list using the following parameters: | |
- * | |
- * options: an optional list of space-separated options that will chang… | |
- * the callback list behaves or a more traditional opti… | |
- * | |
- * By default a callback list will act like an event callback list and can be | |
- * "fired" multiple times. | |
- * | |
- * Possible options: | |
- * | |
- * once: will ensure the callback list can only … | |
- * | |
- * memory: will keep track of previous values an… | |
- * after the list has been fired right … | |
- * values (like a Deferred) | |
- * | |
- * unique: will ensure a callback can only be ad… | |
- * | |
- * stopOnFalse: interrupt callings when a callback returns false | |
- * | |
- */ | |
-jQuery.Callbacks = function( options ) { | |
- | |
- // Convert options from String-formatted to Object-formatted if needed | |
- // (we check in cache first) | |
- options = typeof options === "string" ? | |
- createOptions( options ) : | |
- jQuery.extend( {}, options ); | |
- | |
- var // Flag to know if list is currently firing | |
- firing, | |
- | |
- // Last fire value for non-forgettable lists | |
- memory, | |
- | |
- // Flag to know if list was already fired | |
- fired, | |
- | |
- // Flag to prevent firing | |
- locked, | |
- | |
- // Actual callback list | |
- list = [], | |
- | |
- // Queue of execution data for repeatable lists | |
- queue = [], | |
- | |
- // Index of currently firing callback (modified by add/remove … | |
- firingIndex = -1, | |
- | |
- // Fire callbacks | |
- fire = function() { | |
- | |
- // Enforce single-firing | |
- locked = options.once; | |
- | |
- // Execute callbacks for all pending executions, | |
- // respecting firingIndex overrides and runtime changes | |
- fired = firing = true; | |
- for ( ; queue.length; firingIndex = -1 ) { | |
- memory = queue.shift(); | |
- while ( ++firingIndex < list.length ) { | |
- | |
- // Run callback and check for early te… | |
- if ( list[ firingIndex ].apply( memory… | |
- options.stopOnFalse ) { | |
- | |
- // Jump to end and forget the … | |
- firingIndex = list.length; | |
- memory = false; | |
- } | |
- } | |
- } | |
- | |
- // Forget the data if we're done with it | |
- if ( !options.memory ) { | |
- memory = false; | |
- } | |
- | |
- firing = false; | |
- | |
- // Clean up if we're done firing for good | |
- if ( locked ) { | |
- | |
- // Keep an empty list if we have data for futu… | |
- if ( memory ) { | |
- list = []; | |
- | |
- // Otherwise, this object is spent | |
- } else { | |
- list = ""; | |
- } | |
- } | |
- }, | |
- | |
- // Actual Callbacks object | |
- self = { | |
- | |
- // Add a callback or a collection of callbacks to the … | |
- add: function() { | |
- if ( list ) { | |
- | |
- // If we have memory from a past run, … | |
- if ( memory && !firing ) { | |
- firingIndex = list.length - 1; | |
- queue.push( memory ); | |
- } | |
- | |
- ( function add( args ) { | |
- jQuery.each( args, function( _… | |
- if ( jQuery.isFunction… | |
- if ( !options.… | |
- list.p… | |
- } | |
- } else if ( arg && arg… | |
- | |
- // Inspect rec… | |
- add( arg ); | |
- } | |
- } ); | |
- } )( arguments ); | |
- | |
- if ( memory && !firing ) { | |
- fire(); | |
- } | |
- } | |
- return this; | |
- }, | |
- | |
- // Remove a callback from the list | |
- remove: function() { | |
- jQuery.each( arguments, function( _, arg ) { | |
- var index; | |
- while ( ( index = jQuery.inArray( arg,… | |
- list.splice( index, 1 ); | |
- | |
- // Handle firing indexes | |
- if ( index <= firingIndex ) { | |
- firingIndex--; | |
- } | |
- } | |
- } ); | |
- return this; | |
- }, | |
- | |
- // Check if a given callback is in the list. | |
- // If no argument is given, return whether or not list… | |
- has: function( fn ) { | |
- return fn ? | |
- jQuery.inArray( fn, list ) > -1 : | |
- list.length > 0; | |
- }, | |
- | |
- // Remove all callbacks from the list | |
- empty: function() { | |
- if ( list ) { | |
- list = []; | |
- } | |
- return this; | |
- }, | |
- | |
- // Disable .fire and .add | |
- // Abort any current/pending executions | |
- // Clear all callbacks and values | |
- disable: function() { | |
- locked = queue = []; | |
- list = memory = ""; | |
- return this; | |
- }, | |
- disabled: function() { | |
- return !list; | |
- }, | |
- | |
- // Disable .fire | |
- // Also disable .add unless we have memory (since it w… | |
- // Abort any pending executions | |
- lock: function() { | |
- locked = queue = []; | |
- if ( !memory && !firing ) { | |
- list = memory = ""; | |
- } | |
- return this; | |
- }, | |
- locked: function() { | |
- return !!locked; | |
- }, | |
- | |
- // Call all callbacks with the given context and argum… | |
- fireWith: function( context, args ) { | |
- if ( !locked ) { | |
- args = args || []; | |
- args = [ context, args.slice ? args.sl… | |
- queue.push( args ); | |
- if ( !firing ) { | |
- fire(); | |
- } | |
- } | |
- return this; | |
- }, | |
- | |
- // Call all the callbacks with the given arguments | |
- fire: function() { | |
- self.fireWith( this, arguments ); | |
- return this; | |
- }, | |
- | |
- // To know if the callbacks have already been called a… | |
- fired: function() { | |
- return !!fired; | |
- } | |
- }; | |
- | |
- return self; | |
-}; | |
- | |
- | |
-function Identity( v ) { | |
- return v; | |
-} | |
-function Thrower( ex ) { | |
- throw ex; | |
-} | |
- | |
-function adoptValue( value, resolve, reject ) { | |
- var method; | |
- | |
- try { | |
- | |
- // Check for promise aspect first to privilege synchronous beh… | |
- if ( value && jQuery.isFunction( ( method = value.promise ) ) … | |
- method.call( value ).done( resolve ).fail( reject ); | |
- | |
- // Other thenables | |
- } else if ( value && jQuery.isFunction( ( method = value.then … | |
- method.call( value, resolve, reject ); | |
- | |
- // Other non-thenables | |
- } else { | |
- | |
- // Support: Android 4.0 only | |
- // Strict mode functions invoked without .call/.apply … | |
- resolve.call( undefined, value ); | |
- } | |
- | |
- // For Promises/A+, convert exceptions into rejections | |
- // Since jQuery.when doesn't unwrap thenables, we can skip the extra c… | |
- // Deferred#then to conditionally suppress rejection. | |
- } catch ( value ) { | |
- | |
- // Support: Android 4.0 only | |
- // Strict mode functions invoked without .call/.apply get glob… | |
- reject.call( undefined, value ); | |
- } | |
-} | |
- | |
-jQuery.extend( { | |
- | |
- Deferred: function( func ) { | |
- var tuples = [ | |
- | |
- // action, add listener, callbacks, | |
- // ... .then handlers, argument index, [final … | |
- [ "notify", "progress", jQuery.Callbacks( "mem… | |
- jQuery.Callbacks( "memory" ), 2 ], | |
- [ "resolve", "done", jQuery.Callbacks( "once m… | |
- jQuery.Callbacks( "once memory" ), 0, … | |
- [ "reject", "fail", jQuery.Callbacks( "once me… | |
- jQuery.Callbacks( "once memory" ), 1, … | |
- ], | |
- state = "pending", | |
- promise = { | |
- state: function() { | |
- return state; | |
- }, | |
- always: function() { | |
- deferred.done( arguments ).fail( argum… | |
- return this; | |
- }, | |
- "catch": function( fn ) { | |
- return promise.then( null, fn ); | |
- }, | |
- | |
- // Keep pipe for back-compat | |
- pipe: function( /* fnDone, fnFail, fnProgress … | |
- var fns = arguments; | |
- | |
- return jQuery.Deferred( function( newD… | |
- jQuery.each( tuples, function(… | |
- | |
- // Map tuples (progres… | |
- var fn = jQuery.isFunc… | |
- | |
- // deferred.progress(f… | |
- // deferred.done(funct… | |
- // deferred.fail(funct… | |
- deferred[ tuple[ 1 ] ]… | |
- var returned =… | |
- if ( returned … | |
- return… | |
- … | |
- … | |
- … | |
- } else { | |
- newDef… | |
- … | |
- … | |
- ); | |
- } | |
- } ); | |
- } ); | |
- fns = null; | |
- } ).promise(); | |
- }, | |
- then: function( onFulfilled, onRejected, onPro… | |
- var maxDepth = 0; | |
- function resolve( depth, deferred, han… | |
- return function() { | |
- var that = this, | |
- args = argumen… | |
- mightThrow = f… | |
- var re… | |
- | |
- // Sup… | |
- // htt… | |
- // Ign… | |
- if ( d… | |
- … | |
- } | |
- | |
- return… | |
- | |
- // Sup… | |
- // htt… | |
- if ( r… | |
- … | |
- } | |
- | |
- // Sup… | |
- // htt… | |
- // htt… | |
- // Ret… | |
- then =… | |
- | |
- … | |
- … | |
- … | |
- … | |
- … | |
- … | |
- | |
- // Han… | |
- if ( j… | |
- | |
- … | |
- … | |
- … | |
- … | |
- … | |
- … | |
- … | |
- | |
- … | |
- … | |
- | |
- … | |
- … | |
- | |
- … | |
- … | |
- … | |
- … | |
- … | |
- … | |
- … | |
- … | |
- | |
- // Han… | |
- } else… | |
- | |
- … | |
- … | |
- … | |
- … | |
- … | |
- … | |
- | |
- … | |
- … | |
- … | |
- } | |
- }, | |
- | |
- // Only normal… | |
- process = spec… | |
- mightT… | |
- functi… | |
- … | |
- … | |
- … | |
- | |
- … | |
- … | |
- … | |
- … | |
- | |
- … | |
- … | |
- … | |
- … | |
- | |
- … | |
- … | |
- … | |
- … | |
- … | |
- … | |
- | |
- … | |
- … | |
- … | |
- }; | |
- | |
- // Support: Promises/A… | |
- // https://promisesapl… | |
- // Re-resolve promises… | |
- // subsequent errors | |
- if ( depth ) { | |
- process(); | |
- } else { | |
- | |
- // Call an opt… | |
- // since it's … | |
- if ( jQuery.De… | |
- proces… | |
- } | |
- window.setTime… | |
- } | |
- }; | |
- } | |
- | |
- return jQuery.Deferred( function( newD… | |
- | |
- // progress_handlers.add( ... ) | |
- tuples[ 0 ][ 3 ].add( | |
- resolve( | |
- 0, | |
- newDefer, | |
- jQuery.isFunct… | |
- onProg… | |
- Identi… | |
- newDefer.notif… | |
- ) | |
- ); | |
- | |
- // fulfilled_handlers.add( ...… | |
- tuples[ 1 ][ 3 ].add( | |
- resolve( | |
- 0, | |
- newDefer, | |
- jQuery.isFunct… | |
- onFulf… | |
- Identi… | |
- ) | |
- ); | |
- | |
- // rejected_handlers.add( ... ) | |
- tuples[ 2 ][ 3 ].add( | |
- resolve( | |
- 0, | |
- newDefer, | |
- jQuery.isFunct… | |
- onReje… | |
- Thrower | |
- ) | |
- ); | |
- } ).promise(); | |
- }, | |
- | |
- // Get a promise for this deferred | |
- // If obj is provided, the promise aspect is a… | |
- promise: function( obj ) { | |
- return obj != null ? jQuery.extend( ob… | |
- } | |
- }, | |
- deferred = {}; | |
- | |
- // Add list-specific methods | |
- jQuery.each( tuples, function( i, tuple ) { | |
- var list = tuple[ 2 ], | |
- stateString = tuple[ 5 ]; | |
- | |
- // promise.progress = list.add | |
- // promise.done = list.add | |
- // promise.fail = list.add | |
- promise[ tuple[ 1 ] ] = list.add; | |
- | |
- // Handle state | |
- if ( stateString ) { | |
- list.add( | |
- function() { | |
- | |
- // state = "resolved" (i.e., f… | |
- // state = "rejected" | |
- state = stateString; | |
- }, | |
- | |
- // rejected_callbacks.disable | |
- // fulfilled_callbacks.disable | |
- tuples[ 3 - i ][ 2 ].disable, | |
- | |
- // progress_callbacks.lock | |
- tuples[ 0 ][ 2 ].lock | |
- ); | |
- } | |
- | |
- // progress_handlers.fire | |
- // fulfilled_handlers.fire | |
- // rejected_handlers.fire | |
- list.add( tuple[ 3 ].fire ); | |
- | |
- // deferred.notify = function() { deferred.notifyWith(… | |
- // deferred.resolve = function() { deferred.resolveWit… | |
- // deferred.reject = function() { deferred.rejectWith(… | |
- deferred[ tuple[ 0 ] ] = function() { | |
- deferred[ tuple[ 0 ] + "With" ]( this === defe… | |
- return this; | |
- }; | |
- | |
- // deferred.notifyWith = list.fireWith | |
- // deferred.resolveWith = list.fireWith | |
- // deferred.rejectWith = list.fireWith | |
- deferred[ tuple[ 0 ] + "With" ] = list.fireWith; | |
- } ); | |
- | |
- // Make the deferred a promise | |
- promise.promise( deferred ); | |
- | |
- // Call given func if any | |
- if ( func ) { | |
- func.call( deferred, deferred ); | |
- } | |
- | |
- // All done! | |
- return deferred; | |
- }, | |
- | |
- // Deferred helper | |
- when: function( singleValue ) { | |
- var | |
- | |
- // count of uncompleted subordinates | |
- remaining = arguments.length, | |
- | |
- // count of unprocessed arguments | |
- i = remaining, | |
- | |
- // subordinate fulfillment data | |
- resolveContexts = Array( i ), | |
- resolveValues = slice.call( arguments ), | |
- | |
- // the master Deferred | |
- master = jQuery.Deferred(), | |
- | |
- // subordinate callback factory | |
- updateFunc = function( i ) { | |
- return function( value ) { | |
- resolveContexts[ i ] = this; | |
- resolveValues[ i ] = arguments.length … | |
- if ( !( --remaining ) ) { | |
- master.resolveWith( resolveCon… | |
- } | |
- }; | |
- }; | |
- | |
- // Single- and empty arguments are adopted like Promise.resolve | |
- if ( remaining <= 1 ) { | |
- adoptValue( singleValue, master.done( updateFunc( i ) … | |
- | |
- // Use .then() to unwrap secondary thenables (cf. gh-3… | |
- if ( master.state() === "pending" || | |
- jQuery.isFunction( resolveValues[ i ] && resol… | |
- | |
- return master.then(); | |
- } | |
- } | |
- | |
- // Multiple arguments are aggregated like Promise.all array el… | |
- while ( i-- ) { | |
- adoptValue( resolveValues[ i ], updateFunc( i ), maste… | |
- } | |
- | |
- return master.promise(); | |
- } | |
-} ); | |
- | |
- | |
-// These usually indicate a programmer mistake during development, | |
-// warn about them ASAP rather than swallowing them by default. | |
-var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; | |
- | |
-jQuery.Deferred.exceptionHook = function( error, stack ) { | |
- | |
- // Support: IE 8 - 9 only | |
- // Console exists when dev tools are open, which can happen at any time | |
- if ( window.console && window.console.warn && error && rerrorNames.tes… | |
- window.console.warn( "jQuery.Deferred exception: " + error.mes… | |
- } | |
-}; | |
- | |
- | |
- | |
- | |
-jQuery.readyException = function( error ) { | |
- window.setTimeout( function() { | |
- throw error; | |
- } ); | |
-}; | |
- | |
- | |
- | |
- | |
-// The deferred used on DOM ready | |
-var readyList = jQuery.Deferred(); | |
- | |
-jQuery.fn.ready = function( fn ) { | |
- | |
- readyList | |
- .then( fn ) | |
- | |
- // Wrap jQuery.readyException in a function so that the lookup | |
- // happens at the time of error handling instead of callback | |
- // registration. | |
- .catch( function( error ) { | |
- jQuery.readyException( error ); | |
- } ); | |
- | |
- return this; | |
-}; | |
- | |
-jQuery.extend( { | |
- | |
- // Is the DOM ready to be used? Set to true once it occurs. | |
- isReady: false, | |
- | |
- // A counter to track how many items to wait for before | |
- // the ready event fires. See #6781 | |
- readyWait: 1, | |
- | |
- // Hold (or release) the ready event | |
- holdReady: function( hold ) { | |
- if ( hold ) { | |
- jQuery.readyWait++; | |
- } else { | |
- jQuery.ready( true ); | |
- } | |
- }, | |
- | |
- // Handle when the DOM is ready | |
- ready: function( wait ) { | |
- | |
- // Abort if there are pending holds or we're already ready | |
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { | |
- return; | |
- } | |
- | |
- // Remember that the DOM is ready | |
- jQuery.isReady = true; | |
- | |
- // If a normal DOM Ready event fired, decrement, and wait if n… | |
- if ( wait !== true && --jQuery.readyWait > 0 ) { | |
- return; | |
- } | |
- | |
- // If there are functions bound, to execute | |
- readyList.resolveWith( document, [ jQuery ] ); | |
- } | |
-} ); | |
- | |
-jQuery.ready.then = readyList.then; | |
- | |
-// The ready event handler and self cleanup method | |
-function completed() { | |
- document.removeEventListener( "DOMContentLoaded", completed ); | |
- window.removeEventListener( "load", completed ); | |
- jQuery.ready(); | |
-} | |
- | |
-// Catch cases where $(document).ready() is called | |
-// after the browser event has already occurred. | |
-// Support: IE <=9 - 10 only | |
-// Older IE sometimes signals "interactive" too soon | |
-if ( document.readyState === "complete" || | |
- ( document.readyState !== "loading" && !document.documentElement.doScr… | |
- | |
- // Handle it asynchronously to allow scripts the opportunity to delay … | |
- window.setTimeout( jQuery.ready ); | |
- | |
-} else { | |
- | |
- // Use the handy event callback | |
- document.addEventListener( "DOMContentLoaded", completed ); | |
- | |
- // A fallback to window.onload, that will always work | |
- window.addEventListener( "load", completed ); | |
-} | |
- | |
- | |
- | |
- | |
-// Multifunctional method to get and set values of a collection | |
-// The value/s can optionally be executed if it's a function | |
-var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { | |
- var i = 0, | |
- len = elems.length, | |
- bulk = key == null; | |
- | |
- // Sets many values | |
- if ( jQuery.type( key ) === "object" ) { | |
- chainable = true; | |
- for ( i in key ) { | |
- access( elems, fn, i, key[ i ], true, emptyGet, raw ); | |
- } | |
- | |
- // Sets one value | |
- } else if ( value !== undefined ) { | |
- chainable = true; | |
- | |
- if ( !jQuery.isFunction( value ) ) { | |
- raw = true; | |
- } | |
- | |
- if ( bulk ) { | |
- | |
- // Bulk operations run against the entire set | |
- if ( raw ) { | |
- fn.call( elems, value ); | |
- fn = null; | |
- | |
- // ...except when executing function values | |
- } else { | |
- bulk = fn; | |
- fn = function( elem, key, value ) { | |
- return bulk.call( jQuery( elem ), valu… | |
- }; | |
- } | |
- } | |
- | |
- if ( fn ) { | |
- for ( ; i < len; i++ ) { | |
- fn( | |
- elems[ i ], key, raw ? | |
- value : | |
- value.call( elems[ i ], i, fn( elems[ … | |
- ); | |
- } | |
- } | |
- } | |
- | |
- if ( chainable ) { | |
- return elems; | |
- } | |
- | |
- // Gets | |
- if ( bulk ) { | |
- return fn.call( elems ); | |
- } | |
- | |
- return len ? fn( elems[ 0 ], key ) : emptyGet; | |
-}; | |
-var acceptData = function( owner ) { | |
- | |
- // Accepts only: | |
- // - Node | |
- // - Node.ELEMENT_NODE | |
- // - Node.DOCUMENT_NODE | |
- // - Object | |
- // - Any | |
- return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeT… | |
-}; | |
- | |
- | |
- | |
- | |
-function Data() { | |
- this.expando = jQuery.expando + Data.uid++; | |
-} | |
- | |
-Data.uid = 1; | |
- | |
-Data.prototype = { | |
- | |
- cache: function( owner ) { | |
- | |
- // Check if the owner object already has a cache | |
- var value = owner[ this.expando ]; | |
- | |
- // If not, create one | |
- if ( !value ) { | |
- value = {}; | |
- | |
- // We can accept data for non-element nodes in modern … | |
- // but we should not, see #8335. | |
- // Always return an empty object. | |
- if ( acceptData( owner ) ) { | |
- | |
- // If it is a node unlikely to be stringify-ed… | |
- // use plain assignment | |
- if ( owner.nodeType ) { | |
- owner[ this.expando ] = value; | |
- | |
- // Otherwise secure it in a non-enumerable pro… | |
- // configurable must be true to allow the prop… | |
- // deleted when data is removed | |
- } else { | |
- Object.defineProperty( owner, this.exp… | |
- value: value, | |
- configurable: true | |
- } ); | |
- } | |
- } | |
- } | |
- | |
- return value; | |
- }, | |
- set: function( owner, data, value ) { | |
- var prop, | |
- cache = this.cache( owner ); | |
- | |
- // Handle: [ owner, key, value ] args | |
- // Always use camelCase key (gh-2257) | |
- if ( typeof data === "string" ) { | |
- cache[ jQuery.camelCase( data ) ] = value; | |
- | |
- // Handle: [ owner, { properties } ] args | |
- } else { | |
- | |
- // Copy the properties one-by-one to the cache object | |
- for ( prop in data ) { | |
- cache[ jQuery.camelCase( prop ) ] = data[ prop… | |
- } | |
- } | |
- return cache; | |
- }, | |
- get: function( owner, key ) { | |
- return key === undefined ? | |
- this.cache( owner ) : | |
- | |
- // Always use camelCase key (gh-2257) | |
- owner[ this.expando ] && owner[ this.expando ][ jQuery… | |
- }, | |
- access: function( owner, key, value ) { | |
- | |
- // In cases where either: | |
- // | |
- // 1. No key was specified | |
- // 2. A string key was specified, but no value provided | |
- // | |
- // Take the "read" path and allow the get method to determine | |
- // which value to return, respectively either: | |
- // | |
- // 1. The entire cache object | |
- // 2. The data stored at the key | |
- // | |
- if ( key === undefined || | |
- ( ( key && typeof key === "string" ) && value … | |
- | |
- return this.get( owner, key ); | |
- } | |
- | |
- // When the key is not a string, or both a key and value | |
- // are specified, set or extend (existing objects) with either: | |
- // | |
- // 1. An object of properties | |
- // 2. A key and value | |
- // | |
- this.set( owner, key, value ); | |
- | |
- // Since the "set" path can have two possible entry points | |
- // return the expected data based on which path was taken[*] | |
- return value !== undefined ? value : key; | |
- }, | |
- remove: function( owner, key ) { | |
- var i, | |
- cache = owner[ this.expando ]; | |
- | |
- if ( cache === undefined ) { | |
- return; | |
- } | |
- | |
- if ( key !== undefined ) { | |
- | |
- // Support array or space separated string of keys | |
- if ( jQuery.isArray( key ) ) { | |
- | |
- // If key is an array of keys... | |
- // We always set camelCase keys, so remove tha… | |
- key = key.map( jQuery.camelCase ); | |
- } else { | |
- key = jQuery.camelCase( key ); | |
- | |
- // If a key with the spaces exists, use it. | |
- // Otherwise, create an array by matching non-… | |
- key = key in cache ? | |
- [ key ] : | |
- ( key.match( rnothtmlwhite ) || [] ); | |
- } | |
- | |
- i = key.length; | |
- | |
- while ( i-- ) { | |
- delete cache[ key[ i ] ]; | |
- } | |
- } | |
- | |
- // Remove the expando if there's no more data | |
- if ( key === undefined || jQuery.isEmptyObject( cache ) ) { | |
- | |
- // Support: Chrome <=35 - 45 | |
- // Webkit & Blink performance suffers when deleting pr… | |
- // from DOM nodes, so set to undefined instead | |
- // https://bugs.chromium.org/p/chromium/issues/detail?… | |
- if ( owner.nodeType ) { | |
- owner[ this.expando ] = undefined; | |
- } else { | |
- delete owner[ this.expando ]; | |
- } | |
- } | |
- }, | |
- hasData: function( owner ) { | |
- var cache = owner[ this.expando ]; | |
- return cache !== undefined && !jQuery.isEmptyObject( cache ); | |
- } | |
-}; | |
-var dataPriv = new Data(); | |
- | |
-var dataUser = new Data(); | |
- | |
- | |
- | |
-// Implementation Summary | |
-// | |
-// 1. Enforce API surface and semantic compatibility with 1.9.x branch | |
-// 2. Improve the module's maintainability by reducing the storage | |
-// paths to a single mechanism. | |
-// 3. Use the same single mechanism to support "private" and "user" dat… | |
-// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _re… | |
-// 5. Avoid exposing implementation details on user objects (eg. expand… | |
-// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 | |
- | |
-var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, | |
- rmultiDash = /[A-Z]/g; | |
- | |
-function getData( data ) { | |
- if ( data === "true" ) { | |
- return true; | |
- } | |
- | |
- if ( data === "false" ) { | |
- return false; | |
- } | |
- | |
- if ( data === "null" ) { | |
- return null; | |
- } | |
- | |
- // Only convert to a number if it doesn't change the string | |
- if ( data === +data + "" ) { | |
- return +data; | |
- } | |
- | |
- if ( rbrace.test( data ) ) { | |
- return JSON.parse( data ); | |
- } | |
- | |
- return data; | |
-} | |
- | |
-function dataAttr( elem, key, data ) { | |
- var name; | |
- | |
- // If nothing was found internally, try to fetch any | |
- // data from the HTML5 data-* attribute | |
- if ( data === undefined && elem.nodeType === 1 ) { | |
- name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(… | |
- data = elem.getAttribute( name ); | |
- | |
- if ( typeof data === "string" ) { | |
- try { | |
- data = getData( data ); | |
- } catch ( e ) {} | |
- | |
- // Make sure we set the data so it isn't changed later | |
- dataUser.set( elem, key, data ); | |
- } else { | |
- data = undefined; | |
- } | |
- } | |
- return data; | |
-} | |
- | |
-jQuery.extend( { | |
- hasData: function( elem ) { | |
- return dataUser.hasData( elem ) || dataPriv.hasData( elem ); | |
- }, | |
- | |
- data: function( elem, name, data ) { | |
- return dataUser.access( elem, name, data ); | |
- }, | |
- | |
- removeData: function( elem, name ) { | |
- dataUser.remove( elem, name ); | |
- }, | |
- | |
- // TODO: Now that all calls to _data and _removeData have been replaced | |
- // with direct calls to dataPriv methods, these can be deprecated. | |
- _data: function( elem, name, data ) { | |
- return dataPriv.access( elem, name, data ); | |
- }, | |
- | |
- _removeData: function( elem, name ) { | |
- dataPriv.remove( elem, name ); | |
- } | |
-} ); | |
- | |
-jQuery.fn.extend( { | |
- data: function( key, value ) { | |
- var i, name, data, | |
- elem = this[ 0 ], | |
- attrs = elem && elem.attributes; | |
- | |
- // Gets all values | |
- if ( key === undefined ) { | |
- if ( this.length ) { | |
- data = dataUser.get( elem ); | |
- | |
- if ( elem.nodeType === 1 && !dataPriv.get( ele… | |
- i = attrs.length; | |
- while ( i-- ) { | |
- | |
- // Support: IE 11 only | |
- // The attrs elements can be n… | |
- if ( attrs[ i ] ) { | |
- name = attrs[ i ].name; | |
- if ( name.indexOf( "da… | |
- name = jQuery.… | |
- dataAttr( elem… | |
- } | |
- } | |
- } | |
- dataPriv.set( elem, "hasDataAttrs", tr… | |
- } | |
- } | |
- | |
- return data; | |
- } | |
- | |
- // Sets multiple values | |
- if ( typeof key === "object" ) { | |
- return this.each( function() { | |
- dataUser.set( this, key ); | |
- } ); | |
- } | |
- | |
- return access( this, function( value ) { | |
- var data; | |
- | |
- // The calling jQuery object (element matches) is not … | |
- // (and therefore has an element appears at this[ 0 ])… | |
- // `value` parameter was not undefined. An empty jQuer… | |
- // will result in `undefined` for elem = this[ 0 ] whi… | |
- // throw an exception if an attempt to read a data cac… | |
- if ( elem && value === undefined ) { | |
- | |
- // Attempt to get data from the cache | |
- // The key will always be camelCased in Data | |
- data = dataUser.get( elem, key ); | |
- if ( data !== undefined ) { | |
- return data; | |
- } | |
- | |
- // Attempt to "discover" the data in | |
- // HTML5 custom data-* attrs | |
- data = dataAttr( elem, key ); | |
- if ( data !== undefined ) { | |
- return data; | |
- } | |
- | |
- // We tried really hard, but the data doesn't … | |
- return; | |
- } | |
- | |
- // Set the data... | |
- this.each( function() { | |
- | |
- // We always store the camelCased key | |
- dataUser.set( this, key, value ); | |
- } ); | |
- }, null, value, arguments.length > 1, null, true ); | |
- }, | |
- | |
- removeData: function( key ) { | |
- return this.each( function() { | |
- dataUser.remove( this, key ); | |
- } ); | |
- } | |
-} ); | |
- | |
- | |
-jQuery.extend( { | |
- queue: function( elem, type, data ) { | |
- var queue; | |
- | |
- if ( elem ) { | |
- type = ( type || "fx" ) + "queue"; | |
- queue = dataPriv.get( elem, type ); | |
- | |
- // Speed up dequeue by getting out quickly if this is … | |
- if ( data ) { | |
- if ( !queue || jQuery.isArray( data ) ) { | |
- queue = dataPriv.access( elem, type, j… | |
- } else { | |
- queue.push( data ); | |
- } | |
- } | |
- return queue || []; | |
- } | |
- }, | |
- | |
- dequeue: function( elem, type ) { | |
- type = type || "fx"; | |
- | |
- var queue = jQuery.queue( elem, type ), | |
- startLength = queue.length, | |
- fn = queue.shift(), | |
- hooks = jQuery._queueHooks( elem, type ), | |
- next = function() { | |
- jQuery.dequeue( elem, type ); | |
- }; | |
- | |
- // If the fx queue is dequeued, always remove the progress sen… | |
- if ( fn === "inprogress" ) { | |
- fn = queue.shift(); | |
- startLength--; | |
- } | |
- | |
- if ( fn ) { | |
- | |
- // Add a progress sentinel to prevent the fx queue fro… | |
- // automatically dequeued | |
- if ( type === "fx" ) { | |
- queue.unshift( "inprogress" ); | |
- } | |
- | |
- // Clear up the last queue stop function | |
- delete hooks.stop; | |
- fn.call( elem, next, hooks ); | |
- } | |
- | |
- if ( !startLength && hooks ) { | |
- hooks.empty.fire(); | |
- } | |
- }, | |
- | |
- // Not public - generate a queueHooks object, or return the current one | |
- _queueHooks: function( elem, type ) { | |
- var key = type + "queueHooks"; | |
- return dataPriv.get( elem, key ) || dataPriv.access( elem, key… | |
- empty: jQuery.Callbacks( "once memory" ).add( function… | |
- dataPriv.remove( elem, [ type + "queue", key ]… | |
- } ) | |
- } ); | |
- } | |
-} ); | |
- | |
-jQuery.fn.extend( { | |
- queue: function( type, data ) { | |
- var setter = 2; | |
- | |
- if ( typeof type !== "string" ) { | |
- data = type; | |
- type = "fx"; | |
- setter--; | |
- } | |
- | |
- if ( arguments.length < setter ) { | |
- return jQuery.queue( this[ 0 ], type ); | |
- } | |
- | |
- return data === undefined ? | |
- this : | |
- this.each( function() { | |
- var queue = jQuery.queue( this, type, data ); | |
- | |
- // Ensure a hooks for this queue | |
- jQuery._queueHooks( this, type ); | |
- | |
- if ( type === "fx" && queue[ 0 ] !== "inprogre… | |
- jQuery.dequeue( this, type ); | |
- } | |
- } ); | |
- }, | |
- dequeue: function( type ) { | |
- return this.each( function() { | |
- jQuery.dequeue( this, type ); | |
- } ); | |
- }, | |
- clearQueue: function( type ) { | |
- return this.queue( type || "fx", [] ); | |
- }, | |
- | |
- // Get a promise resolved when queues of a certain type | |
- // are emptied (fx is the type by default) | |
- promise: function( type, obj ) { | |
- var tmp, | |
- count = 1, | |
- defer = jQuery.Deferred(), | |
- elements = this, | |
- i = this.length, | |
- resolve = function() { | |
- if ( !( --count ) ) { | |
- defer.resolveWith( elements, [ element… | |
- } | |
- }; | |
- | |
- if ( typeof type !== "string" ) { | |
- obj = type; | |
- type = undefined; | |
- } | |
- type = type || "fx"; | |
- | |
- while ( i-- ) { | |
- tmp = dataPriv.get( elements[ i ], type + "queueHooks"… | |
- if ( tmp && tmp.empty ) { | |
- count++; | |
- tmp.empty.add( resolve ); | |
- } | |
- } | |
- resolve(); | |
- return defer.promise( obj ); | |
- } | |
-} ); | |
-var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; | |
- | |
-var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); | |
- | |
- | |
-var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; | |
- | |
-var isHiddenWithinTree = function( elem, el ) { | |
- | |
- // isHiddenWithinTree might be called from jQuery#filter funct… | |
- // in that case, element will be second argument | |
- elem = el || elem; | |
- | |
- // Inline style trumps all | |
- return elem.style.display === "none" || | |
- elem.style.display === "" && | |
- | |
- // Otherwise, check computed style | |
- // Support: Firefox <=43 - 45 | |
- // Disconnected elements can have computed display: no… | |
- // in the document. | |
- jQuery.contains( elem.ownerDocument, elem ) && | |
- | |
- jQuery.css( elem, "display" ) === "none"; | |
- }; | |
- | |
-var swap = function( elem, options, callback, args ) { | |
- var ret, name, | |
- old = {}; | |
- | |
- // Remember the old values, and insert the new ones | |
- for ( name in options ) { | |
- old[ name ] = elem.style[ name ]; | |
- elem.style[ name ] = options[ name ]; | |
- } | |
- | |
- ret = callback.apply( elem, args || [] ); | |
- | |
- // Revert the old values | |
- for ( name in options ) { | |
- elem.style[ name ] = old[ name ]; | |
- } | |
- | |
- return ret; | |
-}; | |
- | |
- | |
- | |
- | |
-function adjustCSS( elem, prop, valueParts, tween ) { | |
- var adjusted, | |
- scale = 1, | |
- maxIterations = 20, | |
- currentValue = tween ? | |
- function() { | |
- return tween.cur(); | |
- } : | |
- function() { | |
- return jQuery.css( elem, prop, "" ); | |
- }, | |
- initial = currentValue(), | |
- unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ pr… | |
- | |
- // Starting value computation is required for potential unit m… | |
- initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" &&… | |
- rcssNum.exec( jQuery.css( elem, prop ) ); | |
- | |
- if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { | |
- | |
- // Trust units reported by jQuery.css | |
- unit = unit || initialInUnit[ 3 ]; | |
- | |
- // Make sure we update the tween properties later on | |
- valueParts = valueParts || []; | |
- | |
- // Iteratively approximate from a nonzero starting point | |
- initialInUnit = +initial || 1; | |
- | |
- do { | |
- | |
- // If previous iteration zeroed out, double until we g… | |
- // Use string for doubling so we don't accidentally se… | |
- scale = scale || ".5"; | |
- | |
- // Adjust and apply | |
- initialInUnit = initialInUnit / scale; | |
- jQuery.style( elem, prop, initialInUnit + unit ); | |
- | |
- // Update scale, tolerating zero or NaN from tween.cur() | |
- // Break the loop if scale is unchanged or perfect, or if we'v… | |
- } while ( | |
- scale !== ( scale = currentValue() / initial ) && scal… | |
- ); | |
- } | |
- | |
- if ( valueParts ) { | |
- initialInUnit = +initialInUnit || +initial || 0; | |
- | |
- // Apply relative offset (+=/-=) if specified | |
- adjusted = valueParts[ 1 ] ? | |
- initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ … | |
- +valueParts[ 2 ]; | |
- if ( tween ) { | |
- tween.unit = unit; | |
- tween.start = initialInUnit; | |
- tween.end = adjusted; | |
- } | |
- } | |
- return adjusted; | |
-} | |
- | |
- | |
-var defaultDisplayMap = {}; | |
- | |
-function getDefaultDisplay( elem ) { | |
- var temp, | |
- doc = elem.ownerDocument, | |
- nodeName = elem.nodeName, | |
- display = defaultDisplayMap[ nodeName ]; | |
- | |
- if ( display ) { | |
- return display; | |
- } | |
- | |
- temp = doc.body.appendChild( doc.createElement( nodeName ) ); | |
- display = jQuery.css( temp, "display" ); | |
- | |
- temp.parentNode.removeChild( temp ); | |
- | |
- if ( display === "none" ) { | |
- display = "block"; | |
- } | |
- defaultDisplayMap[ nodeName ] = display; | |
- | |
- return display; | |
-} | |
- | |
-function showHide( elements, show ) { | |
- var display, elem, | |
- values = [], | |
- index = 0, | |
- length = elements.length; | |
- | |
- // Determine new display value for elements that need to change | |
- for ( ; index < length; index++ ) { | |
- elem = elements[ index ]; | |
- if ( !elem.style ) { | |
- continue; | |
- } | |
- | |
- display = elem.style.display; | |
- if ( show ) { | |
- | |
- // Since we force visibility upon cascade-hidden eleme… | |
- // check is required in this first loop unless we have… | |
- // inline or about-to-be-restored) | |
- if ( display === "none" ) { | |
- values[ index ] = dataPriv.get( elem, "display… | |
- if ( !values[ index ] ) { | |
- elem.style.display = ""; | |
- } | |
- } | |
- if ( elem.style.display === "" && isHiddenWithinTree( … | |
- values[ index ] = getDefaultDisplay( elem ); | |
- } | |
- } else { | |
- if ( display !== "none" ) { | |
- values[ index ] = "none"; | |
- | |
- // Remember what we're overwriting | |
- dataPriv.set( elem, "display", display ); | |
- } | |
- } | |
- } | |
- | |
- // Set the display of the elements in a second loop to avoid constant … | |
- for ( index = 0; index < length; index++ ) { | |
- if ( values[ index ] != null ) { | |
- elements[ index ].style.display = values[ index ]; | |
- } | |
- } | |
- | |
- return elements; | |
-} | |
- | |
-jQuery.fn.extend( { | |
- show: function() { | |
- return showHide( this, true ); | |
- }, | |
- hide: function() { | |
- return showHide( this ); | |
- }, | |
- toggle: function( state ) { | |
- if ( typeof state === "boolean" ) { | |
- return state ? this.show() : this.hide(); | |
- } | |
- | |
- return this.each( function() { | |
- if ( isHiddenWithinTree( this ) ) { | |
- jQuery( this ).show(); | |
- } else { | |
- jQuery( this ).hide(); | |
- } | |
- } ); | |
- } | |
-} ); | |
-var rcheckableType = ( /^(?:checkbox|radio)$/i ); | |
- | |
-var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); | |
- | |
-var rscriptType = ( /^$|\/(?:java|ecma)script/i ); | |
- | |
- | |
- | |
-// We have to close these tags to support XHTML (#13200) | |
-var wrapMap = { | |
- | |
- // Support: IE <=9 only | |
- option: [ 1, "<select multiple='multiple'>", "</select>" ], | |
- | |
- // XHTML parsers do not magically insert elements in the | |
- // same way that tag soup parsers do. So we cannot shorten | |
- // this by omitting <tbody> or other required elements. | |
- thead: [ 1, "<table>", "</table>" ], | |
- col: [ 2, "<table><colgroup>", "</colgroup></table>" ], | |
- tr: [ 2, "<table><tbody>", "</tbody></table>" ], | |
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], | |
- | |
- _default: [ 0, "", "" ] | |
-}; | |
- | |
-// Support: IE <=9 only | |
-wrapMap.optgroup = wrapMap.option; | |
- | |
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.t… | |
-wrapMap.th = wrapMap.td; | |
- | |
- | |
-function getAll( context, tag ) { | |
- | |
- // Support: IE <=9 - 11 only | |
- // Use typeof to avoid zero-argument method invocation on host objects… | |
- var ret; | |
- | |
- if ( typeof context.getElementsByTagName !== "undefined" ) { | |
- ret = context.getElementsByTagName( tag || "*" ); | |
- | |
- } else if ( typeof context.querySelectorAll !== "undefined" ) { | |
- ret = context.querySelectorAll( tag || "*" ); | |
- | |
- } else { | |
- ret = []; | |
- } | |
- | |
- if ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) { | |
- return jQuery.merge( [ context ], ret ); | |
- } | |
- | |
- return ret; | |
-} | |
- | |
- | |
-// Mark scripts as having already been evaluated | |
-function setGlobalEval( elems, refElements ) { | |
- var i = 0, | |
- l = elems.length; | |
- | |
- for ( ; i < l; i++ ) { | |
- dataPriv.set( | |
- elems[ i ], | |
- "globalEval", | |
- !refElements || dataPriv.get( refElements[ i ], "globa… | |
- ); | |
- } | |
-} | |
- | |
- | |
-var rhtml = /<|&#?\w+;/; | |
- | |
-function buildFragment( elems, context, scripts, selection, ignored ) { | |
- var elem, tmp, tag, wrap, contains, j, | |
- fragment = context.createDocumentFragment(), | |
- nodes = [], | |
- i = 0, | |
- l = elems.length; | |
- | |
- for ( ; i < l; i++ ) { | |
- elem = elems[ i ]; | |
- | |
- if ( elem || elem === 0 ) { | |
- | |
- // Add nodes directly | |
- if ( jQuery.type( elem ) === "object" ) { | |
- | |
- // Support: Android <=4.0 only, PhantomJS 1 on… | |
- // push.apply(_, arraylike) throws on ancient … | |
- jQuery.merge( nodes, elem.nodeType ? [ elem ] … | |
- | |
- // Convert non-html into a text node | |
- } else if ( !rhtml.test( elem ) ) { | |
- nodes.push( context.createTextNode( elem ) ); | |
- | |
- // Convert html into DOM nodes | |
- } else { | |
- tmp = tmp || fragment.appendChild( context.cre… | |
- | |
- // Deserialize a standard representation | |
- tag = ( rtagName.exec( elem ) || [ "", "" ] )[… | |
- wrap = wrapMap[ tag ] || wrapMap._default; | |
- tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilt… | |
- | |
- // Descend through wrappers to the right conte… | |
- j = wrap[ 0 ]; | |
- while ( j-- ) { | |
- tmp = tmp.lastChild; | |
- } | |
- | |
- // Support: Android <=4.0 only, PhantomJS 1 on… | |
- // push.apply(_, arraylike) throws on ancient … | |
- jQuery.merge( nodes, tmp.childNodes ); | |
- | |
- // Remember the top-level container | |
- tmp = fragment.firstChild; | |
- | |
- // Ensure the created nodes are orphaned (#123… | |
- tmp.textContent = ""; | |
- } | |
- } | |
- } | |
- | |
- // Remove wrapper from fragment | |
- fragment.textContent = ""; | |
- | |
- i = 0; | |
- while ( ( elem = nodes[ i++ ] ) ) { | |
- | |
- // Skip elements already in the context collection (trac-4087) | |
- if ( selection && jQuery.inArray( elem, selection ) > -1 ) { | |
- if ( ignored ) { | |
- ignored.push( elem ); | |
- } | |
- continue; | |
- } | |
- | |
- contains = jQuery.contains( elem.ownerDocument, elem ); | |
- | |
- // Append to fragment | |
- tmp = getAll( fragment.appendChild( elem ), "script" ); | |
- | |
- // Preserve script evaluation history | |
- if ( contains ) { | |
- setGlobalEval( tmp ); | |
- } | |
- | |
- // Capture executables | |
- if ( scripts ) { | |
- j = 0; | |
- while ( ( elem = tmp[ j++ ] ) ) { | |
- if ( rscriptType.test( elem.type || "" ) ) { | |
- scripts.push( elem ); | |
- } | |
- } | |
- } | |
- } | |
- | |
- return fragment; | |
-} | |
- | |
- | |
-( function() { | |
- var fragment = document.createDocumentFragment(), | |
- div = fragment.appendChild( document.createElement( "div" ) ), | |
- input = document.createElement( "input" ); | |
- | |
- // Support: Android 4.0 - 4.3 only | |
- // Check state lost if the name is set (#11217) | |
- // Support: Windows Web Apps (WWA) | |
- // `name` and `type` must use .setAttribute for WWA (#14901) | |
- input.setAttribute( "type", "radio" ); | |
- input.setAttribute( "checked", "checked" ); | |
- input.setAttribute( "name", "t" ); | |
- | |
- div.appendChild( input ); | |
- | |
- // Support: Android <=4.1 only | |
- // Older WebKit doesn't clone checked state correctly in fragments | |
- support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild… | |
- | |
- // Support: IE <=11 only | |
- // Make sure textarea (and checkbox) defaultValue is properly cloned | |
- div.innerHTML = "<textarea>x</textarea>"; | |
- support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValu… | |
-} )(); | |
-var documentElement = document.documentElement; | |
- | |
- | |
- | |
-var | |
- rkeyEvent = /^key/, | |
- rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, | |
- rtypenamespace = /^([^.]*)(?:\.(.+)|)/; | |
- | |
-function returnTrue() { | |
- return true; | |
-} | |
- | |
-function returnFalse() { | |
- return false; | |
-} | |
- | |
-// Support: IE <=9 only | |
-// See #13393 for more info | |
-function safeActiveElement() { | |
- try { | |
- return document.activeElement; | |
- } catch ( err ) { } | |
-} | |
- | |
-function on( elem, types, selector, data, fn, one ) { | |
- var origFn, type; | |
- | |
- // Types can be a map of types/handlers | |
- if ( typeof types === "object" ) { | |
- | |
- // ( types-Object, selector, data ) | |
- if ( typeof selector !== "string" ) { | |
- | |
- // ( types-Object, data ) | |
- data = data || selector; | |
- selector = undefined; | |
- } | |
- for ( type in types ) { | |
- on( elem, type, selector, data, types[ type ], one ); | |
- } | |
- return elem; | |
- } | |
- | |
- if ( data == null && fn == null ) { | |
- | |
- // ( types, fn ) | |
- fn = selector; | |
- data = selector = undefined; | |
- } else if ( fn == null ) { | |
- if ( typeof selector === "string" ) { | |
- | |
- // ( types, selector, fn ) | |
- fn = data; | |
- data = undefined; | |
- } else { | |
- | |
- // ( types, data, fn ) | |
- fn = data; | |
- data = selector; | |
- selector = undefined; | |
- } | |
- } | |
- if ( fn === false ) { | |
- fn = returnFalse; | |
- } else if ( !fn ) { | |
- return elem; | |
- } | |
- | |
- if ( one === 1 ) { | |
- origFn = fn; | |
- fn = function( event ) { | |
- | |
- // Can use an empty set, since event contains the info | |
- jQuery().off( event ); | |
- return origFn.apply( this, arguments ); | |
- }; | |
- | |
- // Use same guid so caller can remove using origFn | |
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); | |
- } | |
- return elem.each( function() { | |
- jQuery.event.add( this, types, fn, data, selector ); | |
- } ); | |
-} | |
- | |
-/* | |
- * Helper functions for managing events -- not part of the public interface. | |
- * Props to Dean Edwards' addEvent library for many of the ideas. | |
- */ | |
-jQuery.event = { | |
- | |
- global: {}, | |
- | |
- add: function( elem, types, handler, data, selector ) { | |
- | |
- var handleObjIn, eventHandle, tmp, | |
- events, t, handleObj, | |
- special, handlers, type, namespaces, origType, | |
- elemData = dataPriv.get( elem ); | |
- | |
- // Don't attach events to noData or text/comment nodes (but al… | |
- if ( !elemData ) { | |
- return; | |
- } | |
- | |
- // Caller can pass in an object of custom data in lieu of the … | |
- if ( handler.handler ) { | |
- handleObjIn = handler; | |
- handler = handleObjIn.handler; | |
- selector = handleObjIn.selector; | |
- } | |
- | |
- // Ensure that invalid selectors throw exceptions at attach ti… | |
- // Evaluate against documentElement in case elem is a non-elem… | |
- if ( selector ) { | |
- jQuery.find.matchesSelector( documentElement, selector… | |
- } | |
- | |
- // Make sure that the handler has a unique ID, used to find/re… | |
- if ( !handler.guid ) { | |
- handler.guid = jQuery.guid++; | |
- } | |
- | |
- // Init the element's event structure and main handler, if thi… | |
- if ( !( events = elemData.events ) ) { | |
- events = elemData.events = {}; | |
- } | |
- if ( !( eventHandle = elemData.handle ) ) { | |
- eventHandle = elemData.handle = function( e ) { | |
- | |
- // Discard the second event of a jQuery.event.… | |
- // when an event is called after a page has un… | |
- return typeof jQuery !== "undefined" && jQuery… | |
- jQuery.event.dispatch.apply( elem, arg… | |
- }; | |
- } | |
- | |
- // Handle multiple events separated by a space | |
- types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; | |
- t = types.length; | |
- while ( t-- ) { | |
- tmp = rtypenamespace.exec( types[ t ] ) || []; | |
- type = origType = tmp[ 1 ]; | |
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); | |
- | |
- // There *must* be a type, no attaching namespace-only… | |
- if ( !type ) { | |
- continue; | |
- } | |
- | |
- // If event changes its type, use the special event ha… | |
- special = jQuery.event.special[ type ] || {}; | |
- | |
- // If selector defined, determine special event api ty… | |
- type = ( selector ? special.delegateType : special.bin… | |
- | |
- // Update special based on newly reset type | |
- special = jQuery.event.special[ type ] || {}; | |
- | |
- // handleObj is passed to all event handlers | |
- handleObj = jQuery.extend( { | |
- type: type, | |
- origType: origType, | |
- data: data, | |
- handler: handler, | |
- guid: handler.guid, | |
- selector: selector, | |
- needsContext: selector && jQuery.expr.match.ne… | |
- namespace: namespaces.join( "." ) | |
- }, handleObjIn ); | |
- | |
- // Init the event handler queue if we're the first | |
- if ( !( handlers = events[ type ] ) ) { | |
- handlers = events[ type ] = []; | |
- handlers.delegateCount = 0; | |
- | |
- // Only use addEventListener if the special ev… | |
- if ( !special.setup || | |
- special.setup.call( elem, data, namesp… | |
- | |
- if ( elem.addEventListener ) { | |
- elem.addEventListener( type, e… | |
- } | |
- } | |
- } | |
- | |
- if ( special.add ) { | |
- special.add.call( elem, handleObj ); | |
- | |
- if ( !handleObj.handler.guid ) { | |
- handleObj.handler.guid = handler.guid; | |
- } | |
- } | |
- | |
- // Add to the element's handler list, delegates in fro… | |
- if ( selector ) { | |
- handlers.splice( handlers.delegateCount++, 0, … | |
- } else { | |
- handlers.push( handleObj ); | |
- } | |
- | |
- // Keep track of which events have ever been used, for… | |
- jQuery.event.global[ type ] = true; | |
- } | |
- | |
- }, | |
- | |
- // Detach an event or set of events from an element | |
- remove: function( elem, types, handler, selector, mappedTypes ) { | |
- | |
- var j, origCount, tmp, | |
- events, t, handleObj, | |
- special, handlers, type, namespaces, origType, | |
- elemData = dataPriv.hasData( elem ) && dataPriv.get( e… | |
- | |
- if ( !elemData || !( events = elemData.events ) ) { | |
- return; | |
- } | |
- | |
- // Once for each type.namespace in types; type may be omitted | |
- types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; | |
- t = types.length; | |
- while ( t-- ) { | |
- tmp = rtypenamespace.exec( types[ t ] ) || []; | |
- type = origType = tmp[ 1 ]; | |
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); | |
- | |
- // Unbind all events (on this namespace, if provided) … | |
- if ( !type ) { | |
- for ( type in events ) { | |
- jQuery.event.remove( elem, type + type… | |
- } | |
- continue; | |
- } | |
- | |
- special = jQuery.event.special[ type ] || {}; | |
- type = ( selector ? special.delegateType : special.bin… | |
- handlers = events[ type ] || []; | |
- tmp = tmp[ 2 ] && | |
- new RegExp( "(^|\\.)" + namespaces.join( "\\.(… | |
- | |
- // Remove matching events | |
- origCount = j = handlers.length; | |
- while ( j-- ) { | |
- handleObj = handlers[ j ]; | |
- | |
- if ( ( mappedTypes || origType === handleObj.o… | |
- ( !handler || handler.guid === handleO… | |
- ( !tmp || tmp.test( handleObj.namespac… | |
- ( !selector || selector === handleObj.… | |
- selector === "**" && handleObj… | |
- handlers.splice( j, 1 ); | |
- | |
- if ( handleObj.selector ) { | |
- handlers.delegateCount--; | |
- } | |
- if ( special.remove ) { | |
- special.remove.call( elem, han… | |
- } | |
- } | |
- } | |
- | |
- // Remove generic event handler if we removed somethin… | |
- // (avoids potential for endless recursion during remo… | |
- if ( origCount && !handlers.length ) { | |
- if ( !special.teardown || | |
- special.teardown.call( elem, namespace… | |
- | |
- jQuery.removeEvent( elem, type, elemDa… | |
- } | |
- | |
- delete events[ type ]; | |
- } | |
- } | |
- | |
- // Remove data and the expando if it's no longer used | |
- if ( jQuery.isEmptyObject( events ) ) { | |
- dataPriv.remove( elem, "handle events" ); | |
- } | |
- }, | |
- | |
- dispatch: function( nativeEvent ) { | |
- | |
- // Make a writable jQuery.Event from the native event object | |
- var event = jQuery.event.fix( nativeEvent ); | |
- | |
- var i, j, ret, matched, handleObj, handlerQueue, | |
- args = new Array( arguments.length ), | |
- handlers = ( dataPriv.get( this, "events" ) || {} )[ e… | |
- special = jQuery.event.special[ event.type ] || {}; | |
- | |
- // Use the fix-ed jQuery.Event rather than the (read-only) nat… | |
- args[ 0 ] = event; | |
- | |
- for ( i = 1; i < arguments.length; i++ ) { | |
- args[ i ] = arguments[ i ]; | |
- } | |
- | |
- event.delegateTarget = this; | |
- | |
- // Call the preDispatch hook for the mapped type, and let it b… | |
- if ( special.preDispatch && special.preDispatch.call( this, ev… | |
- return; | |
- } | |
- | |
- // Determine handlers | |
- handlerQueue = jQuery.event.handlers.call( this, event, handle… | |
- | |
- // Run delegates first; they may want to stop propagation bene… | |
- i = 0; | |
- while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagat… | |
- event.currentTarget = matched.elem; | |
- | |
- j = 0; | |
- while ( ( handleObj = matched.handlers[ j++ ] ) && | |
- !event.isImmediatePropagationStopped() ) { | |
- | |
- // Triggered event must either 1) have no name… | |
- // a subset or equal to those in the bound eve… | |
- if ( !event.rnamespace || event.rnamespace.tes… | |
- | |
- event.handleObj = handleObj; | |
- event.data = handleObj.data; | |
- | |
- ret = ( ( jQuery.event.special[ handle… | |
- handleObj.handler ).apply( mat… | |
- | |
- if ( ret !== undefined ) { | |
- if ( ( event.result = ret ) ==… | |
- event.preventDefault(); | |
- event.stopPropagation(… | |
- } | |
- } | |
- } | |
- } | |
- } | |
- | |
- // Call the postDispatch hook for the mapped type | |
- if ( special.postDispatch ) { | |
- special.postDispatch.call( this, event ); | |
- } | |
- | |
- return event.result; | |
- }, | |
- | |
- handlers: function( event, handlers ) { | |
- var i, handleObj, sel, matchedHandlers, matchedSelectors, | |
- handlerQueue = [], | |
- delegateCount = handlers.delegateCount, | |
- cur = event.target; | |
- | |
- // Find delegate handlers | |
- if ( delegateCount && | |
- | |
- // Support: IE <=9 | |
- // Black-hole SVG <use> instance trees (trac-13180) | |
- cur.nodeType && | |
- | |
- // Support: Firefox <=42 | |
- // Suppress spec-violating clicks indicating a non-pri… | |
- // https://www.w3.org/TR/DOM-Level-3-Events/#event-typ… | |
- // Support: IE 11 only | |
- // ...but not arrow key "clicks" of radio inputs, whic… | |
- !( event.type === "click" && event.button >= 1 ) ) { | |
- | |
- for ( ; cur !== this; cur = cur.parentNode || this ) { | |
- | |
- // Don't check non-elements (#13208) | |
- // Don't process clicks on disabled elements (… | |
- if ( cur.nodeType === 1 && !( event.type === "… | |
- matchedHandlers = []; | |
- matchedSelectors = {}; | |
- for ( i = 0; i < delegateCount; i++ ) { | |
- handleObj = handlers[ i ]; | |
- | |
- // Don't conflict with Object.… | |
- sel = handleObj.selector + " "; | |
- | |
- if ( matchedSelectors[ sel ] =… | |
- matchedSelectors[ sel … | |
- jQuery( sel, t… | |
- jQuery.find( s… | |
- } | |
- if ( matchedSelectors[ sel ] )… | |
- matchedHandlers.push( … | |
- } | |
- } | |
- if ( matchedHandlers.length ) { | |
- handlerQueue.push( { elem: cur… | |
- } | |
- } | |
- } | |
- } | |
- | |
- // Add the remaining (directly-bound) handlers | |
- cur = this; | |
- if ( delegateCount < handlers.length ) { | |
- handlerQueue.push( { elem: cur, handlers: handlers.sli… | |
- } | |
- | |
- return handlerQueue; | |
- }, | |
- | |
- addProp: function( name, hook ) { | |
- Object.defineProperty( jQuery.Event.prototype, name, { | |
- enumerable: true, | |
- configurable: true, | |
- | |
- get: jQuery.isFunction( hook ) ? | |
- function() { | |
- if ( this.originalEvent ) { | |
- return hook( this.orig… | |
- } | |
- } : | |
- function() { | |
- if ( this.originalEvent ) { | |
- return this.originalEv… | |
- } | |
- }, | |
- | |
- set: function( value ) { | |
- Object.defineProperty( this, name, { | |
- enumerable: true, | |
- configurable: true, | |
- writable: true, | |
- value: value | |
- } ); | |
- } | |
- } ); | |
- }, | |
- | |
- fix: function( originalEvent ) { | |
- return originalEvent[ jQuery.expando ] ? | |
- originalEvent : | |
- new jQuery.Event( originalEvent ); | |
- }, | |
- | |
- special: { | |
- load: { | |
- | |
- // Prevent triggered image.load events from bubbling t… | |
- noBubble: true | |
- }, | |
- focus: { | |
- | |
- // Fire native event if possible so blur/focus sequenc… | |
- trigger: function() { | |
- if ( this !== safeActiveElement() && this.focu… | |
- this.focus(); | |
- return false; | |
- } | |
- }, | |
- delegateType: "focusin" | |
- }, | |
- blur: { | |
- trigger: function() { | |
- if ( this === safeActiveElement() && this.blur… | |
- this.blur(); | |
- return false; | |
- } | |
- }, | |
- delegateType: "focusout" | |
- }, | |
- click: { | |
- | |
- // For checkbox, fire native event so checked state wi… | |
- trigger: function() { | |
- if ( this.type === "checkbox" && this.click &&… | |
- this.click(); | |
- return false; | |
- } | |
- }, | |
- | |
- // For cross-browser consistency, don't fire native .c… | |
- _default: function( event ) { | |
- return jQuery.nodeName( event.target, "a" ); | |
- } | |
- }, | |
- | |
- beforeunload: { | |
- postDispatch: function( event ) { | |
- | |
- // Support: Firefox 20+ | |
- // Firefox doesn't alert if the returnValue fi… | |
- if ( event.result !== undefined && event.origi… | |
- event.originalEvent.returnValue = even… | |
- } | |
- } | |
- } | |
- } | |
-}; | |
- | |
-jQuery.removeEvent = function( elem, type, handle ) { | |
- | |
- // This "if" is needed for plain objects | |
- if ( elem.removeEventListener ) { | |
- elem.removeEventListener( type, handle ); | |
- } | |
-}; | |
- | |
-jQuery.Event = function( src, props ) { | |
- | |
- // Allow instantiation without the 'new' keyword | |
- if ( !( this instanceof jQuery.Event ) ) { | |
- return new jQuery.Event( src, props ); | |
- } | |
- | |
- // Event object | |
- if ( src && src.type ) { | |
- this.originalEvent = src; | |
- this.type = src.type; | |
- | |
- // Events bubbling up the document may have been marked as pre… | |
- // by a handler lower down the tree; reflect the correct value. | |
- this.isDefaultPrevented = src.defaultPrevented || | |
- src.defaultPrevented === undefined && | |
- | |
- // Support: Android <=2.3 only | |
- src.returnValue === false ? | |
- returnTrue : | |
- returnFalse; | |
- | |
- // Create target properties | |
- // Support: Safari <=6 - 7 only | |
- // Target should not be a text node (#504, #13143) | |
- this.target = ( src.target && src.target.nodeType === 3 ) ? | |
- src.target.parentNode : | |
- src.target; | |
- | |
- this.currentTarget = src.currentTarget; | |
- this.relatedTarget = src.relatedTarget; | |
- | |
- // Event type | |
- } else { | |
- this.type = src; | |
- } | |
- | |
- // Put explicitly provided properties onto the event object | |
- if ( props ) { | |
- jQuery.extend( this, props ); | |
- } | |
- | |
- // Create a timestamp if incoming event doesn't have one | |
- this.timeStamp = src && src.timeStamp || jQuery.now(); | |
- | |
- // Mark it as fixed | |
- this[ jQuery.expando ] = true; | |
-}; | |
- | |
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Languag… | |
-// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-bindi… | |
-jQuery.Event.prototype = { | |
- constructor: jQuery.Event, | |
- isDefaultPrevented: returnFalse, | |
- isPropagationStopped: returnFalse, | |
- isImmediatePropagationStopped: returnFalse, | |
- isSimulated: false, | |
- | |
- preventDefault: function() { | |
- var e = this.originalEvent; | |
- | |
- this.isDefaultPrevented = returnTrue; | |
- | |
- if ( e && !this.isSimulated ) { | |
- e.preventDefault(); | |
- } | |
- }, | |
- stopPropagation: function() { | |
- var e = this.originalEvent; | |
- | |
- this.isPropagationStopped = returnTrue; | |
- | |
- if ( e && !this.isSimulated ) { | |
- e.stopPropagation(); | |
- } | |
- }, | |
- stopImmediatePropagation: function() { | |
- var e = this.originalEvent; | |
- | |
- this.isImmediatePropagationStopped = returnTrue; | |
- | |
- if ( e && !this.isSimulated ) { | |
- e.stopImmediatePropagation(); | |
- } | |
- | |
- this.stopPropagation(); | |
- } | |
-}; | |
- | |
-// Includes all common event props including KeyEvent and MouseEvent specific … | |
-jQuery.each( { | |
- altKey: true, | |
- bubbles: true, | |
- cancelable: true, | |
- changedTouches: true, | |
- ctrlKey: true, | |
- detail: true, | |
- eventPhase: true, | |
- metaKey: true, | |
- pageX: true, | |
- pageY: true, | |
- shiftKey: true, | |
- view: true, | |
- "char": true, | |
- charCode: true, | |
- key: true, | |
- keyCode: true, | |
- button: true, | |
- buttons: true, | |
- clientX: true, | |
- clientY: true, | |
- offsetX: true, | |
- offsetY: true, | |
- pointerId: true, | |
- pointerType: true, | |
- screenX: true, | |
- screenY: true, | |
- targetTouches: true, | |
- toElement: true, | |
- touches: true, | |
- | |
- which: function( event ) { | |
- var button = event.button; | |
- | |
- // Add which for key events | |
- if ( event.which == null && rkeyEvent.test( event.type ) ) { | |
- return event.charCode != null ? event.charCode : event… | |
- } | |
- | |
- // Add which for click: 1 === left; 2 === middle; 3 === right | |
- if ( !event.which && button !== undefined && rmouseEvent.test(… | |
- if ( button & 1 ) { | |
- return 1; | |
- } | |
- | |
- if ( button & 2 ) { | |
- return 3; | |
- } | |
- | |
- if ( button & 4 ) { | |
- return 2; | |
- } | |
- | |
- return 0; | |
- } | |
- | |
- return event.which; | |
- } | |
-}, jQuery.event.addProp ); | |
- | |
-// Create mouseenter/leave events using mouseover/out and event-time checks | |
-// so that event delegation works in jQuery. | |
-// Do the same for pointerenter/pointerleave and pointerover/pointerout | |
-// | |
-// Support: Safari 7 only | |
-// Safari sends mouseenter too often; see: | |
-// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 | |
-// for the description of the bug (it existed in older Chrome versions as well… | |
-jQuery.each( { | |
- mouseenter: "mouseover", | |
- mouseleave: "mouseout", | |
- pointerenter: "pointerover", | |
- pointerleave: "pointerout" | |
-}, function( orig, fix ) { | |
- jQuery.event.special[ orig ] = { | |
- delegateType: fix, | |
- bindType: fix, | |
- | |
- handle: function( event ) { | |
- var ret, | |
- target = this, | |
- related = event.relatedTarget, | |
- handleObj = event.handleObj; | |
- | |
- // For mouseenter/leave call the handler if related is… | |
- // NB: No relatedTarget if the mouse left/entered the … | |
- if ( !related || ( related !== target && !jQuery.conta… | |
- event.type = handleObj.origType; | |
- ret = handleObj.handler.apply( this, arguments… | |
- event.type = fix; | |
- } | |
- return ret; | |
- } | |
- }; | |
-} ); | |
- | |
-jQuery.fn.extend( { | |
- | |
- on: function( types, selector, data, fn ) { | |
- return on( this, types, selector, data, fn ); | |
- }, | |
- one: function( types, selector, data, fn ) { | |
- return on( this, types, selector, data, fn, 1 ); | |
- }, | |
- off: function( types, selector, fn ) { | |
- var handleObj, type; | |
- if ( types && types.preventDefault && types.handleObj ) { | |
- | |
- // ( event ) dispatched jQuery.Event | |
- handleObj = types.handleObj; | |
- jQuery( types.delegateTarget ).off( | |
- handleObj.namespace ? | |
- handleObj.origType + "." + handleObj.n… | |
- handleObj.origType, | |
- handleObj.selector, | |
- handleObj.handler | |
- ); | |
- return this; | |
- } | |
- if ( typeof types === "object" ) { | |
- | |
- // ( types-object [, selector] ) | |
- for ( type in types ) { | |
- this.off( type, selector, types[ type ] ); | |
- } | |
- return this; | |
- } | |
- if ( selector === false || typeof selector === "function" ) { | |
- | |
- // ( types [, fn] ) | |
- fn = selector; | |
- selector = undefined; | |
- } | |
- if ( fn === false ) { | |
- fn = returnFalse; | |
- } | |
- return this.each( function() { | |
- jQuery.event.remove( this, types, fn, selector ); | |
- } ); | |
- } | |
-} ); | |
- | |
- | |
-var | |
- | |
- /* eslint-disable max-len */ | |
- | |
- // See https://github.com/eslint/eslint/issues/3229 | |
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z… | |
- | |
- /* eslint-enable */ | |
- | |
- // Support: IE <=10 - 11, Edge 12 - 13 | |
- // In IE/Edge using regex groups here causes severe slowdowns. | |
- // See https://connect.microsoft.com/IE/feedback/details/1736512/ | |
- rnoInnerhtml = /<script|<style|<link/i, | |
- | |
- // checked="checked" or checked | |
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, | |
- rscriptTypeMasked = /^true\/(.*)/, | |
- rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; | |
- | |
-function manipulationTarget( elem, content ) { | |
- if ( jQuery.nodeName( elem, "table" ) && | |
- jQuery.nodeName( content.nodeType !== 11 ? content : content.f… | |
- | |
- return elem.getElementsByTagName( "tbody" )[ 0 ] || elem; | |
- } | |
- | |
- return elem; | |
-} | |
- | |
-// Replace/restore the type attribute of script elements for safe DOM manipula… | |
-function disableScript( elem ) { | |
- elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; | |
- return elem; | |
-} | |
-function restoreScript( elem ) { | |
- var match = rscriptTypeMasked.exec( elem.type ); | |
- | |
- if ( match ) { | |
- elem.type = match[ 1 ]; | |
- } else { | |
- elem.removeAttribute( "type" ); | |
- } | |
- | |
- return elem; | |
-} | |
- | |
-function cloneCopyEvent( src, dest ) { | |
- var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; | |
- | |
- if ( dest.nodeType !== 1 ) { | |
- return; | |
- } | |
- | |
- // 1. Copy private data: events, handlers, etc. | |
- if ( dataPriv.hasData( src ) ) { | |
- pdataOld = dataPriv.access( src ); | |
- pdataCur = dataPriv.set( dest, pdataOld ); | |
- events = pdataOld.events; | |
- | |
- if ( events ) { | |
- delete pdataCur.handle; | |
- pdataCur.events = {}; | |
- | |
- for ( type in events ) { | |
- for ( i = 0, l = events[ type ].length; i < l;… | |
- jQuery.event.add( dest, type, events[ … | |
- } | |
- } | |
- } | |
- } | |
- | |
- // 2. Copy user data | |
- if ( dataUser.hasData( src ) ) { | |
- udataOld = dataUser.access( src ); | |
- udataCur = jQuery.extend( {}, udataOld ); | |
- | |
- dataUser.set( dest, udataCur ); | |
- } | |
-} | |
- | |
-// Fix IE bugs, see support tests | |
-function fixInput( src, dest ) { | |
- var nodeName = dest.nodeName.toLowerCase(); | |
- | |
- // Fails to persist the checked state of a cloned checkbox or radio bu… | |
- if ( nodeName === "input" && rcheckableType.test( src.type ) ) { | |
- dest.checked = src.checked; | |
- | |
- // Fails to return the selected option to the default selected state w… | |
- } else if ( nodeName === "input" || nodeName === "textarea" ) { | |
- dest.defaultValue = src.defaultValue; | |
- } | |
-} | |
- | |
-function domManip( collection, args, callback, ignored ) { | |
- | |
- // Flatten any nested arrays | |
- args = concat.apply( [], args ); | |
- | |
- var fragment, first, scripts, hasScripts, node, doc, | |
- i = 0, | |
- l = collection.length, | |
- iNoClone = l - 1, | |
- value = args[ 0 ], | |
- isFunction = jQuery.isFunction( value ); | |
- | |
- // We can't cloneNode fragments that contain checked, in WebKit | |
- if ( isFunction || | |
- ( l > 1 && typeof value === "string" && | |
- !support.checkClone && rchecked.test( value ) … | |
- return collection.each( function( index ) { | |
- var self = collection.eq( index ); | |
- if ( isFunction ) { | |
- args[ 0 ] = value.call( this, index, self.html… | |
- } | |
- domManip( self, args, callback, ignored ); | |
- } ); | |
- } | |
- | |
- if ( l ) { | |
- fragment = buildFragment( args, collection[ 0 ].ownerDocument,… | |
- first = fragment.firstChild; | |
- | |
- if ( fragment.childNodes.length === 1 ) { | |
- fragment = first; | |
- } | |
- | |
- // Require either new content or an interest in ignored elemen… | |
- if ( first || ignored ) { | |
- scripts = jQuery.map( getAll( fragment, "script" ), di… | |
- hasScripts = scripts.length; | |
- | |
- // Use the original fragment for the last item | |
- // instead of the first because it can end up | |
- // being emptied incorrectly in certain situations (#8… | |
- for ( ; i < l; i++ ) { | |
- node = fragment; | |
- | |
- if ( i !== iNoClone ) { | |
- node = jQuery.clone( node, true, true … | |
- | |
- // Keep references to cloned scripts f… | |
- if ( hasScripts ) { | |
- | |
- // Support: Android <=4.0 only… | |
- // push.apply(_, arraylike) th… | |
- jQuery.merge( scripts, getAll(… | |
- } | |
- } | |
- | |
- callback.call( collection[ i ], node, i ); | |
- } | |
- | |
- if ( hasScripts ) { | |
- doc = scripts[ scripts.length - 1 ].ownerDocum… | |
- | |
- // Reenable scripts | |
- jQuery.map( scripts, restoreScript ); | |
- | |
- // Evaluate executable scripts on first docume… | |
- for ( i = 0; i < hasScripts; i++ ) { | |
- node = scripts[ i ]; | |
- if ( rscriptType.test( node.type || ""… | |
- !dataPriv.access( node, "globa… | |
- jQuery.contains( doc, node ) )… | |
- | |
- if ( node.src ) { | |
- | |
- // Optional AJAX depen… | |
- if ( jQuery._evalUrl )… | |
- jQuery._evalUr… | |
- } | |
- } else { | |
- DOMEval( node.textCont… | |
- } | |
- } | |
- } | |
- } | |
- } | |
- } | |
- | |
- return collection; | |
-} | |
- | |
-function remove( elem, selector, keepData ) { | |
- var node, | |
- nodes = selector ? jQuery.filter( selector, elem ) : elem, | |
- i = 0; | |
- | |
- for ( ; ( node = nodes[ i ] ) != null; i++ ) { | |
- if ( !keepData && node.nodeType === 1 ) { | |
- jQuery.cleanData( getAll( node ) ); | |
- } | |
- | |
- if ( node.parentNode ) { | |
- if ( keepData && jQuery.contains( node.ownerDocument, … | |
- setGlobalEval( getAll( node, "script" ) ); | |
- } | |
- node.parentNode.removeChild( node ); | |
- } | |
- } | |
- | |
- return elem; | |
-} | |
- | |
-jQuery.extend( { | |
- htmlPrefilter: function( html ) { | |
- return html.replace( rxhtmlTag, "<$1></$2>" ); | |
- }, | |
- | |
- clone: function( elem, dataAndEvents, deepDataAndEvents ) { | |
- var i, l, srcElements, destElements, | |
- clone = elem.cloneNode( true ), | |
- inPage = jQuery.contains( elem.ownerDocument, elem ); | |
- | |
- // Fix IE cloning issues | |
- if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.… | |
- !jQuery.isXMLDoc( elem ) ) { | |
- | |
- // We eschew Sizzle here for performance reasons: http… | |
- destElements = getAll( clone ); | |
- srcElements = getAll( elem ); | |
- | |
- for ( i = 0, l = srcElements.length; i < l; i++ ) { | |
- fixInput( srcElements[ i ], destElements[ i ] … | |
- } | |
- } | |
- | |
- // Copy the events from the original to the clone | |
- if ( dataAndEvents ) { | |
- if ( deepDataAndEvents ) { | |
- srcElements = srcElements || getAll( elem ); | |
- destElements = destElements || getAll( clone ); | |
- | |
- for ( i = 0, l = srcElements.length; i < l; i+… | |
- cloneCopyEvent( srcElements[ i ], dest… | |
- } | |
- } else { | |
- cloneCopyEvent( elem, clone ); | |
- } | |
- } | |
- | |
- // Preserve script evaluation history | |
- destElements = getAll( clone, "script" ); | |
- if ( destElements.length > 0 ) { | |
- setGlobalEval( destElements, !inPage && getAll( elem, … | |
- } | |
- | |
- // Return the cloned set | |
- return clone; | |
- }, | |
- | |
- cleanData: function( elems ) { | |
- var data, elem, type, | |
- special = jQuery.event.special, | |
- i = 0; | |
- | |
- for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { | |
- if ( acceptData( elem ) ) { | |
- if ( ( data = elem[ dataPriv.expando ] ) ) { | |
- if ( data.events ) { | |
- for ( type in data.events ) { | |
- if ( special[ type ] )… | |
- jQuery.event.r… | |
- | |
- // This is a shortcut … | |
- } else { | |
- jQuery.removeE… | |
- } | |
- } | |
- } | |
- | |
- // Support: Chrome <=35 - 45+ | |
- // Assign undefined instead of using d… | |
- elem[ dataPriv.expando ] = undefined; | |
- } | |
- if ( elem[ dataUser.expando ] ) { | |
- | |
- // Support: Chrome <=35 - 45+ | |
- // Assign undefined instead of using d… | |
- elem[ dataUser.expando ] = undefined; | |
- } | |
- } | |
- } | |
- } | |
-} ); | |
- | |
-jQuery.fn.extend( { | |
- detach: function( selector ) { | |
- return remove( this, selector, true ); | |
- }, | |
- | |
- remove: function( selector ) { | |
- return remove( this, selector ); | |
- }, | |
- | |
- text: function( value ) { | |
- return access( this, function( value ) { | |
- return value === undefined ? | |
- jQuery.text( this ) : | |
- this.empty().each( function() { | |
- if ( this.nodeType === 1 || this.nodeT… | |
- this.textContent = value; | |
- } | |
- } ); | |
- }, null, value, arguments.length ); | |
- }, | |
- | |
- append: function() { | |
- return domManip( this, arguments, function( elem ) { | |
- if ( this.nodeType === 1 || this.nodeType === 11 || th… | |
- var target = manipulationTarget( this, elem ); | |
- target.appendChild( elem ); | |
- } | |
- } ); | |
- }, | |
- | |
- prepend: function() { | |
- return domManip( this, arguments, function( elem ) { | |
- if ( this.nodeType === 1 || this.nodeType === 11 || th… | |
- var target = manipulationTarget( this, elem ); | |
- target.insertBefore( elem, target.firstChild ); | |
- } | |
- } ); | |
- }, | |
- | |
- before: function() { | |
- return domManip( this, arguments, function( elem ) { | |
- if ( this.parentNode ) { | |
- this.parentNode.insertBefore( elem, this ); | |
- } | |
- } ); | |
- }, | |
- | |
- after: function() { | |
- return domManip( this, arguments, function( elem ) { | |
- if ( this.parentNode ) { | |
- this.parentNode.insertBefore( elem, this.nextS… | |
- } | |
- } ); | |
- }, | |
- | |
- empty: function() { | |
- var elem, | |
- i = 0; | |
- | |
- for ( ; ( elem = this[ i ] ) != null; i++ ) { | |
- if ( elem.nodeType === 1 ) { | |
- | |
- // Prevent memory leaks | |
- jQuery.cleanData( getAll( elem, false ) ); | |
- | |
- // Remove any remaining nodes | |
- elem.textContent = ""; | |
- } | |
- } | |
- | |
- return this; | |
- }, | |
- | |
- clone: function( dataAndEvents, deepDataAndEvents ) { | |
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents; | |
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents … | |
- | |
- return this.map( function() { | |
- return jQuery.clone( this, dataAndEvents, deepDataAndE… | |
- } ); | |
- }, | |
- | |
- html: function( value ) { | |
- return access( this, function( value ) { | |
- var elem = this[ 0 ] || {}, | |
- i = 0, | |
- l = this.length; | |
- | |
- if ( value === undefined && elem.nodeType === 1 ) { | |
- return elem.innerHTML; | |
- } | |
- | |
- // See if we can take a shortcut and just use innerHTML | |
- if ( typeof value === "string" && !rnoInnerhtml.test( … | |
- !wrapMap[ ( rtagName.exec( value ) || [ "", ""… | |
- | |
- value = jQuery.htmlPrefilter( value ); | |
- | |
- try { | |
- for ( ; i < l; i++ ) { | |
- elem = this[ i ] || {}; | |
- | |
- // Remove element nodes and pr… | |
- if ( elem.nodeType === 1 ) { | |
- jQuery.cleanData( getA… | |
- elem.innerHTML = value; | |
- } | |
- } | |
- | |
- elem = 0; | |
- | |
- // If using innerHTML throws an exception, use… | |
- } catch ( e ) {} | |
- } | |
- | |
- if ( elem ) { | |
- this.empty().append( value ); | |
- } | |
- }, null, value, arguments.length ); | |
- }, | |
- | |
- replaceWith: function() { | |
- var ignored = []; | |
- | |
- // Make the changes, replacing each non-ignored context elemen… | |
- return domManip( this, arguments, function( elem ) { | |
- var parent = this.parentNode; | |
- | |
- if ( jQuery.inArray( this, ignored ) < 0 ) { | |
- jQuery.cleanData( getAll( this ) ); | |
- if ( parent ) { | |
- parent.replaceChild( elem, this ); | |
- } | |
- } | |
- | |
- // Force callback invocation | |
- }, ignored ); | |
- } | |
-} ); | |
- | |
-jQuery.each( { | |
- appendTo: "append", | |
- prependTo: "prepend", | |
- insertBefore: "before", | |
- insertAfter: "after", | |
- replaceAll: "replaceWith" | |
-}, function( name, original ) { | |
- jQuery.fn[ name ] = function( selector ) { | |
- var elems, | |
- ret = [], | |
- insert = jQuery( selector ), | |
- last = insert.length - 1, | |
- i = 0; | |
- | |
- for ( ; i <= last; i++ ) { | |
- elems = i === last ? this : this.clone( true ); | |
- jQuery( insert[ i ] )[ original ]( elems ); | |
- | |
- // Support: Android <=4.0 only, PhantomJS 1 only | |
- // .get() because push.apply(_, arraylike) throws on a… | |
- push.apply( ret, elems.get() ); | |
- } | |
- | |
- return this.pushStack( ret ); | |
- }; | |
-} ); | |
-var rmargin = ( /^margin/ ); | |
- | |
-var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); | |
- | |
-var getStyles = function( elem ) { | |
- | |
- // Support: IE <=11 only, Firefox <=30 (#15098, #14150) | |
- // IE throws on elements created in popups | |
- // FF meanwhile throws on frame elements through "defaultView.… | |
- var view = elem.ownerDocument.defaultView; | |
- | |
- if ( !view || !view.opener ) { | |
- view = window; | |
- } | |
- | |
- return view.getComputedStyle( elem ); | |
- }; | |
- | |
- | |
- | |
-( function() { | |
- | |
- // Executing both pixelPosition & boxSizingReliable tests require only… | |
- // so they're executed at the same time to save the second computation. | |
- function computeStyleTests() { | |
- | |
- // This is a singleton, we need to execute it only once | |
- if ( !div ) { | |
- return; | |
- } | |
- | |
- div.style.cssText = | |
- "box-sizing:border-box;" + | |
- "position:relative;display:block;" + | |
- "margin:auto;border:1px;padding:1px;" + | |
- "top:1%;width:50%"; | |
- div.innerHTML = ""; | |
- documentElement.appendChild( container ); | |
- | |
- var divStyle = window.getComputedStyle( div ); | |
- pixelPositionVal = divStyle.top !== "1%"; | |
- | |
- // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 | |
- reliableMarginLeftVal = divStyle.marginLeft === "2px"; | |
- boxSizingReliableVal = divStyle.width === "4px"; | |
- | |
- // Support: Android 4.0 - 4.3 only | |
- // Some styles come back with percentage values, even though t… | |
- div.style.marginRight = "50%"; | |
- pixelMarginRightVal = divStyle.marginRight === "4px"; | |
- | |
- documentElement.removeChild( container ); | |
- | |
- // Nullify the div so it wouldn't be stored in the memory and | |
- // it will also be a sign that checks already performed | |
- div = null; | |
- } | |
- | |
- var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, relia… | |
- container = document.createElement( "div" ), | |
- div = document.createElement( "div" ); | |
- | |
- // Finish early in limited (non-browser) environments | |
- if ( !div.style ) { | |
- return; | |
- } | |
- | |
- // Support: IE <=9 - 11 only | |
- // Style of cloned element affects source element cloned (#8908) | |
- div.style.backgroundClip = "content-box"; | |
- div.cloneNode( true ).style.backgroundClip = ""; | |
- support.clearCloneStyle = div.style.backgroundClip === "content-box"; | |
- | |
- container.style.cssText = "border:0;width:8px;height:0;top:0;left:-999… | |
- "padding:0;margin-top:1px;position:absolute"; | |
- container.appendChild( div ); | |
- | |
- jQuery.extend( support, { | |
- pixelPosition: function() { | |
- computeStyleTests(); | |
- return pixelPositionVal; | |
- }, | |
- boxSizingReliable: function() { | |
- computeStyleTests(); | |
- return boxSizingReliableVal; | |
- }, | |
- pixelMarginRight: function() { | |
- computeStyleTests(); | |
- return pixelMarginRightVal; | |
- }, | |
- reliableMarginLeft: function() { | |
- computeStyleTests(); | |
- return reliableMarginLeftVal; | |
- } | |
- } ); | |
-} )(); | |
- | |
- | |
-function curCSS( elem, name, computed ) { | |
- var width, minWidth, maxWidth, ret, | |
- style = elem.style; | |
- | |
- computed = computed || getStyles( elem ); | |
- | |
- // Support: IE <=9 only | |
- // getPropertyValue is only needed for .css('filter') (#12537) | |
- if ( computed ) { | |
- ret = computed.getPropertyValue( name ) || computed[ name ]; | |
- | |
- if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem … | |
- ret = jQuery.style( elem, name ); | |
- } | |
- | |
- // A tribute to the "awesome hack by Dean Edwards" | |
- // Android Browser returns percentage for some values, | |
- // but width seems to be reliably pixels. | |
- // This is against the CSSOM draft spec: | |
- // https://drafts.csswg.org/cssom/#resolved-values | |
- if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && r… | |
- | |
- // Remember the original values | |
- width = style.width; | |
- minWidth = style.minWidth; | |
- maxWidth = style.maxWidth; | |
- | |
- // Put in the new values to get a computed value out | |
- style.minWidth = style.maxWidth = style.width = ret; | |
- ret = computed.width; | |
- | |
- // Revert the changed values | |
- style.width = width; | |
- style.minWidth = minWidth; | |
- style.maxWidth = maxWidth; | |
- } | |
- } | |
- | |
- return ret !== undefined ? | |
- | |
- // Support: IE <=9 - 11 only | |
- // IE returns zIndex value as an integer. | |
- ret + "" : | |
- ret; | |
-} | |
- | |
- | |
-function addGetHookIf( conditionFn, hookFn ) { | |
- | |
- // Define the hook, we'll check on the first run if it's really needed. | |
- return { | |
- get: function() { | |
- if ( conditionFn() ) { | |
- | |
- // Hook not needed (or it's not possible to us… | |
- // to missing dependency), remove it. | |
- delete this.get; | |
- return; | |
- } | |
- | |
- // Hook needed; redefine it so that the support test i… | |
- return ( this.get = hookFn ).apply( this, arguments ); | |
- } | |
- }; | |
-} | |
- | |
- | |
-var | |
- | |
- // Swappable if display is none or starts with table | |
- // except "table", "table-cell", or "table-caption" | |
- // See here for display values: https://developer.mozilla.org/en-US/do… | |
- rdisplayswap = /^(none|table(?!-c[ea]).+)/, | |
- cssShow = { position: "absolute", visibility: "hidden", display: "bloc… | |
- cssNormalTransform = { | |
- letterSpacing: "0", | |
- fontWeight: "400" | |
- }, | |
- | |
- cssPrefixes = [ "Webkit", "Moz", "ms" ], | |
- emptyStyle = document.createElement( "div" ).style; | |
- | |
-// Return a css property mapped to a potentially vendor prefixed property | |
-function vendorPropName( name ) { | |
- | |
- // Shortcut for names that are not vendor prefixed | |
- if ( name in emptyStyle ) { | |
- return name; | |
- } | |
- | |
- // Check for vendor prefixed names | |
- var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), | |
- i = cssPrefixes.length; | |
- | |
- while ( i-- ) { | |
- name = cssPrefixes[ i ] + capName; | |
- if ( name in emptyStyle ) { | |
- return name; | |
- } | |
- } | |
-} | |
- | |
-function setPositiveNumber( elem, value, subtract ) { | |
- | |
- // Any relative (+/-) values have already been | |
- // normalized at this point | |
- var matches = rcssNum.exec( value ); | |
- return matches ? | |
- | |
- // Guard against undefined "subtract", e.g., when used as in c… | |
- Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3… | |
- value; | |
-} | |
- | |
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { | |
- var i, | |
- val = 0; | |
- | |
- // If we already have the right measurement, avoid augmentation | |
- if ( extra === ( isBorderBox ? "border" : "content" ) ) { | |
- i = 4; | |
- | |
- // Otherwise initialize for horizontal or vertical properties | |
- } else { | |
- i = name === "width" ? 1 : 0; | |
- } | |
- | |
- for ( ; i < 4; i += 2 ) { | |
- | |
- // Both box models exclude margin, so add it if we want it | |
- if ( extra === "margin" ) { | |
- val += jQuery.css( elem, extra + cssExpand[ i ], true,… | |
- } | |
- | |
- if ( isBorderBox ) { | |
- | |
- // border-box includes padding, so remove it if we wan… | |
- if ( extra === "content" ) { | |
- val -= jQuery.css( elem, "padding" + cssExpand… | |
- } | |
- | |
- // At this point, extra isn't border nor margin, so re… | |
- if ( extra !== "margin" ) { | |
- val -= jQuery.css( elem, "border" + cssExpand[… | |
- } | |
- } else { | |
- | |
- // At this point, extra isn't content, so add padding | |
- val += jQuery.css( elem, "padding" + cssExpand[ i ], t… | |
- | |
- // At this point, extra isn't content nor padding, so … | |
- if ( extra !== "padding" ) { | |
- val += jQuery.css( elem, "border" + cssExpand[… | |
- } | |
- } | |
- } | |
- | |
- return val; | |
-} | |
- | |
-function getWidthOrHeight( elem, name, extra ) { | |
- | |
- // Start with offset property, which is equivalent to the border-box v… | |
- var val, | |
- valueIsBorderBox = true, | |
- styles = getStyles( elem ), | |
- isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) =… | |
- | |
- // Support: IE <=11 only | |
- // Running getBoundingClientRect on a disconnected node | |
- // in IE throws an error. | |
- if ( elem.getClientRects().length ) { | |
- val = elem.getBoundingClientRect()[ name ]; | |
- } | |
- | |
- // Some non-html elements return undefined for offsetWidth, so check f… | |
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 | |
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 | |
- if ( val <= 0 || val == null ) { | |
- | |
- // Fall back to computed then uncomputed css if necessary | |
- val = curCSS( elem, name, styles ); | |
- if ( val < 0 || val == null ) { | |
- val = elem.style[ name ]; | |
- } | |
- | |
- // Computed unit is not pixels. Stop here and return. | |
- if ( rnumnonpx.test( val ) ) { | |
- return val; | |
- } | |
- | |
- // Check for style in case a browser which returns unreliable … | |
- // for getComputedStyle silently falls back to the reliable el… | |
- valueIsBorderBox = isBorderBox && | |
- ( support.boxSizingReliable() || val === elem.style[ n… | |
- | |
- // Normalize "", auto, and prepare for extra | |
- val = parseFloat( val ) || 0; | |
- } | |
- | |
- // Use the active box-sizing model to add/subtract irrelevant styles | |
- return ( val + | |
- augmentWidthOrHeight( | |
- elem, | |
- name, | |
- extra || ( isBorderBox ? "border" : "content" ), | |
- valueIsBorderBox, | |
- styles | |
- ) | |
- ) + "px"; | |
-} | |
- | |
-jQuery.extend( { | |
- | |
- // Add in style property hooks for overriding the default | |
- // behavior of getting and setting a style property | |
- cssHooks: { | |
- opacity: { | |
- get: function( elem, computed ) { | |
- if ( computed ) { | |
- | |
- // We should always get a number back … | |
- var ret = curCSS( elem, "opacity" ); | |
- return ret === "" ? "1" : ret; | |
- } | |
- } | |
- } | |
- }, | |
- | |
- // Don't automatically add "px" to these possibly-unitless properties | |
- cssNumber: { | |
- "animationIterationCount": true, | |
- "columnCount": true, | |
- "fillOpacity": true, | |
- "flexGrow": true, | |
- "flexShrink": true, | |
- "fontWeight": true, | |
- "lineHeight": true, | |
- "opacity": true, | |
- "order": true, | |
- "orphans": true, | |
- "widows": true, | |
- "zIndex": true, | |
- "zoom": true | |
- }, | |
- | |
- // Add in properties whose names you wish to fix before | |
- // setting or getting the value | |
- cssProps: { | |
- "float": "cssFloat" | |
- }, | |
- | |
- // Get and set the style property on a DOM Node | |
- style: function( elem, name, value, extra ) { | |
- | |
- // Don't set styles on text and comment nodes | |
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !e… | |
- return; | |
- } | |
- | |
- // Make sure that we're working with the right name | |
- var ret, type, hooks, | |
- origName = jQuery.camelCase( name ), | |
- style = elem.style; | |
- | |
- name = jQuery.cssProps[ origName ] || | |
- ( jQuery.cssProps[ origName ] = vendorPropName( origNa… | |
- | |
- // Gets hook for the prefixed version, then unprefixed version | |
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; | |
- | |
- // Check if we're setting a value | |
- if ( value !== undefined ) { | |
- type = typeof value; | |
- | |
- // Convert "+=" or "-=" to relative numbers (#7345) | |
- if ( type === "string" && ( ret = rcssNum.exec( value … | |
- value = adjustCSS( elem, name, ret ); | |
- | |
- // Fixes bug #9237 | |
- type = "number"; | |
- } | |
- | |
- // Make sure that null and NaN values aren't set (#711… | |
- if ( value == null || value !== value ) { | |
- return; | |
- } | |
- | |
- // If a number was passed in, add the unit (except for… | |
- if ( type === "number" ) { | |
- value += ret && ret[ 3 ] || ( jQuery.cssNumber… | |
- } | |
- | |
- // background-* props affect original clone's values | |
- if ( !support.clearCloneStyle && value === "" && name.… | |
- style[ name ] = "inherit"; | |
- } | |
- | |
- // If a hook was provided, use that value, otherwise j… | |
- if ( !hooks || !( "set" in hooks ) || | |
- ( value = hooks.set( elem, value, extra ) ) !=… | |
- | |
- style[ name ] = value; | |
- } | |
- | |
- } else { | |
- | |
- // If a hook was provided get the non-computed value f… | |
- if ( hooks && "get" in hooks && | |
- ( ret = hooks.get( elem, false, extra ) ) !== … | |
- | |
- return ret; | |
- } | |
- | |
- // Otherwise just get the value from the style object | |
- return style[ name ]; | |
- } | |
- }, | |
- | |
- css: function( elem, name, extra, styles ) { | |
- var val, num, hooks, | |
- origName = jQuery.camelCase( name ); | |
- | |
- // Make sure that we're working with the right name | |
- name = jQuery.cssProps[ origName ] || | |
- ( jQuery.cssProps[ origName ] = vendorPropName( origNa… | |
- | |
- // Try prefixed name followed by the unprefixed name | |
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; | |
- | |
- // If a hook was provided get the computed value from there | |
- if ( hooks && "get" in hooks ) { | |
- val = hooks.get( elem, true, extra ); | |
- } | |
- | |
- // Otherwise, if a way to get the computed value exists, use t… | |
- if ( val === undefined ) { | |
- val = curCSS( elem, name, styles ); | |
- } | |
- | |
- // Convert "normal" to computed value | |
- if ( val === "normal" && name in cssNormalTransform ) { | |
- val = cssNormalTransform[ name ]; | |
- } | |
- | |
- // Make numeric if forced or a qualifier was provided and val … | |
- if ( extra === "" || extra ) { | |
- num = parseFloat( val ); | |
- return extra === true || isFinite( num ) ? num || 0 : … | |
- } | |
- return val; | |
- } | |
-} ); | |
- | |
-jQuery.each( [ "height", "width" ], function( i, name ) { | |
- jQuery.cssHooks[ name ] = { | |
- get: function( elem, computed, extra ) { | |
- if ( computed ) { | |
- | |
- // Certain elements can have dimension info if… | |
- // but it must have a current display style th… | |
- return rdisplayswap.test( jQuery.css( elem, "d… | |
- | |
- // Support: Safari 8+ | |
- // Table columns in Safari have non-ze… | |
- // getBoundingClientRect().width unles… | |
- // Support: IE <=11 only | |
- // Running getBoundingClientRect on a … | |
- // in IE throws an error. | |
- ( !elem.getClientRects().length || !el… | |
- swap( elem, cssShow, function(… | |
- return getWidthOrHeigh… | |
- } ) : | |
- getWidthOrHeight( elem, name, … | |
- } | |
- }, | |
- | |
- set: function( elem, value, extra ) { | |
- var matches, | |
- styles = extra && getStyles( elem ), | |
- subtract = extra && augmentWidthOrHeight( | |
- elem, | |
- name, | |
- extra, | |
- jQuery.css( elem, "boxSizing", false, … | |
- styles | |
- ); | |
- | |
- // Convert to pixels if value adjustment is needed | |
- if ( subtract && ( matches = rcssNum.exec( value ) ) && | |
- ( matches[ 3 ] || "px" ) !== "px" ) { | |
- | |
- elem.style[ name ] = value; | |
- value = jQuery.css( elem, name ); | |
- } | |
- | |
- return setPositiveNumber( elem, value, subtract ); | |
- } | |
- }; | |
-} ); | |
- | |
-jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, | |
- function( elem, computed ) { | |
- if ( computed ) { | |
- return ( parseFloat( curCSS( elem, "marginLeft" ) ) || | |
- elem.getBoundingClientRect().left - | |
- swap( elem, { marginLeft: 0 }, functio… | |
- return elem.getBoundingClientR… | |
- } ) | |
- ) + "px"; | |
- } | |
- } | |
-); | |
- | |
-// These hooks are used by animate to expand properties | |
-jQuery.each( { | |
- margin: "", | |
- padding: "", | |
- border: "Width" | |
-}, function( prefix, suffix ) { | |
- jQuery.cssHooks[ prefix + suffix ] = { | |
- expand: function( value ) { | |
- var i = 0, | |
- expanded = {}, | |
- | |
- // Assumes a single number if not a string | |
- parts = typeof value === "string" ? value.spli… | |
- | |
- for ( ; i < 4; i++ ) { | |
- expanded[ prefix + cssExpand[ i ] + suffix ] = | |
- parts[ i ] || parts[ i - 2 ] || parts[… | |
- } | |
- | |
- return expanded; | |
- } | |
- }; | |
- | |
- if ( !rmargin.test( prefix ) ) { | |
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; | |
- } | |
-} ); | |
- | |
-jQuery.fn.extend( { | |
- css: function( name, value ) { | |
- return access( this, function( elem, name, value ) { | |
- var styles, len, | |
- map = {}, | |
- i = 0; | |
- | |
- if ( jQuery.isArray( name ) ) { | |
- styles = getStyles( elem ); | |
- len = name.length; | |
- | |
- for ( ; i < len; i++ ) { | |
- map[ name[ i ] ] = jQuery.css( elem, n… | |
- } | |
- | |
- return map; | |
- } | |
- | |
- return value !== undefined ? | |
- jQuery.style( elem, name, value ) : | |
- jQuery.css( elem, name ); | |
- }, name, value, arguments.length > 1 ); | |
- } | |
-} ); | |
- | |
- | |
-function Tween( elem, options, prop, end, easing ) { | |
- return new Tween.prototype.init( elem, options, prop, end, easing ); | |
-} | |
-jQuery.Tween = Tween; | |
- | |
-Tween.prototype = { | |
- constructor: Tween, | |
- init: function( elem, options, prop, end, easing, unit ) { | |
- this.elem = elem; | |
- this.prop = prop; | |
- this.easing = easing || jQuery.easing._default; | |
- this.options = options; | |
- this.start = this.now = this.cur(); | |
- this.end = end; | |
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); | |
- }, | |
- cur: function() { | |
- var hooks = Tween.propHooks[ this.prop ]; | |
- | |
- return hooks && hooks.get ? | |
- hooks.get( this ) : | |
- Tween.propHooks._default.get( this ); | |
- }, | |
- run: function( percent ) { | |
- var eased, | |
- hooks = Tween.propHooks[ this.prop ]; | |
- | |
- if ( this.options.duration ) { | |
- this.pos = eased = jQuery.easing[ this.easing ]( | |
- percent, this.options.duration * percent, 0, 1… | |
- ); | |
- } else { | |
- this.pos = eased = percent; | |
- } | |
- this.now = ( this.end - this.start ) * eased + this.start; | |
- | |
- if ( this.options.step ) { | |
- this.options.step.call( this.elem, this.now, this ); | |
- } | |
- | |
- if ( hooks && hooks.set ) { | |
- hooks.set( this ); | |
- } else { | |
- Tween.propHooks._default.set( this ); | |
- } | |
- return this; | |
- } | |
-}; | |
- | |
-Tween.prototype.init.prototype = Tween.prototype; | |
- | |
-Tween.propHooks = { | |
- _default: { | |
- get: function( tween ) { | |
- var result; | |
- | |
- // Use a property on the element directly when it is n… | |
- // or when there is no matching style property that ex… | |
- if ( tween.elem.nodeType !== 1 || | |
- tween.elem[ tween.prop ] != null && tween.elem… | |
- return tween.elem[ tween.prop ]; | |
- } | |
- | |
- // Passing an empty string as a 3rd parameter to .css … | |
- // attempt a parseFloat and fallback to a string if th… | |
- // Simple values such as "10px" are parsed to Float; | |
- // complex values such as "rotate(1rad)" are returned … | |
- result = jQuery.css( tween.elem, tween.prop, "" ); | |
- | |
- // Empty strings, null, undefined and "auto" are conve… | |
- return !result || result === "auto" ? 0 : result; | |
- }, | |
- set: function( tween ) { | |
- | |
- // Use step hook for back compat. | |
- // Use cssHook if its there. | |
- // Use .style if available and use plain properties wh… | |
- if ( jQuery.fx.step[ tween.prop ] ) { | |
- jQuery.fx.step[ tween.prop ]( tween ); | |
- } else if ( tween.elem.nodeType === 1 && | |
- ( tween.elem.style[ jQuery.cssProps[ tween.pro… | |
- jQuery.cssHooks[ tween.prop ] ) ) { | |
- jQuery.style( tween.elem, tween.prop, tween.no… | |
- } else { | |
- tween.elem[ tween.prop ] = tween.now; | |
- } | |
- } | |
- } | |
-}; | |
- | |
-// Support: IE <=9 only | |
-// Panic based approach to setting things on disconnected nodes | |
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { | |
- set: function( tween ) { | |
- if ( tween.elem.nodeType && tween.elem.parentNode ) { | |
- tween.elem[ tween.prop ] = tween.now; | |
- } | |
- } | |
-}; | |
- | |
-jQuery.easing = { | |
- linear: function( p ) { | |
- return p; | |
- }, | |
- swing: function( p ) { | |
- return 0.5 - Math.cos( p * Math.PI ) / 2; | |
- }, | |
- _default: "swing" | |
-}; | |
- | |
-jQuery.fx = Tween.prototype.init; | |
- | |
-// Back compat <1.8 extension point | |
-jQuery.fx.step = {}; | |
- | |
- | |
- | |
- | |
-var | |
- fxNow, timerId, | |
- rfxtypes = /^(?:toggle|show|hide)$/, | |
- rrun = /queueHooks$/; | |
- | |
-function raf() { | |
- if ( timerId ) { | |
- window.requestAnimationFrame( raf ); | |
- jQuery.fx.tick(); | |
- } | |
-} | |
- | |
-// Animations created synchronously will run synchronously | |
-function createFxNow() { | |
- window.setTimeout( function() { | |
- fxNow = undefined; | |
- } ); | |
- return ( fxNow = jQuery.now() ); | |
-} | |
- | |
-// Generate parameters to create a standard animation | |
-function genFx( type, includeWidth ) { | |
- var which, | |
- i = 0, | |
- attrs = { height: type }; | |
- | |
- // If we include width, step value is 1 to do all cssExpand values, | |
- // otherwise step value is 2 to skip over Left and Right | |
- includeWidth = includeWidth ? 1 : 0; | |
- for ( ; i < 4; i += 2 - includeWidth ) { | |
- which = cssExpand[ i ]; | |
- attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; | |
- } | |
- | |
- if ( includeWidth ) { | |
- attrs.opacity = attrs.width = type; | |
- } | |
- | |
- return attrs; | |
-} | |
- | |
-function createTween( value, prop, animation ) { | |
- var tween, | |
- collection = ( Animation.tweeners[ prop ] || [] ).concat( Anim… | |
- index = 0, | |
- length = collection.length; | |
- for ( ; index < length; index++ ) { | |
- if ( ( tween = collection[ index ].call( animation, prop, valu… | |
- | |
- // We're done with this property | |
- return tween; | |
- } | |
- } | |
-} | |
- | |
-function defaultPrefilter( elem, props, opts ) { | |
- var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, di… | |
- isBox = "width" in props || "height" in props, | |
- anim = this, | |
- orig = {}, | |
- style = elem.style, | |
- hidden = elem.nodeType && isHiddenWithinTree( elem ), | |
- dataShow = dataPriv.get( elem, "fxshow" ); | |
- | |
- // Queue-skipping animations hijack the fx hooks | |
- if ( !opts.queue ) { | |
- hooks = jQuery._queueHooks( elem, "fx" ); | |
- if ( hooks.unqueued == null ) { | |
- hooks.unqueued = 0; | |
- oldfire = hooks.empty.fire; | |
- hooks.empty.fire = function() { | |
- if ( !hooks.unqueued ) { | |
- oldfire(); | |
- } | |
- }; | |
- } | |
- hooks.unqueued++; | |
- | |
- anim.always( function() { | |
- | |
- // Ensure the complete handler is called before this c… | |
- anim.always( function() { | |
- hooks.unqueued--; | |
- if ( !jQuery.queue( elem, "fx" ).length ) { | |
- hooks.empty.fire(); | |
- } | |
- } ); | |
- } ); | |
- } | |
- | |
- // Detect show/hide animations | |
- for ( prop in props ) { | |
- value = props[ prop ]; | |
- if ( rfxtypes.test( value ) ) { | |
- delete props[ prop ]; | |
- toggle = toggle || value === "toggle"; | |
- if ( value === ( hidden ? "hide" : "show" ) ) { | |
- | |
- // Pretend to be hidden if this is a "show" and | |
- // there is still data from a stopped show/hide | |
- if ( value === "show" && dataShow && dataShow[… | |
- hidden = true; | |
- | |
- // Ignore all other no-op show/hide data | |
- } else { | |
- continue; | |
- } | |
- } | |
- orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.… | |
- } | |
- } | |
- | |
- // Bail out if this is a no-op like .hide().hide() | |
- propTween = !jQuery.isEmptyObject( props ); | |
- if ( !propTween && jQuery.isEmptyObject( orig ) ) { | |
- return; | |
- } | |
- | |
- // Restrict "overflow" and "display" styles during box animations | |
- if ( isBox && elem.nodeType === 1 ) { | |
- | |
- // Support: IE <=9 - 11, Edge 12 - 13 | |
- // Record all 3 overflow attributes because IE does not infer … | |
- // from identically-valued overflowX and overflowY | |
- opts.overflow = [ style.overflow, style.overflowX, style.overf… | |
- | |
- // Identify a display type, preferring old show/hide data over… | |
- restoreDisplay = dataShow && dataShow.display; | |
- if ( restoreDisplay == null ) { | |
- restoreDisplay = dataPriv.get( elem, "display" ); | |
- } | |
- display = jQuery.css( elem, "display" ); | |
- if ( display === "none" ) { | |
- if ( restoreDisplay ) { | |
- display = restoreDisplay; | |
- } else { | |
- | |
- // Get nonempty value(s) by temporarily forcin… | |
- showHide( [ elem ], true ); | |
- restoreDisplay = elem.style.display || restore… | |
- display = jQuery.css( elem, "display" ); | |
- showHide( [ elem ] ); | |
- } | |
- } | |
- | |
- // Animate inline elements as inline-block | |
- if ( display === "inline" || display === "inline-block" && res… | |
- if ( jQuery.css( elem, "float" ) === "none" ) { | |
- | |
- // Restore the original display value at the e… | |
- if ( !propTween ) { | |
- anim.done( function() { | |
- style.display = restoreDisplay; | |
- } ); | |
- if ( restoreDisplay == null ) { | |
- display = style.display; | |
- restoreDisplay = display === "… | |
- } | |
- } | |
- style.display = "inline-block"; | |
- } | |
- } | |
- } | |
- | |
- if ( opts.overflow ) { | |
- style.overflow = "hidden"; | |
- anim.always( function() { | |
- style.overflow = opts.overflow[ 0 ]; | |
- style.overflowX = opts.overflow[ 1 ]; | |
- style.overflowY = opts.overflow[ 2 ]; | |
- } ); | |
- } | |
- | |
- // Implement show/hide animations | |
- propTween = false; | |
- for ( prop in orig ) { | |
- | |
- // General show/hide setup for this element animation | |
- if ( !propTween ) { | |
- if ( dataShow ) { | |
- if ( "hidden" in dataShow ) { | |
- hidden = dataShow.hidden; | |
- } | |
- } else { | |
- dataShow = dataPriv.access( elem, "fxshow", { … | |
- } | |
- | |
- // Store hidden/visible for toggle so `.stop().toggle(… | |
- if ( toggle ) { | |
- dataShow.hidden = !hidden; | |
- } | |
- | |
- // Show elements before animating them | |
- if ( hidden ) { | |
- showHide( [ elem ], true ); | |
- } | |
- | |
- /* eslint-disable no-loop-func */ | |
- | |
- anim.done( function() { | |
- | |
- /* eslint-enable no-loop-func */ | |
- | |
- // The final step of a "hide" animation is act… | |
- if ( !hidden ) { | |
- showHide( [ elem ] ); | |
- } | |
- dataPriv.remove( elem, "fxshow" ); | |
- for ( prop in orig ) { | |
- jQuery.style( elem, prop, orig[ prop ]… | |
- } | |
- } ); | |
- } | |
- | |
- // Per-property setup | |
- propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, … | |
- if ( !( prop in dataShow ) ) { | |
- dataShow[ prop ] = propTween.start; | |
- if ( hidden ) { | |
- propTween.end = propTween.start; | |
- propTween.start = 0; | |
- } | |
- } | |
- } | |
-} | |
- | |
-function propFilter( props, specialEasing ) { | |
- var index, name, easing, value, hooks; | |
- | |
- // camelCase, specialEasing and expand cssHook pass | |
- for ( index in props ) { | |
- name = jQuery.camelCase( index ); | |
- easing = specialEasing[ name ]; | |
- value = props[ index ]; | |
- if ( jQuery.isArray( value ) ) { | |
- easing = value[ 1 ]; | |
- value = props[ index ] = value[ 0 ]; | |
- } | |
- | |
- if ( index !== name ) { | |
- props[ name ] = value; | |
- delete props[ index ]; | |
- } | |
- | |
- hooks = jQuery.cssHooks[ name ]; | |
- if ( hooks && "expand" in hooks ) { | |
- value = hooks.expand( value ); | |
- delete props[ name ]; | |
- | |
- // Not quite $.extend, this won't overwrite existing k… | |
- // Reusing 'index' because we have the correct "name" | |
- for ( index in value ) { | |
- if ( !( index in props ) ) { | |
- props[ index ] = value[ index ]; | |
- specialEasing[ index ] = easing; | |
- } | |
- } | |
- } else { | |
- specialEasing[ name ] = easing; | |
- } | |
- } | |
-} | |
- | |
-function Animation( elem, properties, options ) { | |
- var result, | |
- stopped, | |
- index = 0, | |
- length = Animation.prefilters.length, | |
- deferred = jQuery.Deferred().always( function() { | |
- | |
- // Don't match elem in the :animated selector | |
- delete tick.elem; | |
- } ), | |
- tick = function() { | |
- if ( stopped ) { | |
- return false; | |
- } | |
- var currentTime = fxNow || createFxNow(), | |
- remaining = Math.max( 0, animation.startTime +… | |
- | |
- // Support: Android 2.3 only | |
- // Archaic crash bug won't allow us to use `1 … | |
- temp = remaining / animation.duration || 0, | |
- percent = 1 - temp, | |
- index = 0, | |
- length = animation.tweens.length; | |
- | |
- for ( ; index < length; index++ ) { | |
- animation.tweens[ index ].run( percent ); | |
- } | |
- | |
- deferred.notifyWith( elem, [ animation, percent, remai… | |
- | |
- if ( percent < 1 && length ) { | |
- return remaining; | |
- } else { | |
- deferred.resolveWith( elem, [ animation ] ); | |
- return false; | |
- } | |
- }, | |
- animation = deferred.promise( { | |
- elem: elem, | |
- props: jQuery.extend( {}, properties ), | |
- opts: jQuery.extend( true, { | |
- specialEasing: {}, | |
- easing: jQuery.easing._default | |
- }, options ), | |
- originalProperties: properties, | |
- originalOptions: options, | |
- startTime: fxNow || createFxNow(), | |
- duration: options.duration, | |
- tweens: [], | |
- createTween: function( prop, end ) { | |
- var tween = jQuery.Tween( elem, animation.opts… | |
- animation.opts.specialEasing[ … | |
- animation.tweens.push( tween ); | |
- return tween; | |
- }, | |
- stop: function( gotoEnd ) { | |
- var index = 0, | |
- | |
- // If we are going to the end, we want… | |
- // otherwise we skip this part | |
- length = gotoEnd ? animation.tweens.le… | |
- if ( stopped ) { | |
- return this; | |
- } | |
- stopped = true; | |
- for ( ; index < length; index++ ) { | |
- animation.tweens[ index ].run( 1 ); | |
- } | |
- | |
- // Resolve when we played the last frame; othe… | |
- if ( gotoEnd ) { | |
- deferred.notifyWith( elem, [ animation… | |
- deferred.resolveWith( elem, [ animatio… | |
- } else { | |
- deferred.rejectWith( elem, [ animation… | |
- } | |
- return this; | |
- } | |
- } ), | |
- props = animation.props; | |
- | |
- propFilter( props, animation.opts.specialEasing ); | |
- | |
- for ( ; index < length; index++ ) { | |
- result = Animation.prefilters[ index ].call( animation, elem, … | |
- if ( result ) { | |
- if ( jQuery.isFunction( result.stop ) ) { | |
- jQuery._queueHooks( animation.elem, animation.… | |
- jQuery.proxy( result.stop, result ); | |
- } | |
- return result; | |
- } | |
- } | |
- | |
- jQuery.map( props, createTween, animation ); | |
- | |
- if ( jQuery.isFunction( animation.opts.start ) ) { | |
- animation.opts.start.call( elem, animation ); | |
- } | |
- | |
- jQuery.fx.timer( | |
- jQuery.extend( tick, { | |
- elem: elem, | |
- anim: animation, | |
- queue: animation.opts.queue | |
- } ) | |
- ); | |
- | |
- // attach callbacks from options | |
- return animation.progress( animation.opts.progress ) | |
- .done( animation.opts.done, animation.opts.complete ) | |
- .fail( animation.opts.fail ) | |
- .always( animation.opts.always ); | |
-} | |
- | |
-jQuery.Animation = jQuery.extend( Animation, { | |
- | |
- tweeners: { | |
- "*": [ function( prop, value ) { | |
- var tween = this.createTween( prop, value ); | |
- adjustCSS( tween.elem, prop, rcssNum.exec( value ), tw… | |
- return tween; | |
- } ] | |
- }, | |
- | |
- tweener: function( props, callback ) { | |
- if ( jQuery.isFunction( props ) ) { | |
- callback = props; | |
- props = [ "*" ]; | |
- } else { | |
- props = props.match( rnothtmlwhite ); | |
- } | |
- | |
- var prop, | |
- index = 0, | |
- length = props.length; | |
- | |
- for ( ; index < length; index++ ) { | |
- prop = props[ index ]; | |
- Animation.tweeners[ prop ] = Animation.tweeners[ prop … | |
- Animation.tweeners[ prop ].unshift( callback ); | |
- } | |
- }, | |
- | |
- prefilters: [ defaultPrefilter ], | |
- | |
- prefilter: function( callback, prepend ) { | |
- if ( prepend ) { | |
- Animation.prefilters.unshift( callback ); | |
- } else { | |
- Animation.prefilters.push( callback ); | |
- } | |
- } | |
-} ); | |
- | |
-jQuery.speed = function( speed, easing, fn ) { | |
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, spee… | |
- complete: fn || !fn && easing || | |
- jQuery.isFunction( speed ) && speed, | |
- duration: speed, | |
- easing: fn && easing || easing && !jQuery.isFunction( easing )… | |
- }; | |
- | |
- // Go to the end state if fx are off or if document is hidden | |
- if ( jQuery.fx.off || document.hidden ) { | |
- opt.duration = 0; | |
- | |
- } else { | |
- if ( typeof opt.duration !== "number" ) { | |
- if ( opt.duration in jQuery.fx.speeds ) { | |
- opt.duration = jQuery.fx.speeds[ opt.duration … | |
- | |
- } else { | |
- opt.duration = jQuery.fx.speeds._default; | |
- } | |
- } | |
- } | |
- | |
- // Normalize opt.queue - true/undefined/null -> "fx" | |
- if ( opt.queue == null || opt.queue === true ) { | |
- opt.queue = "fx"; | |
- } | |
- | |
- // Queueing | |
- opt.old = opt.complete; | |
- | |
- opt.complete = function() { | |
- if ( jQuery.isFunction( opt.old ) ) { | |
- opt.old.call( this ); | |
- } | |
- | |
- if ( opt.queue ) { | |
- jQuery.dequeue( this, opt.queue ); | |
- } | |
- }; | |
- | |
- return opt; | |
-}; | |
- | |
-jQuery.fn.extend( { | |
- fadeTo: function( speed, to, easing, callback ) { | |
- | |
- // Show any hidden elements after setting opacity to 0 | |
- return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).s… | |
- | |
- // Animate to the value specified | |
- .end().animate( { opacity: to }, speed, easing, callba… | |
- }, | |
- animate: function( prop, speed, easing, callback ) { | |
- var empty = jQuery.isEmptyObject( prop ), | |
- optall = jQuery.speed( speed, easing, callback ), | |
- doAnimation = function() { | |
- | |
- // Operate on a copy of prop so per-property e… | |
- var anim = Animation( this, jQuery.extend( {},… | |
- | |
- // Empty animations, or finishing resolves imm… | |
- if ( empty || dataPriv.get( this, "finish" ) )… | |
- anim.stop( true ); | |
- } | |
- }; | |
- doAnimation.finish = doAnimation; | |
- | |
- return empty || optall.queue === false ? | |
- this.each( doAnimation ) : | |
- this.queue( optall.queue, doAnimation ); | |
- }, | |
- stop: function( type, clearQueue, gotoEnd ) { | |
- var stopQueue = function( hooks ) { | |
- var stop = hooks.stop; | |
- delete hooks.stop; | |
- stop( gotoEnd ); | |
- }; | |
- | |
- if ( typeof type !== "string" ) { | |
- gotoEnd = clearQueue; | |
- clearQueue = type; | |
- type = undefined; | |
- } | |
- if ( clearQueue && type !== false ) { | |
- this.queue( type || "fx", [] ); | |
- } | |
- | |
- return this.each( function() { | |
- var dequeue = true, | |
- index = type != null && type + "queueHooks", | |
- timers = jQuery.timers, | |
- data = dataPriv.get( this ); | |
- | |
- if ( index ) { | |
- if ( data[ index ] && data[ index ].stop ) { | |
- stopQueue( data[ index ] ); | |
- } | |
- } else { | |
- for ( index in data ) { | |
- if ( data[ index ] && data[ index ].st… | |
- stopQueue( data[ index ] ); | |
- } | |
- } | |
- } | |
- | |
- for ( index = timers.length; index--; ) { | |
- if ( timers[ index ].elem === this && | |
- ( type == null || timers[ index ].queu… | |
- | |
- timers[ index ].anim.stop( gotoEnd ); | |
- dequeue = false; | |
- timers.splice( index, 1 ); | |
- } | |
- } | |
- | |
- // Start the next in the queue if the last step wasn't… | |
- // Timers currently will call their complete callbacks… | |
- // will dequeue but only if they were gotoEnd. | |
- if ( dequeue || !gotoEnd ) { | |
- jQuery.dequeue( this, type ); | |
- } | |
- } ); | |
- }, | |
- finish: function( type ) { | |
- if ( type !== false ) { | |
- type = type || "fx"; | |
- } | |
- return this.each( function() { | |
- var index, | |
- data = dataPriv.get( this ), | |
- queue = data[ type + "queue" ], | |
- hooks = data[ type + "queueHooks" ], | |
- timers = jQuery.timers, | |
- length = queue ? queue.length : 0; | |
- | |
- // Enable finishing flag on private data | |
- data.finish = true; | |
- | |
- // Empty the queue first | |
- jQuery.queue( this, type, [] ); | |
- | |
- if ( hooks && hooks.stop ) { | |
- hooks.stop.call( this, true ); | |
- } | |
- | |
- // Look for any active animations, and finish them | |
- for ( index = timers.length; index--; ) { | |
- if ( timers[ index ].elem === this && timers[ … | |
- timers[ index ].anim.stop( true ); | |
- timers.splice( index, 1 ); | |
- } | |
- } | |
- | |
- // Look for any animations in the old queue and finish… | |
- for ( index = 0; index < length; index++ ) { | |
- if ( queue[ index ] && queue[ index ].finish )… | |
- queue[ index ].finish.call( this ); | |
- } | |
- } | |
- | |
- // Turn off finishing flag | |
- delete data.finish; | |
- } ); | |
- } | |
-} ); | |
- | |
-jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { | |
- var cssFn = jQuery.fn[ name ]; | |
- jQuery.fn[ name ] = function( speed, easing, callback ) { | |
- return speed == null || typeof speed === "boolean" ? | |
- cssFn.apply( this, arguments ) : | |
- this.animate( genFx( name, true ), speed, easing, call… | |
- }; | |
-} ); | |
- | |
-// Generate shortcuts for custom animations | |
-jQuery.each( { | |
- slideDown: genFx( "show" ), | |
- slideUp: genFx( "hide" ), | |
- slideToggle: genFx( "toggle" ), | |
- fadeIn: { opacity: "show" }, | |
- fadeOut: { opacity: "hide" }, | |
- fadeToggle: { opacity: "toggle" } | |
-}, function( name, props ) { | |
- jQuery.fn[ name ] = function( speed, easing, callback ) { | |
- return this.animate( props, speed, easing, callback ); | |
- }; | |
-} ); | |
- | |
-jQuery.timers = []; | |
-jQuery.fx.tick = function() { | |
- var timer, | |
- i = 0, | |
- timers = jQuery.timers; | |
- | |
- fxNow = jQuery.now(); | |
- | |
- for ( ; i < timers.length; i++ ) { | |
- timer = timers[ i ]; | |
- | |
- // Checks the timer has not already been removed | |
- if ( !timer() && timers[ i ] === timer ) { | |
- timers.splice( i--, 1 ); | |
- } | |
- } | |
- | |
- if ( !timers.length ) { | |
- jQuery.fx.stop(); | |
- } | |
- fxNow = undefined; | |
-}; | |
- | |
-jQuery.fx.timer = function( timer ) { | |
- jQuery.timers.push( timer ); | |
- if ( timer() ) { | |
- jQuery.fx.start(); | |
- } else { | |
- jQuery.timers.pop(); | |
- } | |
-}; | |
- | |
-jQuery.fx.interval = 13; | |
-jQuery.fx.start = function() { | |
- if ( !timerId ) { | |
- timerId = window.requestAnimationFrame ? | |
- window.requestAnimationFrame( raf ) : | |
- window.setInterval( jQuery.fx.tick, jQuery.fx.interval… | |
- } | |
-}; | |
- | |
-jQuery.fx.stop = function() { | |
- if ( window.cancelAnimationFrame ) { | |
- window.cancelAnimationFrame( timerId ); | |
- } else { | |
- window.clearInterval( timerId ); | |
- } | |
- | |
- timerId = null; | |
-}; | |
- | |
-jQuery.fx.speeds = { | |
- slow: 600, | |
- fast: 200, | |
- | |
- // Default speed | |
- _default: 400 | |
-}; | |
- | |
- | |
-// Based off of the plugin by Clint Helfers, with permission. | |
-// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.ph… | |
-jQuery.fn.delay = function( time, type ) { | |
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; | |
- type = type || "fx"; | |
- | |
- return this.queue( type, function( next, hooks ) { | |
- var timeout = window.setTimeout( next, time ); | |
- hooks.stop = function() { | |
- window.clearTimeout( timeout ); | |
- }; | |
- } ); | |
-}; | |
- | |
- | |
-( function() { | |
- var input = document.createElement( "input" ), | |
- select = document.createElement( "select" ), | |
- opt = select.appendChild( document.createElement( "option" ) ); | |
- | |
- input.type = "checkbox"; | |
- | |
- // Support: Android <=4.3 only | |
- // Default value for a checkbox should be "on" | |
- support.checkOn = input.value !== ""; | |
- | |
- // Support: IE <=11 only | |
- // Must access selectedIndex to make default options select | |
- support.optSelected = opt.selected; | |
- | |
- // Support: IE <=11 only | |
- // An input loses its value after becoming a radio | |
- input = document.createElement( "input" ); | |
- input.value = "t"; | |
- input.type = "radio"; | |
- support.radioValue = input.value === "t"; | |
-} )(); | |
- | |
- | |
-var boolHook, | |
- attrHandle = jQuery.expr.attrHandle; | |
- | |
-jQuery.fn.extend( { | |
- attr: function( name, value ) { | |
- return access( this, jQuery.attr, name, value, arguments.lengt… | |
- }, | |
- | |
- removeAttr: function( name ) { | |
- return this.each( function() { | |
- jQuery.removeAttr( this, name ); | |
- } ); | |
- } | |
-} ); | |
- | |
-jQuery.extend( { | |
- attr: function( elem, name, value ) { | |
- var ret, hooks, | |
- nType = elem.nodeType; | |
- | |
- // Don't get/set attributes on text, comment and attribute nod… | |
- if ( nType === 3 || nType === 8 || nType === 2 ) { | |
- return; | |
- } | |
- | |
- // Fallback to prop when attributes are not supported | |
- if ( typeof elem.getAttribute === "undefined" ) { | |
- return jQuery.prop( elem, name, value ); | |
- } | |
- | |
- // Attribute hooks are determined by the lowercase version | |
- // Grab necessary hook if one is defined | |
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { | |
- hooks = jQuery.attrHooks[ name.toLowerCase() ] || | |
- ( jQuery.expr.match.bool.test( name ) ? boolHo… | |
- } | |
- | |
- if ( value !== undefined ) { | |
- if ( value === null ) { | |
- jQuery.removeAttr( elem, name ); | |
- return; | |
- } | |
- | |
- if ( hooks && "set" in hooks && | |
- ( ret = hooks.set( elem, value, name ) ) !== u… | |
- return ret; | |
- } | |
- | |
- elem.setAttribute( name, value + "" ); | |
- return value; | |
- } | |
- | |
- if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name … | |
- return ret; | |
- } | |
- | |
- ret = jQuery.find.attr( elem, name ); | |
- | |
- // Non-existent attributes return null, we normalize to undefi… | |
- return ret == null ? undefined : ret; | |
- }, | |
- | |
- attrHooks: { | |
- type: { | |
- set: function( elem, value ) { | |
- if ( !support.radioValue && value === "radio" … | |
- jQuery.nodeName( elem, "input" ) ) { | |
- var val = elem.value; | |
- elem.setAttribute( "type", value ); | |
- if ( val ) { | |
- elem.value = val; | |
- } | |
- return value; | |
- } | |
- } | |
- } | |
- }, | |
- | |
- removeAttr: function( elem, value ) { | |
- var name, | |
- i = 0, | |
- | |
- // Attribute names can contain non-HTML whitespace cha… | |
- // https://html.spec.whatwg.org/multipage/syntax.html#… | |
- attrNames = value && value.match( rnothtmlwhite ); | |
- | |
- if ( attrNames && elem.nodeType === 1 ) { | |
- while ( ( name = attrNames[ i++ ] ) ) { | |
- elem.removeAttribute( name ); | |
- } | |
- } | |
- } | |
-} ); | |
- | |
-// Hooks for boolean attributes | |
-boolHook = { | |
- set: function( elem, value, name ) { | |
- if ( value === false ) { | |
- | |
- // Remove boolean attributes when set to false | |
- jQuery.removeAttr( elem, name ); | |
- } else { | |
- elem.setAttribute( name, name ); | |
- } | |
- return name; | |
- } | |
-}; | |
- | |
-jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name … | |
- var getter = attrHandle[ name ] || jQuery.find.attr; | |
- | |
- attrHandle[ name ] = function( elem, name, isXML ) { | |
- var ret, handle, | |
- lowercaseName = name.toLowerCase(); | |
- | |
- if ( !isXML ) { | |
- | |
- // Avoid an infinite loop by temporarily removing this… | |
- handle = attrHandle[ lowercaseName ]; | |
- attrHandle[ lowercaseName ] = ret; | |
- ret = getter( elem, name, isXML ) != null ? | |
- lowercaseName : | |
- null; | |
- attrHandle[ lowercaseName ] = handle; | |
- } | |
- return ret; | |
- }; | |
-} ); | |
- | |
- | |
- | |
- | |
-var rfocusable = /^(?:input|select|textarea|button)$/i, | |
- rclickable = /^(?:a|area)$/i; | |
- | |
-jQuery.fn.extend( { | |
- prop: function( name, value ) { | |
- return access( this, jQuery.prop, name, value, arguments.lengt… | |
- }, | |
- | |
- removeProp: function( name ) { | |
- return this.each( function() { | |
- delete this[ jQuery.propFix[ name ] || name ]; | |
- } ); | |
- } | |
-} ); | |
- | |
-jQuery.extend( { | |
- prop: function( elem, name, value ) { | |
- var ret, hooks, | |
- nType = elem.nodeType; | |
- | |
- // Don't get/set properties on text, comment and attribute nod… | |
- if ( nType === 3 || nType === 8 || nType === 2 ) { | |
- return; | |
- } | |
- | |
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { | |
- | |
- // Fix name and attach hooks | |
- name = jQuery.propFix[ name ] || name; | |
- hooks = jQuery.propHooks[ name ]; | |
- } | |
- | |
- if ( value !== undefined ) { | |
- if ( hooks && "set" in hooks && | |
- ( ret = hooks.set( elem, value, name ) ) !== u… | |
- return ret; | |
- } | |
- | |
- return ( elem[ name ] = value ); | |
- } | |
- | |
- if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name … | |
- return ret; | |
- } | |
- | |
- return elem[ name ]; | |
- }, | |
- | |
- propHooks: { | |
- tabIndex: { | |
- get: function( elem ) { | |
- | |
- // Support: IE <=9 - 11 only | |
- // elem.tabIndex doesn't always return the | |
- // correct value when it hasn't been explicitl… | |
- // https://web.archive.org/web/20141116233347/… | |
- // Use proper attribute retrieval(#12072) | |
- var tabindex = jQuery.find.attr( elem, "tabind… | |
- | |
- if ( tabindex ) { | |
- return parseInt( tabindex, 10 ); | |
- } | |
- | |
- if ( | |
- rfocusable.test( elem.nodeName ) || | |
- rclickable.test( elem.nodeName ) && | |
- elem.href | |
- ) { | |
- return 0; | |
- } | |
- | |
- return -1; | |
- } | |
- } | |
- }, | |
- | |
- propFix: { | |
- "for": "htmlFor", | |
- "class": "className" | |
- } | |
-} ); | |
- | |
-// Support: IE <=11 only | |
-// Accessing the selectedIndex property | |
-// forces the browser to respect setting selected | |
-// on the option | |
-// The getter ensures a default option is selected | |
-// when in an optgroup | |
-// eslint rule "no-unused-expressions" is disabled for this code | |
-// since it considers such accessions noop | |
-if ( !support.optSelected ) { | |
- jQuery.propHooks.selected = { | |
- get: function( elem ) { | |
- | |
- /* eslint no-unused-expressions: "off" */ | |
- | |
- var parent = elem.parentNode; | |
- if ( parent && parent.parentNode ) { | |
- parent.parentNode.selectedIndex; | |
- } | |
- return null; | |
- }, | |
- set: function( elem ) { | |
- | |
- /* eslint no-unused-expressions: "off" */ | |
- | |
- var parent = elem.parentNode; | |
- if ( parent ) { | |
- parent.selectedIndex; | |
- | |
- if ( parent.parentNode ) { | |
- parent.parentNode.selectedIndex; | |
- } | |
- } | |
- } | |
- }; | |
-} | |
- | |
-jQuery.each( [ | |
- "tabIndex", | |
- "readOnly", | |
- "maxLength", | |
- "cellSpacing", | |
- "cellPadding", | |
- "rowSpan", | |
- "colSpan", | |
- "useMap", | |
- "frameBorder", | |
- "contentEditable" | |
-], function() { | |
- jQuery.propFix[ this.toLowerCase() ] = this; | |
-} ); | |
- | |
- | |
- | |
- | |
- // Strip and collapse whitespace according to HTML spec | |
- // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-an… | |
- function stripAndCollapse( value ) { | |
- var tokens = value.match( rnothtmlwhite ) || []; | |
- return tokens.join( " " ); | |
- } | |
- | |
- | |
-function getClass( elem ) { | |
- return elem.getAttribute && elem.getAttribute( "class" ) || ""; | |
-} | |
- | |
-jQuery.fn.extend( { | |
- addClass: function( value ) { | |
- var classes, elem, cur, curValue, clazz, j, finalValue, | |
- i = 0; | |
- | |
- if ( jQuery.isFunction( value ) ) { | |
- return this.each( function( j ) { | |
- jQuery( this ).addClass( value.call( this, j, … | |
- } ); | |
- } | |
- | |
- if ( typeof value === "string" && value ) { | |
- classes = value.match( rnothtmlwhite ) || []; | |
- | |
- while ( ( elem = this[ i++ ] ) ) { | |
- curValue = getClass( elem ); | |
- cur = elem.nodeType === 1 && ( " " + stripAndC… | |
- | |
- if ( cur ) { | |
- j = 0; | |
- while ( ( clazz = classes[ j++ ] ) ) { | |
- if ( cur.indexOf( " " + clazz … | |
- cur += clazz + " "; | |
- } | |
- } | |
- | |
- // Only assign if different to avoid u… | |
- finalValue = stripAndCollapse( cur ); | |
- if ( curValue !== finalValue ) { | |
- elem.setAttribute( "class", fi… | |
- } | |
- } | |
- } | |
- } | |
- | |
- return this; | |
- }, | |
- | |
- removeClass: function( value ) { | |
- var classes, elem, cur, curValue, clazz, j, finalValue, | |
- i = 0; | |
- | |
- if ( jQuery.isFunction( value ) ) { | |
- return this.each( function( j ) { | |
- jQuery( this ).removeClass( value.call( this, … | |
- } ); | |
- } | |
- | |
- if ( !arguments.length ) { | |
- return this.attr( "class", "" ); | |
- } | |
- | |
- if ( typeof value === "string" && value ) { | |
- classes = value.match( rnothtmlwhite ) || []; | |
- | |
- while ( ( elem = this[ i++ ] ) ) { | |
- curValue = getClass( elem ); | |
- | |
- // This expression is here for better compress… | |
- cur = elem.nodeType === 1 && ( " " + stripAndC… | |
- | |
- if ( cur ) { | |
- j = 0; | |
- while ( ( clazz = classes[ j++ ] ) ) { | |
- | |
- // Remove *all* instances | |
- while ( cur.indexOf( " " + cla… | |
- cur = cur.replace( " "… | |
- } | |
- } | |
- | |
- // Only assign if different to avoid u… | |
- finalValue = stripAndCollapse( cur ); | |
- if ( curValue !== finalValue ) { | |
- elem.setAttribute( "class", fi… | |
- } | |
- } | |
- } | |
- } | |
- | |
- return this; | |
- }, | |
- | |
- toggleClass: function( value, stateVal ) { | |
- var type = typeof value; | |
- | |
- if ( typeof stateVal === "boolean" && type === "string" ) { | |
- return stateVal ? this.addClass( value ) : this.remove… | |
- } | |
- | |
- if ( jQuery.isFunction( value ) ) { | |
- return this.each( function( i ) { | |
- jQuery( this ).toggleClass( | |
- value.call( this, i, getClass( this ),… | |
- stateVal | |
- ); | |
- } ); | |
- } | |
- | |
- return this.each( function() { | |
- var className, i, self, classNames; | |
- | |
- if ( type === "string" ) { | |
- | |
- // Toggle individual class names | |
- i = 0; | |
- self = jQuery( this ); | |
- classNames = value.match( rnothtmlwhite ) || [… | |
- | |
- while ( ( className = classNames[ i++ ] ) ) { | |
- | |
- // Check each className given, space s… | |
- if ( self.hasClass( className ) ) { | |
- self.removeClass( className ); | |
- } else { | |
- self.addClass( className ); | |
- } | |
- } | |
- | |
- // Toggle whole class name | |
- } else if ( value === undefined || type === "boolean" … | |
- className = getClass( this ); | |
- if ( className ) { | |
- | |
- // Store className if set | |
- dataPriv.set( this, "__className__", c… | |
- } | |
- | |
- // If the element has a class name or if we're… | |
- // then remove the whole classname (if there w… | |
- // Otherwise bring back whatever was previousl… | |
- // falling back to the empty string if nothing… | |
- if ( this.setAttribute ) { | |
- this.setAttribute( "class", | |
- className || value === false ? | |
- "" : | |
- dataPriv.get( this, "__classNa… | |
- ); | |
- } | |
- } | |
- } ); | |
- }, | |
- | |
- hasClass: function( selector ) { | |
- var className, elem, | |
- i = 0; | |
- | |
- className = " " + selector + " "; | |
- while ( ( elem = this[ i++ ] ) ) { | |
- if ( elem.nodeType === 1 && | |
- ( " " + stripAndCollapse( getClass( elem ) ) +… | |
- return true; | |
- } | |
- } | |
- | |
- return false; | |
- } | |
-} ); | |
- | |
- | |
- | |
- | |
-var rreturn = /\r/g; | |
- | |
-jQuery.fn.extend( { | |
- val: function( value ) { | |
- var hooks, ret, isFunction, | |
- elem = this[ 0 ]; | |
- | |
- if ( !arguments.length ) { | |
- if ( elem ) { | |
- hooks = jQuery.valHooks[ elem.type ] || | |
- jQuery.valHooks[ elem.nodeName.toLower… | |
- | |
- if ( hooks && | |
- "get" in hooks && | |
- ( ret = hooks.get( elem, "value" ) ) !… | |
- ) { | |
- return ret; | |
- } | |
- | |
- ret = elem.value; | |
- | |
- // Handle most common string cases | |
- if ( typeof ret === "string" ) { | |
- return ret.replace( rreturn, "" ); | |
- } | |
- | |
- // Handle cases where value is null/undef or n… | |
- return ret == null ? "" : ret; | |
- } | |
- | |
- return; | |
- } | |
- | |
- isFunction = jQuery.isFunction( value ); | |
- | |
- return this.each( function( i ) { | |
- var val; | |
- | |
- if ( this.nodeType !== 1 ) { | |
- return; | |
- } | |
- | |
- if ( isFunction ) { | |
- val = value.call( this, i, jQuery( this ).val(… | |
- } else { | |
- val = value; | |
- } | |
- | |
- // Treat null/undefined as ""; convert numbers to stri… | |
- if ( val == null ) { | |
- val = ""; | |
- | |
- } else if ( typeof val === "number" ) { | |
- val += ""; | |
- | |
- } else if ( jQuery.isArray( val ) ) { | |
- val = jQuery.map( val, function( value ) { | |
- return value == null ? "" : value + ""; | |
- } ); | |
- } | |
- | |
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHook… | |
- | |
- // If set returns undefined, fall back to normal setti… | |
- if ( !hooks || !( "set" in hooks ) || hooks.set( this,… | |
- this.value = val; | |
- } | |
- } ); | |
- } | |
-} ); | |
- | |
-jQuery.extend( { | |
- valHooks: { | |
- option: { | |
- get: function( elem ) { | |
- | |
- var val = jQuery.find.attr( elem, "value" ); | |
- return val != null ? | |
- val : | |
- | |
- // Support: IE <=10 - 11 only | |
- // option.text throws exceptions (#146… | |
- // Strip and collapse whitespace | |
- // https://html.spec.whatwg.org/#strip… | |
- stripAndCollapse( jQuery.text( elem ) … | |
- } | |
- }, | |
- select: { | |
- get: function( elem ) { | |
- var value, option, i, | |
- options = elem.options, | |
- index = elem.selectedIndex, | |
- one = elem.type === "select-one", | |
- values = one ? null : [], | |
- max = one ? index + 1 : options.length; | |
- | |
- if ( index < 0 ) { | |
- i = max; | |
- | |
- } else { | |
- i = one ? index : 0; | |
- } | |
- | |
- // Loop through all the selected options | |
- for ( ; i < max; i++ ) { | |
- option = options[ i ]; | |
- | |
- // Support: IE <=9 only | |
- // IE8-9 doesn't update selected after… | |
- if ( ( option.selected || i === index … | |
- | |
- // Don't return option… | |
- !option.disabled && | |
- ( !option.parentNode.d… | |
- !jQuery.nodeNa… | |
- | |
- // Get the specific value for … | |
- value = jQuery( option ).val(); | |
- | |
- // We don't need an array for … | |
- if ( one ) { | |
- return value; | |
- } | |
- | |
- // Multi-Selects return an arr… | |
- values.push( value ); | |
- } | |
- } | |
- | |
- return values; | |
- }, | |
- | |
- set: function( elem, value ) { | |
- var optionSet, option, | |
- options = elem.options, | |
- values = jQuery.makeArray( value ), | |
- i = options.length; | |
- | |
- while ( i-- ) { | |
- option = options[ i ]; | |
- | |
- /* eslint-disable no-cond-assign */ | |
- | |
- if ( option.selected = | |
- jQuery.inArray( jQuery.valHook… | |
- ) { | |
- optionSet = true; | |
- } | |
- | |
- /* eslint-enable no-cond-assign */ | |
- } | |
- | |
- // Force browsers to behave consistently when … | |
- if ( !optionSet ) { | |
- elem.selectedIndex = -1; | |
- } | |
- return values; | |
- } | |
- } | |
- } | |
-} ); | |
- | |
-// Radios and checkboxes getter/setter | |
-jQuery.each( [ "radio", "checkbox" ], function() { | |
- jQuery.valHooks[ this ] = { | |
- set: function( elem, value ) { | |
- if ( jQuery.isArray( value ) ) { | |
- return ( elem.checked = jQuery.inArray( jQuery… | |
- } | |
- } | |
- }; | |
- if ( !support.checkOn ) { | |
- jQuery.valHooks[ this ].get = function( elem ) { | |
- return elem.getAttribute( "value" ) === null ? "on" : … | |
- }; | |
- } | |
-} ); | |
- | |
- | |
- | |
- | |
-// Return jQuery for attributes-only inclusion | |
- | |
- | |
-var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; | |
- | |
-jQuery.extend( jQuery.event, { | |
- | |
- trigger: function( event, data, elem, onlyHandlers ) { | |
- | |
- var i, cur, tmp, bubbleType, ontype, handle, special, | |
- eventPath = [ elem || document ], | |
- type = hasOwn.call( event, "type" ) ? event.type : eve… | |
- namespaces = hasOwn.call( event, "namespace" ) ? event… | |
- | |
- cur = tmp = elem = elem || document; | |
- | |
- // Don't do events on text and comment nodes | |
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) { | |
- return; | |
- } | |
- | |
- // focus/blur morphs to focusin/out; ensure we're not firing t… | |
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { | |
- return; | |
- } | |
- | |
- if ( type.indexOf( "." ) > -1 ) { | |
- | |
- // Namespaced trigger; create a regexp to match event … | |
- namespaces = type.split( "." ); | |
- type = namespaces.shift(); | |
- namespaces.sort(); | |
- } | |
- ontype = type.indexOf( ":" ) < 0 && "on" + type; | |
- | |
- // Caller can pass in a jQuery.Event object, Object, or just a… | |
- event = event[ jQuery.expando ] ? | |
- event : | |
- new jQuery.Event( type, typeof event === "object" && e… | |
- | |
- // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (a… | |
- event.isTrigger = onlyHandlers ? 2 : 3; | |
- event.namespace = namespaces.join( "." ); | |
- event.rnamespace = event.namespace ? | |
- new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|… | |
- null; | |
- | |
- // Clean up the event in case it is being reused | |
- event.result = undefined; | |
- if ( !event.target ) { | |
- event.target = elem; | |
- } | |
- | |
- // Clone any incoming data and prepend the event, creating the… | |
- data = data == null ? | |
- [ event ] : | |
- jQuery.makeArray( data, [ event ] ); | |
- | |
- // Allow special events to draw outside the lines | |
- special = jQuery.event.special[ type ] || {}; | |
- if ( !onlyHandlers && special.trigger && special.trigger.apply… | |
- return; | |
- } | |
- | |
- // Determine event propagation path in advance, per W3C events… | |
- // Bubble up to document, then to window; watch for a global o… | |
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( e… | |
- | |
- bubbleType = special.delegateType || type; | |
- if ( !rfocusMorph.test( bubbleType + type ) ) { | |
- cur = cur.parentNode; | |
- } | |
- for ( ; cur; cur = cur.parentNode ) { | |
- eventPath.push( cur ); | |
- tmp = cur; | |
- } | |
- | |
- // Only add window if we got to document (e.g., not pl… | |
- if ( tmp === ( elem.ownerDocument || document ) ) { | |
- eventPath.push( tmp.defaultView || tmp.parentW… | |
- } | |
- } | |
- | |
- // Fire handlers on the event path | |
- i = 0; | |
- while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStop… | |
- | |
- event.type = i > 1 ? | |
- bubbleType : | |
- special.bindType || type; | |
- | |
- // jQuery handler | |
- handle = ( dataPriv.get( cur, "events" ) || {} )[ even… | |
- dataPriv.get( cur, "handle" ); | |
- if ( handle ) { | |
- handle.apply( cur, data ); | |
- } | |
- | |
- // Native handler | |
- handle = ontype && cur[ ontype ]; | |
- if ( handle && handle.apply && acceptData( cur ) ) { | |
- event.result = handle.apply( cur, data ); | |
- if ( event.result === false ) { | |
- event.preventDefault(); | |
- } | |
- } | |
- } | |
- event.type = type; | |
- | |
- // If nobody prevented the default action, do it now | |
- if ( !onlyHandlers && !event.isDefaultPrevented() ) { | |
- | |
- if ( ( !special._default || | |
- special._default.apply( eventPath.pop(), data … | |
- acceptData( elem ) ) { | |
- | |
- // Call a native DOM method on the target with… | |
- // Don't do default actions on window, that's … | |
- if ( ontype && jQuery.isFunction( elem[ type ]… | |
- | |
- // Don't re-trigger an onFOO event whe… | |
- tmp = elem[ ontype ]; | |
- | |
- if ( tmp ) { | |
- elem[ ontype ] = null; | |
- } | |
- | |
- // Prevent re-triggering of the same e… | |
- jQuery.event.triggered = type; | |
- elem[ type ](); | |
- jQuery.event.triggered = undefined; | |
- | |
- if ( tmp ) { | |
- elem[ ontype ] = tmp; | |
- } | |
- } | |
- } | |
- } | |
- | |
- return event.result; | |
- }, | |
- | |
- // Piggyback on a donor event to simulate a different one | |
- // Used only for `focus(in | out)` events | |
- simulate: function( type, elem, event ) { | |
- var e = jQuery.extend( | |
- new jQuery.Event(), | |
- event, | |
- { | |
- type: type, | |
- isSimulated: true | |
- } | |
- ); | |
- | |
- jQuery.event.trigger( e, null, elem ); | |
- } | |
- | |
-} ); | |
- | |
-jQuery.fn.extend( { | |
- | |
- trigger: function( type, data ) { | |
- return this.each( function() { | |
- jQuery.event.trigger( type, data, this ); | |
- } ); | |
- }, | |
- triggerHandler: function( type, data ) { | |
- var elem = this[ 0 ]; | |
- if ( elem ) { | |
- return jQuery.event.trigger( type, data, elem, true ); | |
- } | |
- } | |
-} ); | |
- | |
- | |
-jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + | |
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave … | |
- "change select submit keydown keypress keyup contextmenu" ).split( " "… | |
- function( i, name ) { | |
- | |
- // Handle event binding | |
- jQuery.fn[ name ] = function( data, fn ) { | |
- return arguments.length > 0 ? | |
- this.on( name, null, data, fn ) : | |
- this.trigger( name ); | |
- }; | |
-} ); | |
- | |
-jQuery.fn.extend( { | |
- hover: function( fnOver, fnOut ) { | |
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); | |
- } | |
-} ); | |
- | |
- | |
- | |
- | |
-support.focusin = "onfocusin" in window; | |
- | |
- | |
-// Support: Firefox <=44 | |
-// Firefox doesn't have focus(in | out) events | |
-// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 | |
-// | |
-// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 | |
-// focus(in | out) events fire after focus & blur events, | |
-// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-f… | |
-// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=4498… | |
-if ( !support.focusin ) { | |
- jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, f… | |
- | |
- // Attach a single capturing handler on the document while som… | |
- var handler = function( event ) { | |
- jQuery.event.simulate( fix, event.target, jQuery.event… | |
- }; | |
- | |
- jQuery.event.special[ fix ] = { | |
- setup: function() { | |
- var doc = this.ownerDocument || this, | |
- attaches = dataPriv.access( doc, fix ); | |
- | |
- if ( !attaches ) { | |
- doc.addEventListener( orig, handler, t… | |
- } | |
- dataPriv.access( doc, fix, ( attaches || 0 ) +… | |
- }, | |
- teardown: function() { | |
- var doc = this.ownerDocument || this, | |
- attaches = dataPriv.access( doc, fix )… | |
- | |
- if ( !attaches ) { | |
- doc.removeEventListener( orig, handler… | |
- dataPriv.remove( doc, fix ); | |
- | |
- } else { | |
- dataPriv.access( doc, fix, attaches ); | |
- } | |
- } | |
- }; | |
- } ); | |
-} | |
-var location = window.location; | |
- | |
-var nonce = jQuery.now(); | |
- | |
-var rquery = ( /\?/ ); | |
- | |
- | |
- | |
-// Cross-browser xml parsing | |
-jQuery.parseXML = function( data ) { | |
- var xml; | |
- if ( !data || typeof data !== "string" ) { | |
- return null; | |
- } | |
- | |
- // Support: IE 9 - 11 only | |
- // IE throws on parseFromString with invalid input. | |
- try { | |
- xml = ( new window.DOMParser() ).parseFromString( data, "text/… | |
- } catch ( e ) { | |
- xml = undefined; | |
- } | |
- | |
- if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { | |
- jQuery.error( "Invalid XML: " + data ); | |
- } | |
- return xml; | |
-}; | |
- | |
- | |
-var | |
- rbracket = /\[\]$/, | |
- rCRLF = /\r?\n/g, | |
- rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, | |
- rsubmittable = /^(?:input|select|textarea|keygen)/i; | |
- | |
-function buildParams( prefix, obj, traditional, add ) { | |
- var name; | |
- | |
- if ( jQuery.isArray( obj ) ) { | |
- | |
- // Serialize array item. | |
- jQuery.each( obj, function( i, v ) { | |
- if ( traditional || rbracket.test( prefix ) ) { | |
- | |
- // Treat each array item as a scalar. | |
- add( prefix, v ); | |
- | |
- } else { | |
- | |
- // Item is non-scalar (array or object), encod… | |
- buildParams( | |
- prefix + "[" + ( typeof v === "object"… | |
- v, | |
- traditional, | |
- add | |
- ); | |
- } | |
- } ); | |
- | |
- } else if ( !traditional && jQuery.type( obj ) === "object" ) { | |
- | |
- // Serialize object item. | |
- for ( name in obj ) { | |
- buildParams( prefix + "[" + name + "]", obj[ name ], t… | |
- } | |
- | |
- } else { | |
- | |
- // Serialize scalar item. | |
- add( prefix, obj ); | |
- } | |
-} | |
- | |
-// Serialize an array of form elements or a set of | |
-// key/values into a query string | |
-jQuery.param = function( a, traditional ) { | |
- var prefix, | |
- s = [], | |
- add = function( key, valueOrFunction ) { | |
- | |
- // If value is a function, invoke it and use its retur… | |
- var value = jQuery.isFunction( valueOrFunction ) ? | |
- valueOrFunction() : | |
- valueOrFunction; | |
- | |
- s[ s.length ] = encodeURIComponent( key ) + "=" + | |
- encodeURIComponent( value == null ? "" : value… | |
- }; | |
- | |
- // If an array was passed in, assume that it is an array of form eleme… | |
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) )… | |
- | |
- // Serialize the form elements | |
- jQuery.each( a, function() { | |
- add( this.name, this.value ); | |
- } ); | |
- | |
- } else { | |
- | |
- // If traditional, encode the "old" way (the way 1.3.2 or older | |
- // did it), otherwise encode params recursively. | |
- for ( prefix in a ) { | |
- buildParams( prefix, a[ prefix ], traditional, add ); | |
- } | |
- } | |
- | |
- // Return the resulting serialization | |
- return s.join( "&" ); | |
-}; | |
- | |
-jQuery.fn.extend( { | |
- serialize: function() { | |
- return jQuery.param( this.serializeArray() ); | |
- }, | |
- serializeArray: function() { | |
- return this.map( function() { | |
- | |
- // Can add propHook for "elements" to filter or add fo… | |
- var elements = jQuery.prop( this, "elements" ); | |
- return elements ? jQuery.makeArray( elements ) : this; | |
- } ) | |
- .filter( function() { | |
- var type = this.type; | |
- | |
- // Use .is( ":disabled" ) so that fieldset[disabled] w… | |
- return this.name && !jQuery( this ).is( ":disabled" ) … | |
- rsubmittable.test( this.nodeName ) && !rsubmit… | |
- ( this.checked || !rcheckableType.test( type )… | |
- } ) | |
- .map( function( i, elem ) { | |
- var val = jQuery( this ).val(); | |
- | |
- if ( val == null ) { | |
- return null; | |
- } | |
- | |
- if ( jQuery.isArray( val ) ) { | |
- return jQuery.map( val, function( val ) { | |
- return { name: elem.name, value: val.r… | |
- } ); | |
- } | |
- | |
- return { name: elem.name, value: val.replace( rCRLF, "… | |
- } ).get(); | |
- } | |
-} ); | |
- | |
- | |
-var | |
- r20 = /%20/g, | |
- rhash = /#.*$/, | |
- rantiCache = /([?&])_=[^&]*/, | |
- rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, | |
- | |
- // #7653, #8125, #8152: local protocol detection | |
- rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widg… | |
- rnoContent = /^(?:GET|HEAD)$/, | |
- rprotocol = /^\/\//, | |
- | |
- /* Prefilters | |
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js… | |
- * 2) These are called: | |
- * - BEFORE asking for a transport | |
- * - AFTER param serialization (s.data is a string if s.processData… | |
- * 3) key is the dataType | |
- * 4) the catchall symbol "*" can be used | |
- * 5) execution will start with transport dataType and THEN continue d… | |
- */ | |
- prefilters = {}, | |
- | |
- /* Transports bindings | |
- * 1) key is the dataType | |
- * 2) the catchall symbol "*" can be used | |
- * 3) selection will start with transport dataType and THEN go to "*" … | |
- */ | |
- transports = {}, | |
- | |
- // Avoid comment-prolog char sequence (#10098); must appease lint and … | |
- allTypes = "*/".concat( "*" ), | |
- | |
- // Anchor tag for parsing the document origin | |
- originAnchor = document.createElement( "a" ); | |
- originAnchor.href = location.href; | |
- | |
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport | |
-function addToPrefiltersOrTransports( structure ) { | |
- | |
- // dataTypeExpression is optional and defaults to "*" | |
- return function( dataTypeExpression, func ) { | |
- | |
- if ( typeof dataTypeExpression !== "string" ) { | |
- func = dataTypeExpression; | |
- dataTypeExpression = "*"; | |
- } | |
- | |
- var dataType, | |
- i = 0, | |
- dataTypes = dataTypeExpression.toLowerCase().match( rn… | |
- | |
- if ( jQuery.isFunction( func ) ) { | |
- | |
- // For each dataType in the dataTypeExpression | |
- while ( ( dataType = dataTypes[ i++ ] ) ) { | |
- | |
- // Prepend if requested | |
- if ( dataType[ 0 ] === "+" ) { | |
- dataType = dataType.slice( 1 ) || "*"; | |
- ( structure[ dataType ] = structure[ d… | |
- | |
- // Otherwise append | |
- } else { | |
- ( structure[ dataType ] = structure[ d… | |
- } | |
- } | |
- } | |
- }; | |
-} | |
- | |
-// Base inspection function for prefilters and transports | |
-function inspectPrefiltersOrTransports( structure, options, originalOptions, j… | |
- | |
- var inspected = {}, | |
- seekingTransport = ( structure === transports ); | |
- | |
- function inspect( dataType ) { | |
- var selected; | |
- inspected[ dataType ] = true; | |
- jQuery.each( structure[ dataType ] || [], function( _, prefilt… | |
- var dataTypeOrTransport = prefilterOrFactory( options,… | |
- if ( typeof dataTypeOrTransport === "string" && | |
- !seekingTransport && !inspected[ dataTypeOrTra… | |
- | |
- options.dataTypes.unshift( dataTypeOrTransport… | |
- inspect( dataTypeOrTransport ); | |
- return false; | |
- } else if ( seekingTransport ) { | |
- return !( selected = dataTypeOrTransport ); | |
- } | |
- } ); | |
- return selected; | |
- } | |
- | |
- return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspe… | |
-} | |
- | |
-// A special extend for ajax options | |
-// that takes "flat" options (not to be deep extended) | |
-// Fixes #9887 | |
-function ajaxExtend( target, src ) { | |
- var key, deep, | |
- flatOptions = jQuery.ajaxSettings.flatOptions || {}; | |
- | |
- for ( key in src ) { | |
- if ( src[ key ] !== undefined ) { | |
- ( flatOptions[ key ] ? target : ( deep || ( deep = {} … | |
- } | |
- } | |
- if ( deep ) { | |
- jQuery.extend( true, target, deep ); | |
- } | |
- | |
- return target; | |
-} | |
- | |
-/* Handles responses to an ajax request: | |
- * - finds the right dataType (mediates between content-type and expected data… | |
- * - returns the corresponding response | |
- */ | |
-function ajaxHandleResponses( s, jqXHR, responses ) { | |
- | |
- var ct, type, finalDataType, firstDataType, | |
- contents = s.contents, | |
- dataTypes = s.dataTypes; | |
- | |
- // Remove auto dataType and get content-type in the process | |
- while ( dataTypes[ 0 ] === "*" ) { | |
- dataTypes.shift(); | |
- if ( ct === undefined ) { | |
- ct = s.mimeType || jqXHR.getResponseHeader( "Content-T… | |
- } | |
- } | |
- | |
- // Check if we're dealing with a known content-type | |
- if ( ct ) { | |
- for ( type in contents ) { | |
- if ( contents[ type ] && contents[ type ].test( ct ) )… | |
- dataTypes.unshift( type ); | |
- break; | |
- } | |
- } | |
- } | |
- | |
- // Check to see if we have a response for the expected dataType | |
- if ( dataTypes[ 0 ] in responses ) { | |
- finalDataType = dataTypes[ 0 ]; | |
- } else { | |
- | |
- // Try convertible dataTypes | |
- for ( type in responses ) { | |
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dat… | |
- finalDataType = type; | |
- break; | |
- } | |
- if ( !firstDataType ) { | |
- firstDataType = type; | |
- } | |
- } | |
- | |
- // Or just use first one | |
- finalDataType = finalDataType || firstDataType; | |
- } | |
- | |
- // If we found a dataType | |
- // We add the dataType to the list if needed | |
- // and return the corresponding response | |
- if ( finalDataType ) { | |
- if ( finalDataType !== dataTypes[ 0 ] ) { | |
- dataTypes.unshift( finalDataType ); | |
- } | |
- return responses[ finalDataType ]; | |
- } | |
-} | |
- | |
-/* Chain conversions given the request and the original response | |
- * Also sets the responseXXX fields on the jqXHR instance | |
- */ | |
-function ajaxConvert( s, response, jqXHR, isSuccess ) { | |
- var conv2, current, conv, tmp, prev, | |
- converters = {}, | |
- | |
- // Work with a copy of dataTypes in case we need to modify it … | |
- dataTypes = s.dataTypes.slice(); | |
- | |
- // Create converters map with lowercased keys | |
- if ( dataTypes[ 1 ] ) { | |
- for ( conv in s.converters ) { | |
- converters[ conv.toLowerCase() ] = s.converters[ conv … | |
- } | |
- } | |
- | |
- current = dataTypes.shift(); | |
- | |
- // Convert to each sequential dataType | |
- while ( current ) { | |
- | |
- if ( s.responseFields[ current ] ) { | |
- jqXHR[ s.responseFields[ current ] ] = response; | |
- } | |
- | |
- // Apply the dataFilter if provided | |
- if ( !prev && isSuccess && s.dataFilter ) { | |
- response = s.dataFilter( response, s.dataType ); | |
- } | |
- | |
- prev = current; | |
- current = dataTypes.shift(); | |
- | |
- if ( current ) { | |
- | |
- // There's only work to do if current dataType is non-… | |
- if ( current === "*" ) { | |
- | |
- current = prev; | |
- | |
- // Convert response if prev dataType is non-auto and d… | |
- } else if ( prev !== "*" && prev !== current ) { | |
- | |
- // Seek a direct converter | |
- conv = converters[ prev + " " + current ] || c… | |
- | |
- // If none found, seek a pair | |
- if ( !conv ) { | |
- for ( conv2 in converters ) { | |
- | |
- // If conv2 outputs current | |
- tmp = conv2.split( " " ); | |
- if ( tmp[ 1 ] === current ) { | |
- | |
- // If prev can be conv… | |
- conv = converters[ pre… | |
- converters[ "*… | |
- if ( conv ) { | |
- | |
- // Condense eq… | |
- if ( conv === … | |
- conv =… | |
- | |
- // Otherwise, … | |
- } else if ( co… | |
- curren… | |
- dataTy… | |
- } | |
- break; | |
- } | |
- } | |
- } | |
- } | |
- | |
- // Apply converter (if not an equivalence) | |
- if ( conv !== true ) { | |
- | |
- // Unless errors are allowed to bubble… | |
- if ( conv && s.throws ) { | |
- response = conv( response ); | |
- } else { | |
- try { | |
- response = conv( respo… | |
- } catch ( e ) { | |
- return { | |
- state: "parser… | |
- error: conv ? … | |
- }; | |
- } | |
- } | |
- } | |
- } | |
- } | |
- } | |
- | |
- return { state: "success", data: response }; | |
-} | |
- | |
-jQuery.extend( { | |
- | |
- // Counter for holding the number of active queries | |
- active: 0, | |
- | |
- // Last-Modified header cache for next request | |
- lastModified: {}, | |
- etag: {}, | |
- | |
- ajaxSettings: { | |
- url: location.href, | |
- type: "GET", | |
- isLocal: rlocalProtocol.test( location.protocol ), | |
- global: true, | |
- processData: true, | |
- async: true, | |
- contentType: "application/x-www-form-urlencoded; charset=UTF-8… | |
- | |
- /* | |
- timeout: 0, | |
- data: null, | |
- dataType: null, | |
- username: null, | |
- password: null, | |
- cache: null, | |
- throws: false, | |
- traditional: false, | |
- headers: {}, | |
- */ | |
- | |
- accepts: { | |
- "*": allTypes, | |
- text: "text/plain", | |
- html: "text/html", | |
- xml: "application/xml, text/xml", | |
- json: "application/json, text/javascript" | |
- }, | |
- | |
- contents: { | |
- xml: /\bxml\b/, | |
- html: /\bhtml/, | |
- json: /\bjson\b/ | |
- }, | |
- | |
- responseFields: { | |
- xml: "responseXML", | |
- text: "responseText", | |
- json: "responseJSON" | |
- }, | |
- | |
- // Data converters | |
- // Keys separate source (or catchall "*") and destination type… | |
- converters: { | |
- | |
- // Convert anything to text | |
- "* text": String, | |
- | |
- // Text to html (true = no transformation) | |
- "text html": true, | |
- | |
- // Evaluate text as a json expression | |
- "text json": JSON.parse, | |
- | |
- // Parse text as xml | |
- "text xml": jQuery.parseXML | |
- }, | |
- | |
- // For options that shouldn't be deep extended: | |
- // you can add your own custom options here if | |
- // and when you create one that shouldn't be | |
- // deep extended (see ajaxExtend) | |
- flatOptions: { | |
- url: true, | |
- context: true | |
- } | |
- }, | |
- | |
- // Creates a full fledged settings object into target | |
- // with both ajaxSettings and settings fields. | |
- // If target is omitted, writes into ajaxSettings. | |
- ajaxSetup: function( target, settings ) { | |
- return settings ? | |
- | |
- // Building a settings object | |
- ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ),… | |
- | |
- // Extending ajaxSettings | |
- ajaxExtend( jQuery.ajaxSettings, target ); | |
- }, | |
- | |
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), | |
- ajaxTransport: addToPrefiltersOrTransports( transports ), | |
- | |
- // Main method | |
- ajax: function( url, options ) { | |
- | |
- // If url is an object, simulate pre-1.5 signature | |
- if ( typeof url === "object" ) { | |
- options = url; | |
- url = undefined; | |
- } | |
- | |
- // Force options to be an object | |
- options = options || {}; | |
- | |
- var transport, | |
- | |
- // URL without anti-cache param | |
- cacheURL, | |
- | |
- // Response headers | |
- responseHeadersString, | |
- responseHeaders, | |
- | |
- // timeout handle | |
- timeoutTimer, | |
- | |
- // Url cleanup var | |
- urlAnchor, | |
- | |
- // Request state (becomes false upon send and true upo… | |
- completed, | |
- | |
- // To know if global events are to be dispatched | |
- fireGlobals, | |
- | |
- // Loop variable | |
- i, | |
- | |
- // uncached part of the url | |
- uncached, | |
- | |
- // Create the final options object | |
- s = jQuery.ajaxSetup( {}, options ), | |
- | |
- // Callbacks context | |
- callbackContext = s.context || s, | |
- | |
- // Context for global events is callbackContext if it … | |
- globalEventContext = s.context && | |
- ( callbackContext.nodeType || callbackContext.… | |
- jQuery( callbackContext ) : | |
- jQuery.event, | |
- | |
- // Deferreds | |
- deferred = jQuery.Deferred(), | |
- completeDeferred = jQuery.Callbacks( "once memory" ), | |
- | |
- // Status-dependent callbacks | |
- statusCode = s.statusCode || {}, | |
- | |
- // Headers (they are sent all at once) | |
- requestHeaders = {}, | |
- requestHeadersNames = {}, | |
- | |
- // Default abort message | |
- strAbort = "canceled", | |
- | |
- // Fake xhr | |
- jqXHR = { | |
- readyState: 0, | |
- | |
- // Builds headers hashtable if needed | |
- getResponseHeader: function( key ) { | |
- var match; | |
- if ( completed ) { | |
- if ( !responseHeaders ) { | |
- responseHeaders = {}; | |
- while ( ( match = rhea… | |
- responseHeader… | |
- } | |
- } | |
- match = responseHeaders[ key.t… | |
- } | |
- return match == null ? null : match; | |
- }, | |
- | |
- // Raw string | |
- getAllResponseHeaders: function() { | |
- return completed ? responseHeadersStri… | |
- }, | |
- | |
- // Caches the header | |
- setRequestHeader: function( name, value ) { | |
- if ( completed == null ) { | |
- name = requestHeadersNames[ na… | |
- requestHeadersNames[ n… | |
- requestHeaders[ name ] = value; | |
- } | |
- return this; | |
- }, | |
- | |
- // Overrides response content-type header | |
- overrideMimeType: function( type ) { | |
- if ( completed == null ) { | |
- s.mimeType = type; | |
- } | |
- return this; | |
- }, | |
- | |
- // Status-dependent callbacks | |
- statusCode: function( map ) { | |
- var code; | |
- if ( map ) { | |
- if ( completed ) { | |
- | |
- // Execute the appropr… | |
- jqXHR.always( map[ jqX… | |
- } else { | |
- | |
- // Lazy-add the new ca… | |
- for ( code in map ) { | |
- statusCode[ co… | |
- } | |
- } | |
- } | |
- return this; | |
- }, | |
- | |
- // Cancel the request | |
- abort: function( statusText ) { | |
- var finalText = statusText || strAbort; | |
- if ( transport ) { | |
- transport.abort( finalText ); | |
- } | |
- done( 0, finalText ); | |
- return this; | |
- } | |
- }; | |
- | |
- // Attach deferreds | |
- deferred.promise( jqXHR ); | |
- | |
- // Add protocol if not provided (prefilters might expect it) | |
- // Handle falsy url in the settings object (#10093: consistenc… | |
- // We also use the url parameter if available | |
- s.url = ( ( url || s.url || location.href ) + "" ) | |
- .replace( rprotocol, location.protocol + "//" ); | |
- | |
- // Alias method option to type as per ticket #12004 | |
- s.type = options.method || options.type || s.method || s.type; | |
- | |
- // Extract dataTypes list | |
- s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnoth… | |
- | |
- // A cross-domain request is in order when the origin doesn't … | |
- if ( s.crossDomain == null ) { | |
- urlAnchor = document.createElement( "a" ); | |
- | |
- // Support: IE <=8 - 11, Edge 12 - 13 | |
- // IE throws exception on accessing the href property … | |
- // e.g. http://example.com:80x/ | |
- try { | |
- urlAnchor.href = s.url; | |
- | |
- // Support: IE <=8 - 11 only | |
- // Anchor's host property isn't correctly set … | |
- urlAnchor.href = urlAnchor.href; | |
- s.crossDomain = originAnchor.protocol + "//" +… | |
- urlAnchor.protocol + "//" + urlAnchor.… | |
- } catch ( e ) { | |
- | |
- // If there is an error parsing the URL, assum… | |
- // it can be rejected by the transport if it i… | |
- s.crossDomain = true; | |
- } | |
- } | |
- | |
- // Convert data if not already a string | |
- if ( s.data && s.processData && typeof s.data !== "string" ) { | |
- s.data = jQuery.param( s.data, s.traditional ); | |
- } | |
- | |
- // Apply prefilters | |
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); | |
- | |
- // If request was aborted inside a prefilter, stop there | |
- if ( completed ) { | |
- return jqXHR; | |
- } | |
- | |
- // We can fire global events as of now if asked to | |
- // Don't fire events if jQuery.event is undefined in an AMD-us… | |
- fireGlobals = jQuery.event && s.global; | |
- | |
- // Watch for a new set of requests | |
- if ( fireGlobals && jQuery.active++ === 0 ) { | |
- jQuery.event.trigger( "ajaxStart" ); | |
- } | |
- | |
- // Uppercase the type | |
- s.type = s.type.toUpperCase(); | |
- | |
- // Determine if request has content | |
- s.hasContent = !rnoContent.test( s.type ); | |
- | |
- // Save the URL in case we're toying with the If-Modified-Since | |
- // and/or If-None-Match header later on | |
- // Remove hash to simplify url manipulation | |
- cacheURL = s.url.replace( rhash, "" ); | |
- | |
- // More options handling for requests with no content | |
- if ( !s.hasContent ) { | |
- | |
- // Remember the hash so we can put it back | |
- uncached = s.url.slice( cacheURL.length ); | |
- | |
- // If data is available, append data to url | |
- if ( s.data ) { | |
- cacheURL += ( rquery.test( cacheURL ) ? "&" : … | |
- | |
- // #9682: remove data so that it's not used in… | |
- delete s.data; | |
- } | |
- | |
- // Add or update anti-cache param if needed | |
- if ( s.cache === false ) { | |
- cacheURL = cacheURL.replace( rantiCache, "$1" … | |
- uncached = ( rquery.test( cacheURL ) ? "&" : "… | |
- } | |
- | |
- // Put hash and anti-cache on the URL that will be req… | |
- s.url = cacheURL + uncached; | |
- | |
- // Change '%20' to '+' if this is encoded form body content (g… | |
- } else if ( s.data && s.processData && | |
- ( s.contentType || "" ).indexOf( "application/x-www-fo… | |
- s.data = s.data.replace( r20, "+" ); | |
- } | |
- | |
- // Set the If-Modified-Since and/or If-None-Match header, if i… | |
- if ( s.ifModified ) { | |
- if ( jQuery.lastModified[ cacheURL ] ) { | |
- jqXHR.setRequestHeader( "If-Modified-Since", j… | |
- } | |
- if ( jQuery.etag[ cacheURL ] ) { | |
- jqXHR.setRequestHeader( "If-None-Match", jQuer… | |
- } | |
- } | |
- | |
- // Set the correct header, if data is being sent | |
- if ( s.data && s.hasContent && s.contentType !== false || opti… | |
- jqXHR.setRequestHeader( "Content-Type", s.contentType … | |
- } | |
- | |
- // Set the Accepts header for the server, depending on the dat… | |
- jqXHR.setRequestHeader( | |
- "Accept", | |
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? | |
- s.accepts[ s.dataTypes[ 0 ] ] + | |
- ( s.dataTypes[ 0 ] !== "*" ? ", " + al… | |
- s.accepts[ "*" ] | |
- ); | |
- | |
- // Check for headers option | |
- for ( i in s.headers ) { | |
- jqXHR.setRequestHeader( i, s.headers[ i ] ); | |
- } | |
- | |
- // Allow custom headers/mimetypes and early abort | |
- if ( s.beforeSend && | |
- ( s.beforeSend.call( callbackContext, jqXHR, s ) === f… | |
- | |
- // Abort if not done already and return | |
- return jqXHR.abort(); | |
- } | |
- | |
- // Aborting is no longer a cancellation | |
- strAbort = "abort"; | |
- | |
- // Install callbacks on deferreds | |
- completeDeferred.add( s.complete ); | |
- jqXHR.done( s.success ); | |
- jqXHR.fail( s.error ); | |
- | |
- // Get transport | |
- transport = inspectPrefiltersOrTransports( transports, s, opti… | |
- | |
- // If no transport, we auto-abort | |
- if ( !transport ) { | |
- done( -1, "No Transport" ); | |
- } else { | |
- jqXHR.readyState = 1; | |
- | |
- // Send global event | |
- if ( fireGlobals ) { | |
- globalEventContext.trigger( "ajaxSend", [ jqXH… | |
- } | |
- | |
- // If request was aborted inside ajaxSend, stop there | |
- if ( completed ) { | |
- return jqXHR; | |
- } | |
- | |
- // Timeout | |
- if ( s.async && s.timeout > 0 ) { | |
- timeoutTimer = window.setTimeout( function() { | |
- jqXHR.abort( "timeout" ); | |
- }, s.timeout ); | |
- } | |
- | |
- try { | |
- completed = false; | |
- transport.send( requestHeaders, done ); | |
- } catch ( e ) { | |
- | |
- // Rethrow post-completion exceptions | |
- if ( completed ) { | |
- throw e; | |
- } | |
- | |
- // Propagate others as results | |
- done( -1, e ); | |
- } | |
- } | |
- | |
- // Callback for when everything is done | |
- function done( status, nativeStatusText, responses, headers ) { | |
- var isSuccess, success, error, response, modified, | |
- statusText = nativeStatusText; | |
- | |
- // Ignore repeat invocations | |
- if ( completed ) { | |
- return; | |
- } | |
- | |
- completed = true; | |
- | |
- // Clear timeout if it exists | |
- if ( timeoutTimer ) { | |
- window.clearTimeout( timeoutTimer ); | |
- } | |
- | |
- // Dereference transport for early garbage collection | |
- // (no matter how long the jqXHR object will be used) | |
- transport = undefined; | |
- | |
- // Cache response headers | |
- responseHeadersString = headers || ""; | |
- | |
- // Set readyState | |
- jqXHR.readyState = status > 0 ? 4 : 0; | |
- | |
- // Determine if successful | |
- isSuccess = status >= 200 && status < 300 || status ==… | |
- | |
- // Get response data | |
- if ( responses ) { | |
- response = ajaxHandleResponses( s, jqXHR, resp… | |
- } | |
- | |
- // Convert no matter what (that way responseXXX fields… | |
- response = ajaxConvert( s, response, jqXHR, isSuccess … | |
- | |
- // If successful, handle type chaining | |
- if ( isSuccess ) { | |
- | |
- // Set the If-Modified-Since and/or If-None-Ma… | |
- if ( s.ifModified ) { | |
- modified = jqXHR.getResponseHeader( "L… | |
- if ( modified ) { | |
- jQuery.lastModified[ cacheURL … | |
- } | |
- modified = jqXHR.getResponseHeader( "e… | |
- if ( modified ) { | |
- jQuery.etag[ cacheURL ] = modi… | |
- } | |
- } | |
- | |
- // if no content | |
- if ( status === 204 || s.type === "HEAD" ) { | |
- statusText = "nocontent"; | |
- | |
- // if not modified | |
- } else if ( status === 304 ) { | |
- statusText = "notmodified"; | |
- | |
- // If we have data, let's convert it | |
- } else { | |
- statusText = response.state; | |
- success = response.data; | |
- error = response.error; | |
- isSuccess = !error; | |
- } | |
- } else { | |
- | |
- // Extract error from statusText and normalize… | |
- error = statusText; | |
- if ( status || !statusText ) { | |
- statusText = "error"; | |
- if ( status < 0 ) { | |
- status = 0; | |
- } | |
- } | |
- } | |
- | |
- // Set data for the fake xhr object | |
- jqXHR.status = status; | |
- jqXHR.statusText = ( nativeStatusText || statusText ) … | |
- | |
- // Success/Error | |
- if ( isSuccess ) { | |
- deferred.resolveWith( callbackContext, [ succe… | |
- } else { | |
- deferred.rejectWith( callbackContext, [ jqXHR,… | |
- } | |
- | |
- // Status-dependent callbacks | |
- jqXHR.statusCode( statusCode ); | |
- statusCode = undefined; | |
- | |
- if ( fireGlobals ) { | |
- globalEventContext.trigger( isSuccess ? "ajaxS… | |
- [ jqXHR, s, isSuccess ? success : erro… | |
- } | |
- | |
- // Complete | |
- completeDeferred.fireWith( callbackContext, [ jqXHR, s… | |
- | |
- if ( fireGlobals ) { | |
- globalEventContext.trigger( "ajaxComplete", [ … | |
- | |
- // Handle the global AJAX counter | |
- if ( !( --jQuery.active ) ) { | |
- jQuery.event.trigger( "ajaxStop" ); | |
- } | |
- } | |
- } | |
- | |
- return jqXHR; | |
- }, | |
- | |
- getJSON: function( url, data, callback ) { | |
- return jQuery.get( url, data, callback, "json" ); | |
- }, | |
- | |
- getScript: function( url, callback ) { | |
- return jQuery.get( url, undefined, callback, "script" ); | |
- } | |
-} ); | |
- | |
-jQuery.each( [ "get", "post" ], function( i, method ) { | |
- jQuery[ method ] = function( url, data, callback, type ) { | |
- | |
- // Shift arguments if data argument was omitted | |
- if ( jQuery.isFunction( data ) ) { | |
- type = type || callback; | |
- callback = data; | |
- data = undefined; | |
- } | |
- | |
- // The url can be an options object (which then must have .url) | |
- return jQuery.ajax( jQuery.extend( { | |
- url: url, | |
- type: method, | |
- dataType: type, | |
- data: data, | |
- success: callback | |
- }, jQuery.isPlainObject( url ) && url ) ); | |
- }; | |
-} ); | |
- | |
- | |
-jQuery._evalUrl = function( url ) { | |
- return jQuery.ajax( { | |
- url: url, | |
- | |
- // Make this explicit, since user can override this through aj… | |
- type: "GET", | |
- dataType: "script", | |
- cache: true, | |
- async: false, | |
- global: false, | |
- "throws": true | |
- } ); | |
-}; | |
- | |
- | |
-jQuery.fn.extend( { | |
- wrapAll: function( html ) { | |
- var wrap; | |
- | |
- if ( this[ 0 ] ) { | |
- if ( jQuery.isFunction( html ) ) { | |
- html = html.call( this[ 0 ] ); | |
- } | |
- | |
- // The elements to wrap the target around | |
- wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 )… | |
- | |
- if ( this[ 0 ].parentNode ) { | |
- wrap.insertBefore( this[ 0 ] ); | |
- } | |
- | |
- wrap.map( function() { | |
- var elem = this; | |
- | |
- while ( elem.firstElementChild ) { | |
- elem = elem.firstElementChild; | |
- } | |
- | |
- return elem; | |
- } ).append( this ); | |
- } | |
- | |
- return this; | |
- }, | |
- | |
- wrapInner: function( html ) { | |
- if ( jQuery.isFunction( html ) ) { | |
- return this.each( function( i ) { | |
- jQuery( this ).wrapInner( html.call( this, i )… | |
- } ); | |
- } | |
- | |
- return this.each( function() { | |
- var self = jQuery( this ), | |
- contents = self.contents(); | |
- | |
- if ( contents.length ) { | |
- contents.wrapAll( html ); | |
- | |
- } else { | |
- self.append( html ); | |
- } | |
- } ); | |
- }, | |
- | |
- wrap: function( html ) { | |
- var isFunction = jQuery.isFunction( html ); | |
- | |
- return this.each( function( i ) { | |
- jQuery( this ).wrapAll( isFunction ? html.call( this, … | |
- } ); | |
- }, | |
- | |
- unwrap: function( selector ) { | |
- this.parent( selector ).not( "body" ).each( function() { | |
- jQuery( this ).replaceWith( this.childNodes ); | |
- } ); | |
- return this; | |
- } | |
-} ); | |
- | |
- | |
-jQuery.expr.pseudos.hidden = function( elem ) { | |
- return !jQuery.expr.pseudos.visible( elem ); | |
-}; | |
-jQuery.expr.pseudos.visible = function( elem ) { | |
- return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRect… | |
-}; | |
- | |
- | |
- | |
- | |
-jQuery.ajaxSettings.xhr = function() { | |
- try { | |
- return new window.XMLHttpRequest(); | |
- } catch ( e ) {} | |
-}; | |
- | |
-var xhrSuccessStatus = { | |
- | |
- // File protocol always yields status code 0, assume 200 | |
- 0: 200, | |
- | |
- // Support: IE <=9 only | |
- // #1450: sometimes IE returns 1223 when it should be 204 | |
- 1223: 204 | |
- }, | |
- xhrSupported = jQuery.ajaxSettings.xhr(); | |
- | |
-support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); | |
-support.ajax = xhrSupported = !!xhrSupported; | |
- | |
-jQuery.ajaxTransport( function( options ) { | |
- var callback, errorCallback; | |
- | |
- // Cross domain only allowed if supported through XMLHttpRequest | |
- if ( support.cors || xhrSupported && !options.crossDomain ) { | |
- return { | |
- send: function( headers, complete ) { | |
- var i, | |
- xhr = options.xhr(); | |
- | |
- xhr.open( | |
- options.type, | |
- options.url, | |
- options.async, | |
- options.username, | |
- options.password | |
- ); | |
- | |
- // Apply custom fields if provided | |
- if ( options.xhrFields ) { | |
- for ( i in options.xhrFields ) { | |
- xhr[ i ] = options.xhrFields[ … | |
- } | |
- } | |
- | |
- // Override mime type if needed | |
- if ( options.mimeType && xhr.overrideMimeType … | |
- xhr.overrideMimeType( options.mimeType… | |
- } | |
- | |
- // X-Requested-With header | |
- // For cross-domain requests, seeing as condit… | |
- // akin to a jigsaw puzzle, we simply never se… | |
- // (it can always be set on a per-request basi… | |
- // For same-domain requests, won't change head… | |
- if ( !options.crossDomain && !headers[ "X-Requ… | |
- headers[ "X-Requested-With" ] = "XMLHt… | |
- } | |
- | |
- // Set headers | |
- for ( i in headers ) { | |
- xhr.setRequestHeader( i, headers[ i ] … | |
- } | |
- | |
- // Callback | |
- callback = function( type ) { | |
- return function() { | |
- if ( callback ) { | |
- callback = errorCallba… | |
- xhr.onerror = … | |
- | |
- if ( type === "abort" … | |
- xhr.abort(); | |
- } else if ( type === "… | |
- | |
- // Support: IE… | |
- // On a manual… | |
- // errors on a… | |
- if ( typeof xh… | |
- comple… | |
- } else { | |
- comple… | |
- | |
- … | |
- … | |
- … | |
- ); | |
- } | |
- } else { | |
- complete( | |
- xhrSuc… | |
- xhr.st… | |
- | |
- // Sup… | |
- // IE9… | |
- // For… | |
- ( xhr.… | |
- typeof… | |
- … | |
- … | |
- xhr.ge… | |
- ); | |
- } | |
- } | |
- }; | |
- }; | |
- | |
- // Listen to events | |
- xhr.onload = callback(); | |
- errorCallback = xhr.onerror = callback( "error… | |
- | |
- // Support: IE 9 only | |
- // Use onreadystatechange to replace onabort | |
- // to handle uncaught aborts | |
- if ( xhr.onabort !== undefined ) { | |
- xhr.onabort = errorCallback; | |
- } else { | |
- xhr.onreadystatechange = function() { | |
- | |
- // Check readyState before tim… | |
- if ( xhr.readyState === 4 ) { | |
- | |
- // Allow onerror to be… | |
- // but that will not h… | |
- // Also, save errorCal… | |
- // as xhr.onerror cann… | |
- window.setTimeout( fun… | |
- if ( callback … | |
- errorC… | |
- } | |
- } ); | |
- } | |
- }; | |
- } | |
- | |
- // Create the abort callback | |
- callback = callback( "abort" ); | |
- | |
- try { | |
- | |
- // Do send the request (this may raise… | |
- xhr.send( options.hasContent && option… | |
- } catch ( e ) { | |
- | |
- // #14683: Only rethrow if this hasn't… | |
- if ( callback ) { | |
- throw e; | |
- } | |
- } | |
- }, | |
- | |
- abort: function() { | |
- if ( callback ) { | |
- callback(); | |
- } | |
- } | |
- }; | |
- } | |
-} ); | |
- | |
- | |
- | |
- | |
-// Prevent auto-execution of scripts when no explicit dataType was provided (S… | |
-jQuery.ajaxPrefilter( function( s ) { | |
- if ( s.crossDomain ) { | |
- s.contents.script = false; | |
- } | |
-} ); | |
- | |
-// Install script dataType | |
-jQuery.ajaxSetup( { | |
- accepts: { | |
- script: "text/javascript, application/javascript, " + | |
- "application/ecmascript, application/x-ecmascript" | |
- }, | |
- contents: { | |
- script: /\b(?:java|ecma)script\b/ | |
- }, | |
- converters: { | |
- "text script": function( text ) { | |
- jQuery.globalEval( text ); | |
- return text; | |
- } | |
- } | |
-} ); | |
- | |
-// Handle cache's special case and crossDomain | |
-jQuery.ajaxPrefilter( "script", function( s ) { | |
- if ( s.cache === undefined ) { | |
- s.cache = false; | |
- } | |
- if ( s.crossDomain ) { | |
- s.type = "GET"; | |
- } | |
-} ); | |
- | |
-// Bind script tag hack transport | |
-jQuery.ajaxTransport( "script", function( s ) { | |
- | |
- // This transport only deals with cross domain requests | |
- if ( s.crossDomain ) { | |
- var script, callback; | |
- return { | |
- send: function( _, complete ) { | |
- script = jQuery( "<script>" ).prop( { | |
- charset: s.scriptCharset, | |
- src: s.url | |
- } ).on( | |
- "load error", | |
- callback = function( evt ) { | |
- script.remove(); | |
- callback = null; | |
- if ( evt ) { | |
- complete( evt.type ===… | |
- } | |
- } | |
- ); | |
- | |
- // Use native DOM manipulation to avoid our do… | |
- document.head.appendChild( script[ 0 ] ); | |
- }, | |
- abort: function() { | |
- if ( callback ) { | |
- callback(); | |
- } | |
- } | |
- }; | |
- } | |
-} ); | |
- | |
- | |
- | |
- | |
-var oldCallbacks = [], | |
- rjsonp = /(=)\?(?=&|$)|\?\?/; | |
- | |
-// Default jsonp settings | |
-jQuery.ajaxSetup( { | |
- jsonp: "callback", | |
- jsonpCallback: function() { | |
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + … | |
- this[ callback ] = true; | |
- return callback; | |
- } | |
-} ); | |
- | |
-// Detect, normalize options and install callbacks for jsonp requests | |
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { | |
- | |
- var callbackName, overwritten, responseContainer, | |
- jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? | |
- "url" : | |
- typeof s.data === "string" && | |
- ( s.contentType || "" ) | |
- .indexOf( "application/x-www-form-urle… | |
- rjsonp.test( s.data ) && "data" | |
- ); | |
- | |
- // Handle iff the expected data type is "jsonp" or we have a parameter… | |
- if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { | |
- | |
- // Get callback name, remembering preexisting value associated… | |
- callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCal… | |
- s.jsonpCallback() : | |
- s.jsonpCallback; | |
- | |
- // Insert callback into url or form data | |
- if ( jsonProp ) { | |
- s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + … | |
- } else if ( s.jsonp !== false ) { | |
- s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.json… | |
- } | |
- | |
- // Use data converter to retrieve json after script execution | |
- s.converters[ "script json" ] = function() { | |
- if ( !responseContainer ) { | |
- jQuery.error( callbackName + " was not called"… | |
- } | |
- return responseContainer[ 0 ]; | |
- }; | |
- | |
- // Force json dataType | |
- s.dataTypes[ 0 ] = "json"; | |
- | |
- // Install callback | |
- overwritten = window[ callbackName ]; | |
- window[ callbackName ] = function() { | |
- responseContainer = arguments; | |
- }; | |
- | |
- // Clean-up function (fires after converters) | |
- jqXHR.always( function() { | |
- | |
- // If previous value didn't exist - remove it | |
- if ( overwritten === undefined ) { | |
- jQuery( window ).removeProp( callbackName ); | |
- | |
- // Otherwise restore preexisting value | |
- } else { | |
- window[ callbackName ] = overwritten; | |
- } | |
- | |
- // Save back as free | |
- if ( s[ callbackName ] ) { | |
- | |
- // Make sure that re-using the options doesn't… | |
- s.jsonpCallback = originalSettings.jsonpCallba… | |
- | |
- // Save the callback name for future use | |
- oldCallbacks.push( callbackName ); | |
- } | |
- | |
- // Call if it was a function and we have a response | |
- if ( responseContainer && jQuery.isFunction( overwritt… | |
- overwritten( responseContainer[ 0 ] ); | |
- } | |
- | |
- responseContainer = overwritten = undefined; | |
- } ); | |
- | |
- // Delegate to script | |
- return "script"; | |
- } | |
-} ); | |
- | |
- | |
- | |
- | |
-// Support: Safari 8 only | |
-// In Safari 8 documents created via document.implementation.createHTMLDocument | |
-// collapse sibling forms: the second one becomes a child of the first one. | |
-// Because of that, this security measure has to be disabled in Safari 8. | |
-// https://bugs.webkit.org/show_bug.cgi?id=137337 | |
-support.createHTMLDocument = ( function() { | |
- var body = document.implementation.createHTMLDocument( "" ).body; | |
- body.innerHTML = "<form></form><form></form>"; | |
- return body.childNodes.length === 2; | |
-} )(); | |
- | |
- | |
-// Argument "data" should be string of html | |
-// context (optional): If specified, the fragment will be created in this cont… | |
-// defaults to document | |
-// keepScripts (optional): If true, will include scripts passed in the html st… | |
-jQuery.parseHTML = function( data, context, keepScripts ) { | |
- if ( typeof data !== "string" ) { | |
- return []; | |
- } | |
- if ( typeof context === "boolean" ) { | |
- keepScripts = context; | |
- context = false; | |
- } | |
- | |
- var base, parsed, scripts; | |
- | |
- if ( !context ) { | |
- | |
- // Stop scripts or inline event handlers from being executed i… | |
- // by using document.implementation | |
- if ( support.createHTMLDocument ) { | |
- context = document.implementation.createHTMLDocument( … | |
- | |
- // Set the base href for the created document | |
- // so any parsed elements with URLs | |
- // are based on the document's URL (gh-2965) | |
- base = context.createElement( "base" ); | |
- base.href = document.location.href; | |
- context.head.appendChild( base ); | |
- } else { | |
- context = document; | |
- } | |
- } | |
- | |
- parsed = rsingleTag.exec( data ); | |
- scripts = !keepScripts && []; | |
- | |
- // Single tag | |
- if ( parsed ) { | |
- return [ context.createElement( parsed[ 1 ] ) ]; | |
- } | |
- | |
- parsed = buildFragment( [ data ], context, scripts ); | |
- | |
- if ( scripts && scripts.length ) { | |
- jQuery( scripts ).remove(); | |
- } | |
- | |
- return jQuery.merge( [], parsed.childNodes ); | |
-}; | |
- | |
- | |
-/** | |
- * Load a url into a page | |
- */ | |
-jQuery.fn.load = function( url, params, callback ) { | |
- var selector, type, response, | |
- self = this, | |
- off = url.indexOf( " " ); | |
- | |
- if ( off > -1 ) { | |
- selector = stripAndCollapse( url.slice( off ) ); | |
- url = url.slice( 0, off ); | |
- } | |
- | |
- // If it's a function | |
- if ( jQuery.isFunction( params ) ) { | |
- | |
- // We assume that it's the callback | |
- callback = params; | |
- params = undefined; | |
- | |
- // Otherwise, build a param string | |
- } else if ( params && typeof params === "object" ) { | |
- type = "POST"; | |
- } | |
- | |
- // If we have elements to modify, make the request | |
- if ( self.length > 0 ) { | |
- jQuery.ajax( { | |
- url: url, | |
- | |
- // If "type" variable is undefined, then "GET" method … | |
- // Make value of this field explicit since | |
- // user can override it through ajaxSetup method | |
- type: type || "GET", | |
- dataType: "html", | |
- data: params | |
- } ).done( function( responseText ) { | |
- | |
- // Save response for use in complete callback | |
- response = arguments; | |
- | |
- self.html( selector ? | |
- | |
- // If a selector was specified, locate the rig… | |
- // Exclude scripts to avoid IE 'Permission Den… | |
- jQuery( "<div>" ).append( jQuery.parseHTML( re… | |
- | |
- // Otherwise use the full result | |
- responseText ); | |
- | |
- // If the request succeeds, this function gets "data", "status… | |
- // but they are ignored because response was set above. | |
- // If it fails, this function gets "jqXHR", "status", "error" | |
- } ).always( callback && function( jqXHR, status ) { | |
- self.each( function() { | |
- callback.apply( this, response || [ jqXHR.resp… | |
- } ); | |
- } ); | |
- } | |
- | |
- return this; | |
-}; | |
- | |
- | |
- | |
- | |
-// Attach a bunch of functions for handling common AJAX events | |
-jQuery.each( [ | |
- "ajaxStart", | |
- "ajaxStop", | |
- "ajaxComplete", | |
- "ajaxError", | |
- "ajaxSuccess", | |
- "ajaxSend" | |
-], function( i, type ) { | |
- jQuery.fn[ type ] = function( fn ) { | |
- return this.on( type, fn ); | |
- }; | |
-} ); | |
- | |
- | |
- | |
- | |
-jQuery.expr.pseudos.animated = function( elem ) { | |
- return jQuery.grep( jQuery.timers, function( fn ) { | |
- return elem === fn.elem; | |
- } ).length; | |
-}; | |
- | |
- | |
- | |
- | |
-/** | |
- * Gets a window from an element | |
- */ | |
-function getWindow( elem ) { | |
- return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.de… | |
-} | |
- | |
-jQuery.offset = { | |
- setOffset: function( elem, options, i ) { | |
- var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSS… | |
- position = jQuery.css( elem, "position" ), | |
- curElem = jQuery( elem ), | |
- props = {}; | |
- | |
- // Set position first, in-case top/left are set even on static… | |
- if ( position === "static" ) { | |
- elem.style.position = "relative"; | |
- } | |
- | |
- curOffset = curElem.offset(); | |
- curCSSTop = jQuery.css( elem, "top" ); | |
- curCSSLeft = jQuery.css( elem, "left" ); | |
- calculatePosition = ( position === "absolute" || position === … | |
- ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; | |
- | |
- // Need to be able to calculate position if either | |
- // top or left is auto and position is either absolute or fixed | |
- if ( calculatePosition ) { | |
- curPosition = curElem.position(); | |
- curTop = curPosition.top; | |
- curLeft = curPosition.left; | |
- | |
- } else { | |
- curTop = parseFloat( curCSSTop ) || 0; | |
- curLeft = parseFloat( curCSSLeft ) || 0; | |
- } | |
- | |
- if ( jQuery.isFunction( options ) ) { | |
- | |
- // Use jQuery.extend here to allow modification of coo… | |
- options = options.call( elem, i, jQuery.extend( {}, cu… | |
- } | |
- | |
- if ( options.top != null ) { | |
- props.top = ( options.top - curOffset.top ) + curTop; | |
- } | |
- if ( options.left != null ) { | |
- props.left = ( options.left - curOffset.left ) + curLe… | |
- } | |
- | |
- if ( "using" in options ) { | |
- options.using.call( elem, props ); | |
- | |
- } else { | |
- curElem.css( props ); | |
- } | |
- } | |
-}; | |
- | |
-jQuery.fn.extend( { | |
- offset: function( options ) { | |
- | |
- // Preserve chaining for setter | |
- if ( arguments.length ) { | |
- return options === undefined ? | |
- this : | |
- this.each( function( i ) { | |
- jQuery.offset.setOffset( this, options… | |
- } ); | |
- } | |
- | |
- var docElem, win, rect, doc, | |
- elem = this[ 0 ]; | |
- | |
- if ( !elem ) { | |
- return; | |
- } | |
- | |
- // Support: IE <=11 only | |
- // Running getBoundingClientRect on a | |
- // disconnected node in IE throws an error | |
- if ( !elem.getClientRects().length ) { | |
- return { top: 0, left: 0 }; | |
- } | |
- | |
- rect = elem.getBoundingClientRect(); | |
- | |
- // Make sure element is not hidden (display: none) | |
- if ( rect.width || rect.height ) { | |
- doc = elem.ownerDocument; | |
- win = getWindow( doc ); | |
- docElem = doc.documentElement; | |
- | |
- return { | |
- top: rect.top + win.pageYOffset - docElem.clie… | |
- left: rect.left + win.pageXOffset - docElem.cl… | |
- }; | |
- } | |
- | |
- // Return zeros for disconnected and hidden elements (gh-2310) | |
- return rect; | |
- }, | |
- | |
- position: function() { | |
- if ( !this[ 0 ] ) { | |
- return; | |
- } | |
- | |
- var offsetParent, offset, | |
- elem = this[ 0 ], | |
- parentOffset = { top: 0, left: 0 }; | |
- | |
- // Fixed elements are offset from window (parentOffset = {top:… | |
- // because it is its only offset parent | |
- if ( jQuery.css( elem, "position" ) === "fixed" ) { | |
- | |
- // Assume getBoundingClientRect is there when computed… | |
- offset = elem.getBoundingClientRect(); | |
- | |
- } else { | |
- | |
- // Get *real* offsetParent | |
- offsetParent = this.offsetParent(); | |
- | |
- // Get correct offsets | |
- offset = this.offset(); | |
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { | |
- parentOffset = offsetParent.offset(); | |
- } | |
- | |
- // Add offsetParent borders | |
- parentOffset = { | |
- top: parentOffset.top + jQuery.css( offsetPare… | |
- left: parentOffset.left + jQuery.css( offsetPa… | |
- }; | |
- } | |
- | |
- // Subtract parent offsets and element margins | |
- return { | |
- top: offset.top - parentOffset.top - jQuery.css( elem,… | |
- left: offset.left - parentOffset.left - jQuery.css( el… | |
- }; | |
- }, | |
- | |
- // This method will return documentElement in the following cases: | |
- // 1) For the element inside the iframe without offsetParent, this met… | |
- // documentElement of the parent window | |
- // 2) For the hidden or detached element | |
- // 3) For body or html element, i.e. in case of the html node - it wil… | |
- // | |
- // but those exceptions were never presented as a real life use-cases | |
- // and might be considered as more preferable results. | |
- // | |
- // This logic, however, is not guaranteed and can change at any point … | |
- offsetParent: function() { | |
- return this.map( function() { | |
- var offsetParent = this.offsetParent; | |
- | |
- while ( offsetParent && jQuery.css( offsetParent, "pos… | |
- offsetParent = offsetParent.offsetParent; | |
- } | |
- | |
- return offsetParent || documentElement; | |
- } ); | |
- } | |
-} ); | |
- | |
-// Create scrollLeft and scrollTop methods | |
-jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function… | |
- var top = "pageYOffset" === prop; | |
- | |
- jQuery.fn[ method ] = function( val ) { | |
- return access( this, function( elem, method, val ) { | |
- var win = getWindow( elem ); | |
- | |
- if ( val === undefined ) { | |
- return win ? win[ prop ] : elem[ method ]; | |
- } | |
- | |
- if ( win ) { | |
- win.scrollTo( | |
- !top ? val : win.pageXOffset, | |
- top ? val : win.pageYOffset | |
- ); | |
- | |
- } else { | |
- elem[ method ] = val; | |
- } | |
- }, method, val, arguments.length ); | |
- }; | |
-} ); | |
- | |
-// Support: Safari <=7 - 9.1, Chrome <=37 - 49 | |
-// Add the top/left cssHooks using jQuery.fn.position | |
-// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 | |
-// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 | |
-// getComputedStyle returns percent when specified for top/left/bottom/right; | |
-// rather than make the css module depend on the offset module, just check for… | |
-jQuery.each( [ "top", "left" ], function( i, prop ) { | |
- jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, | |
- function( elem, computed ) { | |
- if ( computed ) { | |
- computed = curCSS( elem, prop ); | |
- | |
- // If curCSS returns percentage, fallback to o… | |
- return rnumnonpx.test( computed ) ? | |
- jQuery( elem ).position()[ prop ] + "p… | |
- computed; | |
- } | |
- } | |
- ); | |
-} ); | |
- | |
- | |
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth m… | |
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { | |
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + n… | |
- function( defaultExtra, funcName ) { | |
- | |
- // Margin is only for outerHeight, outerWidth | |
- jQuery.fn[ funcName ] = function( margin, value ) { | |
- var chainable = arguments.length && ( defaultExtra || … | |
- extra = defaultExtra || ( margin === true || v… | |
- | |
- return access( this, function( elem, type, value ) { | |
- var doc; | |
- | |
- if ( jQuery.isWindow( elem ) ) { | |
- | |
- // $( window ).outerWidth/Height retur… | |
- return funcName.indexOf( "outer" ) ===… | |
- elem[ "inner" + name ] : | |
- elem.document.documentElement[… | |
- } | |
- | |
- // Get document width or height | |
- if ( elem.nodeType === 9 ) { | |
- doc = elem.documentElement; | |
- | |
- // Either scroll[Width/Height] or offs… | |
- // whichever is greatest | |
- return Math.max( | |
- elem.body[ "scroll" + name ], … | |
- elem.body[ "offset" + name ], … | |
- doc[ "client" + name ] | |
- ); | |
- } | |
- | |
- return value === undefined ? | |
- | |
- // Get width or height on the element,… | |
- jQuery.css( elem, type, extra ) : | |
- | |
- // Set width or height on the element | |
- jQuery.style( elem, type, value, extra… | |
- }, type, chainable ? margin : undefined, chainable ); | |
- }; | |
- } ); | |
-} ); | |
- | |
- | |
-jQuery.fn.extend( { | |
- | |
- bind: function( types, data, fn ) { | |
- return this.on( types, null, data, fn ); | |
- }, | |
- unbind: function( types, fn ) { | |
- return this.off( types, null, fn ); | |
- }, | |
- | |
- delegate: function( selector, types, data, fn ) { | |
- return this.on( types, selector, data, fn ); | |
- }, | |
- undelegate: function( selector, types, fn ) { | |
- | |
- // ( namespace ) or ( selector, types [, fn] ) | |
- return arguments.length === 1 ? | |
- this.off( selector, "**" ) : | |
- this.off( types, selector || "**", fn ); | |
- } | |
-} ); | |
- | |
-jQuery.parseJSON = JSON.parse; | |
- | |
- | |
- | |
- | |
-// Register as a named AMD module, since jQuery can be concatenated with other | |
-// files that may use define, but not via a proper concatenation script that | |
-// understands anonymous AMD modules. A named AMD is safest and most robust | |
-// way to register. Lowercase jquery is used because AMD module names are | |
-// derived from file names, and jQuery is normally delivered in a lowercase | |
-// file name. Do this after creating the global so that if an AMD module wants | |
-// to call noConflict to hide this version of jQuery, it will work. | |
- | |
-// Note that for maximum portability, libraries that are not jQuery should | |
-// declare themselves as anonymous modules, and avoid setting a global if an | |
-// AMD loader is present. jQuery is a special case. For more information, see | |
-// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-… | |
- | |
-if ( typeof define === "function" && define.amd ) { | |
- define( "jquery", [], function() { | |
- return jQuery; | |
- } ); | |
-} | |
- | |
- | |
- | |
- | |
-var | |
- | |
- // Map over jQuery in case of overwrite | |
- _jQuery = window.jQuery, | |
- | |
- // Map over the $ in case of overwrite | |
- _$ = window.$; | |
- | |
-jQuery.noConflict = function( deep ) { | |
- if ( window.$ === jQuery ) { | |
- window.$ = _$; | |
- } | |
- | |
- if ( deep && window.jQuery === jQuery ) { | |
- window.jQuery = _jQuery; | |
- } | |
- | |
- return jQuery; | |
-}; | |
- | |
-// Expose jQuery and $ identifiers, even in AMD | |
-// (#7102#comment:10, https://github.com/jquery/jquery/pull/557) | |
-// and CommonJS for browser emulators (#13566) | |
-if ( !noGlobal ) { | |
- window.jQuery = window.$ = jQuery; | |
-} | |
- | |
- | |
- | |
- | |
-return jQuery; | |
-} ); | |
+/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/lice… | |
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.e… | |
diff --git a/doc/html/_static/minus.png b/doc/html/_static/minus.png | |
Binary files differ. | |
diff --git a/doc/html/_static/plus.png b/doc/html/_static/plus.png | |
Binary files differ. | |
diff --git a/doc/html/_static/searchtools.js b/doc/html/_static/searchtools.js | |
t@@ -1,331 +1,54 @@ | |
/* | |
- * searchtools.js_t | |
+ * searchtools.js | |
* ~~~~~~~~~~~~~~~~ | |
* | |
* Sphinx JavaScript utilities for the full-text search. | |
* | |
- * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. | |
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. | |
* :license: BSD, see LICENSE for details. | |
* | |
*/ | |
- | |
-/* Non-minified version JS is _stemmer.js if file is provided */ | |
-/** | |
- * Porter Stemmer | |
- */ | |
-var Stemmer = function() { | |
- | |
- var step2list = { | |
- ational: 'ate', | |
- tional: 'tion', | |
- enci: 'ence', | |
- anci: 'ance', | |
- izer: 'ize', | |
- bli: 'ble', | |
- alli: 'al', | |
- entli: 'ent', | |
- eli: 'e', | |
- ousli: 'ous', | |
- ization: 'ize', | |
- ation: 'ate', | |
- ator: 'ate', | |
- alism: 'al', | |
- iveness: 'ive', | |
- fulness: 'ful', | |
- ousness: 'ous', | |
- aliti: 'al', | |
- iviti: 'ive', | |
- biliti: 'ble', | |
- logi: 'log' | |
- }; | |
- | |
- var step3list = { | |
- icate: 'ic', | |
- ative: '', | |
- alize: 'al', | |
- iciti: 'ic', | |
- ical: 'ic', | |
- ful: '', | |
- ness: '' | |
+if (!Scorer) { | |
+ /** | |
+ * Simple result scoring code. | |
+ */ | |
+ var Scorer = { | |
+ // Implement the following function to further tweak the score for each re… | |
+ // The function takes a result array [filename, title, anchor, descr, scor… | |
+ // and returns the new score. | |
+ /* | |
+ score: function(result) { | |
+ return result[4]; | |
+ }, | |
+ */ | |
+ | |
+ // query matches the full name of an object | |
+ objNameMatch: 11, | |
+ // or matches in the last dotted part of the object name | |
+ objPartialMatch: 6, | |
+ // Additive scores depending on the priority of the object | |
+ objPrio: {0: 15, // used to be importantResults | |
+ 1: 5, // used to be objectResults | |
+ 2: -5}, // used to be unimportantResults | |
+ // Used when the priority is not in the mapping. | |
+ objPrioDefault: 0, | |
+ | |
+ // query found in title | |
+ title: 15, | |
+ partialTitle: 7, | |
+ // query found in terms | |
+ term: 5, | |
+ partialTerm: 2 | |
}; | |
- | |
- var c = "[^aeiou]"; // consonant | |
- var v = "[aeiouy]"; // vowel | |
- var C = c + "[^aeiouy]*"; // consonant sequence | |
- var V = v + "[aeiou]*"; // vowel sequence | |
- | |
- var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 | |
- var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 | |
- var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 | |
- var s_v = "^(" + C + ")?" + v; // vowel in stem | |
- | |
- this.stemWord = function (w) { | |
- var stem; | |
- var suffix; | |
- var firstch; | |
- var origword = w; | |
- | |
- if (w.length < 3) | |
- return w; | |
- | |
- var re; | |
- var re2; | |
- var re3; | |
- var re4; | |
- | |
- firstch = w.substr(0,1); | |
- if (firstch == "y") | |
- w = firstch.toUpperCase() + w.substr(1); | |
- | |
- // Step 1a | |
- re = /^(.+?)(ss|i)es$/; | |
- re2 = /^(.+?)([^s])s$/; | |
- | |
- if (re.test(w)) | |
- w = w.replace(re,"$1$2"); | |
- else if (re2.test(w)) | |
- w = w.replace(re2,"$1$2"); | |
- | |
- // Step 1b | |
- re = /^(.+?)eed$/; | |
- re2 = /^(.+?)(ed|ing)$/; | |
- if (re.test(w)) { | |
- var fp = re.exec(w); | |
- re = new RegExp(mgr0); | |
- if (re.test(fp[1])) { | |
- re = /.$/; | |
- w = w.replace(re,""); | |
- } | |
- } | |
- else if (re2.test(w)) { | |
- var fp = re2.exec(w); | |
- stem = fp[1]; | |
- re2 = new RegExp(s_v); | |
- if (re2.test(stem)) { | |
- w = stem; | |
- re2 = /(at|bl|iz)$/; | |
- re3 = new RegExp("([^aeiouylsz])\\1$"); | |
- re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); | |
- if (re2.test(w)) | |
- w = w + "e"; | |
- else if (re3.test(w)) { | |
- re = /.$/; | |
- w = w.replace(re,""); | |
- } | |
- else if (re4.test(w)) | |
- w = w + "e"; | |
- } | |
- } | |
- | |
- // Step 1c | |
- re = /^(.+?)y$/; | |
- if (re.test(w)) { | |
- var fp = re.exec(w); | |
- stem = fp[1]; | |
- re = new RegExp(s_v); | |
- if (re.test(stem)) | |
- w = stem + "i"; | |
- } | |
- | |
- // Step 2 | |
- re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|izatio… | |
- if (re.test(w)) { | |
- var fp = re.exec(w); | |
- stem = fp[1]; | |
- suffix = fp[2]; | |
- re = new RegExp(mgr0); | |
- if (re.test(stem)) | |
- w = stem + step2list[suffix]; | |
- } | |
- | |
- // Step 3 | |
- re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; | |
- if (re.test(w)) { | |
- var fp = re.exec(w); | |
- stem = fp[1]; | |
- suffix = fp[2]; | |
- re = new RegExp(mgr0); | |
- if (re.test(stem)) | |
- w = stem + step3list[suffix]; | |
- } | |
- | |
- // Step 4 | |
- re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|it… | |
- re2 = /^(.+?)(s|t)(ion)$/; | |
- if (re.test(w)) { | |
- var fp = re.exec(w); | |
- stem = fp[1]; | |
- re = new RegExp(mgr1); | |
- if (re.test(stem)) | |
- w = stem; | |
- } | |
- else if (re2.test(w)) { | |
- var fp = re2.exec(w); | |
- stem = fp[1] + fp[2]; | |
- re2 = new RegExp(mgr1); | |
- if (re2.test(stem)) | |
- w = stem; | |
- } | |
- | |
- // Step 5 | |
- re = /^(.+?)e$/; | |
- if (re.test(w)) { | |
- var fp = re.exec(w); | |
- stem = fp[1]; | |
- re = new RegExp(mgr1); | |
- re2 = new RegExp(meq1); | |
- re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); | |
- if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) | |
- w = stem; | |
- } | |
- re = /ll$/; | |
- re2 = new RegExp(mgr1); | |
- if (re.test(w) && re2.test(w)) { | |
- re = /.$/; | |
- w = w.replace(re,""); | |
- } | |
- | |
- // and turn initial Y back to y | |
- if (firstch == "y") | |
- w = firstch.toLowerCase() + w.substr(1); | |
- return w; | |
- } | |
} | |
- | |
- | |
-/** | |
- * Simple result scoring code. | |
- */ | |
-var Scorer = { | |
- // Implement the following function to further tweak the score for each resu… | |
- // The function takes a result array [filename, title, anchor, descr, score] | |
- // and returns the new score. | |
- /* | |
- score: function(result) { | |
- return result[4]; | |
- }, | |
- */ | |
- | |
- // query matches the full name of an object | |
- objNameMatch: 11, | |
- // or matches in the last dotted part of the object name | |
- objPartialMatch: 6, | |
- // Additive scores depending on the priority of the object | |
- objPrio: {0: 15, // used to be importantResults | |
- 1: 5, // used to be objectResults | |
- 2: -5}, // used to be unimportantResults | |
- // Used when the priority is not in the mapping. | |
- objPrioDefault: 0, | |
- | |
- // query found in title | |
- title: 15, | |
- // query found in terms | |
- term: 5 | |
-}; | |
- | |
- | |
- | |
- | |
- | |
-var splitChars = (function() { | |
- var result = {}; | |
- var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, … | |
- 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 270… | |
- 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 297… | |
- 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 334… | |
- 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 376… | |
- 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 482… | |
- 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 812… | |
- 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, … | |
- 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019,… | |
- 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; | |
- var i, j, start, end; | |
- for (i = 0; i < singles.length; i++) { | |
- result[singles[i]] = true; | |
- } | |
- var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 1… | |
- [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 11… | |
- [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519],… | |
- [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790],… | |
- [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041],… | |
- [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364],… | |
- [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446],… | |
- [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533],… | |
- [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661],… | |
- [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789],… | |
- [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917],… | |
- [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989],… | |
- [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167],… | |
- [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301],… | |
- [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460],… | |
- [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712],… | |
- [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775],… | |
- [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975],… | |
- [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196],… | |
- [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351],… | |
- [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887],… | |
- [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791],… | |
- [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015],… | |
- [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175],… | |
- [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527],… | |
- [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799],… | |
- [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085],… | |
- [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679],… | |
- [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129],… | |
- [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307],… | |
- [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472],… | |
- [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449],… | |
- [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [1155… | |
- [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [1182… | |
- [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [1243… | |
- [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [1272… | |
- [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [1299… | |
- [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [4250… | |
- [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [4273… | |
- [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [4306… | |
- [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [4326… | |
- [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [4348… | |
- [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [4364… | |
- [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [4374… | |
- [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [5529… | |
- [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [6426… | |
- [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [6496… | |
- [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [6537… | |
- [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; | |
- for (i = 0; i < ranges.length; i++) { | |
- start = ranges[i][0]; | |
- end = ranges[i][1]; | |
- for (j = start; j <= end; j++) { | |
- result[j] = true; | |
- } | |
- } | |
- return result; | |
-})(); | |
- | |
-function splitQuery(query) { | |
- var result = []; | |
- var start = -1; | |
- for (var i = 0; i < query.length; i++) { | |
- if (splitChars[query.charCodeAt(i)]) { | |
- if (start !== -1) { | |
- result.push(query.slice(start, i)); | |
- start = -1; | |
- } | |
- } else if (start === -1) { | |
- start = i; | |
- } | |
- } | |
- if (start !== -1) { | |
- result.push(query.slice(start)); | |
- } | |
- return result; | |
+if (!splitQuery) { | |
+ function splitQuery(query) { | |
+ return query.split(/\s+/); | |
+ } | |
} | |
- | |
- | |
- | |
/** | |
* Search Module | |
*/ | |
t@@ -335,6 +58,14 @@ var Search = { | |
_queued_query : null, | |
_pulse_status : -1, | |
+ htmlToText : function(htmlString) { | |
+ var htmlElement = document.createElement('span'); | |
+ htmlElement.innerHTML = htmlString; | |
+ $(htmlElement).find('.headerlink').remove(); | |
+ docContent = $(htmlElement).find('[role=main]')[0]; | |
+ return docContent.textContent || docContent.innerText; | |
+ }, | |
+ | |
init : function() { | |
var params = $.getQueryParameters(); | |
if (params.q) { | |
t@@ -399,7 +130,7 @@ var Search = { | |
this.out = $('#search-results'); | |
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out); | |
this.dots = $('<span></span>').appendTo(this.title); | |
- this.status = $('<p style="display: none"></p>').appendTo(this.out); | |
+ this.status = $('<p class="search-summary"> </p>').appendTo(this.out); | |
this.output = $('<ul class="search"/>').appendTo(this.out); | |
$('#search-progress').text(_('Preparing search...')); | |
t@@ -417,7 +148,6 @@ var Search = { | |
*/ | |
query : function(query) { | |
var i; | |
- var stopwords = ["a","and","are","as","at","be","but","by","for","if","in"… | |
// stem the searchterms and add them to the correct list | |
var stemmer = new Stemmer(); | |
t@@ -438,6 +168,10 @@ var Search = { | |
} | |
// stem the word | |
var word = stemmer.stemWord(tmp[i].toLowerCase()); | |
+ // prevent stemmer from cutting word smaller than two chars | |
+ if(word.length < 3 && tmp[i].length >= 3) { | |
+ word = tmp[i]; | |
+ } | |
var toAppend; | |
// select the correct list | |
if (word[0] == '-') { | |
t@@ -535,7 +269,7 @@ var Search = { | |
displayNextItem(); | |
}); | |
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { | |
- $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] … | |
+ $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATIO… | |
dataType: "text", | |
complete: function(jqxhr, textstatus) { | |
var data = jqxhr.responseText; | |
t@@ -574,6 +308,7 @@ var Search = { | |
*/ | |
performObjectSearch : function(object, otherterms) { | |
var filenames = this._index.filenames; | |
+ var docnames = this._index.docnames; | |
var objects = this._index.objects; | |
var objnames = this._index.objnames; | |
var titles = this._index.titles; | |
t@@ -584,12 +319,13 @@ var Search = { | |
for (var prefix in objects) { | |
for (var name in objects[prefix]) { | |
var fullname = (prefix ? prefix + '.' : '') + name; | |
- if (fullname.toLowerCase().indexOf(object) > -1) { | |
+ var fullnameLower = fullname.toLowerCase() | |
+ if (fullnameLower.indexOf(object) > -1) { | |
var score = 0; | |
- var parts = fullname.split('.'); | |
+ var parts = fullnameLower.split('.'); | |
// check for different match types: exact matches of full name or | |
// "last name" (i.e. last dotted part) | |
- if (fullname == object || parts[parts.length - 1] == object) { | |
+ if (fullnameLower == object || parts[parts.length - 1] == object) { | |
score += Scorer.objNameMatch; | |
// matches in last name | |
} else if (parts[parts.length - 1].indexOf(object) > -1) { | |
t@@ -627,7 +363,7 @@ var Search = { | |
} else { | |
score += Scorer.objPrioDefault; | |
} | |
- results.push([filenames[match[0]], fullname, '#'+anchor, descr, scor… | |
+ results.push([docnames[match[0]], fullname, '#'+anchor, descr, score… | |
} | |
} | |
} | |
t@@ -639,6 +375,7 @@ var Search = { | |
* search for full-text terms in the index | |
*/ | |
performTermsSearch : function(searchterms, excluded, terms, titleterms) { | |
+ var docnames = this._index.docnames; | |
var filenames = this._index.filenames; | |
var titles = this._index.titles; | |
t@@ -655,6 +392,19 @@ var Search = { | |
{files: terms[word], score: Scorer.term}, | |
{files: titleterms[word], score: Scorer.title} | |
]; | |
+ // add support for partial matches | |
+ if (word.length > 2) { | |
+ for (var w in terms) { | |
+ if (w.match(word) && !terms[word]) { | |
+ _o.push({files: terms[w], score: Scorer.partialTerm}) | |
+ } | |
+ } | |
+ for (var w in titleterms) { | |
+ if (w.match(word) && !titleterms[word]) { | |
+ _o.push({files: titleterms[w], score: Scorer.partialTitle}) | |
+ } | |
+ } | |
+ } | |
// no match but word was a required one | |
if ($u.every(_o, function(o){return o.files === undefined;})) { | |
t@@ -694,8 +444,12 @@ var Search = { | |
var valid = true; | |
// check if all requirements are matched | |
- if (fileMap[file].length != searchterms.length) | |
- continue; | |
+ var filteredTermCount = // as search terms with length < 3 are discarded… | |
+ searchterms.filter(function(term){return term.length > 2}).length | |
+ if ( | |
+ fileMap[file].length != searchterms.length && | |
+ fileMap[file].length != filteredTermCount | |
+ ) continue; | |
// ensure that none of the excluded terms is in the search result | |
for (i = 0; i < excluded.length; i++) { | |
t@@ -713,7 +467,7 @@ var Search = { | |
// select one (max) score for the file. | |
// for better ranking, we should calculate ranking by using words stat… | |
var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[f… | |
- results.push([filenames[file], titles[file], '', null, score]); | |
+ results.push([docnames[file], titles[file], '', null, score, filenames… | |
} | |
} | |
return results; | |
t@@ -726,7 +480,8 @@ var Search = { | |
* words. the first one is used to find the occurrence, the | |
* latter for highlighting it. | |
*/ | |
- makeSearchSummary : function(text, keywords, hlwords) { | |
+ makeSearchSummary : function(htmlText, keywords, hlwords) { | |
+ var text = Search.htmlToText(htmlText); | |
var textLower = text.toLowerCase(); | |
var start = 0; | |
$.each(keywords, function() { | |
t@@ -748,4 +503,4 @@ var Search = { | |
$(document).ready(function() { | |
Search.init(); | |
-}); | |
-\ No newline at end of file | |
+}); | |
diff --git a/doc/html/_static/sidebar.js b/doc/html/_static/sidebar.js | |
t@@ -16,7 +16,7 @@ | |
* Once the browser is closed the cookie is deleted and the position | |
* reset to the default (expanded). | |
* | |
- * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. | |
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. | |
* :license: BSD, see LICENSE for details. | |
* | |
*/ | |
diff --git a/doc/html/_static/underscore.js b/doc/html/_static/underscore.js | |
t@@ -1,1548 +1,31 @@ | |
-// Underscore.js 1.8.3 | |
-// http://underscorejs.org | |
-// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporter… | |
-// Underscore may be freely distributed under the MIT license. | |
- | |
-(function() { | |
- | |
- // Baseline setup | |
- // -------------- | |
- | |
- // Establish the root object, `window` in the browser, or `exports` on the s… | |
- var root = this; | |
- | |
- // Save the previous value of the `_` variable. | |
- var previousUnderscore = root._; | |
- | |
- // Save bytes in the minified (but not gzipped) version: | |
- var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = F… | |
- | |
- // Create quick reference variables for speed access to core prototypes. | |
- var | |
- push = ArrayProto.push, | |
- slice = ArrayProto.slice, | |
- toString = ObjProto.toString, | |
- hasOwnProperty = ObjProto.hasOwnProperty; | |
- | |
- // All **ECMAScript 5** native function implementations that we hope to use | |
- // are declared here. | |
- var | |
- nativeIsArray = Array.isArray, | |
- nativeKeys = Object.keys, | |
- nativeBind = FuncProto.bind, | |
- nativeCreate = Object.create; | |
- | |
- // Naked function reference for surrogate-prototype-swapping. | |
- var Ctor = function(){}; | |
- | |
- // Create a safe reference to the Underscore object for use below. | |
- var _ = function(obj) { | |
- if (obj instanceof _) return obj; | |
- if (!(this instanceof _)) return new _(obj); | |
- this._wrapped = obj; | |
- }; | |
- | |
- // Export the Underscore object for **Node.js**, with | |
- // backwards-compatibility for the old `require()` API. If we're in | |
- // the browser, add `_` as a global object. | |
- if (typeof exports !== 'undefined') { | |
- if (typeof module !== 'undefined' && module.exports) { | |
- exports = module.exports = _; | |
- } | |
- exports._ = _; | |
- } else { | |
- root._ = _; | |
- } | |
- | |
- // Current version. | |
- _.VERSION = '1.8.3'; | |
- | |
- // Internal function that returns an efficient (for current engines) version | |
- // of the passed-in callback, to be repeatedly applied in other Underscore | |
- // functions. | |
- var optimizeCb = function(func, context, argCount) { | |
- if (context === void 0) return func; | |
- switch (argCount == null ? 3 : argCount) { | |
- case 1: return function(value) { | |
- return func.call(context, value); | |
- }; | |
- case 2: return function(value, other) { | |
- return func.call(context, value, other); | |
- }; | |
- case 3: return function(value, index, collection) { | |
- return func.call(context, value, index, collection); | |
- }; | |
- case 4: return function(accumulator, value, index, collection) { | |
- return func.call(context, accumulator, value, index, collection); | |
- }; | |
- } | |
- return function() { | |
- return func.apply(context, arguments); | |
- }; | |
- }; | |
- | |
- // A mostly-internal function to generate callbacks that can be applied | |
- // to each element in a collection, returning the desired result — either | |
- // identity, an arbitrary callback, a property matcher, or a property access… | |
- var cb = function(value, context, argCount) { | |
- if (value == null) return _.identity; | |
- if (_.isFunction(value)) return optimizeCb(value, context, argCount); | |
- if (_.isObject(value)) return _.matcher(value); | |
- return _.property(value); | |
- }; | |
- _.iteratee = function(value, context) { | |
- return cb(value, context, Infinity); | |
- }; | |
- | |
- // An internal function for creating assigner functions. | |
- var createAssigner = function(keysFunc, undefinedOnly) { | |
- return function(obj) { | |
- var length = arguments.length; | |
- if (length < 2 || obj == null) return obj; | |
- for (var index = 1; index < length; index++) { | |
- var source = arguments[index], | |
- keys = keysFunc(source), | |
- l = keys.length; | |
- for (var i = 0; i < l; i++) { | |
- var key = keys[i]; | |
- if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key]; | |
- } | |
- } | |
- return obj; | |
- }; | |
- }; | |
- | |
- // An internal function for creating a new object that inherits from another. | |
- var baseCreate = function(prototype) { | |
- if (!_.isObject(prototype)) return {}; | |
- if (nativeCreate) return nativeCreate(prototype); | |
- Ctor.prototype = prototype; | |
- var result = new Ctor; | |
- Ctor.prototype = null; | |
- return result; | |
- }; | |
- | |
- var property = function(key) { | |
- return function(obj) { | |
- return obj == null ? void 0 : obj[key]; | |
- }; | |
- }; | |
- | |
- // Helper for collection methods to determine whether a collection | |
- // should be iterated as an array or as an object | |
- // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength | |
- // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 | |
- var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; | |
- var getLength = property('length'); | |
- var isArrayLike = function(collection) { | |
- var length = getLength(collection); | |
- return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_IND… | |
- }; | |
- | |
- // Collection Functions | |
- // -------------------- | |
- | |
- // The cornerstone, an `each` implementation, aka `forEach`. | |
- // Handles raw objects in addition to array-likes. Treats all | |
- // sparse array-likes as if they were dense. | |
- _.each = _.forEach = function(obj, iteratee, context) { | |
- iteratee = optimizeCb(iteratee, context); | |
- var i, length; | |
- if (isArrayLike(obj)) { | |
- for (i = 0, length = obj.length; i < length; i++) { | |
- iteratee(obj[i], i, obj); | |
- } | |
- } else { | |
- var keys = _.keys(obj); | |
- for (i = 0, length = keys.length; i < length; i++) { | |
- iteratee(obj[keys[i]], keys[i], obj); | |
- } | |
- } | |
- return obj; | |
- }; | |
- | |
- // Return the results of applying the iteratee to each element. | |
- _.map = _.collect = function(obj, iteratee, context) { | |
- iteratee = cb(iteratee, context); | |
- var keys = !isArrayLike(obj) && _.keys(obj), | |
- length = (keys || obj).length, | |
- results = Array(length); | |
- for (var index = 0; index < length; index++) { | |
- var currentKey = keys ? keys[index] : index; | |
- results[index] = iteratee(obj[currentKey], currentKey, obj); | |
- } | |
- return results; | |
- }; | |
- | |
- // Create a reducing function iterating left or right. | |
- function createReduce(dir) { | |
- // Optimized iterator function as using arguments.length | |
- // in the main function will deoptimize the, see #1991. | |
- function iterator(obj, iteratee, memo, keys, index, length) { | |
- for (; index >= 0 && index < length; index += dir) { | |
- var currentKey = keys ? keys[index] : index; | |
- memo = iteratee(memo, obj[currentKey], currentKey, obj); | |
- } | |
- return memo; | |
- } | |
- | |
- return function(obj, iteratee, memo, context) { | |
- iteratee = optimizeCb(iteratee, context, 4); | |
- var keys = !isArrayLike(obj) && _.keys(obj), | |
- length = (keys || obj).length, | |
- index = dir > 0 ? 0 : length - 1; | |
- // Determine the initial value if none is provided. | |
- if (arguments.length < 3) { | |
- memo = obj[keys ? keys[index] : index]; | |
- index += dir; | |
- } | |
- return iterator(obj, iteratee, memo, keys, index, length); | |
- }; | |
- } | |
- | |
- // **Reduce** builds up a single result from a list of values, aka `inject`, | |
- // or `foldl`. | |
- _.reduce = _.foldl = _.inject = createReduce(1); | |
- | |
- // The right-associative version of reduce, also known as `foldr`. | |
- _.reduceRight = _.foldr = createReduce(-1); | |
- | |
- // Return the first value which passes a truth test. Aliased as `detect`. | |
- _.find = _.detect = function(obj, predicate, context) { | |
- var key; | |
- if (isArrayLike(obj)) { | |
- key = _.findIndex(obj, predicate, context); | |
- } else { | |
- key = _.findKey(obj, predicate, context); | |
- } | |
- if (key !== void 0 && key !== -1) return obj[key]; | |
- }; | |
- | |
- // Return all the elements that pass a truth test. | |
- // Aliased as `select`. | |
- _.filter = _.select = function(obj, predicate, context) { | |
- var results = []; | |
- predicate = cb(predicate, context); | |
- _.each(obj, function(value, index, list) { | |
- if (predicate(value, index, list)) results.push(value); | |
- }); | |
- return results; | |
- }; | |
- | |
- // Return all the elements for which a truth test fails. | |
- _.reject = function(obj, predicate, context) { | |
- return _.filter(obj, _.negate(cb(predicate)), context); | |
- }; | |
- | |
- // Determine whether all of the elements match a truth test. | |
- // Aliased as `all`. | |
- _.every = _.all = function(obj, predicate, context) { | |
- predicate = cb(predicate, context); | |
- var keys = !isArrayLike(obj) && _.keys(obj), | |
- length = (keys || obj).length; | |
- for (var index = 0; index < length; index++) { | |
- var currentKey = keys ? keys[index] : index; | |
- if (!predicate(obj[currentKey], currentKey, obj)) return false; | |
- } | |
- return true; | |
- }; | |
- | |
- // Determine if at least one element in the object matches a truth test. | |
- // Aliased as `any`. | |
- _.some = _.any = function(obj, predicate, context) { | |
- predicate = cb(predicate, context); | |
- var keys = !isArrayLike(obj) && _.keys(obj), | |
- length = (keys || obj).length; | |
- for (var index = 0; index < length; index++) { | |
- var currentKey = keys ? keys[index] : index; | |
- if (predicate(obj[currentKey], currentKey, obj)) return true; | |
- } | |
- return false; | |
- }; | |
- | |
- // Determine if the array or object contains a given item (using `===`). | |
- // Aliased as `includes` and `include`. | |
- _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) { | |
- if (!isArrayLike(obj)) obj = _.values(obj); | |
- if (typeof fromIndex != 'number' || guard) fromIndex = 0; | |
- return _.indexOf(obj, item, fromIndex) >= 0; | |
- }; | |
- | |
- // Invoke a method (with arguments) on every item in a collection. | |
- _.invoke = function(obj, method) { | |
- var args = slice.call(arguments, 2); | |
- var isFunc = _.isFunction(method); | |
- return _.map(obj, function(value) { | |
- var func = isFunc ? method : value[method]; | |
- return func == null ? func : func.apply(value, args); | |
- }); | |
- }; | |
- | |
- // Convenience version of a common use case of `map`: fetching a property. | |
- _.pluck = function(obj, key) { | |
- return _.map(obj, _.property(key)); | |
- }; | |
- | |
- // Convenience version of a common use case of `filter`: selecting only obje… | |
- // containing specific `key:value` pairs. | |
- _.where = function(obj, attrs) { | |
- return _.filter(obj, _.matcher(attrs)); | |
- }; | |
- | |
- // Convenience version of a common use case of `find`: getting the first obj… | |
- // containing specific `key:value` pairs. | |
- _.findWhere = function(obj, attrs) { | |
- return _.find(obj, _.matcher(attrs)); | |
- }; | |
- | |
- // Return the maximum element (or element-based computation). | |
- _.max = function(obj, iteratee, context) { | |
- var result = -Infinity, lastComputed = -Infinity, | |
- value, computed; | |
- if (iteratee == null && obj != null) { | |
- obj = isArrayLike(obj) ? obj : _.values(obj); | |
- for (var i = 0, length = obj.length; i < length; i++) { | |
- value = obj[i]; | |
- if (value > result) { | |
- result = value; | |
- } | |
- } | |
- } else { | |
- iteratee = cb(iteratee, context); | |
- _.each(obj, function(value, index, list) { | |
- computed = iteratee(value, index, list); | |
- if (computed > lastComputed || computed === -Infinity && result === -I… | |
- result = value; | |
- lastComputed = computed; | |
- } | |
- }); | |
- } | |
- return result; | |
- }; | |
- | |
- // Return the minimum element (or element-based computation). | |
- _.min = function(obj, iteratee, context) { | |
- var result = Infinity, lastComputed = Infinity, | |
- value, computed; | |
- if (iteratee == null && obj != null) { | |
- obj = isArrayLike(obj) ? obj : _.values(obj); | |
- for (var i = 0, length = obj.length; i < length; i++) { | |
- value = obj[i]; | |
- if (value < result) { | |
- result = value; | |
- } | |
- } | |
- } else { | |
- iteratee = cb(iteratee, context); | |
- _.each(obj, function(value, index, list) { | |
- computed = iteratee(value, index, list); | |
- if (computed < lastComputed || computed === Infinity && result === Inf… | |
- result = value; | |
- lastComputed = computed; | |
- } | |
- }); | |
- } | |
- return result; | |
- }; | |
- | |
- // Shuffle a collection, using the modern version of the | |
- // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffl… | |
- _.shuffle = function(obj) { | |
- var set = isArrayLike(obj) ? obj : _.values(obj); | |
- var length = set.length; | |
- var shuffled = Array(length); | |
- for (var index = 0, rand; index < length; index++) { | |
- rand = _.random(0, index); | |
- if (rand !== index) shuffled[index] = shuffled[rand]; | |
- shuffled[rand] = set[index]; | |
- } | |
- return shuffled; | |
- }; | |
- | |
- // Sample **n** random values from a collection. | |
- // If **n** is not specified, returns a single random element. | |
- // The internal `guard` argument allows it to work with `map`. | |
- _.sample = function(obj, n, guard) { | |
- if (n == null || guard) { | |
- if (!isArrayLike(obj)) obj = _.values(obj); | |
- return obj[_.random(obj.length - 1)]; | |
- } | |
- return _.shuffle(obj).slice(0, Math.max(0, n)); | |
- }; | |
- | |
- // Sort the object's values by a criterion produced by an iteratee. | |
- _.sortBy = function(obj, iteratee, context) { | |
- iteratee = cb(iteratee, context); | |
- return _.pluck(_.map(obj, function(value, index, list) { | |
- return { | |
- value: value, | |
- index: index, | |
- criteria: iteratee(value, index, list) | |
- }; | |
- }).sort(function(left, right) { | |
- var a = left.criteria; | |
- var b = right.criteria; | |
- if (a !== b) { | |
- if (a > b || a === void 0) return 1; | |
- if (a < b || b === void 0) return -1; | |
- } | |
- return left.index - right.index; | |
- }), 'value'); | |
- }; | |
- | |
- // An internal function used for aggregate "group by" operations. | |
- var group = function(behavior) { | |
- return function(obj, iteratee, context) { | |
- var result = {}; | |
- iteratee = cb(iteratee, context); | |
- _.each(obj, function(value, index) { | |
- var key = iteratee(value, index, obj); | |
- behavior(result, value, key); | |
- }); | |
- return result; | |
- }; | |
- }; | |
- | |
- // Groups the object's values by a criterion. Pass either a string attribute | |
- // to group by, or a function that returns the criterion. | |
- _.groupBy = group(function(result, value, key) { | |
- if (_.has(result, key)) result[key].push(value); else result[key] = [value… | |
- }); | |
- | |
- // Indexes the object's values by a criterion, similar to `groupBy`, but for | |
- // when you know that your index values will be unique. | |
- _.indexBy = group(function(result, value, key) { | |
- result[key] = value; | |
- }); | |
- | |
- // Counts instances of an object that group by a certain criterion. Pass | |
- // either a string attribute to count by, or a function that returns the | |
- // criterion. | |
- _.countBy = group(function(result, value, key) { | |
- if (_.has(result, key)) result[key]++; else result[key] = 1; | |
- }); | |
- | |
- // Safely create a real, live array from anything iterable. | |
- _.toArray = function(obj) { | |
- if (!obj) return []; | |
- if (_.isArray(obj)) return slice.call(obj); | |
- if (isArrayLike(obj)) return _.map(obj, _.identity); | |
- return _.values(obj); | |
- }; | |
- | |
- // Return the number of elements in an object. | |
- _.size = function(obj) { | |
- if (obj == null) return 0; | |
- return isArrayLike(obj) ? obj.length : _.keys(obj).length; | |
- }; | |
- | |
- // Split a collection into two arrays: one whose elements all satisfy the gi… | |
- // predicate, and one whose elements all do not satisfy the predicate. | |
- _.partition = function(obj, predicate, context) { | |
- predicate = cb(predicate, context); | |
- var pass = [], fail = []; | |
- _.each(obj, function(value, key, obj) { | |
- (predicate(value, key, obj) ? pass : fail).push(value); | |
- }); | |
- return [pass, fail]; | |
- }; | |
- | |
- // Array Functions | |
- // --------------- | |
- | |
- // Get the first element of an array. Passing **n** will return the first N | |
- // values in the array. Aliased as `head` and `take`. The **guard** check | |
- // allows it to work with `_.map`. | |
- _.first = _.head = _.take = function(array, n, guard) { | |
- if (array == null) return void 0; | |
- if (n == null || guard) return array[0]; | |
- return _.initial(array, array.length - n); | |
- }; | |
- | |
- // Returns everything but the last entry of the array. Especially useful on | |
- // the arguments object. Passing **n** will return all the values in | |
- // the array, excluding the last N. | |
- _.initial = function(array, n, guard) { | |
- return slice.call(array, 0, Math.max(0, array.length - (n == null || guard… | |
- }; | |
- | |
- // Get the last element of an array. Passing **n** will return the last N | |
- // values in the array. | |
- _.last = function(array, n, guard) { | |
- if (array == null) return void 0; | |
- if (n == null || guard) return array[array.length - 1]; | |
- return _.rest(array, Math.max(0, array.length - n)); | |
- }; | |
- | |
- // Returns everything but the first entry of the array. Aliased as `tail` an… | |
- // Especially useful on the arguments object. Passing an **n** will return | |
- // the rest N values in the array. | |
- _.rest = _.tail = _.drop = function(array, n, guard) { | |
- return slice.call(array, n == null || guard ? 1 : n); | |
- }; | |
- | |
- // Trim out all falsy values from an array. | |
- _.compact = function(array) { | |
- return _.filter(array, _.identity); | |
- }; | |
- | |
- // Internal implementation of a recursive `flatten` function. | |
- var flatten = function(input, shallow, strict, startIndex) { | |
- var output = [], idx = 0; | |
- for (var i = startIndex || 0, length = getLength(input); i < length; i++) { | |
- var value = input[i]; | |
- if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) { | |
- //flatten current level of array or arguments object | |
- if (!shallow) value = flatten(value, shallow, strict); | |
- var j = 0, len = value.length; | |
- output.length += len; | |
- while (j < len) { | |
- output[idx++] = value[j++]; | |
- } | |
- } else if (!strict) { | |
- output[idx++] = value; | |
- } | |
- } | |
- return output; | |
- }; | |
- | |
- // Flatten out an array, either recursively (by default), or just one level. | |
- _.flatten = function(array, shallow) { | |
- return flatten(array, shallow, false); | |
- }; | |
- | |
- // Return a version of the array that does not contain the specified value(s… | |
- _.without = function(array) { | |
- return _.difference(array, slice.call(arguments, 1)); | |
- }; | |
- | |
- // Produce a duplicate-free version of the array. If the array has already | |
- // been sorted, you have the option of using a faster algorithm. | |
- // Aliased as `unique`. | |
- _.uniq = _.unique = function(array, isSorted, iteratee, context) { | |
- if (!_.isBoolean(isSorted)) { | |
- context = iteratee; | |
- iteratee = isSorted; | |
- isSorted = false; | |
- } | |
- if (iteratee != null) iteratee = cb(iteratee, context); | |
- var result = []; | |
- var seen = []; | |
- for (var i = 0, length = getLength(array); i < length; i++) { | |
- var value = array[i], | |
- computed = iteratee ? iteratee(value, i, array) : value; | |
- if (isSorted) { | |
- if (!i || seen !== computed) result.push(value); | |
- seen = computed; | |
- } else if (iteratee) { | |
- if (!_.contains(seen, computed)) { | |
- seen.push(computed); | |
- result.push(value); | |
- } | |
- } else if (!_.contains(result, value)) { | |
- result.push(value); | |
- } | |
- } | |
- return result; | |
- }; | |
- | |
- // Produce an array that contains the union: each distinct element from all … | |
- // the passed-in arrays. | |
- _.union = function() { | |
- return _.uniq(flatten(arguments, true, true)); | |
- }; | |
- | |
- // Produce an array that contains every item shared between all the | |
- // passed-in arrays. | |
- _.intersection = function(array) { | |
- var result = []; | |
- var argsLength = arguments.length; | |
- for (var i = 0, length = getLength(array); i < length; i++) { | |
- var item = array[i]; | |
- if (_.contains(result, item)) continue; | |
- for (var j = 1; j < argsLength; j++) { | |
- if (!_.contains(arguments[j], item)) break; | |
- } | |
- if (j === argsLength) result.push(item); | |
- } | |
- return result; | |
- }; | |
- | |
- // Take the difference between one array and a number of other arrays. | |
- // Only the elements present in just the first array will remain. | |
- _.difference = function(array) { | |
- var rest = flatten(arguments, true, true, 1); | |
- return _.filter(array, function(value){ | |
- return !_.contains(rest, value); | |
- }); | |
- }; | |
- | |
- // Zip together multiple lists into a single array -- elements that share | |
- // an index go together. | |
- _.zip = function() { | |
- return _.unzip(arguments); | |
- }; | |
- | |
- // Complement of _.zip. Unzip accepts an array of arrays and groups | |
- // each array's elements on shared indices | |
- _.unzip = function(array) { | |
- var length = array && _.max(array, getLength).length || 0; | |
- var result = Array(length); | |
- | |
- for (var index = 0; index < length; index++) { | |
- result[index] = _.pluck(array, index); | |
- } | |
- return result; | |
- }; | |
- | |
- // Converts lists into objects. Pass either a single array of `[key, value]` | |
- // pairs, or two parallel arrays of the same length -- one of keys, and one … | |
- // the corresponding values. | |
- _.object = function(list, values) { | |
- var result = {}; | |
- for (var i = 0, length = getLength(list); i < length; i++) { | |
- if (values) { | |
- result[list[i]] = values[i]; | |
- } else { | |
- result[list[i][0]] = list[i][1]; | |
- } | |
- } | |
- return result; | |
- }; | |
- | |
- // Generator function to create the findIndex and findLastIndex functions | |
- function createPredicateIndexFinder(dir) { | |
- return function(array, predicate, context) { | |
- predicate = cb(predicate, context); | |
- var length = getLength(array); | |
- var index = dir > 0 ? 0 : length - 1; | |
- for (; index >= 0 && index < length; index += dir) { | |
- if (predicate(array[index], index, array)) return index; | |
- } | |
- return -1; | |
- }; | |
- } | |
- | |
- // Returns the first index on an array-like that passes a predicate test | |
- _.findIndex = createPredicateIndexFinder(1); | |
- _.findLastIndex = createPredicateIndexFinder(-1); | |
- | |
- // Use a comparator function to figure out the smallest index at which | |
- // an object should be inserted so as to maintain order. Uses binary search. | |
- _.sortedIndex = function(array, obj, iteratee, context) { | |
- iteratee = cb(iteratee, context, 1); | |
- var value = iteratee(obj); | |
- var low = 0, high = getLength(array); | |
- while (low < high) { | |
- var mid = Math.floor((low + high) / 2); | |
- if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; | |
- } | |
- return low; | |
- }; | |
- | |
- // Generator function to create the indexOf and lastIndexOf functions | |
- function createIndexFinder(dir, predicateFind, sortedIndex) { | |
- return function(array, item, idx) { | |
- var i = 0, length = getLength(array); | |
- if (typeof idx == 'number') { | |
- if (dir > 0) { | |
- i = idx >= 0 ? idx : Math.max(idx + length, i); | |
- } else { | |
- length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; | |
- } | |
- } else if (sortedIndex && idx && length) { | |
- idx = sortedIndex(array, item); | |
- return array[idx] === item ? idx : -1; | |
- } | |
- if (item !== item) { | |
- idx = predicateFind(slice.call(array, i, length), _.isNaN); | |
- return idx >= 0 ? idx + i : -1; | |
- } | |
- for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += di… | |
- if (array[idx] === item) return idx; | |
- } | |
- return -1; | |
- }; | |
- } | |
- | |
- // Return the position of the first occurrence of an item in an array, | |
- // or -1 if the item is not included in the array. | |
- // If the array is large and already in sort order, pass `true` | |
- // for **isSorted** to use binary search. | |
- _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex); | |
- _.lastIndexOf = createIndexFinder(-1, _.findLastIndex); | |
- | |
- // Generate an integer Array containing an arithmetic progression. A port of | |
- // the native Python `range()` function. See | |
- // [the Python documentation](http://docs.python.org/library/functions.html#… | |
- _.range = function(start, stop, step) { | |
- if (stop == null) { | |
- stop = start || 0; | |
- start = 0; | |
- } | |
- step = step || 1; | |
- | |
- var length = Math.max(Math.ceil((stop - start) / step), 0); | |
- var range = Array(length); | |
- | |
- for (var idx = 0; idx < length; idx++, start += step) { | |
- range[idx] = start; | |
- } | |
- | |
- return range; | |
- }; | |
- | |
- // Function (ahem) Functions | |
- // ------------------ | |
- | |
- // Determines whether to execute a function as a constructor | |
- // or a normal function with the provided arguments | |
- var executeBound = function(sourceFunc, boundFunc, context, callingContext, … | |
- if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(contex… | |
- var self = baseCreate(sourceFunc.prototype); | |
- var result = sourceFunc.apply(self, args); | |
- if (_.isObject(result)) return result; | |
- return self; | |
- }; | |
- | |
- // Create a function bound to a given object (assigning `this`, and argument… | |
- // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if | |
- // available. | |
- _.bind = function(func, context) { | |
- if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, … | |
- if (!_.isFunction(func)) throw new TypeError('Bind must be called on a fun… | |
- var args = slice.call(arguments, 2); | |
- var bound = function() { | |
- return executeBound(func, bound, context, this, args.concat(slice.call(a… | |
- }; | |
- return bound; | |
- }; | |
- | |
- // Partially apply a function by creating a version that has had some of its | |
- // arguments pre-filled, without changing its dynamic `this` context. _ acts | |
- // as a placeholder, allowing any combination of arguments to be pre-filled. | |
- _.partial = function(func) { | |
- var boundArgs = slice.call(arguments, 1); | |
- var bound = function() { | |
- var position = 0, length = boundArgs.length; | |
- var args = Array(length); | |
- for (var i = 0; i < length; i++) { | |
- args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i]; | |
- } | |
- while (position < arguments.length) args.push(arguments[position++]); | |
- return executeBound(func, bound, this, this, args); | |
- }; | |
- return bound; | |
- }; | |
- | |
- // Bind a number of an object's methods to that object. Remaining arguments | |
- // are the method names to be bound. Useful for ensuring that all callbacks | |
- // defined on an object belong to it. | |
- _.bindAll = function(obj) { | |
- var i, length = arguments.length, key; | |
- if (length <= 1) throw new Error('bindAll must be passed function names'); | |
- for (i = 1; i < length; i++) { | |
- key = arguments[i]; | |
- obj[key] = _.bind(obj[key], obj); | |
- } | |
- return obj; | |
- }; | |
- | |
- // Memoize an expensive function by storing its results. | |
- _.memoize = function(func, hasher) { | |
- var memoize = function(key) { | |
- var cache = memoize.cache; | |
- var address = '' + (hasher ? hasher.apply(this, arguments) : key); | |
- if (!_.has(cache, address)) cache[address] = func.apply(this, arguments); | |
- return cache[address]; | |
- }; | |
- memoize.cache = {}; | |
- return memoize; | |
- }; | |
- | |
- // Delays a function for the given number of milliseconds, and then calls | |
- // it with the arguments supplied. | |
- _.delay = function(func, wait) { | |
- var args = slice.call(arguments, 2); | |
- return setTimeout(function(){ | |
- return func.apply(null, args); | |
- }, wait); | |
- }; | |
- | |
- // Defers a function, scheduling it to run after the current call stack has | |
- // cleared. | |
- _.defer = _.partial(_.delay, _, 1); | |
- | |
- // Returns a function, that, when invoked, will only be triggered at most on… | |
- // during a given window of time. Normally, the throttled function will run | |
- // as much as it can, without ever going more than once per `wait` duration; | |
- // but if you'd like to disable the execution on the leading edge, pass | |
- // `{leading: false}`. To disable execution on the trailing edge, ditto. | |
- _.throttle = function(func, wait, options) { | |
- var context, args, result; | |
- var timeout = null; | |
- var previous = 0; | |
- if (!options) options = {}; | |
- var later = function() { | |
- previous = options.leading === false ? 0 : _.now(); | |
- timeout = null; | |
- result = func.apply(context, args); | |
- if (!timeout) context = args = null; | |
- }; | |
- return function() { | |
- var now = _.now(); | |
- if (!previous && options.leading === false) previous = now; | |
- var remaining = wait - (now - previous); | |
- context = this; | |
- args = arguments; | |
- if (remaining <= 0 || remaining > wait) { | |
- if (timeout) { | |
- clearTimeout(timeout); | |
- timeout = null; | |
- } | |
- previous = now; | |
- result = func.apply(context, args); | |
- if (!timeout) context = args = null; | |
- } else if (!timeout && options.trailing !== false) { | |
- timeout = setTimeout(later, remaining); | |
- } | |
- return result; | |
- }; | |
- }; | |
- | |
- // Returns a function, that, as long as it continues to be invoked, will not | |
- // be triggered. The function will be called after it stops being called for | |
- // N milliseconds. If `immediate` is passed, trigger the function on the | |
- // leading edge, instead of the trailing. | |
- _.debounce = function(func, wait, immediate) { | |
- var timeout, args, context, timestamp, result; | |
- | |
- var later = function() { | |
- var last = _.now() - timestamp; | |
- | |
- if (last < wait && last >= 0) { | |
- timeout = setTimeout(later, wait - last); | |
- } else { | |
- timeout = null; | |
- if (!immediate) { | |
- result = func.apply(context, args); | |
- if (!timeout) context = args = null; | |
- } | |
- } | |
- }; | |
- | |
- return function() { | |
- context = this; | |
- args = arguments; | |
- timestamp = _.now(); | |
- var callNow = immediate && !timeout; | |
- if (!timeout) timeout = setTimeout(later, wait); | |
- if (callNow) { | |
- result = func.apply(context, args); | |
- context = args = null; | |
- } | |
- | |
- return result; | |
- }; | |
- }; | |
- | |
- // Returns the first function passed as an argument to the second, | |
- // allowing you to adjust arguments, run code before and after, and | |
- // conditionally execute the original function. | |
- _.wrap = function(func, wrapper) { | |
- return _.partial(wrapper, func); | |
- }; | |
- | |
- // Returns a negated version of the passed-in predicate. | |
- _.negate = function(predicate) { | |
- return function() { | |
- return !predicate.apply(this, arguments); | |
- }; | |
- }; | |
- | |
- // Returns a function that is the composition of a list of functions, each | |
- // consuming the return value of the function that follows. | |
- _.compose = function() { | |
- var args = arguments; | |
- var start = args.length - 1; | |
- return function() { | |
- var i = start; | |
- var result = args[start].apply(this, arguments); | |
- while (i--) result = args[i].call(this, result); | |
- return result; | |
- }; | |
- }; | |
- | |
- // Returns a function that will only be executed on and after the Nth call. | |
- _.after = function(times, func) { | |
- return function() { | |
- if (--times < 1) { | |
- return func.apply(this, arguments); | |
- } | |
- }; | |
- }; | |
- | |
- // Returns a function that will only be executed up to (but not including) t… | |
- _.before = function(times, func) { | |
- var memo; | |
- return function() { | |
- if (--times > 0) { | |
- memo = func.apply(this, arguments); | |
- } | |
- if (times <= 1) func = null; | |
- return memo; | |
- }; | |
- }; | |
- | |
- // Returns a function that will be executed at most one time, no matter how | |
- // often you call it. Useful for lazy initialization. | |
- _.once = _.partial(_.before, 2); | |
- | |
- // Object Functions | |
- // ---------------- | |
- | |
- // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. | |
- var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); | |
- var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', | |
- 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleStrin… | |
- | |
- function collectNonEnumProps(obj, keys) { | |
- var nonEnumIdx = nonEnumerableProps.length; | |
- var constructor = obj.constructor; | |
- var proto = (_.isFunction(constructor) && constructor.prototype) || ObjPro… | |
- | |
- // Constructor is a special case. | |
- var prop = 'constructor'; | |
- if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); | |
- | |
- while (nonEnumIdx--) { | |
- prop = nonEnumerableProps[nonEnumIdx]; | |
- if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop))… | |
- keys.push(prop); | |
- } | |
- } | |
- } | |
- | |
- // Retrieve the names of an object's own properties. | |
- // Delegates to **ECMAScript 5**'s native `Object.keys` | |
- _.keys = function(obj) { | |
- if (!_.isObject(obj)) return []; | |
- if (nativeKeys) return nativeKeys(obj); | |
- var keys = []; | |
- for (var key in obj) if (_.has(obj, key)) keys.push(key); | |
- // Ahem, IE < 9. | |
- if (hasEnumBug) collectNonEnumProps(obj, keys); | |
- return keys; | |
- }; | |
- | |
- // Retrieve all the property names of an object. | |
- _.allKeys = function(obj) { | |
- if (!_.isObject(obj)) return []; | |
- var keys = []; | |
- for (var key in obj) keys.push(key); | |
- // Ahem, IE < 9. | |
- if (hasEnumBug) collectNonEnumProps(obj, keys); | |
- return keys; | |
- }; | |
- | |
- // Retrieve the values of an object's properties. | |
- _.values = function(obj) { | |
- var keys = _.keys(obj); | |
- var length = keys.length; | |
- var values = Array(length); | |
- for (var i = 0; i < length; i++) { | |
- values[i] = obj[keys[i]]; | |
- } | |
- return values; | |
- }; | |
- | |
- // Returns the results of applying the iteratee to each element of the object | |
- // In contrast to _.map it returns an object | |
- _.mapObject = function(obj, iteratee, context) { | |
- iteratee = cb(iteratee, context); | |
- var keys = _.keys(obj), | |
- length = keys.length, | |
- results = {}, | |
- currentKey; | |
- for (var index = 0; index < length; index++) { | |
- currentKey = keys[index]; | |
- results[currentKey] = iteratee(obj[currentKey], currentKey, obj); | |
- } | |
- return results; | |
- }; | |
- | |
- // Convert an object into a list of `[key, value]` pairs. | |
- _.pairs = function(obj) { | |
- var keys = _.keys(obj); | |
- var length = keys.length; | |
- var pairs = Array(length); | |
- for (var i = 0; i < length; i++) { | |
- pairs[i] = [keys[i], obj[keys[i]]]; | |
- } | |
- return pairs; | |
- }; | |
- | |
- // Invert the keys and values of an object. The values must be serializable. | |
- _.invert = function(obj) { | |
- var result = {}; | |
- var keys = _.keys(obj); | |
- for (var i = 0, length = keys.length; i < length; i++) { | |
- result[obj[keys[i]]] = keys[i]; | |
- } | |
- return result; | |
- }; | |
- | |
- // Return a sorted list of the function names available on the object. | |
- // Aliased as `methods` | |
- _.functions = _.methods = function(obj) { | |
- var names = []; | |
- for (var key in obj) { | |
- if (_.isFunction(obj[key])) names.push(key); | |
- } | |
- return names.sort(); | |
- }; | |
- | |
- // Extend a given object with all the properties in passed-in object(s). | |
- _.extend = createAssigner(_.allKeys); | |
- | |
- // Assigns a given object with all the own properties in the passed-in objec… | |
- // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objec… | |
- _.extendOwn = _.assign = createAssigner(_.keys); | |
- | |
- // Returns the first key on an object that passes a predicate test | |
- _.findKey = function(obj, predicate, context) { | |
- predicate = cb(predicate, context); | |
- var keys = _.keys(obj), key; | |
- for (var i = 0, length = keys.length; i < length; i++) { | |
- key = keys[i]; | |
- if (predicate(obj[key], key, obj)) return key; | |
- } | |
- }; | |
- | |
- // Return a copy of the object only containing the whitelisted properties. | |
- _.pick = function(object, oiteratee, context) { | |
- var result = {}, obj = object, iteratee, keys; | |
- if (obj == null) return result; | |
- if (_.isFunction(oiteratee)) { | |
- keys = _.allKeys(obj); | |
- iteratee = optimizeCb(oiteratee, context); | |
- } else { | |
- keys = flatten(arguments, false, false, 1); | |
- iteratee = function(value, key, obj) { return key in obj; }; | |
- obj = Object(obj); | |
- } | |
- for (var i = 0, length = keys.length; i < length; i++) { | |
- var key = keys[i]; | |
- var value = obj[key]; | |
- if (iteratee(value, key, obj)) result[key] = value; | |
- } | |
- return result; | |
- }; | |
- | |
- // Return a copy of the object without the blacklisted properties. | |
- _.omit = function(obj, iteratee, context) { | |
- if (_.isFunction(iteratee)) { | |
- iteratee = _.negate(iteratee); | |
- } else { | |
- var keys = _.map(flatten(arguments, false, false, 1), String); | |
- iteratee = function(value, key) { | |
- return !_.contains(keys, key); | |
- }; | |
- } | |
- return _.pick(obj, iteratee, context); | |
- }; | |
- | |
- // Fill in a given object with default properties. | |
- _.defaults = createAssigner(_.allKeys, true); | |
- | |
- // Creates an object that inherits from the given prototype object. | |
- // If additional properties are provided then they will be added to the | |
- // created object. | |
- _.create = function(prototype, props) { | |
- var result = baseCreate(prototype); | |
- if (props) _.extendOwn(result, props); | |
- return result; | |
- }; | |
- | |
- // Create a (shallow-cloned) duplicate of an object. | |
- _.clone = function(obj) { | |
- if (!_.isObject(obj)) return obj; | |
- return _.isArray(obj) ? obj.slice() : _.extend({}, obj); | |
- }; | |
- | |
- // Invokes interceptor with the obj, and then returns obj. | |
- // The primary purpose of this method is to "tap into" a method chain, in | |
- // order to perform operations on intermediate results within the chain. | |
- _.tap = function(obj, interceptor) { | |
- interceptor(obj); | |
- return obj; | |
- }; | |
- | |
- // Returns whether an object has a given set of `key:value` pairs. | |
- _.isMatch = function(object, attrs) { | |
- var keys = _.keys(attrs), length = keys.length; | |
- if (object == null) return !length; | |
- var obj = Object(object); | |
- for (var i = 0; i < length; i++) { | |
- var key = keys[i]; | |
- if (attrs[key] !== obj[key] || !(key in obj)) return false; | |
- } | |
- return true; | |
- }; | |
- | |
- | |
- // Internal recursive comparison function for `isEqual`. | |
- var eq = function(a, b, aStack, bStack) { | |
- // Identical objects are equal. `0 === -0`, but they aren't identical. | |
- // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?i… | |
- if (a === b) return a !== 0 || 1 / a === 1 / b; | |
- // A strict comparison is necessary because `null == undefined`. | |
- if (a == null || b == null) return a === b; | |
- // Unwrap any wrapped objects. | |
- if (a instanceof _) a = a._wrapped; | |
- if (b instanceof _) b = b._wrapped; | |
- // Compare `[[Class]]` names. | |
- var className = toString.call(a); | |
- if (className !== toString.call(b)) return false; | |
- switch (className) { | |
- // Strings, numbers, regular expressions, dates, and booleans are compar… | |
- case '[object RegExp]': | |
- // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/… | |
- case '[object String]': | |
- // Primitives and their corresponding object wrappers are equivalent; … | |
- // equivalent to `new String("5")`. | |
- return '' + a === '' + b; | |
- case '[object Number]': | |
- // `NaN`s are equivalent, but non-reflexive. | |
- // Object(NaN) is equivalent to NaN | |
- if (+a !== +a) return +b !== +b; | |
- // An `egal` comparison is performed for other numeric values. | |
- return +a === 0 ? 1 / +a === 1 / b : +a === +b; | |
- case '[object Date]': | |
- case '[object Boolean]': | |
- // Coerce dates and booleans to numeric primitive values. Dates are co… | |
- // millisecond representations. Note that invalid dates with milliseco… | |
- // of `NaN` are not equivalent. | |
- return +a === +b; | |
- } | |
- | |
- var areArrays = className === '[object Array]'; | |
- if (!areArrays) { | |
- if (typeof a != 'object' || typeof b != 'object') return false; | |
- | |
- // Objects with different constructors are not equivalent, but `Object`s… | |
- // from different frames are. | |
- var aCtor = a.constructor, bCtor = b.constructor; | |
- if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && | |
- _.isFunction(bCtor) && bCtor instanceof bCtor) | |
- && ('constructor' in a && 'constructor' in b)) { | |
- return false; | |
- } | |
- } | |
- // Assume equality for cyclic structures. The algorithm for detecting cycl… | |
- // structures is adapted from ES 5.1 section 15.12.3, abstract operation `… | |
- | |
- // Initializing stack of traversed objects. | |
- // It's done here since we only need them for objects and arrays compariso… | |
- aStack = aStack || []; | |
- bStack = bStack || []; | |
- var length = aStack.length; | |
- while (length--) { | |
- // Linear search. Performance is inversely proportional to the number of | |
- // unique nested structures. | |
- if (aStack[length] === a) return bStack[length] === b; | |
- } | |
- | |
- // Add the first object to the stack of traversed objects. | |
- aStack.push(a); | |
- bStack.push(b); | |
- | |
- // Recursively compare objects and arrays. | |
- if (areArrays) { | |
- // Compare array lengths to determine if a deep comparison is necessary. | |
- length = a.length; | |
- if (length !== b.length) return false; | |
- // Deep compare the contents, ignoring non-numeric properties. | |
- while (length--) { | |
- if (!eq(a[length], b[length], aStack, bStack)) return false; | |
- } | |
- } else { | |
- // Deep compare objects. | |
- var keys = _.keys(a), key; | |
- length = keys.length; | |
- // Ensure that both objects contain the same number of properties before… | |
- if (_.keys(b).length !== length) return false; | |
- while (length--) { | |
- // Deep compare each member | |
- key = keys[length]; | |
- if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return fal… | |
- } | |
- } | |
- // Remove the first object from the stack of traversed objects. | |
- aStack.pop(); | |
- bStack.pop(); | |
- return true; | |
- }; | |
- | |
- // Perform a deep comparison to check if two objects are equal. | |
- _.isEqual = function(a, b) { | |
- return eq(a, b); | |
- }; | |
- | |
- // Is a given array, string, or object empty? | |
- // An "empty" object has no enumerable own-properties. | |
- _.isEmpty = function(obj) { | |
- if (obj == null) return true; | |
- if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArgument… | |
- return _.keys(obj).length === 0; | |
- }; | |
- | |
- // Is a given value a DOM element? | |
- _.isElement = function(obj) { | |
- return !!(obj && obj.nodeType === 1); | |
- }; | |
- | |
- // Is a given value an array? | |
- // Delegates to ECMA5's native Array.isArray | |
- _.isArray = nativeIsArray || function(obj) { | |
- return toString.call(obj) === '[object Array]'; | |
- }; | |
- | |
- // Is a given variable an object? | |
- _.isObject = function(obj) { | |
- var type = typeof obj; | |
- return type === 'function' || type === 'object' && !!obj; | |
- }; | |
- | |
- // Add some isType methods: isArguments, isFunction, isString, isNumber, isD… | |
- _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Erro… | |
- _['is' + name] = function(obj) { | |
- return toString.call(obj) === '[object ' + name + ']'; | |
- }; | |
- }); | |
- | |
- // Define a fallback version of the method in browsers (ahem, IE < 9), where | |
- // there isn't any inspectable "Arguments" type. | |
- if (!_.isArguments(arguments)) { | |
- _.isArguments = function(obj) { | |
- return _.has(obj, 'callee'); | |
- }; | |
- } | |
- | |
- // Optimize `isFunction` if appropriate. Work around some typeof bugs in old… | |
- // IE 11 (#1621), and in Safari 8 (#1929). | |
- if (typeof /./ != 'function' && typeof Int8Array != 'object') { | |
- _.isFunction = function(obj) { | |
- return typeof obj == 'function' || false; | |
- }; | |
- } | |
- | |
- // Is a given object a finite number? | |
- _.isFinite = function(obj) { | |
- return isFinite(obj) && !isNaN(parseFloat(obj)); | |
- }; | |
- | |
- // Is the given value `NaN`? (NaN is the only number which does not equal it… | |
- _.isNaN = function(obj) { | |
- return _.isNumber(obj) && obj !== +obj; | |
- }; | |
- | |
- // Is a given value a boolean? | |
- _.isBoolean = function(obj) { | |
- return obj === true || obj === false || toString.call(obj) === '[object Bo… | |
- }; | |
- | |
- // Is a given value equal to null? | |
- _.isNull = function(obj) { | |
- return obj === null; | |
- }; | |
- | |
- // Is a given variable undefined? | |
- _.isUndefined = function(obj) { | |
- return obj === void 0; | |
- }; | |
- | |
- // Shortcut function for checking if an object has a given property directly | |
- // on itself (in other words, not on a prototype). | |
- _.has = function(obj, key) { | |
- return obj != null && hasOwnProperty.call(obj, key); | |
- }; | |
- | |
- // Utility Functions | |
- // ----------------- | |
- | |
- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its | |
- // previous owner. Returns a reference to the Underscore object. | |
- _.noConflict = function() { | |
- root._ = previousUnderscore; | |
- return this; | |
- }; | |
- | |
- // Keep the identity function around for default iteratees. | |
- _.identity = function(value) { | |
- return value; | |
- }; | |
- | |
- // Predicate-generating functions. Often useful outside of Underscore. | |
- _.constant = function(value) { | |
- return function() { | |
- return value; | |
- }; | |
- }; | |
- | |
- _.noop = function(){}; | |
- | |
- _.property = property; | |
- | |
- // Generates a function for a given object that returns a given property. | |
- _.propertyOf = function(obj) { | |
- return obj == null ? function(){} : function(key) { | |
- return obj[key]; | |
- }; | |
- }; | |
- | |
- // Returns a predicate for checking whether an object has a given set of | |
- // `key:value` pairs. | |
- _.matcher = _.matches = function(attrs) { | |
- attrs = _.extendOwn({}, attrs); | |
- return function(obj) { | |
- return _.isMatch(obj, attrs); | |
- }; | |
- }; | |
- | |
- // Run a function **n** times. | |
- _.times = function(n, iteratee, context) { | |
- var accum = Array(Math.max(0, n)); | |
- iteratee = optimizeCb(iteratee, context, 1); | |
- for (var i = 0; i < n; i++) accum[i] = iteratee(i); | |
- return accum; | |
- }; | |
- | |
- // Return a random integer between min and max (inclusive). | |
- _.random = function(min, max) { | |
- if (max == null) { | |
- max = min; | |
- min = 0; | |
- } | |
- return min + Math.floor(Math.random() * (max - min + 1)); | |
- }; | |
- | |
- // A (possibly faster) way to get the current timestamp as an integer. | |
- _.now = Date.now || function() { | |
- return new Date().getTime(); | |
- }; | |
- | |
- // List of HTML entities for escaping. | |
- var escapeMap = { | |
- '&': '&', | |
- '<': '<', | |
- '>': '>', | |
- '"': '"', | |
- "'": ''', | |
- '`': '`' | |
- }; | |
- var unescapeMap = _.invert(escapeMap); | |
- | |
- // Functions for escaping and unescaping strings to/from HTML interpolation. | |
- var createEscaper = function(map) { | |
- var escaper = function(match) { | |
- return map[match]; | |
- }; | |
- // Regexes for identifying a key that needs to be escaped | |
- var source = '(?:' + _.keys(map).join('|') + ')'; | |
- var testRegexp = RegExp(source); | |
- var replaceRegexp = RegExp(source, 'g'); | |
- return function(string) { | |
- string = string == null ? '' : '' + string; | |
- return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) … | |
- }; | |
- }; | |
- _.escape = createEscaper(escapeMap); | |
- _.unescape = createEscaper(unescapeMap); | |
- | |
- // If the value of the named `property` is a function then invoke it with the | |
- // `object` as context; otherwise, return it. | |
- _.result = function(object, property, fallback) { | |
- var value = object == null ? void 0 : object[property]; | |
- if (value === void 0) { | |
- value = fallback; | |
- } | |
- return _.isFunction(value) ? value.call(object) : value; | |
- }; | |
- | |
- // Generate a unique integer id (unique within the entire client session). | |
- // Useful for temporary DOM ids. | |
- var idCounter = 0; | |
- _.uniqueId = function(prefix) { | |
- var id = ++idCounter + ''; | |
- return prefix ? prefix + id : id; | |
- }; | |
- | |
- // By default, Underscore uses ERB-style template delimiters, change the | |
- // following template settings to use alternative delimiters. | |
- _.templateSettings = { | |
- evaluate : /<%([\s\S]+?)%>/g, | |
- interpolate : /<%=([\s\S]+?)%>/g, | |
- escape : /<%-([\s\S]+?)%>/g | |
- }; | |
- | |
- // When customizing `templateSettings`, if you don't want to define an | |
- // interpolation, evaluation or escaping regex, we need one that is | |
- // guaranteed not to match. | |
- var noMatch = /(.)^/; | |
- | |
- // Certain characters need to be escaped so that they can be put into a | |
- // string literal. | |
- var escapes = { | |
- "'": "'", | |
- '\\': '\\', | |
- '\r': 'r', | |
- '\n': 'n', | |
- '\u2028': 'u2028', | |
- '\u2029': 'u2029' | |
- }; | |
- | |
- var escaper = /\\|'|\r|\n|\u2028|\u2029/g; | |
- | |
- var escapeChar = function(match) { | |
- return '\\' + escapes[match]; | |
- }; | |
- | |
- // JavaScript micro-templating, similar to John Resig's implementation. | |
- // Underscore templating handles arbitrary delimiters, preserves whitespace, | |
- // and correctly escapes quotes within interpolated code. | |
- // NB: `oldSettings` only exists for backwards compatibility. | |
- _.template = function(text, settings, oldSettings) { | |
- if (!settings && oldSettings) settings = oldSettings; | |
- settings = _.defaults({}, settings, _.templateSettings); | |
- | |
- // Combine delimiters into one regular expression via alternation. | |
- var matcher = RegExp([ | |
- (settings.escape || noMatch).source, | |
- (settings.interpolate || noMatch).source, | |
- (settings.evaluate || noMatch).source | |
- ].join('|') + '|$', 'g'); | |
- | |
- // Compile the template source, escaping string literals appropriately. | |
- var index = 0; | |
- var source = "__p+='"; | |
- text.replace(matcher, function(match, escape, interpolate, evaluate, offse… | |
- source += text.slice(index, offset).replace(escaper, escapeChar); | |
- index = offset + match.length; | |
- | |
- if (escape) { | |
- source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; | |
- } else if (interpolate) { | |
- source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; | |
- } else if (evaluate) { | |
- source += "';\n" + evaluate + "\n__p+='"; | |
- } | |
- | |
- // Adobe VMs need the match returned to produce the correct offest. | |
- return match; | |
- }); | |
- source += "';\n"; | |
- | |
- // If a variable is not specified, place data values in local scope. | |
- if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; | |
- | |
- source = "var __t,__p='',__j=Array.prototype.join," + | |
- "print=function(){__p+=__j.call(arguments,'');};\n" + | |
- source + 'return __p;\n'; | |
- | |
- try { | |
- var render = new Function(settings.variable || 'obj', '_', source); | |
- } catch (e) { | |
- e.source = source; | |
- throw e; | |
- } | |
- | |
- var template = function(data) { | |
- return render.call(this, data, _); | |
- }; | |
- | |
- // Provide the compiled source as a convenience for precompilation. | |
- var argument = settings.variable || 'obj'; | |
- template.source = 'function(' + argument + '){\n' + source + '}'; | |
- | |
- return template; | |
- }; | |
- | |
- // Add a "chain" function. Start chaining a wrapped Underscore object. | |
- _.chain = function(obj) { | |
- var instance = _(obj); | |
- instance._chain = true; | |
- return instance; | |
- }; | |
- | |
- // OOP | |
- // --------------- | |
- // If Underscore is called as a function, it returns a wrapped object that | |
- // can be used OO-style. This wrapper holds altered versions of all the | |
- // underscore functions. Wrapped objects may be chained. | |
- | |
- // Helper function to continue chaining intermediate results. | |
- var result = function(instance, obj) { | |
- return instance._chain ? _(obj).chain() : obj; | |
- }; | |
- | |
- // Add your own custom functions to the Underscore object. | |
- _.mixin = function(obj) { | |
- _.each(_.functions(obj), function(name) { | |
- var func = _[name] = obj[name]; | |
- _.prototype[name] = function() { | |
- var args = [this._wrapped]; | |
- push.apply(args, arguments); | |
- return result(this, func.apply(_, args)); | |
- }; | |
- }); | |
- }; | |
- | |
- // Add all of the Underscore functions to the wrapper object. | |
- _.mixin(_); | |
- | |
- // Add all mutator Array functions to the wrapper. | |
- _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], fun… | |
- var method = ArrayProto[name]; | |
- _.prototype[name] = function() { | |
- var obj = this._wrapped; | |
- method.apply(obj, arguments); | |
- if ((name === 'shift' || name === 'splice') && obj.length === 0) delete … | |
- return result(this, obj); | |
- }; | |
- }); | |
- | |
- // Add all accessor Array functions to the wrapper. | |
- _.each(['concat', 'join', 'slice'], function(name) { | |
- var method = ArrayProto[name]; | |
- _.prototype[name] = function() { | |
- return result(this, method.apply(this._wrapped, arguments)); | |
- }; | |
- }); | |
- | |
- // Extracts the result from a wrapped and chained object. | |
- _.prototype.value = function() { | |
- return this._wrapped; | |
- }; | |
- | |
- // Provide unwrapping proxy for some methods used in engine operations | |
- // such as arithmetic and JSON stringification. | |
- _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; | |
- | |
- _.prototype.toString = function() { | |
- return '' + this._wrapped; | |
- }; | |
- | |
- // AMD registration happens at the end for compatibility with AMD loaders | |
- // that may not enforce next-turn semantics on modules. Even though general | |
- // practice for AMD registration is to be anonymous, underscore registers | |
- // as a named module because, like jQuery, it is a base library that is | |
- // popular enough to be bundled in a third party lib, but not be part of | |
- // an AMD load request. Those cases could generate an error when an | |
- // anonymous define() is called outside of a loader request. | |
- if (typeof define === 'function' && define.amd) { | |
- define('underscore', [], function() { | |
- return _; | |
- }); | |
- } | |
-}.call(this)); | |
+// Underscore.js 1.3.1 | |
+// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. | |
+// Underscore is freely distributable under the MIT license. | |
+// Portions of Underscore are inspired or borrowed from Prototype, | |
+// Oliver Steele's Functional, and John Resig's Micro-Templating. | |
+// For all details and documentation: | |
+// http://documentcloud.github.com/underscore | |
+(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==n… | |
+c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignore… | |
+h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,… | |
+b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else i… | |
+null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.re… | |
+function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true})… | |
+e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c|… | |
+function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){… | |
+return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){f==0?b[0]=a… | |
+c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?… | |
+b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){… | |
+return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.inter… | |
+d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if… | |
+var F=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.appl… | |
+c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);… | |
+a.apply(d,e);i();g=true}};b.debounce=function(a,b){var d;return function(){var… | |
+b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,… | |
+1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=func… | |
+b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArgu… | |
+b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(… | |
+function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return … | |
+u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).rep… | |
+function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,… | |
+true;return this};m.prototype.value=function(){return this._wrapped}}).call(th… | |
diff --git a/doc/html/_static/up-pressed.png b/doc/html/_static/up-pressed.png | |
Binary files differ. | |
diff --git a/doc/html/_static/up.png b/doc/html/_static/up.png | |
Binary files differ. | |
diff --git a/doc/html/_static/websupport.js b/doc/html/_static/websupport.js | |
t@@ -1,808 +0,0 @@ | |
-/* | |
- * websupport.js | |
- * ~~~~~~~~~~~~~ | |
- * | |
- * sphinx.websupport utilities for all documentation. | |
- * | |
- * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. | |
- * :license: BSD, see LICENSE for details. | |
- * | |
- */ | |
- | |
-(function($) { | |
- $.fn.autogrow = function() { | |
- return this.each(function() { | |
- var textarea = this; | |
- | |
- $.fn.autogrow.resize(textarea); | |
- | |
- $(textarea) | |
- .focus(function() { | |
- textarea.interval = setInterval(function() { | |
- $.fn.autogrow.resize(textarea); | |
- }, 500); | |
- }) | |
- .blur(function() { | |
- clearInterval(textarea.interval); | |
- }); | |
- }); | |
- }; | |
- | |
- $.fn.autogrow.resize = function(textarea) { | |
- var lineHeight = parseInt($(textarea).css('line-height'), 10); | |
- var lines = textarea.value.split('\n'); | |
- var columns = textarea.cols; | |
- var lineCount = 0; | |
- $.each(lines, function() { | |
- lineCount += Math.ceil(this.length / columns) || 1; | |
- }); | |
- var height = lineHeight * (lineCount + 1); | |
- $(textarea).css('height', height); | |
- }; | |
-})(jQuery); | |
- | |
-(function($) { | |
- var comp, by; | |
- | |
- function init() { | |
- initEvents(); | |
- initComparator(); | |
- } | |
- | |
- function initEvents() { | |
- $(document).on("click", 'a.comment-close', function(event) { | |
- event.preventDefault(); | |
- hide($(this).attr('id').substring(2)); | |
- }); | |
- $(document).on("click", 'a.vote', function(event) { | |
- event.preventDefault(); | |
- handleVote($(this)); | |
- }); | |
- $(document).on("click", 'a.reply', function(event) { | |
- event.preventDefault(); | |
- openReply($(this).attr('id').substring(2)); | |
- }); | |
- $(document).on("click", 'a.close-reply', function(event) { | |
- event.preventDefault(); | |
- closeReply($(this).attr('id').substring(2)); | |
- }); | |
- $(document).on("click", 'a.sort-option', function(event) { | |
- event.preventDefault(); | |
- handleReSort($(this)); | |
- }); | |
- $(document).on("click", 'a.show-proposal', function(event) { | |
- event.preventDefault(); | |
- showProposal($(this).attr('id').substring(2)); | |
- }); | |
- $(document).on("click", 'a.hide-proposal', function(event) { | |
- event.preventDefault(); | |
- hideProposal($(this).attr('id').substring(2)); | |
- }); | |
- $(document).on("click", 'a.show-propose-change', function(event) { | |
- event.preventDefault(); | |
- showProposeChange($(this).attr('id').substring(2)); | |
- }); | |
- $(document).on("click", 'a.hide-propose-change', function(event) { | |
- event.preventDefault(); | |
- hideProposeChange($(this).attr('id').substring(2)); | |
- }); | |
- $(document).on("click", 'a.accept-comment', function(event) { | |
- event.preventDefault(); | |
- acceptComment($(this).attr('id').substring(2)); | |
- }); | |
- $(document).on("click", 'a.delete-comment', function(event) { | |
- event.preventDefault(); | |
- deleteComment($(this).attr('id').substring(2)); | |
- }); | |
- $(document).on("click", 'a.comment-markup', function(event) { | |
- event.preventDefault(); | |
- toggleCommentMarkupBox($(this).attr('id').substring(2)); | |
- }); | |
- } | |
- | |
- /** | |
- * Set comp, which is a comparator function used for sorting and | |
- * inserting comments into the list. | |
- */ | |
- function setComparator() { | |
- // If the first three letters are "asc", sort in ascending order | |
- // and remove the prefix. | |
- if (by.substring(0,3) == 'asc') { | |
- var i = by.substring(3); | |
- comp = function(a, b) { return a[i] - b[i]; }; | |
- } else { | |
- // Otherwise sort in descending order. | |
- comp = function(a, b) { return b[by] - a[by]; }; | |
- } | |
- | |
- // Reset link styles and format the selected sort option. | |
- $('a.sel').attr('href', '#').removeClass('sel'); | |
- $('a.by' + by).removeAttr('href').addClass('sel'); | |
- } | |
- | |
- /** | |
- * Create a comp function. If the user has preferences stored in | |
- * the sortBy cookie, use those, otherwise use the default. | |
- */ | |
- function initComparator() { | |
- by = 'rating'; // Default to sort by rating. | |
- // If the sortBy cookie is set, use that instead. | |
- if (document.cookie.length > 0) { | |
- var start = document.cookie.indexOf('sortBy='); | |
- if (start != -1) { | |
- start = start + 7; | |
- var end = document.cookie.indexOf(";", start); | |
- if (end == -1) { | |
- end = document.cookie.length; | |
- by = unescape(document.cookie.substring(start, end)); | |
- } | |
- } | |
- } | |
- setComparator(); | |
- } | |
- | |
- /** | |
- * Show a comment div. | |
- */ | |
- function show(id) { | |
- $('#ao' + id).hide(); | |
- $('#ah' + id).show(); | |
- var context = $.extend({id: id}, opts); | |
- var popup = $(renderTemplate(popupTemplate, context)).hide(); | |
- popup.find('textarea[name="proposal"]').hide(); | |
- popup.find('a.by' + by).addClass('sel'); | |
- var form = popup.find('#cf' + id); | |
- form.submit(function(event) { | |
- event.preventDefault(); | |
- addComment(form); | |
- }); | |
- $('#s' + id).after(popup); | |
- popup.slideDown('fast', function() { | |
- getComments(id); | |
- }); | |
- } | |
- | |
- /** | |
- * Hide a comment div. | |
- */ | |
- function hide(id) { | |
- $('#ah' + id).hide(); | |
- $('#ao' + id).show(); | |
- var div = $('#sc' + id); | |
- div.slideUp('fast', function() { | |
- div.remove(); | |
- }); | |
- } | |
- | |
- /** | |
- * Perform an ajax request to get comments for a node | |
- * and insert the comments into the comments tree. | |
- */ | |
- function getComments(id) { | |
- $.ajax({ | |
- type: 'GET', | |
- url: opts.getCommentsURL, | |
- data: {node: id}, | |
- success: function(data, textStatus, request) { | |
- var ul = $('#cl' + id); | |
- var speed = 100; | |
- $('#cf' + id) | |
- .find('textarea[name="proposal"]') | |
- .data('source', data.source); | |
- | |
- if (data.comments.length === 0) { | |
- ul.html('<li>No comments yet.</li>'); | |
- ul.data('empty', true); | |
- } else { | |
- // If there are comments, sort them and put them in the list. | |
- var comments = sortComments(data.comments); | |
- speed = data.comments.length * 100; | |
- appendComments(comments, ul); | |
- ul.data('empty', false); | |
- } | |
- $('#cn' + id).slideUp(speed + 200); | |
- ul.slideDown(speed); | |
- }, | |
- error: function(request, textStatus, error) { | |
- showError('Oops, there was a problem retrieving the comments.'); | |
- }, | |
- dataType: 'json' | |
- }); | |
- } | |
- | |
- /** | |
- * Add a comment via ajax and insert the comment into the comment tree. | |
- */ | |
- function addComment(form) { | |
- var node_id = form.find('input[name="node"]').val(); | |
- var parent_id = form.find('input[name="parent"]').val(); | |
- var text = form.find('textarea[name="comment"]').val(); | |
- var proposal = form.find('textarea[name="proposal"]').val(); | |
- | |
- if (text == '') { | |
- showError('Please enter a comment.'); | |
- return; | |
- } | |
- | |
- // Disable the form that is being submitted. | |
- form.find('textarea,input').attr('disabled', 'disabled'); | |
- | |
- // Send the comment to the server. | |
- $.ajax({ | |
- type: "POST", | |
- url: opts.addCommentURL, | |
- dataType: 'json', | |
- data: { | |
- node: node_id, | |
- parent: parent_id, | |
- text: text, | |
- proposal: proposal | |
- }, | |
- success: function(data, textStatus, error) { | |
- // Reset the form. | |
- if (node_id) { | |
- hideProposeChange(node_id); | |
- } | |
- form.find('textarea') | |
- .val('') | |
- .add(form.find('input')) | |
- .removeAttr('disabled'); | |
- var ul = $('#cl' + (node_id || parent_id)); | |
- if (ul.data('empty')) { | |
- $(ul).empty(); | |
- ul.data('empty', false); | |
- } | |
- insertComment(data.comment); | |
- var ao = $('#ao' + node_id); | |
- ao.find('img').attr({'src': opts.commentBrightImage}); | |
- if (node_id) { | |
- // if this was a "root" comment, remove the commenting box | |
- // (the user can get it back by reopening the comment popup) | |
- $('#ca' + node_id).slideUp(); | |
- } | |
- }, | |
- error: function(request, textStatus, error) { | |
- form.find('textarea,input').removeAttr('disabled'); | |
- showError('Oops, there was a problem adding the comment.'); | |
- } | |
- }); | |
- } | |
- | |
- /** | |
- * Recursively append comments to the main comment list and children | |
- * lists, creating the comment tree. | |
- */ | |
- function appendComments(comments, ul) { | |
- $.each(comments, function() { | |
- var div = createCommentDiv(this); | |
- ul.append($(document.createElement('li')).html(div)); | |
- appendComments(this.children, div.find('ul.comment-children')); | |
- // To avoid stagnating data, don't store the comments children in data. | |
- this.children = null; | |
- div.data('comment', this); | |
- }); | |
- } | |
- | |
- /** | |
- * After adding a new comment, it must be inserted in the correct | |
- * location in the comment tree. | |
- */ | |
- function insertComment(comment) { | |
- var div = createCommentDiv(comment); | |
- | |
- // To avoid stagnating data, don't store the comments children in data. | |
- comment.children = null; | |
- div.data('comment', comment); | |
- | |
- var ul = $('#cl' + (comment.node || comment.parent)); | |
- var siblings = getChildren(ul); | |
- | |
- var li = $(document.createElement('li')); | |
- li.hide(); | |
- | |
- // Determine where in the parents children list to insert this comment. | |
- for(i=0; i < siblings.length; i++) { | |
- if (comp(comment, siblings[i]) <= 0) { | |
- $('#cd' + siblings[i].id) | |
- .parent() | |
- .before(li.html(div)); | |
- li.slideDown('fast'); | |
- return; | |
- } | |
- } | |
- | |
- // If we get here, this comment rates lower than all the others, | |
- // or it is the only comment in the list. | |
- ul.append(li.html(div)); | |
- li.slideDown('fast'); | |
- } | |
- | |
- function acceptComment(id) { | |
- $.ajax({ | |
- type: 'POST', | |
- url: opts.acceptCommentURL, | |
- data: {id: id}, | |
- success: function(data, textStatus, request) { | |
- $('#cm' + id).fadeOut('fast'); | |
- $('#cd' + id).removeClass('moderate'); | |
- }, | |
- error: function(request, textStatus, error) { | |
- showError('Oops, there was a problem accepting the comment.'); | |
- } | |
- }); | |
- } | |
- | |
- function deleteComment(id) { | |
- $.ajax({ | |
- type: 'POST', | |
- url: opts.deleteCommentURL, | |
- data: {id: id}, | |
- success: function(data, textStatus, request) { | |
- var div = $('#cd' + id); | |
- if (data == 'delete') { | |
- // Moderator mode: remove the comment and all children immediately | |
- div.slideUp('fast', function() { | |
- div.remove(); | |
- }); | |
- return; | |
- } | |
- // User mode: only mark the comment as deleted | |
- div | |
- .find('span.user-id:first') | |
- .text('[deleted]').end() | |
- .find('div.comment-text:first') | |
- .text('[deleted]').end() | |
- .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id + | |
- ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id) | |
- .remove(); | |
- var comment = div.data('comment'); | |
- comment.username = '[deleted]'; | |
- comment.text = '[deleted]'; | |
- div.data('comment', comment); | |
- }, | |
- error: function(request, textStatus, error) { | |
- showError('Oops, there was a problem deleting the comment.'); | |
- } | |
- }); | |
- } | |
- | |
- function showProposal(id) { | |
- $('#sp' + id).hide(); | |
- $('#hp' + id).show(); | |
- $('#pr' + id).slideDown('fast'); | |
- } | |
- | |
- function hideProposal(id) { | |
- $('#hp' + id).hide(); | |
- $('#sp' + id).show(); | |
- $('#pr' + id).slideUp('fast'); | |
- } | |
- | |
- function showProposeChange(id) { | |
- $('#pc' + id).hide(); | |
- $('#hc' + id).show(); | |
- var textarea = $('#pt' + id); | |
- textarea.val(textarea.data('source')); | |
- $.fn.autogrow.resize(textarea[0]); | |
- textarea.slideDown('fast'); | |
- } | |
- | |
- function hideProposeChange(id) { | |
- $('#hc' + id).hide(); | |
- $('#pc' + id).show(); | |
- var textarea = $('#pt' + id); | |
- textarea.val('').removeAttr('disabled'); | |
- textarea.slideUp('fast'); | |
- } | |
- | |
- function toggleCommentMarkupBox(id) { | |
- $('#mb' + id).toggle(); | |
- } | |
- | |
- /** Handle when the user clicks on a sort by link. */ | |
- function handleReSort(link) { | |
- var classes = link.attr('class').split(/\s+/); | |
- for (var i=0; i<classes.length; i++) { | |
- if (classes[i] != 'sort-option') { | |
- by = classes[i].substring(2); | |
- } | |
- } | |
- setComparator(); | |
- // Save/update the sortBy cookie. | |
- var expiration = new Date(); | |
- expiration.setDate(expiration.getDate() + 365); | |
- document.cookie= 'sortBy=' + escape(by) + | |
- ';expires=' + expiration.toUTCString(); | |
- $('ul.comment-ul').each(function(index, ul) { | |
- var comments = getChildren($(ul), true); | |
- comments = sortComments(comments); | |
- appendComments(comments, $(ul).empty()); | |
- }); | |
- } | |
- | |
- /** | |
- * Function to process a vote when a user clicks an arrow. | |
- */ | |
- function handleVote(link) { | |
- if (!opts.voting) { | |
- showError("You'll need to login to vote."); | |
- return; | |
- } | |
- | |
- var id = link.attr('id'); | |
- if (!id) { | |
- // Didn't click on one of the voting arrows. | |
- return; | |
- } | |
- // If it is an unvote, the new vote value is 0, | |
- // Otherwise it's 1 for an upvote, or -1 for a downvote. | |
- var value = 0; | |
- if (id.charAt(1) != 'u') { | |
- value = id.charAt(0) == 'u' ? 1 : -1; | |
- } | |
- // The data to be sent to the server. | |
- var d = { | |
- comment_id: id.substring(2), | |
- value: value | |
- }; | |
- | |
- // Swap the vote and unvote links. | |
- link.hide(); | |
- $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id) | |
- .show(); | |
- | |
- // The div the comment is displayed in. | |
- var div = $('div#cd' + d.comment_id); | |
- var data = div.data('comment'); | |
- | |
- // If this is not an unvote, and the other vote arrow has | |
- // already been pressed, unpress it. | |
- if ((d.value !== 0) && (data.vote === d.value * -1)) { | |
- $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide(); | |
- $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show(); | |
- } | |
- | |
- // Update the comments rating in the local data. | |
- data.rating += (data.vote === 0) ? d.value : (d.value - data.vote); | |
- data.vote = d.value; | |
- div.data('comment', data); | |
- | |
- // Change the rating text. | |
- div.find('.rating:first') | |
- .text(data.rating + ' point' + (data.rating == 1 ? '' : 's')); | |
- | |
- // Send the vote information to the server. | |
- $.ajax({ | |
- type: "POST", | |
- url: opts.processVoteURL, | |
- data: d, | |
- error: function(request, textStatus, error) { | |
- showError('Oops, there was a problem casting that vote.'); | |
- } | |
- }); | |
- } | |
- | |
- /** | |
- * Open a reply form used to reply to an existing comment. | |
- */ | |
- function openReply(id) { | |
- // Swap out the reply link for the hide link | |
- $('#rl' + id).hide(); | |
- $('#cr' + id).show(); | |
- | |
- // Add the reply li to the children ul. | |
- var div = $(renderTemplate(replyTemplate, {id: id})).hide(); | |
- $('#cl' + id) | |
- .prepend(div) | |
- // Setup the submit handler for the reply form. | |
- .find('#rf' + id) | |
- .submit(function(event) { | |
- event.preventDefault(); | |
- addComment($('#rf' + id)); | |
- closeReply(id); | |
- }) | |
- .find('input[type=button]') | |
- .click(function() { | |
- closeReply(id); | |
- }); | |
- div.slideDown('fast', function() { | |
- $('#rf' + id).find('textarea').focus(); | |
- }); | |
- } | |
- | |
- /** | |
- * Close the reply form opened with openReply. | |
- */ | |
- function closeReply(id) { | |
- // Remove the reply div from the DOM. | |
- $('#rd' + id).slideUp('fast', function() { | |
- $(this).remove(); | |
- }); | |
- | |
- // Swap out the hide link for the reply link | |
- $('#cr' + id).hide(); | |
- $('#rl' + id).show(); | |
- } | |
- | |
- /** | |
- * Recursively sort a tree of comments using the comp comparator. | |
- */ | |
- function sortComments(comments) { | |
- comments.sort(comp); | |
- $.each(comments, function() { | |
- this.children = sortComments(this.children); | |
- }); | |
- return comments; | |
- } | |
- | |
- /** | |
- * Get the children comments from a ul. If recursive is true, | |
- * recursively include childrens' children. | |
- */ | |
- function getChildren(ul, recursive) { | |
- var children = []; | |
- ul.children().children("[id^='cd']") | |
- .each(function() { | |
- var comment = $(this).data('comment'); | |
- if (recursive) | |
- comment.children = getChildren($(this).find('#cl' + comment.id), tru… | |
- children.push(comment); | |
- }); | |
- return children; | |
- } | |
- | |
- /** Create a div to display a comment in. */ | |
- function createCommentDiv(comment) { | |
- if (!comment.displayed && !opts.moderator) { | |
- return $('<div class="moderate">Thank you! Your comment will show up ' | |
- + 'once it is has been approved by a moderator.</div>'); | |
- } | |
- // Prettify the comment rating. | |
- comment.pretty_rating = comment.rating + ' point' + | |
- (comment.rating == 1 ? '' : 's'); | |
- // Make a class (for displaying not yet moderated comments differently) | |
- comment.css_class = comment.displayed ? '' : ' moderate'; | |
- // Create a div for this comment. | |
- var context = $.extend({}, opts, comment); | |
- var div = $(renderTemplate(commentTemplate, context)); | |
- | |
- // If the user has voted on this comment, highlight the correct arrow. | |
- if (comment.vote) { | |
- var direction = (comment.vote == 1) ? 'u' : 'd'; | |
- div.find('#' + direction + 'v' + comment.id).hide(); | |
- div.find('#' + direction + 'u' + comment.id).show(); | |
- } | |
- | |
- if (opts.moderator || comment.text != '[deleted]') { | |
- div.find('a.reply').show(); | |
- if (comment.proposal_diff) | |
- div.find('#sp' + comment.id).show(); | |
- if (opts.moderator && !comment.displayed) | |
- div.find('#cm' + comment.id).show(); | |
- if (opts.moderator || (opts.username == comment.username)) | |
- div.find('#dc' + comment.id).show(); | |
- } | |
- return div; | |
- } | |
- | |
- /** | |
- * A simple template renderer. Placeholders such as <%id%> are replaced | |
- * by context['id'] with items being escaped. Placeholders such as <#id#> | |
- * are not escaped. | |
- */ | |
- function renderTemplate(template, context) { | |
- var esc = $(document.createElement('div')); | |
- | |
- function handle(ph, escape) { | |
- var cur = context; | |
- $.each(ph.split('.'), function() { | |
- cur = cur[this]; | |
- }); | |
- return escape ? esc.text(cur || "").html() : cur; | |
- } | |
- | |
- return template.replace(/<([%#])([\w\.]*)\1>/g, function() { | |
- return handle(arguments[2], arguments[1] == '%' ? true : false); | |
- }); | |
- } | |
- | |
- /** Flash an error message briefly. */ | |
- function showError(message) { | |
- $(document.createElement('div')).attr({'class': 'popup-error'}) | |
- .append($(document.createElement('div')) | |
- .attr({'class': 'error-message'}).text(message)) | |
- .appendTo('body') | |
- .fadeIn("slow") | |
- .delay(2000) | |
- .fadeOut("slow"); | |
- } | |
- | |
- /** Add a link the user uses to open the comments popup. */ | |
- $.fn.comment = function() { | |
- return this.each(function() { | |
- var id = $(this).attr('id').substring(1); | |
- var count = COMMENT_METADATA[id]; | |
- var title = count + ' comment' + (count == 1 ? '' : 's'); | |
- var image = count > 0 ? opts.commentBrightImage : opts.commentImage; | |
- var addcls = count == 0 ? ' nocomment' : ''; | |
- $(this) | |
- .append( | |
- $(document.createElement('a')).attr({ | |
- href: '#', | |
- 'class': 'sphinx-comment-open' + addcls, | |
- id: 'ao' + id | |
- }) | |
- .append($(document.createElement('img')).attr({ | |
- src: image, | |
- alt: 'comment', | |
- title: title | |
- })) | |
- .click(function(event) { | |
- event.preventDefault(); | |
- show($(this).attr('id').substring(2)); | |
- }) | |
- ) | |
- .append( | |
- $(document.createElement('a')).attr({ | |
- href: '#', | |
- 'class': 'sphinx-comment-close hidden', | |
- id: 'ah' + id | |
- }) | |
- .append($(document.createElement('img')).attr({ | |
- src: opts.closeCommentImage, | |
- alt: 'close', | |
- title: 'close' | |
- })) | |
- .click(function(event) { | |
- event.preventDefault(); | |
- hide($(this).attr('id').substring(2)); | |
- }) | |
- ); | |
- }); | |
- }; | |
- | |
- var opts = { | |
- processVoteURL: '/_process_vote', | |
- addCommentURL: '/_add_comment', | |
- getCommentsURL: '/_get_comments', | |
- acceptCommentURL: '/_accept_comment', | |
- deleteCommentURL: '/_delete_comment', | |
- commentImage: '/static/_static/comment.png', | |
- closeCommentImage: '/static/_static/comment-close.png', | |
- loadingImage: '/static/_static/ajax-loader.gif', | |
- commentBrightImage: '/static/_static/comment-bright.png', | |
- upArrow: '/static/_static/up.png', | |
- downArrow: '/static/_static/down.png', | |
- upArrowPressed: '/static/_static/up-pressed.png', | |
- downArrowPressed: '/static/_static/down-pressed.png', | |
- voting: false, | |
- moderator: false | |
- }; | |
- | |
- if (typeof COMMENT_OPTIONS != "undefined") { | |
- opts = jQuery.extend(opts, COMMENT_OPTIONS); | |
- } | |
- | |
- var popupTemplate = '\ | |
- <div class="sphinx-comments" id="sc<%id%>">\ | |
- <p class="sort-options">\ | |
- Sort by:\ | |
- <a href="#" class="sort-option byrating">best rated</a>\ | |
- <a href="#" class="sort-option byascage">newest</a>\ | |
- <a href="#" class="sort-option byage">oldest</a>\ | |
- </p>\ | |
- <div class="comment-header">Comments</div>\ | |
- <div class="comment-loading" id="cn<%id%>">\ | |
- loading comments... <img src="<%loadingImage%>" alt="" /></div>\ | |
- <ul id="cl<%id%>" class="comment-ul"></ul>\ | |
- <div id="ca<%id%>">\ | |
- <p class="add-a-comment">Add a comment\ | |
- (<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\ | |
- <div class="comment-markup-box" id="mb<%id%>">\ | |
- reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \ | |
- <code>``code``</code>, \ | |
- code blocks: <code>::</code> and an indented block after blank line</d… | |
- <form method="post" id="cf<%id%>" class="comment-form" action="">\ | |
- <textarea name="comment" cols="80"></textarea>\ | |
- <p class="propose-button">\ | |
- <a href="#" id="pc<%id%>" class="show-propose-change">\ | |
- Propose a change ▹\ | |
- </a>\ | |
- <a href="#" id="hc<%id%>" class="hide-propose-change">\ | |
- Propose a change ▿\ | |
- </a>\ | |
- </p>\ | |
- <textarea name="proposal" id="pt<%id%>" cols="80"\ | |
- spellcheck="false"></textarea>\ | |
- <input type="submit" value="Add comment" />\ | |
- <input type="hidden" name="node" value="<%id%>" />\ | |
- <input type="hidden" name="parent" value="" />\ | |
- </form>\ | |
- </div>\ | |
- </div>'; | |
- | |
- var commentTemplate = '\ | |
- <div id="cd<%id%>" class="sphinx-comment<%css_class%>">\ | |
- <div class="vote">\ | |
- <div class="arrow">\ | |
- <a href="#" id="uv<%id%>" class="vote" title="vote up">\ | |
- <img src="<%upArrow%>" />\ | |
- </a>\ | |
- <a href="#" id="uu<%id%>" class="un vote" title="vote up">\ | |
- <img src="<%upArrowPressed%>" />\ | |
- </a>\ | |
- </div>\ | |
- <div class="arrow">\ | |
- <a href="#" id="dv<%id%>" class="vote" title="vote down">\ | |
- <img src="<%downArrow%>" id="da<%id%>" />\ | |
- </a>\ | |
- <a href="#" id="du<%id%>" class="un vote" title="vote down">\ | |
- <img src="<%downArrowPressed%>" />\ | |
- </a>\ | |
- </div>\ | |
- </div>\ | |
- <div class="comment-content">\ | |
- <p class="tagline comment">\ | |
- <span class="user-id"><%username%></span>\ | |
- <span class="rating"><%pretty_rating%></span>\ | |
- <span class="delta"><%time.delta%></span>\ | |
- </p>\ | |
- <div class="comment-text comment"><#text#></div>\ | |
- <p class="comment-opts comment">\ | |
- <a href="#" class="reply hidden" id="rl<%id%>">reply ▹</a>\ | |
- <a href="#" class="close-reply" id="cr<%id%>">reply ▿</a>\ | |
- <a href="#" id="sp<%id%>" class="show-proposal">proposal ▹</a>\ | |
- <a href="#" id="hp<%id%>" class="hide-proposal">proposal ▿</a>\ | |
- <a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\ | |
- <span id="cm<%id%>" class="moderation hidden">\ | |
- <a href="#" id="ac<%id%>" class="accept-comment">accept</a>\ | |
- </span>\ | |
- </p>\ | |
- <pre class="proposal" id="pr<%id%>">\ | |
-<#proposal_diff#>\ | |
- </pre>\ | |
- <ul class="comment-children" id="cl<%id%>"></ul>\ | |
- </div>\ | |
- <div class="clearleft"></div>\ | |
- </div>\ | |
- </div>'; | |
- | |
- var replyTemplate = '\ | |
- <li>\ | |
- <div class="reply-div" id="rd<%id%>">\ | |
- <form id="rf<%id%>">\ | |
- <textarea name="comment" cols="80"></textarea>\ | |
- <input type="submit" value="Add reply" />\ | |
- <input type="button" value="Cancel" />\ | |
- <input type="hidden" name="parent" value="<%id%>" />\ | |
- <input type="hidden" name="node" value="" />\ | |
- </form>\ | |
- </div>\ | |
- </li>'; | |
- | |
- $(document).ready(function() { | |
- init(); | |
- }); | |
-})(jQuery); | |
- | |
-$(document).ready(function() { | |
- // add comment anchors for all paragraphs that are commentable | |
- $('.sphinx-has-comment').comment(); | |
- | |
- // highlight search words in search results | |
- $("div.context").each(function() { | |
- var params = $.getQueryParameters(); | |
- var terms = (params.q) ? params.q[0].split(/\s+/) : []; | |
- var result = $(this); | |
- $.each(terms, function() { | |
- result.highlightText(this.toLowerCase(), 'highlighted'); | |
- }); | |
- }); | |
- | |
- // directly open comment window if requested | |
- var anchor = document.location.hash; | |
- if (anchor.substring(0, 9) == '#comment-') { | |
- $('#ao' + anchor.substring(9)).click(); | |
- document.location.hash = '#s' + anchor.substring(9); | |
- } | |
-}); | |
diff --git a/doc/html/cfd.html b/doc/html/cfd.html | |
t@@ -1,35 +1,24 @@ | |
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
+<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
- | |
+ <meta charset="utf-8" /> | |
<title>Fluid simulation and particle-fluid interaction — sphere 2.15… | |
- | |
<link rel="stylesheet" href="_static/classic.css" type="text/css" /> | |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
- <script type="text/javascript"> | |
- var DOCUMENTATION_OPTIONS = { | |
- URL_ROOT: './', | |
- VERSION: '2.15-beta', | |
- COLLAPSE_INDEX: false, | |
- FILE_SUFFIX: '.html', | |
- HAS_SOURCE: true | |
- }; | |
- </script> | |
+ <script type="text/javascript" id="documentation_options" data-url_root=".… | |
<script type="text/javascript" src="_static/jquery.js"></script> | |
<script type="text/javascript" src="_static/underscore.js"></script> | |
<script type="text/javascript" src="_static/doctools.js"></script> | |
+ <script type="text/javascript" src="_static/language_data.js"></script> | |
+ | |
<link rel="index" title="Index" href="genindex.html" /> | |
<link rel="search" title="Search" href="search.html" /> | |
- <link rel="top" title="sphere 2.15-beta documentation" href="index.html" /> | |
<link rel="next" title="Python API" href="python_api.html" /> | |
<link rel="prev" title="Discrete element method" href="dem.html" /> | |
- </head> | |
- <body role="document"> | |
+ </head><body> | |
<div class="related" role="navigation" aria-label="related navigation"> | |
<h3>Navigation</h3> | |
<ul> | |
t@@ -68,31 +57,31 @@ solution procedure and the numerical implementation.</p> | |
<p>Following the outline presented by <a class="reference external" href="http… | |
continuity equation for an incompressible fluid material is given by:</p> | |
<div class="math"> | |
-<p><img src="_images/math/12f7f7910a11a5fc522425b33139287524c6e643.png" alt="\… | |
+<p><img src="_images/math/2ebe57143bfac54b7d13d59297affe6ce4e0490e.png" alt="\… | |
</div><p>and the momentum equation:</p> | |
<div class="math"> | |
-<p><img src="_images/math/8b081782b6d73a048e968995b8605086e2c9ff1f.png" alt="\… | |
+<p><img src="_images/math/321ea56397cc9e6cf05b895883258025af46a885.png" alt="\… | |
+ \rho (\boldsymbol{v} \cdot \nabla \boldsymbol{v}) | |
= \nabla \cdot \boldsymbol{\sigma} | |
- \boldsymbol{f}^i | |
+ \rho \boldsymbol{g}"/></p> | |
-</div><p>Here, <img class="math" src="_images/math/e7b48cd405b36440e40f970237c… | |
-fluid density, <img class="math" src="_images/math/2c6c8b6b1866df63a964f3c153a… | |
-<img class="math" src="_images/math/af5ed4f2edd188dadef68b3626d9fe7328f44848.p… | |
-<img class="math" src="_images/math/2be557ceeacba6f01feedb2ed907af87442104a1.p… | |
+</div><p>Here, <img class="math" src="_images/math/510c4529ac8afe31da328659a62… | |
+fluid density, <img class="math" src="_images/math/af12689d82b180a54e5362ae95a… | |
+<img class="math" src="_images/math/48bdffae0ccbc9ae14526c24bde0b5ce156d6b46.p… | |
+<img class="math" src="_images/math/bb8cd3151bb302b4dbd7107bc23240b7a1f86d80.p… | |
Newtonian fluids, the Cauchy stress is given by:</p> | |
<div class="math"> | |
-<p><img src="_images/math/778cdde6b1b06e6e1e0c059db34e1821a0744b5b.png" alt="\… | |
-</div><p><img class="math" src="_images/math/27d463da4622be5b3ef1d4176ced7d7a3… | |
-tensor, and <img class="math" src="_images/math/ecff587acb289da44784794a8cbe92… | |
+<p><img src="_images/math/70f3b255df6b95c6eccdddaf26e814efbb21a482.png" alt="\… | |
+</div><p><img class="math" src="_images/math/141bbefb74014fc5e43499901bf78607a… | |
+tensor, and <img class="math" src="_images/math/e8638c03875910e3365dac845714a8… | |
by:</p> | |
<div class="math"> | |
-<p><img src="_images/math/048aa5b140cc86095a635258ba222f4ce562c46c.png" alt="\… | |
+<p><img src="_images/math/36e047f01517c90d6122694bfff5f7f18630b788.png" alt="\… | |
\mu_f \nabla \boldsymbol{v} | |
+ \mu_f (\nabla \boldsymbol{v})^T"/></p> | |
</div><p>By using the following vector identities:</p> | |
<div class="math"> | |
-<p><img src="_images/math/54c6ba63db4b565c0d31fd9e64caae2e0990706b.png" alt="\… | |
+<p><img src="_images/math/80f029074944a89a2802f326da11b4fea65b1b2d.png" alt="\… | |
\nabla \cdot (\nabla \boldsymbol{v}) = \nabla^2 \boldsymbol{v} | |
t@@ -101,29 +90,29 @@ by:</p> | |
</div><p>the deviatoric component of the Cauchy stress tensor simplifies to the | |
following, assuming that spatial variations in the viscosity can be neglected:… | |
<div class="math"> | |
-<p><img src="_images/math/3b48976b9058ec32db3d413cfccaede0cd1bf31b.png" alt="=… | |
+<p><img src="_images/math/e525a4923850629a39c3abc0a0b46b85eeb8eab6.png" alt="=… | |
+ \mu_f \nabla^2 \boldsymbol{v}"/></p> | |
</div><p>Since we are dealing with fluid flow in a porous medium, additional t… | |
introduced to the equations for conservation of mass and momentum. In the | |
following, the equations are derived for the first spatial component. The | |
solution for the other components is trivial.</p> | |
<p>The porosity value (in the saturated porous medium the volumetric fraction … | |
-the fluid phase) denoted <img class="math" src="_images/math/c2f31c22645274c37… | |
+the fluid phase) denoted <img class="math" src="_images/math/fffd2357ee88a9c50… | |
momentum equations. The continuity equation becomes:</p> | |
<div class="math"> | |
-<p><img src="_images/math/ccd454c154f50b005e2c673771bf6f7fc20dcdcd.png" alt="\… | |
+<p><img src="_images/math/b9068a1e88690142dca1c6a74091348e8064b9ca.png" alt="\… | |
+ \nabla \cdot (\phi \boldsymbol{v}) = 0"/></p> | |
-</div><p>For the <img class="math" src="_images/math/a59f68a4202623bb859a7093f… | |
-with a body force <img class="math" src="_images/math/0d2439f09c0757d8e087ec31… | |
+</div><p>For the <img class="math" src="_images/math/888f7c323ac0341871e867220… | |
+with a body force <img class="math" src="_images/math/589f894e7bddf7ae1a4b9dcb… | |
<div class="math"> | |
-<p><img src="_images/math/94cb90a2611b5dcea79f236933ff4f759fddbe71.png" alt="\… | |
+<p><img src="_images/math/5470b3e5faeecda0a5d86db97b337c268cbe1a46.png" alt="\… | |
= \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\sigma}) \right]_x | |
- \frac{1}{\rho} f^i_x | |
+ \phi g"/></p> | |
</div><p>In the Eulerian formulation, an advection term is added, and the Cauc… | |
tensor is represented as isotropic and deviatoric components individually:</p> | |
<div class="math"> | |
-<p><img src="_images/math/30db4313208df84c2ad59bb33fb8d7cda1ea18ac.png" alt="\… | |
+<p><img src="_images/math/d860033316d4db0b552f2e4441ef5b3fd2b58d76.png" alt="\… | |
+ \boldsymbol{v} \cdot \nabla (\phi v_x) | |
= \frac{1}{\rho} \left[ \nabla \cdot (-\phi p \boldsymbol{I}) | |
+ \phi \boldsymbol{\tau}) \right]_x | |
t@@ -132,7 +121,7 @@ tensor is represented as isotropic and deviatoric componen… | |
</div><p>Using vector identities to rewrite the advection term, and expanding … | |
stress tensor term:</p> | |
<div class="math"> | |
-<p><img src="_images/math/dfc197cc1f3569837c89d6fd4eda57f135c1941a.png" alt="\… | |
+<p><img src="_images/math/bd5938eba6625b76607b0ac2ceb37453e8a67105.png" alt="\… | |
+ \nabla \cdot (\phi v_x \boldsymbol{v}) | |
- \phi v_x (\nabla \cdot \boldsymbol{v}) | |
= \frac{1}{\rho} \left[ -\nabla \phi p \right]_x | |
t@@ -141,24 +130,24 @@ stress tensor term:</p> | |
+ \phi g_x"/></p> | |
</div><p>Spatial variations in the porosity are neglected,</p> | |
<div class="math"> | |
-<p><img src="_images/math/f986f0b44e081477adec302df83930cdd31e5a42.png" alt="\… | |
+<p><img src="_images/math/a349ae092fc26f86f454abfacb40ce0ed9cd2ac9.png" alt="\… | |
</div><p>and the pressure is attributed to the fluid phase alone (model B in Z… | |
2007 and Zhou et al. 2010). The divergence of fluid velocities is defined to be | |
zero:</p> | |
<div class="math"> | |
-<p><img src="_images/math/bb89d2c54178c6063bbddbc2ef5cc575a6ad20d6.png" alt="\… | |
+<p><img src="_images/math/b2d579d8b04e5bb645239dd2e5d8dfe4d8d7b472.png" alt="\… | |
</div><p>With these assumptions, the momentum equation simplifies to:</p> | |
<div class="math"> | |
-<p><img src="_images/math/0c167e8743c59960431a47f16ee7244f2a13028f.png" alt="\… | |
+<p><img src="_images/math/857e62557f767500fdff1bb017a6a5771a10af6f.png" alt="\… | |
+ \nabla \cdot (\phi v_x \boldsymbol{v}) | |
= -\frac{1}{\rho} \frac{\partial p}{\partial x} | |
+ \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\tau}) \right]_x | |
- \frac{1}{\rho} f^i_x | |
+ \phi g_x"/></p> | |
-</div><p>The remaining part of the advection term is for the <img class="math"… | |
+</div><p>The remaining part of the advection term is for the <img class="math"… | |
found as:</p> | |
<div class="math"> | |
-<p><img src="_images/math/145ab6190ce7c0c86da9eda1e2fac70f23b3a5fd.png" alt="\… | |
+<p><img src="_images/math/61a00fe9b19055ba2dd54bc5792a1993c782967a.png" alt="\… | |
\left[ | |
\frac{\partial}{\partial x}, | |
\frac{\partial}{\partial y}, | |
t@@ -175,10 +164,10 @@ found as:</p> | |
\frac{\partial (\phi v_x v_x)}{\partial x} + | |
\frac{\partial (\phi v_x v_y)}{\partial y} + | |
\frac{\partial (\phi v_x v_z)}{\partial z}"/></p> | |
-</div><p>The deviatoric stress tensor is in this case symmetrical, i.e. <img c… | |
+</div><p>The deviatoric stress tensor is in this case symmetrical, i.e. <img c… | |
= \tau_{ji}"/>, and is found by:</p> | |
<div class="math"> | |
-<p><img src="_images/math/0e293ff1406db52958abdce04458871a8a4c966f.png" alt="\… | |
+<p><img src="_images/math/a25fbe2b1d2c99f6e93bb0c16b422a16d706f479.png" alt="\… | |
= \frac{1}{\rho} | |
\left[ | |
\left[ | |
t@@ -217,17 +206,17 @@ found as:</p> | |
+ \frac{\partial (\phi \tau_{xz})}{\partial z} | |
\right)"/></p> | |
</div><p>In a linear viscous fluid, the stress and strain rate | |
-(<img class="math" src="_images/math/bdf1f5aad7dd65124011111a75c2b8b6c3252f0f.… | |
-viscosity parameter <img class="math" src="_images/math/d24e1c9504f0a7305bbf80… | |
+(<img class="math" src="_images/math/be6144b74fc7e34c2a42af2bf1993b8ea1556f63.… | |
+viscosity parameter <img class="math" src="_images/math/cebafd792667b403a21a4f… | |
<div class="math"> | |
-<p><img src="_images/math/f08a1f9bfdf41e9a3f9852b0aeae4a16500bb993.png" alt="\… | |
+<p><img src="_images/math/2e91d0a31e3dfb269c8af110ef9d87cca141c921.png" alt="\… | |
= \mu_f \left( | |
\frac{\partial v_i}{\partial x_j} + \frac{\partial v_j}{\partial x_i} | |
\right)"/></p> | |
</div><p>With this relationship, the deviatoric stress tensor components can be | |
calculated as:</p> | |
<div class="math"> | |
-<p><img src="_images/math/5fe663ae852d5c4d779d8d7827ca30a28852936a.png" alt="\… | |
+<p><img src="_images/math/51aabda11b1f09c36be43c63f1a3363920f6d2ba.png" alt="\… | |
\tau_{yy} = 2 \mu_f \frac{\partial v_y}{\partial y} \qquad | |
\tau_{zz} = 2 \mu_f \frac{\partial v_z}{\partial z} | |
t@@ -239,26 +228,26 @@ calculated as:</p> | |
\tau_{yz} = \mu_f \left( | |
\frac{\partial v_y}{\partial z} + \frac{\partial v_z}{\partial y} \right)"/></… | |
-</div><p>where <img class="math" src="_images/math/d24e1c9504f0a7305bbf80f4d75… | |
+</div><p>where <img class="math" src="_images/math/cebafd792667b403a21a4f507d0… | |
fluid rheology assumes identical bulk and shear viscosities. The derivation of | |
the equations for the other spatial components is trivial.</p> | |
</div> | |
<div class="section" id="porosity-estimation"> | |
<h2>Porosity estimation<a class="headerlink" href="#porosity-estimation" title… | |
<p>The solid volume in each fluid cell is determined by the ratio of the | |
-a cell-centered spherical cell volume (<img class="math" src="_images/math/f99… | |
-particle volumes (<img class="math" src="_images/math/5bd22601fda700e6f36ba7e9… | |
-<img class="math" src="_images/math/5e8dd49b345fe138a2dacb54663b30b69335b6e6.p… | |
+a cell-centered spherical cell volume (<img class="math" src="_images/math/265… | |
+particle volumes (<img class="math" src="_images/math/2990374fde94f327b7f4f669… | |
+<img class="math" src="_images/math/c3233a1342e903c75d1e7983d6d3b12acc11d806.p… | |
the fluid cell width. The nearby particles are characterized by position | |
-<img class="math" src="_images/math/1165d3ed99998c0f1ab1f9f25b42757182923a8b.p… | |
+<img class="math" src="_images/math/a528060f65c96db30e29fe0792ecee736ec290c3.p… | |
as:</p> | |
<div class="math"> | |
-<p><img src="_images/math/3c39d664a1a005333c2e2e6088465ca5aabbc861.png" alt="d… | |
-</div><p>The common volume of the two intersecting spheres is zero if the volu… | |
+<p><img src="_images/math/1b6eba43d66e5a04885cc0147dc7f757b297c95a.png" alt="d… | |
+</div><p>The common volume of the two intersecting spheres is zero if the volu… | |
intersecting, lens shaped if they are intersecting, and spherical if the | |
particle is fully contained by the spherical cell volume:</p> | |
<div class="math"> | |
-<p><img src="_images/math/53e472051fcf13e3695e33c0f473e8d2c64f6ca7.png" alt="V… | |
+<p><img src="_images/math/37759601d93bbc73c7ce9a2a516909c8bf49a7d8.png" alt="V… | |
\begin{cases} | |
0 & \textit{if } R_i + r_j \leq d_{ij} \\ | |
\frac{1}{12d_{ij}} \left[ \pi (R_i + r_j - d_{ij})^2 | |
t@@ -268,7 +257,7 @@ particle is fully contained by the spherical cell volume:<… | |
\end{cases}"/></p> | |
</div><p>Using this method, the cell porosity values are continuous through ti… | |
particles enter and exit the cell volume. The rate of porosity change | |
-(<img class="math" src="_images/math/778cd9f6a1fa43976de0f124e625d935cf4c5f43.… | |
+(<img class="math" src="_images/math/7e2e127f90d156e3e20b4f4c36f3dd5a660fbc5e.… | |
by considering the previous and current porosity.</p> | |
</div> | |
<div class="section" id="particle-fluid-interaction"> | |
t@@ -278,55 +267,55 @@ outlined by Gidaspow 1992 and Shamy and Zhegal 2005. The… | |
interaction is based on the concept of drag, where the magnitude is based on | |
semi-empirical relationships. The drag force scales linearly with the relative | |
difference in velocity between the fluid and particle phase. On the base of | |
-Newton’s third law, the resulting drag force is applied with opposite si… | |
+Newton’s third law, the resulting drag force is applied with opposite signs … | |
the particle and fluid.</p> | |
-<p>For fluid cells with porosities (<img class="math" src="_images/math/c2f31c… | |
+<p>For fluid cells with porosities (<img class="math" src="_images/math/fffd23… | |
force is based on the Ergun (1952) equation:</p> | |
<div class="math"> | |
-<p><img src="_images/math/86705dc922462e20080973641e4bcf0246476b94.png" alt="\… | |
+<p><img src="_images/math/e8048524abc8cd9b1c09c0ae40329ed61f57c719.png" alt="\… | |
150 \frac{\mu_f (1-\phi)^2}{\phi\bar{d}^2} | |
+ 1.75 \frac{(1-\phi)\rho_f | |
||\boldsymbol{v}_f - \bar{\boldsymbol{v}}_p||}{\bar{d}} | |
\right) | |
(\boldsymbol{v}_f - \bar{\boldsymbol{v}}_p)"/></p> | |
-</div><p>here, <img class="math" src="_images/math/22474828ed1ac7525699de27914… | |
-<img class="math" src="_images/math/35a936dcbe9d44868273ba50e463cc18afa0f108.p… | |
-<img class="math" src="_images/math/ee125b2b5874be1ce504888dd7d7fa42b65e9261.p… | |
+</div><p>here, <img class="math" src="_images/math/935dede8fc5c0f449ff3f1d91a0… | |
+<img class="math" src="_images/math/94847c4d283861cea52ea3928c632de4c4062427.p… | |
+<img class="math" src="_images/math/91106df679664eb0437c2180a142140457aff53d.p… | |
particles in contact with the previously mentioned cell-centered sphere for | |
porosity estimation contribute to the average particle velocity and diameter in | |
the fluid cell.</p> | |
<p>If the porosity is greater than 0.8, the cell-averaged drag force | |
-(<img class="math" src="_images/math/7dcc7d011290597e0833cc160b66996c5d9d4595.… | |
+(<img class="math" src="_images/math/2f3dd2fc907238254bb45cc2427997659c2a1336.… | |
which considers the fluid flow situation:</p> | |
<div class="math"> | |
-<p><img src="_images/math/75a974365e0604c0e8675dc2543166a1216a324e.png" alt="\… | |
+<p><img src="_images/math/76c074e79b0a4187ccedcd40bf4147aa3551e819.png" alt="\… | |
\frac{3}{4} | |
\frac{C_d (1-\phi) \phi^{-2.65} \mu_f \rho_f | |
||\boldsymbol{v}_f - \bar{\boldsymbol{v}}_p||}{\bar{d}} | |
\right) | |
(\boldsymbol{v}_f - \bar{\boldsymbol{v}}_p)"/></p> | |
-</div><p>The drag coefficient <img class="math" src="_images/math/15746e47c01e… | |
-Reynolds number <img class="math" src="_images/math/e7d45090e3dbe0db821c4e5fdf… | |
+</div><p>The drag coefficient <img class="math" src="_images/math/0b33acc067ea… | |
+Reynolds number <img class="math" src="_images/math/68132fbd6f413bd35c80cc0f70… | |
<div class="math"> | |
-<p><img src="_images/math/5962c6c4e4e193ec5e6b17320744252e30a86315.png" alt="C… | |
+<p><img src="_images/math/753a91bd77f2126e848dd6d0d8a4ba663dcb2dc4.png" alt="C… | |
\begin{cases} | |
\frac{24}{Re} (1+0.15 (Re)^{0.687} & \textit{if } Re < 1,000 \\ | |
0.44 & \textit{if } Re \geq 1,000 | |
\end{cases}"/></p> | |
-</div><p>where the Reynold’s number is found by:</p> | |
+</div><p>where the Reynold’s number is found by:</p> | |
<div class="math"> | |
-<p><img src="_images/math/8be75291f64c7dd21b34613d8a5346f3b9aff877.png" alt="R… | |
+<p><img src="_images/math/9219f7822d26600e1170a020e204c434c313d2ea.png" alt="R… | |
||\boldsymbol{v}_f - \bar{\boldsymbol{v}}_p||"/></p> | |
</div><p>The interaction force is applied to the fluid with negative sign as a | |
-contribution to the body force <img class="math" src="_images/math/0d2439f09c0… | |
+contribution to the body force <img class="math" src="_images/math/589f894e7bd… | |
force applied particles in the fluid cell is:</p> | |
<div class="math"> | |
-<p><img src="_images/math/4eefba7b01497c1c37254ba0938852a69ca402da.png" alt="\… | |
-</div><p>where <img class="math" src="_images/math/0e157574dc52c16b7aad0f26083… | |
+<p><img src="_images/math/b3a2c5ab22c7b99459b17e5880b0a77558e77144.png" alt="\… | |
+</div><p>where <img class="math" src="_images/math/70bdb5c509a569e9fc814299f3f… | |
interaction force could be expanded to include the force induced by the fluid | |
pressure gradient:</p> | |
<div class="math"> | |
-<p><img src="_images/math/5fc35741bb341c4a7bac2b261074cee511b162b9.png" alt="\… | |
+<p><img src="_images/math/36f8efcaa2b30e4c33847b988de9ebefad7c0f8a.png" alt="\… | |
-\nabla p + | |
\frac{\bar{\boldsymbol{f}}_d}{1-\phi} | |
\right) V_p"/></p> | |
t@@ -336,10 +325,10 @@ pressure gradient:</p> | |
<p>The partial differential terms in the previously described equations are fo… | |
using finite central differences. Modifying the operator splitting methodology | |
presented by Langtangen et al. (2002), the predicted velocity | |
-<img class="math" src="_images/math/8615f3b3cbbe1dc55cb6b255dad751d458a4ed3c.p… | |
-<img class="math" src="_images/math/ec002955bdf95ee9869878fbad4f80fc98539359.p… | |
+<img class="math" src="_images/math/1cc93350d8f6add165eff5f513eaa626e1c8c16c.p… | |
+<img class="math" src="_images/math/b4ed9c2e208e08edeca8b1550ec0840acd090276.p… | |
<div class="math"> | |
-<p><img src="_images/math/3f8cfba42aa84819f05cca10369f3913e4833b5a.png" alt="\… | |
+<p><img src="_images/math/ae12ade90e1697e54f0a857eaaa83de8c1b11dea.png" alt="\… | |
+ \nabla \cdot (\phi v_x \boldsymbol{v}) | |
= - \frac{1}{\rho} \frac{\Delta p}{\Delta x} | |
+ \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\tau}) \right]_x | |
t@@ -355,10 +344,10 @@ presented by Langtangen et al. (2002), the predicted ve… | |
+ \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\tau}) \right]_x | |
- \frac{1}{\rho} f^i_x | |
+ \phi g_x"/></p> | |
-</div><p>We want to isolate <img class="math" src="_images/math/154f421588a532… | |
+</div><p>We want to isolate <img class="math" src="_images/math/0d439c4a5603a2… | |
the new velocity.</p> | |
<div class="math"> | |
-<p><img src="_images/math/f8e4fccaabfa73731975fa62731bb79fed02f428.png" alt="\… | |
+<p><img src="_images/math/088383ea56b643f441d56879639a41ababbd360b.png" alt="\… | |
= - \frac{1}{\rho} \frac{\Delta p}{\Delta x} | |
+ \frac{1}{\rho} \left[ \nabla \cdot (\phi \boldsymbol{\tau}) \right]_x | |
- \frac{1}{\rho} f^i_x | |
t@@ -374,13 +363,13 @@ the new velocity.</p> | |
+ \Delta t g_x | |
- v_x \frac{\Delta \phi}{\phi} | |
- \nabla \cdot (\phi v_x \boldsymbol{v}) \frac{\Delta t}{\phi}"/></p> | |
-</div><p>The term <img class="math" src="_images/math/410a9d0df9c135dd73b269cb… | |
-in the range <img class="math" src="_images/math/b00c7b17d75d91818f2f906056232… | |
+</div><p>The term <img class="math" src="_images/math/7138dad9ac96835665b17f58… | |
+in the range <img class="math" src="_images/math/fa500507a3f7011763a17911535a4… | |
values in the solution procedure (Langtangen et al. 2002). A value of 0 | |
-corresponds to <a class="reference external" href="https://en.wikipedia.org/wi… | |
+corresponds to <a class="reference external" href="https://en.wikipedia.org/wi… | |
in <a class="reference external" href="http://www.ams.org/journals/mcom/1968-2… | |
<div class="math"> | |
-<p><img src="_images/math/30bcc3939e4e8f039a0879219ae7d4488c349831.png" alt="v… | |
+<p><img src="_images/math/cbb779e005d215d86d8205eaf0134147d1a5650d.png" alt="v… | |
v_x^* = v_x^t | |
- \frac{\beta}{\rho} \frac{\Delta p^t}{\Delta x} \frac{\Delta t}{\phi^t} | |
t@@ -390,22 +379,22 @@ v_x^* = v_x^t | |
+ \Delta t g_x | |
- v^t_x \frac{\Delta \phi}{\phi^t} | |
- \nabla \cdot (\phi^t v_x^t \boldsymbol{v}^t) \frac{\Delta t}{\phi^t}"/></p> | |
-</div><p>Here, <img class="math" src="_images/math/05899b70d35eb61a85aaaba3aff… | |
-(<img class="math" src="_images/math/69274c46c55ea9c2723428b533616806381a2b5f.… | |
-<img class="math" src="_images/math/acbab363f98c011e1a927c8ff8b4f565421f5def.p… | |
+</div><p>Here, <img class="math" src="_images/math/7c3282642d867109f551c02c494… | |
+(<img class="math" src="_images/math/f5e23af6a7c6ad3147e01a647b26ac8d4ce72811.… | |
+<img class="math" src="_images/math/b3939293c919512ab5328d9dfacb76aa0a46a7bd.p… | |
equation:</p> | |
<div class="math"> | |
-<p><img src="_images/math/4fc3cb57fe6e8e2710c92acae1dae02dfb464b2c.png" alt="\… | |
+<p><img src="_images/math/d8278c7c03b0669fb61f2460a5a6e24ceff4f94a.png" alt="\… | |
\boldsymbol{v}^{t+\Delta t}) = 0"/></p> | |
</div><p>The divergence of a scalar and vector can be <a class="reference exte… | |
<div class="math"> | |
-<p><img src="_images/math/dd69e8d47250a0448f829f2e1d42222cbda38058.png" alt="\… | |
+<p><img src="_images/math/5151250a36caedcbd152476e5afd1e192b708d3f.png" alt="\… | |
\boldsymbol{v}^{t+\Delta t} \cdot \nabla \phi^t | |
+ \frac{\Delta \phi^t}{\Delta t} = 0"/></p> | |
</div><p>The predicted velocity is corrected using the new pressure (Langtange… | |
2002):</p> | |
<div class="math"> | |
-<p><img src="_images/math/849751204b923a6bcea83d33614df1ce13444a71.png" alt="\… | |
+<p><img src="_images/math/38d819f488f689e73fab8521008fad71f406dc78.png" alt="\… | |
%- \frac{\Delta t}{\rho} \nabla \epsilon | |
- \frac{\Delta t}{\rho \phi^t} \nabla \epsilon | |
\quad \text{where} \quad | |
t@@ -413,21 +402,21 @@ equation:</p> | |
</div><p>The above formulation of the future velocity is put into the continui… | |
equation:</p> | |
<div class="math"> | |
-<p><img src="_images/math/ba57616deddc047e5626df1a0e2e2c4f49c4e95a.png" alt="\… | |
+<p><img src="_images/math/48e1ca5e30bd21cd906af9ed5130d80d272dd215.png" alt="\… | |
\phi^t \nabla \cdot | |
\left( \boldsymbol{v}^* - \frac{\Delta t}{\rho \phi^t} \nabla \epsilon \right) | |
+ | |
\left( \boldsymbol{v}^* - \frac{\Delta t}{\rho \phi^t} \nabla \epsilon \right) | |
\cdot \nabla \phi^t + \frac{\Delta \phi^t}{\Delta t} = 0"/></p> | |
</div><div class="math"> | |
-<p><img src="_images/math/5695b27fddc4f8e8a8d1194a6e74fd72eacc1a4d.png" alt="\… | |
+<p><img src="_images/math/472f5505e817f5744478c6086f93e90e478f6111.png" alt="\… | |
\phi^t \nabla \cdot | |
\boldsymbol{v}^* - \frac{\Delta t}{\rho \phi^t} \phi^t \nabla^2 \epsilon | |
+ \nabla \phi^t \cdot \boldsymbol{v}^* | |
- \nabla \phi^t \cdot \nabla \epsilon \frac{\Delta t}{\rho \phi^t} | |
+ \frac{\Delta \phi^t}{\Delta t} = 0"/></p> | |
</div><div class="math"> | |
-<p><img src="_images/math/bf12e075e2a1ffed21117ae6c3b5a57228a35e48.png" alt="\… | |
+<p><img src="_images/math/f1a012eea74b7fa4510651ff6c338287fb01e182.png" alt="\… | |
\frac{\Delta t}{\rho} \nabla^2 \epsilon | |
= \phi^t \nabla \cdot \boldsymbol{v}^* | |
+ \nabla \phi^t \cdot \boldsymbol{v}^* | |
t@@ -435,38 +424,38 @@ equation:</p> | |
+ \frac{\Delta \phi^t}{\Delta t}"/></p> | |
</div><p>The pressure difference in time becomes a <a class="reference externa… | |
<div class="math"> | |
-<p><img src="_images/math/af973ef88ea161ebaf13a396d18b9fd419b48392.png" alt="\… | |
+<p><img src="_images/math/81ace2a5e8f4b657995ec7b8059f33de5a5efff3.png" alt="\… | |
\nabla^2 \epsilon | |
= \frac{\nabla \cdot \boldsymbol{v}^* \phi^t \rho}{\Delta t} | |
+ \frac{\nabla \phi^t \cdot \boldsymbol{v}^* \rho}{\Delta t} | |
- \frac{\nabla \phi^t \cdot \nabla \epsilon}{\phi^t} | |
+ \frac{\Delta \phi^t \rho}{\Delta t^2}"/></p> | |
</div><p>The right hand side of the above equation is termed the <em>forcing f… | |
-<img class="math" src="_images/math/875eb40014526135383caa89fd500ae40a835f56.p… | |
+<img class="math" src="_images/math/5b7752c757e0b691a80ab8227eadb8a8389dc58a.p… | |
<div class="math"> | |
-<p><img src="_images/math/6d2f443abfc2651609cd8dd745ff62139f7d51c4.png" alt="f… | |
+<p><img src="_images/math/d28d849758880f28a8cc59ef17f116c79b66bc13.png" alt="f… | |
= \frac{\nabla \cdot \boldsymbol{v}^* \phi^t \rho}{\Delta t} | |
+ \frac{\nabla \phi^t \cdot \boldsymbol{v}^* \rho}{\Delta t} | |
+ \frac{\Delta \phi^t \rho}{\Delta t^2} | |
f_2 = | |
\frac{\nabla \phi^t \cdot \nabla \epsilon}{\phi^t}"/></p> | |
-</div><p>During the <a class="reference external" href="http://www.rsmas.miami… | |
-while <img class="math" src="_images/math/a23addf1349384bc83f74ce7c550fe98bbdc… | |
-during the first iteration, while <img class="math" src="_images/math/a23addf1… | |
+</div><p>During the <a class="reference external" href="http://www.rsmas.miami… | |
+while <img class="math" src="_images/math/8bba708bfd9e1df2575d817c79ab6ae0139b… | |
+during the first iteration, while <img class="math" src="_images/math/8bba708b… | |
of the forcing function is found as:</p> | |
<div class="math"> | |
-<p><img src="_images/math/7145387c0de7584800cc45b61520c507b70038cb.png" alt="f… | |
+<p><img src="_images/math/035491a28db4f5849a4e9487e6a4231a2922e308.png" alt="f… | |
</div><p>Using second-order finite difference approximations of the Laplace op… | |
second-order partial derivatives, the differential equations become a system of | |
equations that is solved using <a class="reference external" href="https://en.… | |
-number of unknowns is <img class="math" src="_images/math/046284126cf107c26a29… | |
+number of unknowns is <img class="math" src="_images/math/6f7750f469603b161d82… | |
<p>The discrete Laplacian (approximation of the Laplace operator) can be obtai… | |
by a finite-difference seven-point stencil in a three-dimensional, cubic | |
-grid with cell spacing <img class="math" src="_images/math/fffb1eace0724fc01f1… | |
+grid with cell spacing <img class="math" src="_images/math/8036f77347902c41196… | |
face neighbors:</p> | |
<div class="math"> | |
-<p><img src="_images/math/976d1f7bdf9faa8c8c428dbcc25b1540eedaa139.png" alt="\… | |
+<p><img src="_images/math/ed974cb6e5fa97a3471d7769a1403cac3c2aa6ba.png" alt="\… | |
\frac{\epsilon_{i_x-1,i_y,i_z} - 2 \epsilon_{i_x,i_y,i_z} | |
+ \epsilon_{i_x+1,i_y,i_z}}{\Delta x^2} | |
+ \frac{\epsilon_{i_x,i_y-1,i_z} - 2 \epsilon_{i_x,i_y,i_z} | |
t@@ -475,11 +464,11 @@ face neighbors:</p> | |
+ \frac{\epsilon_{i_x,i_y,i_z-1} - 2 \epsilon_{i_x,i_y,i_z} | |
+ \epsilon_{i_x,i_y,i_z+1}}{\Delta z^2} | |
\approx f_{i_x,i_y,i_z}"/></p> | |
-</div><p>Within a Jacobi iteration, the value of the unknowns (<img class="mat… | |
-used to find an updated solution estimate (<img class="math" src="_images/math… | |
+</div><p>Within a Jacobi iteration, the value of the unknowns (<img class="mat… | |
+used to find an updated solution estimate (<img class="math" src="_images/math… | |
The solution for the updated value takes the form:</p> | |
<div class="math"> | |
-<p><img src="_images/math/52f1699b7bdfcd7da418c1f5639cfdfa40ed99a7.png" alt="\… | |
+<p><img src="_images/math/1768cb6067e2811bb6240abd9a2ed5d0a75fba05.png" alt="\… | |
= \frac{-\Delta x^2 \Delta y^2 \Delta z^2 f_{i_x,i_y,i_z} | |
+ \Delta y^2 \Delta z^2 (\epsilon^n_{i_x-1,i_y,i_z} + | |
\epsilon^n_{i_x+1,i_y,i_z}) | |
t@@ -493,47 +482,47 @@ The solution for the updated value takes the form:</p> | |
</div><p>The difference between the current and updated value is termed the <e… | |
residual</em>:</p> | |
<div class="math"> | |
-<p><img src="_images/math/b843ab93a9cd31bd2f99132fe09390b3b2e69b96.png" alt="r… | |
+<p><img src="_images/math/91499159f82810f02d6b4e1403f836c510b79421.png" alt="r… | |
- \epsilon^n_{i_x,i_y,i_z})^2}{(\epsilon^{n+1}_{i_x,i_y,i_z})^2}"/></p> | |
-</div><p>Note that the <img class="math" src="_images/math/65d19c66c148d5016c6… | |
+</div><p>Note that the <img class="math" src="_images/math/0ad7b30534898f25300… | |
of the residual.</p> | |
<p>The updated values are at the end of the iteration stored as the current va… | |
and the maximal value of the normalized residual is found. If this value is | |
larger than a tolerance criteria, the procedure is repeated. The iterative | |
procedure is ended if the number of iterations exceeds a defined limit.</p> | |
-<p>After the values of <img class="math" src="_images/math/65d19c66c148d5016c6… | |
+<p>After the values of <img class="math" src="_images/math/0ad7b30534898f25300… | |
pressures and velocities:</p> | |
<div class="math"> | |
-<p><img src="_images/math/34ae3abc95078f1fbc7d24815a091daacc0293d6.png" alt="\… | |
+<p><img src="_images/math/1b4e9fe95951a29e190acb2405cba9b530aca182.png" alt="\… | |
</div><div class="math"> | |
-<p><img src="_images/math/d653d13e7a5e33414bfff96b3015fb597c5355f5.png" alt="\… | |
+<p><img src="_images/math/225ec667f659f2a77a57ca0ad93706b28b847601.png" alt="\… | |
\bar{\boldsymbol{v}}^* - \frac{\Delta t}{\rho\phi} \nabla \epsilon"/></p> | |
</div></div> | |
<div class="section" id="boundary-conditions"> | |
<h2>Boundary conditions<a class="headerlink" href="#boundary-conditions" title… | |
<p>The lateral boundaries are periodic. This cannot be changed in the current | |
-version of <code class="docutils literal"><span class="pre">sphere</span></cod… | |
-parallel lateral (<img class="math" src="_images/math/a59f68a4202623bb859a7093… | |
+version of <code class="docutils literal notranslate"><span class="pre">sphere… | |
+parallel lateral (<img class="math" src="_images/math/888f7c323ac0341871e86722… | |
leaving through one side reappears on the opposite side.</p> | |
<p>The top and bottom boundary conditions of the fluid grid can be either: | |
prescribed pressure (Dirichlet), or prescribed velocity (Neumann). The | |
(horizontal) velocities parallel to the boundaries are free to attain other | |
values (free slip). The Dirichlet boundary condition is enforced by keeping the | |
-value of <img class="math" src="_images/math/65d19c66c148d5016c6a89d26486bf6d1… | |
+value of <img class="math" src="_images/math/0ad7b30534898f253002222f998f38001… | |
<div class="math"> | |
-<p><img src="_images/math/9b35bf83c6ef9ec4ea134990256960d8e1c204d0.png" alt="\… | |
+<p><img src="_images/math/7d5308c191e1fc1e95701accdd5e5ef125461f33.png" alt="\… | |
= | |
\epsilon^{n}_{i_x,i_y,i_z = 1 \vee n_z}"/></p> | |
</div><p>The Neumann boundary condition of no flow across the boundary is enfo… | |
-setting the gradient of <img class="math" src="_images/math/65d19c66c148d5016c… | |
+setting the gradient of <img class="math" src="_images/math/0ad7b30534898f2530… | |
e.g.:</p> | |
<div class="math"> | |
-<p><img src="_images/math/e244cc08185d93b146a75a8fa9618b0c83b80db3.png" alt="\… | |
+<p><img src="_images/math/79f896fdeda423ba71fb697a6a2d83f16ed50b5b.png" alt="\… | |
</div></div> | |
<div class="section" id="numerical-implementation"> | |
<h2>Numerical implementation<a class="headerlink" href="#numerical-implementat… | |
<p>Ghost nodes</p> | |
-<p>—</p> | |
+<p>—</p> | |
</div> | |
</div> | |
t@@ -543,7 +532,7 @@ e.g.:</p> | |
</div> | |
<div class="sphinxsidebar" role="navigation" aria-label="main navigation… | |
<div class="sphinxsidebarwrapper"> | |
- <h3><a href="index.html">Table Of Contents</a></h3> | |
+ <h3><a href="index.html">Table of Contents</a></h3> | |
<ul> | |
<li><a class="reference internal" href="#">Fluid simulation and particle-fluid… | |
<li><a class="reference internal" href="#derivation-of-the-navier-stokes-equat… | |
t@@ -565,18 +554,18 @@ e.g.:</p> | |
<div role="note" aria-label="source link"> | |
<h3>This Page</h3> | |
<ul class="this-page-menu"> | |
- <li><a href="_sources/cfd.txt" | |
+ <li><a href="_sources/cfd.rst.txt" | |
rel="nofollow">Show Source</a></li> | |
</ul> | |
</div> | |
<div id="searchbox" style="display: none" role="search"> | |
- <h3>Quick search</h3> | |
+ <h3 id="searchlabel">Quick search</h3> | |
+ <div class="searchformwrapper"> | |
<form class="search" action="search.html" method="get"> | |
- <div><input type="text" name="q" /></div> | |
- <div><input type="submit" value="Go" /></div> | |
- <input type="hidden" name="check_keywords" value="yes" /> | |
- <input type="hidden" name="area" value="default" /> | |
+ <input type="text" name="q" aria-labelledby="searchlabel" /> | |
+ <input type="submit" value="Go" /> | |
</form> | |
+ </div> | |
</div> | |
<script type="text/javascript">$('#searchbox').show(0);</script> | |
</div> | |
t@@ -603,7 +592,7 @@ e.g.:</p> | |
</div> | |
<div class="footer" role="contentinfo"> | |
© Copyright 2014, Anders Damsgaard. | |
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. | |
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0. | |
</div> | |
</body> | |
</html> | |
\ No newline at end of file | |
diff --git a/doc/html/dem.html b/doc/html/dem.html | |
t@@ -1,35 +1,24 @@ | |
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
+<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
- | |
+ <meta charset="utf-8" /> | |
<title>Discrete element method — sphere 2.15-beta documentation</tit… | |
- | |
<link rel="stylesheet" href="_static/classic.css" type="text/css" /> | |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
- <script type="text/javascript"> | |
- var DOCUMENTATION_OPTIONS = { | |
- URL_ROOT: './', | |
- VERSION: '2.15-beta', | |
- COLLAPSE_INDEX: false, | |
- FILE_SUFFIX: '.html', | |
- HAS_SOURCE: true | |
- }; | |
- </script> | |
+ <script type="text/javascript" id="documentation_options" data-url_root=".… | |
<script type="text/javascript" src="_static/jquery.js"></script> | |
<script type="text/javascript" src="_static/underscore.js"></script> | |
<script type="text/javascript" src="_static/doctools.js"></script> | |
+ <script type="text/javascript" src="_static/language_data.js"></script> | |
+ | |
<link rel="index" title="Index" href="genindex.html" /> | |
<link rel="search" title="Search" href="search.html" /> | |
- <link rel="top" title="sphere 2.15-beta documentation" href="index.html" /> | |
<link rel="next" title="Fluid simulation and particle-fluid interaction" h… | |
<link rel="prev" title="Introduction and Installation" href="introduction.… | |
- </head> | |
- <body role="document"> | |
+ </head><body> | |
<div class="related" role="navigation" aria-label="related navigation"> | |
<h3>Navigation</h3> | |
<ul> | |
t@@ -63,7 +52,7 @@ asteroids, powders, seeds, and other foods. Over 75% of the … | |
pass through industry are granular. This wide occurrence has driven the desire | |
to understand the fundamental mechanics of the material.</p> | |
<p>Contrary to other common materials such as gases, liquids and solids, a gen… | |
-mathematical formulation of it’s behavior hasn’t yet been found. G… | |
+mathematical formulation of it’s behavior hasn’t yet been found. Granular | |
material can, however, display states that somewhat resemble gases, fluids and | |
solids.</p> | |
<p>The <a class="reference external" href="https://en.wikipedia.org/wiki/Discr… | |
t@@ -74,7 +63,7 @@ it simulates particles as separate entities, and calculates … | |
velocities, and accelerations through time. See Cundall and Strack (1979) and | |
<a class="reference external" href="http://anders-dc.github.io/2013/10/16/the-… | |
general introduction to the DEM. The following sections will highlight the | |
-DEM implementation in <code class="docutils literal"><span class="pre">sphere<… | |
+DEM implementation in <code class="docutils literal notranslate"><span class="… | |
Damsgaard et al. 2013. In the used notation, a bold symbol denotes a | |
three-dimensional vector, and a dot denotes that the entity is a temporal | |
derivative.</p> | |
t@@ -82,10 +71,10 @@ derivative.</p> | |
<h2>Contact search<a class="headerlink" href="#contact-search" title="Permalin… | |
<p>Homogeneous cubic grid.</p> | |
<div class="math"> | |
-<p><img src="_images/math/9a32e316af25b770f61240f0c87520e61a20170e.png" alt="\… | |
-</div><p>where <img class="math" src="_images/math/eaa6ad49a7f78fe5a13b4866901… | |
-positional vector of a particle, and <img class="math" src="_images/math/df0de… | |
-of two particles. Negative values of <img class="math" src="_images/math/f20d5… | |
+<p><img src="_images/math/5c79b34fe936898cd55bfd2dfd9b85d58bd66fad.png" alt="\… | |
+</div><p>where <img class="math" src="_images/math/79a3d439d28652c547386f39b55… | |
+positional vector of a particle, and <img class="math" src="_images/math/5aa33… | |
+of two particles. Negative values of <img class="math" src="_images/math/a74a3… | |
are overlapping.</p> | |
</div> | |
<div class="section" id="contact-interaction"> | |
t@@ -96,12 +85,12 @@ interaction is decomposed into normal and tangential compo… | |
contact interface orientation. The normal vector to the contact interface is | |
found by:</p> | |
<div class="math"> | |
-<p><img src="_images/math/edf49df0f6a5c2f2624ad844873e377c86bd3e50.png" alt="\… | |
+<p><img src="_images/math/1ecc9f3eb9f630270af6c89a67d8e95b5c55014a.png" alt="\… | |
\frac{\boldsymbol{x}^i - \boldsymbol{x}^j} | |
{||\boldsymbol{x}^i - \boldsymbol{x}^j||}"/></p> | |
-</div><p>The contact velocity <img class="math" src="_images/math/18c042632208… | |
+</div><p>The contact velocity <img class="math" src="_images/math/bdf3ad94aa38… | |
<div class="math"> | |
-<p><img src="_images/math/dc9ba965d2e46bab75a9783346180b4e90516118.png" alt="\… | |
+<p><img src="_images/math/bc86cfac20bf315a60bfd00614d9e5dd192c6dd5.png" alt="\… | |
(\boldsymbol{x}^i - \boldsymbol{x}^j) | |
+ (r^i + \frac{\delta_n^{ij}}{2}) | |
(\boldsymbol{n}^{ij} \times \boldsymbol{\omega}^{i}) | |
t@@ -110,46 +99,46 @@ found by:</p> | |
</div><p>The contact velocity is decomposed into normal and tangential compone… | |
relative to the contact interface. The normal component is:</p> | |
<div class="math"> | |
-<p><img src="_images/math/7064634d7b87e0dd07b7dcfee5d1ab549b5964fa.png" alt="\… | |
+<p><img src="_images/math/3c1524f2029c88a3186b303042ffef4ec5916196.png" alt="\… | |
-(\dot{\boldsymbol{\delta}}^{ij} \cdot \boldsymbol{n}^{ij})"/></p> | |
</div><p>and the tangential velocity component is found as:</p> | |
<div class="math"> | |
-<p><img src="_images/math/e9905af08d85a280a4c2996689972016f7833fef.png" alt="\… | |
+<p><img src="_images/math/df18cfb7be27872e85cfca746a5b65aeec27187a.png" alt="\… | |
\dot{\boldsymbol{\delta}}^{ij} | |
- \boldsymbol{n}^{ij} | |
(\boldsymbol{n}^{ij} \cdot \dot{\boldsymbol{\delta}}^{ij})"/></p> | |
-</div><p>where <img class="math" src="_images/math/cd1d64597c760ff1fc8d90d0d08… | |
+</div><p>where <img class="math" src="_images/math/6087536f1e28c80ec705866fefe… | |
particle. The total tangential displacement on the contact plane is found | |
incrementally:</p> | |
<div class="math"> | |
-<p><img src="_images/math/d3e56488ee50f821a999470459f170e3b0cac3d3.png" alt="\… | |
+<p><img src="_images/math/53f1505c53f0face6b8b68cb4b5919ec39f84592.png" alt="\… | |
\int_0^{t_c} | |
\dot{\boldsymbol{\delta}}^{ij}_t \Delta t"/></p> | |
-</div><p>where <img class="math" src="_images/math/b8cd14d20ff38e8c9e305878c37… | |
+</div><p>where <img class="math" src="_images/math/e497b0cd9de2666c43ccf2e42b7… | |
computational time step length. The tangential contact interface displacement … | |
set to zero when a contact pair no longer overlaps. At each time step, the val… | |
-of <img class="math" src="_images/math/359991b87d5889ece1cd8b1c84cf17fbb37b815… | |
+of <img class="math" src="_images/math/c46baa2a60c45bb8746615b3d8b545cf4a6523f… | |
interface:</p> | |
<div class="math"> | |
-<p><img src="_images/math/71b3ac73bf6447e6cc7ea151b5664dc723a38ea9.png" alt="\… | |
+<p><img src="_images/math/a5d04fe388b8b273356584389cb4a1358bb90ad1.png" alt="\… | |
- (\boldsymbol{n} | |
(\boldsymbol{n} \cdot \boldsymbol{\delta}_{t,\text{uncorrected}}^{ij})"/></p> | |
</div><p>With all the geometrical and kinetic components determined, the resul… | |
-of the particle interaction can be determined using a contact model. <code cla… | |
+of the particle interaction can be determined using a contact model. <code cla… | |
features only one contact model in the normal direction to the contact; the | |
linear-elastic-viscous (<em>Hookean</em> with viscous damping, or <em>Kelvin-V… | |
contact model. The resulting force in the normal direction of the contact | |
-interface on particle <img class="math" src="_images/math/df0deb143e5ac127f00b… | |
+interface on particle <img class="math" src="_images/math/5aa339d4daf45a810dda… | |
<div class="math"> | |
-<p><img src="_images/math/2b331ff6c55b9e20fb12706828da440a9ef5b20c.png" alt="\… | |
+<p><img src="_images/math/c831f45c0dbc852540dc9d70bed0d2c034929af8.png" alt="\… | |
-k_n \delta_n^{ij} -\gamma_n \dot{\delta_n}^{ij} | |
\right) \boldsymbol{n}^{ij}"/></p> | |
-</div><p>The parameter <img class="math" src="_images/math/e8082d4f9b7dfa49370… | |
-contact interface, and <img class="math" src="_images/math/ae2c9cf2d489e787ac1… | |
+</div><p>The parameter <img class="math" src="_images/math/c713414d12f194f3fab… | |
+contact interface, and <img class="math" src="_images/math/9cc677554b62a84edc8… | |
viscosity, also in the normal direction. The loss of energy in this interaction | |
-due to the viscous component is for particle <img class="math" src="_images/ma… | |
+due to the viscous component is for particle <img class="math" src="_images/ma… | |
<div class="math"> | |
-<p><img src="_images/math/89eab38386c7248f117087bc9f112b43b2a60010.png" alt="\… | |
+<p><img src="_images/math/a928c6f408661dd8d6860f7c924635e2ae9bce96.png" alt="\… | |
</div><p>The tangential force is determined by either a viscous-frictional con… | |
or a elastic-viscous-frictional contact model. The former contact model is very | |
computationally efficient, but somewhat inaccurate relative to the mechanics of | |
t@@ -157,24 +146,24 @@ real materials. The latter contact model is therefore t… | |
it results in longer computational times. The tangential force in the | |
visco-frictional contact model:</p> | |
<div class="math"> | |
-<p><img src="_images/math/6fa02b1c3bc8a438f685b666895f7de1f427b702.png" alt="\… | |
-</div><p><img class="math" src="_images/math/ae2c9cf2d489e787ac1340cc4436f6100… | |
+<p><img src="_images/math/ad8a19ed2553a83794270f0a35f29f66b15c0bb7.png" alt="\… | |
+</div><p><img class="math" src="_images/math/9cc677554b62a84edc8937d747d04d117… | |
direction. The tangential displacement along the contact interface | |
-(<img class="math" src="_images/math/359991b87d5889ece1cd8b1c84cf17fbb37b815d.… | |
+(<img class="math" src="_images/math/c46baa2a60c45bb8746615b3d8b545cf4a6523f6.… | |
model. The tangential force in the more realistic elastic-viscous-frictional | |
contact model:</p> | |
<div class="math"> | |
-<p><img src="_images/math/365556da97364e0ebe011deb8a6114cc57208b69.png" alt="\… | |
+<p><img src="_images/math/a3471ecd78ccfe91e0db3d5a607624380afb04d1.png" alt="\… | |
-k_t \boldsymbol{\delta}_t^{ij} -\gamma_t \dot{\boldsymbol{\delta}_t}^{ij}"/><… | |
-</div><p>The parameter <img class="math" src="_images/math/e8082d4f9b7dfa49370… | |
+</div><p>The parameter <img class="math" src="_images/math/c713414d12f194f3fab… | |
direction of the contact interface. Note that the tangential force is only | |
-found if the tangential displacement (<img class="math" src="_images/math/1820… | |
-velocity (<img class="math" src="_images/math/3f1d577c0a6a09ed5b13001794297b2b… | |
-zero. Otherwise it is defined as being <img class="math" src="_images/math/6a4… | |
+found if the tangential displacement (<img class="math" src="_images/math/0362… | |
+velocity (<img class="math" src="_images/math/c17d332a01b1635dd5d3b5c297e9d44c… | |
+zero. Otherwise it is defined as being <img class="math" src="_images/math/dc8… | |
<p>For both types of contact model, the tangential force is limited by the Cou… | |
criterion of static and dynamic friction:</p> | |
<div class="math"> | |
-<p><img src="_images/math/edcde9b8cbb2394c6bbd12f07b845063be99a62e.png" alt="|… | |
+<p><img src="_images/math/4397f45ed8f18be640b692425a8419f5cb72ada3.png" alt="|… | |
\begin{cases} | |
\mu_s ||\boldsymbol{f}^{ij}_n|| & | |
\text{if} \quad ||\boldsymbol{f}_t^{ij}|| = 0 \\ | |
t@@ -185,7 +174,7 @@ criterion of static and dynamic friction:</p> | |
reached, the tangential displacement along the contact interface is limited to | |
this value:</p> | |
<div class="math"> | |
-<p><img src="_images/math/092547c763f745333b005b7094cd03c2cfdd92f5.png" alt="\… | |
+<p><img src="_images/math/c19adb8434d3b9c150be8c8ab3939958c8edaba9.png" alt="\… | |
\frac{1}{k_t} \left( | |
\mu_d ||\boldsymbol{f}_n^{ij}|| | |
\frac{\boldsymbol{f}^{ij}_t}{||\boldsymbol{f}^{ij}_t||} | |
t@@ -193,30 +182,30 @@ this value:</p> | |
</div><p>If the tangential force reaches the Coulomb limit, the energy lost du… | |
frictional dissipation is calculated as:</p> | |
<div class="math"> | |
-<p><img src="_images/math/a699d5b66f6ff1048229d376ae6340ce0ed5ed6b.png" alt="\… | |
+<p><img src="_images/math/2fc641eba6a1d6e4cd948e7e48341561e69fbf10.png" alt="\… | |
\dot{\boldsymbol{\delta}}_t^{ij} \Delta t||}{\Delta t}"/></p> | |
</div><p>The loss of energy by viscous dissipation in the tangential direction… | |
found.</p> | |
</div> | |
<div class="section" id="temporal-integration"> | |
<h2>Temporal integration<a class="headerlink" href="#temporal-integration" tit… | |
-<p>In the DEM, the time is discretized into small steps (<img class="math" src… | |
+<p>In the DEM, the time is discretized into small steps (<img class="math" src… | |
step, the entire network of contacts is resolved, and the resulting forces and | |
torques for each particle are found. With these values at hand, the new | |
linear and rotational accelerations can be found using | |
-<a class="reference external" href="https://en.wikipedia.org/wiki/Newton%27s_l… | |
-of the motion of solid bodies. If a particle with mass <img class="math" src="… | |
-experiences a sum of forces denoted <img class="math" src="_images/math/e5861e… | |
-(<img class="math" src="_images/math/1a238040fa47ba4651506e01c721eb94a03f11ba.… | |
+<a class="reference external" href="https://en.wikipedia.org/wiki/Newton%27s_l… | |
+of the motion of solid bodies. If a particle with mass <img class="math" src="… | |
+experiences a sum of forces denoted <img class="math" src="_images/math/fb7d5a… | |
+(<img class="math" src="_images/math/be9a4fc94d921be9480d891b5c38b77e187b630a.… | |
<div class="math"> | |
-<p><img src="_images/math/7a16f81eae500f9872de54d88258152bfb0ccbc6.png" alt="\… | |
+<p><img src="_images/math/fb9c8157d9c1c87673619af0faf8dc55f256353a.png" alt="\… | |
</div><p>The new velocity and position is found by integrating the above equat… | |
with regards to time. The simplest integration scheme in this regard is the | |
<a class="reference external" href="https://en.wikipedia.org/wiki/Euler_method… | |
<div class="math"> | |
-<p><img src="_images/math/3d4d7c98c0c7511ac5480967994253f526e13af6.png" alt="\… | |
+<p><img src="_images/math/3daf2a856e4e741d27444b532b2fff5a9d58b1db.png" alt="\… | |
</div><div class="math"> | |
-<p><img src="_images/math/91bab0359c2bff8094d2fed7299dc2ca80a27d74.png" alt="\… | |
+<p><img src="_images/math/9d7283875d4be9fca20b3d8c2289a89763a3b38e.png" alt="\… | |
</div></div> | |
</div> | |
t@@ -226,7 +215,7 @@ with regards to time. The simplest integration scheme in t… | |
</div> | |
<div class="sphinxsidebar" role="navigation" aria-label="main navigation… | |
<div class="sphinxsidebarwrapper"> | |
- <h3><a href="index.html">Table Of Contents</a></h3> | |
+ <h3><a href="index.html">Table of Contents</a></h3> | |
<ul> | |
<li><a class="reference internal" href="#">Discrete element method</a><ul> | |
<li><a class="reference internal" href="#contact-search">Contact search</a></l… | |
t@@ -245,18 +234,18 @@ with regards to time. The simplest integration scheme in… | |
<div role="note" aria-label="source link"> | |
<h3>This Page</h3> | |
<ul class="this-page-menu"> | |
- <li><a href="_sources/dem.txt" | |
+ <li><a href="_sources/dem.rst.txt" | |
rel="nofollow">Show Source</a></li> | |
</ul> | |
</div> | |
<div id="searchbox" style="display: none" role="search"> | |
- <h3>Quick search</h3> | |
+ <h3 id="searchlabel">Quick search</h3> | |
+ <div class="searchformwrapper"> | |
<form class="search" action="search.html" method="get"> | |
- <div><input type="text" name="q" /></div> | |
- <div><input type="submit" value="Go" /></div> | |
- <input type="hidden" name="check_keywords" value="yes" /> | |
- <input type="hidden" name="area" value="default" /> | |
+ <input type="text" name="q" aria-labelledby="searchlabel" /> | |
+ <input type="submit" value="Go" /> | |
</form> | |
+ </div> | |
</div> | |
<script type="text/javascript">$('#searchbox').show(0);</script> | |
</div> | |
t@@ -283,7 +272,7 @@ with regards to time. The simplest integration scheme in t… | |
</div> | |
<div class="footer" role="contentinfo"> | |
© Copyright 2014, Anders Damsgaard. | |
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. | |
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0. | |
</div> | |
</body> | |
</html> | |
\ No newline at end of file | |
diff --git a/doc/html/genindex.html b/doc/html/genindex.html | |
t@@ -1,34 +1,23 @@ | |
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
+<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
- | |
+ <meta charset="utf-8" /> | |
<title>Index — sphere 2.15-beta documentation</title> | |
- | |
<link rel="stylesheet" href="_static/classic.css" type="text/css" /> | |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
- <script type="text/javascript"> | |
- var DOCUMENTATION_OPTIONS = { | |
- URL_ROOT: './', | |
- VERSION: '2.15-beta', | |
- COLLAPSE_INDEX: false, | |
- FILE_SUFFIX: '.html', | |
- HAS_SOURCE: true | |
- }; | |
- </script> | |
+ <script type="text/javascript" id="documentation_options" data-url_root=".… | |
<script type="text/javascript" src="_static/jquery.js"></script> | |
<script type="text/javascript" src="_static/underscore.js"></script> | |
<script type="text/javascript" src="_static/doctools.js"></script> | |
+ <script type="text/javascript" src="_static/language_data.js"></script> | |
+ | |
<link rel="index" title="Index" href="#" /> | |
- <link rel="search" title="Search" href="search.html" /> | |
- <link rel="top" title="sphere 2.15-beta documentation" href="index.html" /… | |
- </head> | |
- <body role="document"> | |
+ <link rel="search" title="Search" href="search.html" /> | |
+ </head><body> | |
<div class="related" role="navigation" aria-label="related navigation"> | |
<h3>Navigation</h3> | |
<ul> | |
t@@ -76,854 +65,510 @@ | |
</div> | |
<h2 id="A">A</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.acceleration">acceleration() (sphere… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.adaptiveGrid">adaptiveGrid() (sphere… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.addParticle">addParticle() (sphere.s… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.adjustUpperWall">adjustUpperWall() (… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.adjustWall">adjustWall() (sphere.sim… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.acceleration">acceleration() (sp… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.adaptiveGrid">adaptiveGrid() (sp… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.addParticle">addParticle() (sphe… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.adjustUpperWall">adjustUpperWall… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.adjustWall">adjustWall() (sphere… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="B">B</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.bond">bond() (sphere.sim method)</a> | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.bondsRose">bondsRose() (sphere.sim m… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.bulkPorosity">bulkPorosity() (sphere… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.bond">bond() (sphere.sim method)… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.bondsRose">bondsRose() (sphere.s… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.bulkPorosity">bulkPorosity() (sp… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="C">C</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.cellSize">cellSize() (sphere.sim met… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.checkerboardColors">checkerboardColo… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.cleanup">cleanup() (in module sphere)</a> | |
- </dt> | |
- | |
- <dd><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.cleanup">(sphere.sim method)</a> | |
- </dt> | |
- | |
- </dl></dd> | |
- | |
- <dt><a href="python_api.html#sphere.sim.consolidate">consolidate() (sphere.s… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.contactModel">contactModel() (sphere… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.contactParticleArea">contactParticle… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.contactSurfaceArea">contactSurfaceAr… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.convergence">convergence() (sphere.s… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.convert">convert() (in module sphere)</a> | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.createBondPair">createBondPair() (sp… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.currentNormalStress">currentNormalSt… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.currentTime">currentTime() (sphere.s… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.cellSize">cellSize() (sphere.sim… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.checkerboardColors">checkerboard… | |
+</li> | |
+ <li><a href="python_api.html#sphere.cleanup">cleanup() (in module sphere… | |
+ | |
+ <ul> | |
+ <li><a href="python_api.html#sphere.sim.cleanup">(sphere.sim method)</… | |
+</li> | |
+ </ul></li> | |
+ <li><a href="python_api.html#sphere.sim.consolidate">consolidate() (sphe… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.contactModel">contactModel() (sp… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.contactParticleArea">contactPart… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.contactSurfaceArea">contactSurfa… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.convergence">convergence() (sphe… | |
+</li> | |
+ <li><a href="python_api.html#sphere.convert">convert() (in module sphere… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.createBondPair">createBondPair()… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.currentNormalStress">currentNorm… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.currentTime">currentTime() (sphe… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="D">D</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.defaultParams">defaultParams() (sphe… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.defineWorldBoundaries">defineWorldBo… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.deleteAllParticles">deleteAllParticl… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.deleteParticle">deleteParticle() (sp… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="sphere_internals.html#_CPPv23DEM">DEM (C++ class)</a> | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.disableFluidPressureModulation">disa… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.disableTopWallNormalStressModulation… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.dry">dry() (sphere.sim method)</a> | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.defaultParams">defaultParams() (… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.defineWorldBoundaries">defineWor… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.deleteAllParticles">deleteAllPar… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.deleteParticle">deleteParticle()… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="sphere_internals.html#_CPPv43DEM">DEM (C++ class)</a> | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.disableFluidPressureModulation">… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.disableTopWallNormalStressModula… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.dry">dry() (sphere.sim method)</… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="E">E</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.energy">energy() (sphere.sim method)… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.energy">energy() (sphere.sim met… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="F">F</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.findAllAverageParticlePairAreas">fin… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.findAllContactSurfaceAreas">findAllC… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.findContactStresses">findContactStre… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.findCoordinationNumber">findCoordina… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.findHydraulicConductivities">findHyd… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.findLoadedContacts">findLoadedContac… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.findMeanCoordinationNumber">findMean… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.findNormalForces">findNormalForces()… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.findOverlaps">findOverlaps() (sphere… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.findPermeabilities">findPermeabiliti… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.forcechains">forcechains() (sphere.s… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.forcechainsRose">forcechainsRose() (… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.frictionalEnergy">frictionalEnergy()… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.findAllAverageParticlePairAreas"… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.findAllContactSurfaceAreas">find… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.findContactStresses">findContact… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.findCoordinationNumber">findCoor… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.findHydraulicConductivities">fin… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.findLoadedContacts">findLoadedCo… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.findMeanCoordinationNumber">find… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.findNormalForces">findNormalForc… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.findOverlaps">findOverlaps() (sp… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.findPermeabilities">findPermeabi… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.forcechains">forcechains() (sphe… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.forcechainsRose">forcechainsRose… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.frictionalEnergy">frictionalEner… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="G">G</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.generateBimodalRadii">generateBimoda… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.generateRadii">generateRadii() (sphe… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.generateBimodalRadii">generateBi… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.generateRadii">generateRadii() (… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="H">H</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.hydraulicConductivity">hydraulicCond… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.hydraulicDiffusivity">hydraulicDiffu… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.hydraulicPermeability">hydraulicPerm… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.hydraulicConductivity">hydraulic… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.hydraulicDiffusivity">hydraulicD… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.hydraulicPermeability">hydraulic… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="I">I</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.id">id() (sphere.sim method)</a> | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.idAppend">idAppend() (sphere.sim met… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.inertiaParameterPlanarShear">inertia… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.initFluid">initFluid() (sphere.sim m… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.initGrid">initGrid() (sphere.sim met… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.initGridAndWorldsize">initGridAndWor… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.initGridPos">initGridPos() (sphere.s… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.initRandomGridPos">initRandomGridPos… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.initRandomPos">initRandomPos() (sphe… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.initTemporal">initTemporal() (sphere… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.id">id() (sphere.sim method)</a> | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.idAppend">idAppend() (sphere.sim… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.inertiaParameterPlanarShear">ine… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.initFluid">initFluid() (sphere.s… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.initGrid">initGrid() (sphere.sim… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.initGridAndWorldsize">initGridAn… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.initGridPos">initGridPos() (sphe… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.initRandomGridPos">initRandomGri… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.initRandomPos">initRandomPos() (… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.initTemporal">initTemporal() (sp… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="K">K</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.kineticEnergy">kineticEnergy() (sphe… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.kineticEnergy">kineticEnergy() (… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="L">L</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.largestFluidTimeStep">largestFluidTi… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.largestMass">largestMass() (sphere.s… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.largestFluidTimeStep">largestFlu… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.largestMass">largestMass() (sphe… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="M">M</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.mass">mass() (sphere.sim method)</a> | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.momentOfInertia">momentOfInertia() (… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.momentum">momentum() (sphere.sim met… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.mass">mass() (sphere.sim method)… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.momentOfInertia">momentOfInertia… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.momentum">momentum() (sphere.sim… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="N">N</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.normalBoundariesXY">normalBoundaries… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.normalBoundariesXY">normalBounda… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="P">P</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.periodicBoundariesX">periodicBoundar… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.periodicBoundariesXY">periodicBounda… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.plotContacts">plotContacts() (sphere… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.plotConvergence">plotConvergence() (… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.plotFluidDiffAdvPresZ">plotFluidDiff… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.plotFluidPressuresY">plotFluidPressu… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.plotFluidPressuresZ">plotFluidPressu… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.plotFluidVelocitiesY">plotFluidVeloc… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.plotFluidVelocitiesZ">plotFluidVeloc… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.plotLoadCurve">plotLoadCurve() (sphe… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.plotPrescribedFluidPressures">plotPr… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.plotSinFunction">plotSinFunction() (… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.porosities">porosities() (sphere.sim… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.porosity">porosity() (sphere.sim met… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.periodicBoundariesX">periodicBou… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.periodicBoundariesXY">periodicBo… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.plotContacts">plotContacts() (sp… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.plotConvergence">plotConvergence… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.plotFluidDiffAdvPresZ">plotFluid… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.plotFluidPressuresY">plotFluidPr… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.plotFluidPressuresZ">plotFluidPr… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.plotFluidVelocitiesY">plotFluidV… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.plotFluidVelocitiesZ">plotFluidV… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.plotLoadCurve">plotLoadCurve() (… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.plotPrescribedFluidPressures">pl… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.plotSinFunction">plotSinFunction… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.porosities">porosities() (sphere… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.porosity">porosity() (sphere.sim… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="R">R</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.randomBondPairs">randomBondPairs() (… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.readbin">readbin() (sphere.sim metho… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.readfirst">readfirst() (sphere.sim m… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.readlast">readlast() (sphere.sim met… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.readsecond">readsecond() (sphere.sim… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.readstep">readstep() (sphere.sim met… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.readTime">readTime() (sphere.sim met… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.render">render() (in module sphere)</a> | |
- </dt> | |
- | |
- <dd><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.render">(sphere.sim method)</a> | |
- </dt> | |
- | |
- </dl></dd> | |
- | |
- <dt><a href="python_api.html#sphere.sim.ReynoldsNumber">ReynoldsNumber() (sp… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.rotationalEnergy">rotationalEnergy()… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.run">run() (in module sphere)</a> | |
- </dt> | |
- | |
- <dd><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.run">(sphere.sim method)</a> | |
- </dt> | |
- | |
- </dl></dd> | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.randomBondPairs">randomBondPairs… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.readbin">readbin() (sphere.sim m… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.readfirst">readfirst() (sphere.s… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.readlast">readlast() (sphere.sim… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.readsecond">readsecond() (sphere… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.readstep">readstep() (sphere.sim… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.readTime">readTime() (sphere.sim… | |
+</li> | |
+ <li><a href="python_api.html#sphere.render">render() (in module sphere)<… | |
+ | |
+ <ul> | |
+ <li><a href="python_api.html#sphere.sim.render">(sphere.sim method)</a> | |
+</li> | |
+ </ul></li> | |
+ <li><a href="python_api.html#sphere.sim.ReynoldsNumber">ReynoldsNumber()… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.rotationalEnergy">rotationalEner… | |
+</li> | |
+ <li><a href="python_api.html#sphere.run">run() (in module sphere)</a> | |
+ | |
+ <ul> | |
+ <li><a href="python_api.html#sphere.sim.run">(sphere.sim method)</a> | |
+</li> | |
+ </ul></li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="S">S</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.scaleSize">scaleSize() (sphere.sim m… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setBeta">setBeta() (sphere.sim metho… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setDampingNormal">setDampingNormal()… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setDampingTangential">setDampingTang… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setDEMstepsPerCFDstep">setDEMstepsPe… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setDynamicFriction">setDynamicFricti… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidBottomFixedFlux">setFluidBot… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidBottomFixedPressure">setFlui… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidBottomNoFlow">setFluidBottom… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidBottomNoFlowNoSlip">setFluid… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidCompressibility">setFluidCom… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidDensity">setFluidDensity() (… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidPressureModulation">setFluid… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidTopFixedFlux">setFluidTopFix… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidTopFixedPressure">setFluidTo… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidTopNoFlow">setFluidTopNoFlow… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidTopNoFlowNoSlip">setFluidTop… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidViscosity">setFluidViscosity… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidXFixedPressure">setFluidXFix… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidXNoFlow">setFluidXNoFlow() (… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidXPeriodic">setFluidXPeriodic… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidYFixedPressure">setFluidYFix… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidYNoFlow">setFluidYNoFlow() (… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setFluidYPeriodic">setFluidYPeriodic… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setGamma">setGamma() (sphere.sim met… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.setMaxIterations">setMaxIterations()… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setPermeabilityGrainSize">setPermeab… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setPermeabilityPrefactor">setPermeab… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setStaticFriction">setStaticFriction… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setStiffnessNormal">setStiffnessNorm… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setStiffnessTangential">setStiffness… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setTheta">setTheta() (sphere.sim met… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setTolerance">setTolerance() (sphere… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setTopWallNormalStressModulation">se… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.setYoungsModulus">setYoungsModulus()… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.shear">shear() (sphere.sim method)</… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.sheardisp">sheardisp() (sphere.sim m… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.shearDisplacement">shearDisplacement… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.shearStrain">shearStrain() (sphere.s… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.shearStrainRate">shearStrainRate() (… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.shearStress">shearStress() (sphere.s… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.shearVel">shearVel() (sphere.sim met… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.shearVelocity">shearVelocity() (sphe… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.show">show() (sphere.sim method)</a> | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim">sim (class in sphere)</a> | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.smallestMass">smallestMass() (sphere… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#module-sphere">sphere (module)</a> | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.staticGrid">staticGrid() (sphere.sim… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.status">status() (in module sphere)</a> | |
- </dt> | |
- | |
- <dd><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.status">(sphere.sim method)</a> | |
- </dt> | |
- | |
- </dl></dd> | |
- | |
- <dt><a href="python_api.html#sphere.sim.surfaceArea">surfaceArea() (sphere.s… | |
- </dt> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.scaleSize">scaleSize() (sphere.s… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setBeta">setBeta() (sphere.sim m… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setDampingNormal">setDampingNorm… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setDampingTangential">setDamping… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setDEMstepsPerCFDstep">setDEMste… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setDynamicFriction">setDynamicFr… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidBottomFixedFlux">setFlui… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidBottomFixedPressure">set… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidBottomNoFlow">setFluidBo… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidBottomNoFlowNoSlip">setF… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidCompressibility">setFlui… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidDensity">setFluidDensity… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidPressureModulation">setF… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidTopFixedFlux">setFluidTo… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidTopFixedPressure">setFlu… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidTopNoFlow">setFluidTopNo… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidTopNoFlowNoSlip">setFlui… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidViscosity">setFluidVisco… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidXFixedPressure">setFluid… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidXNoFlow">setFluidXNoFlow… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidXPeriodic">setFluidXPeri… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidYFixedPressure">setFluid… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidYNoFlow">setFluidYNoFlow… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setFluidYPeriodic">setFluidYPeri… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setGamma">setGamma() (sphere.sim… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.setMaxIterations">setMaxIteratio… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setPermeabilityGrainSize">setPer… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setPermeabilityPrefactor">setPer… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setStaticFriction">setStaticFric… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setStiffnessNormal">setStiffness… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setStiffnessTangential">setStiff… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setTheta">setTheta() (sphere.sim… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setTolerance">setTolerance() (sp… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setTopWallNormalStressModulation… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.setYoungsModulus">setYoungsModul… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.shear">shear() (sphere.sim metho… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.sheardisp">sheardisp() (sphere.s… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.shearDisplacement">shearDisplace… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.shearStrain">shearStrain() (sphe… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.shearStrainRate">shearStrainRate… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.shearStress">shearStress() (sphe… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.shearVel">shearVel() (sphere.sim… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.shearVelocity">shearVelocity() (… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.show">show() (sphere.sim method)… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim">sim (class in sphere)</a> | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.smallestMass">smallestMass() (sp… | |
+</li> | |
+ <li><a href="python_api.html#module-sphere">sphere (module)</a> | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.staticGrid">staticGrid() (sphere… | |
+</li> | |
+ <li><a href="python_api.html#sphere.status">status() (in module sphere)<… | |
- </dl></td> | |
+ <ul> | |
+ <li><a href="python_api.html#sphere.sim.status">(sphere.sim method)</a> | |
+</li> | |
+ </ul></li> | |
+ <li><a href="python_api.html#sphere.sim.surfaceArea">surfaceArea() (sphe… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="T">T</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.thinsection_x1x3">thinsection_x1x3()… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.thinsectionVideo">thinsectionVideo() (in… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.torqueScript">torqueScript() (sphere… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.torqueScriptParallel3">torqueScriptParal… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.torqueScriptPenguin">torqueScriptPen… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.totalFrictionalEnergy">totalFriction… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.totalKineticEnergy">totalKineticEner… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.totalMass">totalMass() (sphere.sim m… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.totalMomentum">totalMomentum() (sphe… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.totalRotationalEnergy">totalRotation… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.totalViscousEnergy">totalViscousEner… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.triaxial">triaxial() (sphere.sim met… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.thinsection_x1x3">thinsection_x1… | |
+</li> | |
+ <li><a href="python_api.html#sphere.thinsectionVideo">thinsectionVideo()… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.torqueScript">torqueScript() (sp… | |
+</li> | |
+ <li><a href="python_api.html#sphere.torqueScriptParallel3">torqueScriptP… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.totalFrictionalEnergy">totalFric… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.totalKineticEnergy">totalKinetic… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.totalMass">totalMass() (sphere.s… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.totalMomentum">totalMomentum() (… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.totalRotationalEnergy">totalRota… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.totalViscousEnergy">totalViscous… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.triaxial">triaxial() (sphere.sim… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="U">U</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.uniaxialStrainRate">uniaxialStrainRa… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.uniaxialStrainRate">uniaxialStra… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="V">V</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.V_sphere">V_sphere() (in module sphere)<… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.video">video() (in module sphere)</a> | |
- </dt> | |
- | |
- <dd><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.video">(sphere.sim method)</a> | |
- </dt> | |
- | |
- </dl></dd> | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.viscousEnergy">viscousEnergy() (sphe… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.visualize">visualize() (sphere.sim m… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.voidRatio">voidRatio() (sphere.sim m… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.volume">volume() (sphere.sim method)… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.V_sphere">V_sphere() (in module sphe… | |
+</li> | |
+ <li><a href="python_api.html#sphere.video">video() (in module sphere)</a> | |
+ | |
+ <ul> | |
+ <li><a href="python_api.html#sphere.sim.video">(sphere.sim method)</a> | |
+</li> | |
+ </ul></li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.viscousEnergy">viscousEnergy() (… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.visualize">visualize() (sphere.s… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.voidRatio">voidRatio() (sphere.s… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.volume">volume() (sphere.sim met… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="W">W</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.wall0iz">wall0iz() (sphere.sim metho… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.wet">wet() (sphere.sim method)</a> | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.writebin">writebin() (sphere.sim met… | |
- </dt> | |
- | |
- </dl></td> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.writeFluidVTK">writeFluidVTK() (sphe… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.writeVTK">writeVTK() (sphere.sim met… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.writeVTKall">writeVTKall() (sphere.s… | |
- </dt> | |
- | |
- | |
- <dt><a href="python_api.html#sphere.sim.writeVTKforces">writeVTKforces() (sp… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.wall0iz">wall0iz() (sphere.sim m… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.wet">wet() (sphere.sim method)</… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.writebin">writebin() (sphere.sim… | |
+</li> | |
+ </ul></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.writeFluidVTK">writeFluidVTK() (… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.writeVTK">writeVTK() (sphere.sim… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.writeVTKall">writeVTKall() (sphe… | |
+</li> | |
+ <li><a href="python_api.html#sphere.sim.writeVTKforces">writeVTKforces()… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
<h2 id="Z">Z</h2> | |
<table style="width: 100%" class="indextable genindextable"><tr> | |
- <td style="width: 33%" valign="top"><dl> | |
- | |
- <dt><a href="python_api.html#sphere.sim.zeroKinematics">zeroKinematics() (sp… | |
- </dt> | |
- | |
- </dl></td> | |
+ <td style="width: 33%; vertical-align: top;"><ul> | |
+ <li><a href="python_api.html#sphere.sim.zeroKinematics">zeroKinematics()… | |
+</li> | |
+ </ul></td> | |
</tr></table> | |
t@@ -933,17 +578,14 @@ | |
</div> | |
<div class="sphinxsidebar" role="navigation" aria-label="main navigation… | |
<div class="sphinxsidebarwrapper"> | |
- | |
- | |
- | |
<div id="searchbox" style="display: none" role="search"> | |
- <h3>Quick search</h3> | |
+ <h3 id="searchlabel">Quick search</h3> | |
+ <div class="searchformwrapper"> | |
<form class="search" action="search.html" method="get"> | |
- <div><input type="text" name="q" /></div> | |
- <div><input type="submit" value="Go" /></div> | |
- <input type="hidden" name="check_keywords" value="yes" /> | |
- <input type="hidden" name="area" value="default" /> | |
+ <input type="text" name="q" aria-labelledby="searchlabel" /> | |
+ <input type="submit" value="Go" /> | |
</form> | |
+ </div> | |
</div> | |
<script type="text/javascript">$('#searchbox').show(0);</script> | |
</div> | |
t@@ -964,7 +606,7 @@ | |
</div> | |
<div class="footer" role="contentinfo"> | |
© Copyright 2014, Anders Damsgaard. | |
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. | |
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0. | |
</div> | |
</body> | |
</html> | |
\ No newline at end of file | |
diff --git a/doc/html/index.html b/doc/html/index.html | |
t@@ -1,34 +1,23 @@ | |
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
+<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
- | |
+ <meta charset="utf-8" /> | |
<title>The sphere documentation — sphere 2.15-beta documentation</ti… | |
- | |
<link rel="stylesheet" href="_static/classic.css" type="text/css" /> | |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
- <script type="text/javascript"> | |
- var DOCUMENTATION_OPTIONS = { | |
- URL_ROOT: './', | |
- VERSION: '2.15-beta', | |
- COLLAPSE_INDEX: false, | |
- FILE_SUFFIX: '.html', | |
- HAS_SOURCE: true | |
- }; | |
- </script> | |
+ <script type="text/javascript" id="documentation_options" data-url_root=".… | |
<script type="text/javascript" src="_static/jquery.js"></script> | |
<script type="text/javascript" src="_static/underscore.js"></script> | |
<script type="text/javascript" src="_static/doctools.js"></script> | |
+ <script type="text/javascript" src="_static/language_data.js"></script> | |
+ | |
<link rel="index" title="Index" href="genindex.html" /> | |
<link rel="search" title="Search" href="search.html" /> | |
- <link rel="top" title="sphere 2.15-beta documentation" href="#" /> | |
<link rel="next" title="Introduction and Installation" href="introduction.… | |
- </head> | |
- <body role="document"> | |
+ </head><body> | |
<div class="related" role="navigation" aria-label="related navigation"> | |
<h3>Navigation</h3> | |
<ul> | |
t@@ -52,10 +41,10 @@ | |
<div class="section" id="the-sphere-documentation"> | |
<h1>The sphere documentation<a class="headerlink" href="#the-sphere-documentat… | |
-<p>This is the official documentation for the <code class="docutils literal"><… | |
+<p>This is the official documentation for the <code class="docutils literal no… | |
software. This document aims at guiding the installation process, documenting | |
the usage, and explaining the relevant theory.</p> | |
-<p><code class="docutils literal"><span class="pre">sphere</span></code> is de… | |
+<p><code class="docutils literal notranslate"><span class="pre">sphere</span><… | |
supervision of David Lundbek Egholm and Jan A. Piotrowski, all of the Departme… | |
of Geoscience, Aarhus University, Denmark. The author welcomes interested third | |
party developers. This document is a work in progress.</p> | |
t@@ -68,7 +57,7 @@ party developers. This document is a work in progress.</p> | |
<li class="toctree-l1"><a class="reference internal" href="introduction.html">… | |
<li class="toctree-l2"><a class="reference internal" href="introduction.html#r… | |
<li class="toctree-l2"><a class="reference internal" href="introduction.html#o… | |
-<li class="toctree-l2"><a class="reference internal" href="introduction.html#b… | |
+<li class="toctree-l2"><a class="reference internal" href="introduction.html#b… | |
<li class="toctree-l2"><a class="reference internal" href="introduction.html#u… | |
<li class="toctree-l2"><a class="reference internal" href="introduction.html#w… | |
</ul> | |
t@@ -90,7 +79,7 @@ party developers. This document is a work in progress.</p> | |
</li> | |
<li class="toctree-l1"><a class="reference internal" href="python_api.html">Py… | |
<li class="toctree-l2"><a class="reference internal" href="python_api.html#sam… | |
-<li class="toctree-l2"><a class="reference internal" href="python_api.html#mod… | |
+<li class="toctree-l2"><a class="reference internal" href="python_api.html#mod… | |
</ul> | |
</li> | |
<li class="toctree-l1"><a class="reference internal" href="sphere_internals.ht… | |
t@@ -104,8 +93,8 @@ party developers. This document is a work in progress.</p> | |
<div class="section" id="indices-and-tables"> | |
<h2>Indices and tables<a class="headerlink" href="#indices-and-tables" title="… | |
<ul class="simple"> | |
-<li><a class="reference internal" href="genindex.html"><span class="std std-re… | |
-<li><a class="reference internal" href="search.html"><span class="std std-ref"… | |
+<li><p><a class="reference internal" href="genindex.html"><span class="std std… | |
+<li><p><a class="reference internal" href="search.html"><span class="std std-r… | |
</ul> | |
</div> | |
</div> | |
t@@ -116,7 +105,7 @@ party developers. This document is a work in progress.</p> | |
</div> | |
<div class="sphinxsidebar" role="navigation" aria-label="main navigation… | |
<div class="sphinxsidebarwrapper"> | |
- <h3><a href="#">Table Of Contents</a></h3> | |
+ <h3><a href="#">Table of Contents</a></h3> | |
<ul> | |
<li><a class="reference internal" href="#">The sphere documentation</a><ul> | |
<li><a class="reference internal" href="#contents">Contents</a></li> | |
t@@ -131,18 +120,18 @@ party developers. This document is a work in progress.</… | |
<div role="note" aria-label="source link"> | |
<h3>This Page</h3> | |
<ul class="this-page-menu"> | |
- <li><a href="_sources/index.txt" | |
+ <li><a href="_sources/index.rst.txt" | |
rel="nofollow">Show Source</a></li> | |
</ul> | |
</div> | |
<div id="searchbox" style="display: none" role="search"> | |
- <h3>Quick search</h3> | |
+ <h3 id="searchlabel">Quick search</h3> | |
+ <div class="searchformwrapper"> | |
<form class="search" action="search.html" method="get"> | |
- <div><input type="text" name="q" /></div> | |
- <div><input type="submit" value="Go" /></div> | |
- <input type="hidden" name="check_keywords" value="yes" /> | |
- <input type="hidden" name="area" value="default" /> | |
+ <input type="text" name="q" aria-labelledby="searchlabel" /> | |
+ <input type="submit" value="Go" /> | |
</form> | |
+ </div> | |
</div> | |
<script type="text/javascript">$('#searchbox').show(0);</script> | |
</div> | |
t@@ -166,7 +155,7 @@ party developers. This document is a work in progress.</p> | |
</div> | |
<div class="footer" role="contentinfo"> | |
© Copyright 2014, Anders Damsgaard. | |
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. | |
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0. | |
</div> | |
</body> | |
</html> | |
\ No newline at end of file | |
diff --git a/doc/html/introduction.html b/doc/html/introduction.html | |
t@@ -1,35 +1,24 @@ | |
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
+<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
- | |
+ <meta charset="utf-8" /> | |
<title>Introduction and Installation — sphere 2.15-beta documentatio… | |
- | |
<link rel="stylesheet" href="_static/classic.css" type="text/css" /> | |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
- <script type="text/javascript"> | |
- var DOCUMENTATION_OPTIONS = { | |
- URL_ROOT: './', | |
- VERSION: '2.15-beta', | |
- COLLAPSE_INDEX: false, | |
- FILE_SUFFIX: '.html', | |
- HAS_SOURCE: true | |
- }; | |
- </script> | |
+ <script type="text/javascript" id="documentation_options" data-url_root=".… | |
<script type="text/javascript" src="_static/jquery.js"></script> | |
<script type="text/javascript" src="_static/underscore.js"></script> | |
<script type="text/javascript" src="_static/doctools.js"></script> | |
+ <script type="text/javascript" src="_static/language_data.js"></script> | |
+ | |
<link rel="index" title="Index" href="genindex.html" /> | |
<link rel="search" title="Search" href="search.html" /> | |
- <link rel="top" title="sphere 2.15-beta documentation" href="index.html" /> | |
<link rel="next" title="Discrete element method" href="dem.html" /> | |
<link rel="prev" title="The sphere documentation" href="index.html" /> | |
- </head> | |
- <body role="document"> | |
+ </head><body> | |
<div class="related" role="navigation" aria-label="related navigation"> | |
<h3>Navigation</h3> | |
<ul> | |
t@@ -56,23 +45,23 @@ | |
<div class="section" id="introduction-and-installation"> | |
<h1>Introduction and Installation<a class="headerlink" href="#introduction-and… | |
-<p>The <code class="docutils literal"><span class="pre">sphere</span></code>-s… | |
+<p>The <code class="docutils literal notranslate"><span class="pre">sphere</sp… | |
(DEM) particle simulations. The source code is written in C++, CUDA C and | |
Python, and is compiled by the user. The main computations are performed on the | |
-graphics processing unit (GPU) using NVIDIA’s general purpose parallel c… | |
+graphics processing unit (GPU) using NVIDIA’s general purpose parallel compu… | |
architecture, CUDA. Simulation setup and data analysis is performed with the | |
included Python API.</p> | |
-<p>The ultimate aim of the <code class="docutils literal"><span class="pre">sp… | |
+<p>The ultimate aim of the <code class="docutils literal notranslate"><span cl… | |
conditions, while retaining the flexibility to perform simulations of granular | |
material in other environments.</p> | |
<p>The purpose of this documentation is to provide the user with a walk-throug… | |
the installation, work-flow, data-analysis and visualization methods of | |
-<code class="docutils literal"><span class="pre">sphere</span></code>. In addi… | |
+<code class="docutils literal notranslate"><span class="pre">sphere</span></co… | |
understanding of the discrete element method numerical routines taking place.<… | |
<div class="admonition note"> | |
-<p class="first admonition-title">Note</p> | |
-<p class="last">Command examples in this document starting with the symbol <co… | |
-meant to be executed in the shell of the operational system, and <code class="… | |
+<p class="admonition-title">Note</p> | |
+<p>Command examples in this document starting with the symbol <code class="doc… | |
+meant to be executed in the shell of the operational system, and <code class="… | |
means execution in Python. <a class="reference external" href="http://ipython.… | |
interactive Python shell.</p> | |
</div> | |
t@@ -83,75 +72,76 @@ files are typeset with strict respect to the SI unit syste… | |
<p>The build requirements are:</p> | |
<blockquote> | |
<div><ul class="simple"> | |
-<li>A Nvidia CUDA-supported version of Linux or Mac OS X (see the <a class="re… | |
-release notes</a> for more information)</li> | |
-<li><a class="reference external" href="https://www.gnu.org/software/make/">GN… | |
-<li><a class="reference external" href="http://www.cmake.org">CMake</a>, versi… | |
-<li>The <a class="reference external" href="http://gcc.gnu.org/">GNU Compiler … | |
-<li>The <a class="reference external" href="https://developer.nvidia.com/cuda-… | |
-version 8.0 or newer</li> | |
+<li><p>A Nvidia CUDA-supported version of Linux or Mac OS X (see the <a class=… | |
+release notes</a> for more information)</p></li> | |
+<li><p><a class="reference external" href="https://www.gnu.org/software/make/"… | |
+<li><p><a class="reference external" href="http://www.cmake.org">CMake</a>, ve… | |
+<li><p>The <a class="reference external" href="http://gcc.gnu.org/">GNU Compil… | |
+<li><p>The <a class="reference external" href="https://developer.nvidia.com/cu… | |
+version 8.0 or newer</p></li> | |
</ul> | |
</div></blockquote> | |
<p>In Debian GNU/Linux, these dependencies can be installed by running:</p> | |
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ sudo… | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
</pre></div> | |
</div> | |
<p>Unfortunately, the Nvidia Toolkit is shipped under a non-free license. In o… | |
-to install it in Debian GNU/Linux, add <code class="docutils literal"><span cl… | |
-<code class="docutils literal"><span class="pre">/etc/apt/sources.list</span><… | |
+to install it in Debian GNU/Linux, add <code class="docutils literal notransla… | |
+<code class="docutils literal notranslate"><span class="pre">/etc/apt/sources.… | |
<p>The runtime requirements are:</p> | |
<blockquote> | |
<div><ul class="simple"> | |
-<li>A <a class="reference external" href="http://www.nvidia.com/object/cuda_gp… | |
-compute capability 2.0 or greater.</li> | |
-<li>A Nvidia CUDA-enabled GPU and device driver</li> | |
+<li><p>A <a class="reference external" href="http://www.nvidia.com/object/cuda… | |
+compute capability 2.0 or greater.</p></li> | |
+<li><p>A Nvidia CUDA-enabled GPU and device driver</p></li> | |
</ul> | |
</div></blockquote> | |
<p>Optional tools, required for simulation setup and data processing:</p> | |
<blockquote> | |
<div><ul class="simple"> | |
-<li><a class="reference external" href="http://www.python.org/">Python</a></li> | |
-<li><a class="reference external" href="http://numpy.scipy.org">Numpy</a></li> | |
-<li><a class="reference external" href="http://matplotlib.org">Matplotlib</a><… | |
-<li><a class="reference external" href="http://www.vtk.org">Python bindings fo… | |
-<li><a class="reference external" href="http://www.imagemagick.org/script/inde… | |
-<li><a class="reference external" href="http://ffmpeg.org/">ffmpeg</a>. Soon t… | |
+<li><p><a class="reference external" href="http://www.python.org/">Python</a><… | |
+<li><p><a class="reference external" href="http://numpy.scipy.org">Numpy</a></… | |
+<li><p><a class="reference external" href="http://matplotlib.org">Matplotlib</… | |
+<li><p><a class="reference external" href="http://www.vtk.org">Python bindings… | |
+<li><p><a class="reference external" href="http://www.imagemagick.org/script/i… | |
+<li><p><a class="reference external" href="http://ffmpeg.org/">ffmpeg</a>. Soo… | |
</ul> | |
</div></blockquote> | |
<p>In Debian GNU/Linux, these dependencies can be installed by running:</p> | |
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ sudo… | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
imagemagick libav-tools | |
</pre></div> | |
</div> | |
-<p><code class="docutils literal"><span class="pre">sphere</span></code> is di… | |
+<p><code class="docutils literal notranslate"><span class="pre">sphere</span><… | |
following tools are required for building the documentation:</p> | |
<blockquote> | |
<div><ul class="simple"> | |
-<li><a class="reference external" href="http://sphinx-doc.org">Sphinx</a><ul> | |
-<li><a class="reference external" href="http://packages.python.org/sphinxcontr… | |
+<li><p><a class="reference external" href="http://sphinx-doc.org">Sphinx</a></… | |
+<ul> | |
+<li><p><a class="reference external" href="http://packages.python.org/sphinxco… | |
</ul> | |
</li> | |
-<li><a class="reference external" href="http://www.stack.nl/~dimitri/doxygen/"… | |
-<li><a class="reference external" href="http://michaeljones.github.com/breathe… | |
-<li><a class="reference external" href="http://www.nongnu.org/dvipng/">dvipng<… | |
-<li><a class="reference external" href="http://www.tug.org/texlive/">TeX Live<… | |
+<li><p><a class="reference external" href="http://www.stack.nl/~dimitri/doxyge… | |
+<li><p><a class="reference external" href="http://michaeljones.github.com/brea… | |
+<li><p><a class="reference external" href="http://www.nongnu.org/dvipng/">dvip… | |
+<li><p><a class="reference external" href="http://www.tug.org/texlive/">TeX Li… | |
</ul> | |
</div></blockquote> | |
<p>In Debian GNU/Linux, these dependencies can be installed by running:</p> | |
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ sudo… | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
python-sphinxcontrib-programoutput texlive-full | |
$ sudo pip install breathe | |
</pre></div> | |
</div> | |
<p><a class="reference external" href="http://git-scm.com">Git</a> is used as … | |
-platform, and the source code is maintained at <a class="reference external" h… | |
+platform, and the source code is maintained at <a class="reference external" h… | |
Public License, v.3</a>.</p> | |
<div class="admonition note"> | |
-<p class="first admonition-title">Note</p> | |
+<p class="admonition-title">Note</p> | |
<p>All Debian GNU/Linux runtime, optional, and documentation dependencies | |
mentioned above can be installed by executing the following command from the | |
-<code class="docutils literal"><span class="pre">doc/</span></code> folder:</p> | |
-<div class="last highlight-default"><div class="highlight"><pre><span></span>$… | |
+<code class="docutils literal notranslate"><span class="pre">doc/</span></code… | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
</pre></div> | |
</div> | |
</div> | |
t@@ -161,54 +151,54 @@ mentioned above can be installed by executing the follow… | |
<p>The best way to keep up to date with subsequent updates, bugfixes and | |
development, is to use the Git version control system. To obtain a local | |
copy, execute:</p> | |
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ git … | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
</pre></div> | |
</div> | |
</div> | |
<div class="section" id="building-sphere"> | |
-<h2>Building <code class="docutils literal"><span class="pre">sphere</span></c… | |
-<p><code class="docutils literal"><span class="pre">sphere</span></code> is bu… | |
-and <code class="docutils literal"><span class="pre">nvcc</span></code> from t… | |
-<p>If you instead plan to execute it on a Fermi GPU, change <code class="docut… | |
-<span class="pre">1)</span></code> to <code class="docutils literal"><span cla… | |
+<h2>Building <code class="docutils literal notranslate"><span class="pre">sphe… | |
+<p><code class="docutils literal notranslate"><span class="pre">sphere</span><… | |
+and <code class="docutils literal notranslate"><span class="pre">nvcc</span></… | |
+<p>If you instead plan to execute it on a Fermi GPU, change <code class="docut… | |
+<span class="pre">1)</span></code> to <code class="docutils literal notranslat… | |
<p>In some cases the CMake FindCUDA module will have troubles locating the | |
-CUDA samples directory, and will complain about <code class="docutils literal"… | |
+CUDA samples directory, and will complain about <code class="docutils literal … | |
found.</p> | |
-<p>In that case, modify the <code class="docutils literal"><span class="pre">C… | |
-<code class="docutils literal"><span class="pre">src/CMakeLists.txt</span></co… | |
-<code class="docutils literal"><span class="pre">cmake</span> <span class="pre… | |
-sample subdirectory <code class="docutils literal"><span class="pre">common/in… | |
-directory, and run <code class="docutils literal"><span class="pre">cmake</spa… | |
+<p>In that case, modify the <code class="docutils literal notranslate"><span c… | |
+<code class="docutils literal notranslate"><span class="pre">src/CMakeLists.tx… | |
+<code class="docutils literal notranslate"><span class="pre">cmake</span> <spa… | |
+sample subdirectory <code class="docutils literal notranslate"><span class="pr… | |
+directory, and run <code class="docutils literal notranslate"><span class="pre… | |
sphere cannot be distributed with this file.</p> | |
-<p>If you plan to run <code class="docutils literal"><span class="pre">sphere<… | |
+<p>If you plan to run <code class="docutils literal notranslate"><span class="… | |
from the root directory:</p> | |
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ cmak… | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
</pre></div> | |
</div> | |
<p>NOTE: If your system does not have a GCC compiler compatible with the insta… | |
CUDA version (e.g. GCC-5 for CUDA 8), you will see errors at the linker stage. | |
-In that case, try using <code class="docutils literal"><span class="pre">clang… | |
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ rm -… | |
+In that case, try using <code class="docutils literal notranslate"><span class… | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
$ export CC=$(which clang-3.8) && export CXX=$(which clang++-3.8) &… | |
</pre></div> | |
</div> | |
-<p>After a successfull installation, the <code class="docutils literal"><span … | |
+<p>After a successfull installation, the <code class="docutils literal notrans… | |
in the root folder. To make sure that all components are working correctly, | |
execute:</p> | |
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ make… | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
</pre></div> | |
</div> | |
<p>Disclaimer: On some systems the Navier-Stokes related tests will fail. If … | |
do encounter these problems, but do not plan on using the Navier Stokes solver | |
for fluid dynamics, carry on.</p> | |
<p>If successful the Makefiles will create the required data folders, object | |
-files, as well as the <code class="docutils literal"><span class="pre">sphere<… | |
+files, as well as the <code class="docutils literal notranslate"><span class="… | |
following commands to check the executable:</p> | |
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ ./sp… | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
</pre></div> | |
</div> | |
<p>The output should look similar to this:</p> | |
-<div class="highlight-text"><div class="highlight"><pre><span></span>.--------… | |
+<div class="highlight-text notranslate"><div class="highlight"><pre><span></sp… | |
| _ | | |
| | | | | |
| ___ _ __ | |__ ___ _ __ ___ | | |
t@@ -224,40 +214,40 @@ following commands to check the executable:</p> | |
</pre></div> | |
</div> | |
<p>The documentation can be read in the <a class="reference external" href="ht… | |
-the <code class="docutils literal"><span class="pre">doc/sphinx/</span></code>… | |
-<code class="docutils literal"><span class="pre">doc/html</span></code> and <c… | |
+the <code class="docutils literal notranslate"><span class="pre">doc/sphinx/</… | |
+<code class="docutils literal notranslate"><span class="pre">doc/html</span></… | |
<p>Optionally, the documentation can be built using the following commands:</p> | |
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ cd d… | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
$ make html | |
$ make latexpdf | |
</pre></div> | |
</div> | |
<p>To see all available output formats, execute:</p> | |
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ make… | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
</pre></div> | |
</div> | |
</div> | |
<div class="section" id="updating-sphere"> | |
<h2>Updating sphere<a class="headerlink" href="#updating-sphere" title="Permal… | |
-<p>To update your local version, type the following commands in the <code clas… | |
+<p>To update your local version, type the following commands in the <code clas… | |
directory:</p> | |
-<div class="highlight-default"><div class="highlight"><pre><span></span>$ git … | |
+<div class="highlight-default notranslate"><div class="highlight"><pre><span><… | |
</pre></div> | |
</div> | |
</div> | |
<div class="section" id="work-flow"> | |
<h2>Work flow<a class="headerlink" href="#work-flow" title="Permalink to this … | |
-<p>After compiling the <code class="docutils literal"><span class="pre">sphere… | |
+<p>After compiling the <code class="docutils literal notranslate"><span class=… | |
a simulation is typically arranged in the following order:</p> | |
<blockquote> | |
<div><ul class="simple"> | |
-<li>Setup of particle assemblage, physical properties and conditions using the | |
-Python API (<code class="docutils literal"><span class="pre">python/sphere.py<… | |
-<li>Execution of <code class="docutils literal"><span class="pre">sphere</span… | |
+<li><p>Setup of particle assemblage, physical properties and conditions using … | |
+Python API (<code class="docutils literal notranslate"><span class="pre">pytho… | |
+<li><p>Execution of <code class="docutils literal notranslate"><span class="pr… | |
function of time, as a result of the conditions initially specified in the | |
-input file.</li> | |
-<li>Inspection, analysis, interpretation and visualization of <code class="doc… | |
-in Python, and/or scene rendering using the built-in ray tracer.</li> | |
+input file.</p></li> | |
+<li><p>Inspection, analysis, interpretation and visualization of <code class="… | |
+in Python, and/or scene rendering using the built-in ray tracer.</p></li> | |
</ul> | |
</div></blockquote> | |
</div> | |
t@@ -269,12 +259,12 @@ in Python, and/or scene rendering using the built-in ray… | |
</div> | |
<div class="sphinxsidebar" role="navigation" aria-label="main navigation… | |
<div class="sphinxsidebarwrapper"> | |
- <h3><a href="index.html">Table Of Contents</a></h3> | |
+ <h3><a href="index.html">Table of Contents</a></h3> | |
<ul> | |
<li><a class="reference internal" href="#">Introduction and Installation</a><u… | |
<li><a class="reference internal" href="#requirements">Requirements</a></li> | |
<li><a class="reference internal" href="#obtaining-sphere">Obtaining sphere</a… | |
-<li><a class="reference internal" href="#building-sphere">Building <code class… | |
+<li><a class="reference internal" href="#building-sphere">Building <code class… | |
<li><a class="reference internal" href="#updating-sphere">Updating sphere</a><… | |
<li><a class="reference internal" href="#work-flow">Work flow</a></li> | |
</ul> | |
t@@ -290,18 +280,18 @@ in Python, and/or scene rendering using the built-in ray… | |
<div role="note" aria-label="source link"> | |
<h3>This Page</h3> | |
<ul class="this-page-menu"> | |
- <li><a href="_sources/introduction.txt" | |
+ <li><a href="_sources/introduction.rst.txt" | |
rel="nofollow">Show Source</a></li> | |
</ul> | |
</div> | |
<div id="searchbox" style="display: none" role="search"> | |
- <h3>Quick search</h3> | |
+ <h3 id="searchlabel">Quick search</h3> | |
+ <div class="searchformwrapper"> | |
<form class="search" action="search.html" method="get"> | |
- <div><input type="text" name="q" /></div> | |
- <div><input type="submit" value="Go" /></div> | |
- <input type="hidden" name="check_keywords" value="yes" /> | |
- <input type="hidden" name="area" value="default" /> | |
+ <input type="text" name="q" aria-labelledby="searchlabel" /> | |
+ <input type="submit" value="Go" /> | |
</form> | |
+ </div> | |
</div> | |
<script type="text/javascript">$('#searchbox').show(0);</script> | |
</div> | |
t@@ -328,7 +318,7 @@ in Python, and/or scene rendering using the built-in ray t… | |
</div> | |
<div class="footer" role="contentinfo"> | |
© Copyright 2014, Anders Damsgaard. | |
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. | |
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0. | |
</div> | |
</body> | |
</html> | |
\ No newline at end of file | |
diff --git a/doc/html/objects.inv b/doc/html/objects.inv | |
Binary files differ. | |
diff --git a/doc/html/py-modindex.html b/doc/html/py-modindex.html | |
t@@ -1,31 +1,21 @@ | |
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
+<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
- | |
+ <meta charset="utf-8" /> | |
<title>Python Module Index — sphere 2.15-beta documentation</title> | |
- | |
<link rel="stylesheet" href="_static/classic.css" type="text/css" /> | |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
- <script type="text/javascript"> | |
- var DOCUMENTATION_OPTIONS = { | |
- URL_ROOT: './', | |
- VERSION: '2.15-beta', | |
- COLLAPSE_INDEX: false, | |
- FILE_SUFFIX: '.html', | |
- HAS_SOURCE: true | |
- }; | |
- </script> | |
+ <script type="text/javascript" id="documentation_options" data-url_root=".… | |
<script type="text/javascript" src="_static/jquery.js"></script> | |
<script type="text/javascript" src="_static/underscore.js"></script> | |
<script type="text/javascript" src="_static/doctools.js"></script> | |
+ <script type="text/javascript" src="_static/language_data.js"></script> | |
+ | |
<link rel="index" title="Index" href="genindex.html" /> | |
<link rel="search" title="Search" href="search.html" /> | |
- <link rel="top" title="sphere 2.15-beta documentation" href="index.html" /> | |
<script type="text/javascript"> | |
t@@ -33,8 +23,7 @@ | |
</script> | |
- </head> | |
- <body role="document"> | |
+ </head><body> | |
<div class="related" role="navigation" aria-label="related navigation"> | |
<h3>Navigation</h3> | |
<ul> | |
t@@ -60,7 +49,7 @@ | |
<a href="#cap-s"><strong>s</strong></a> | |
</div> | |
- <table class="indextable modindextable" cellspacing="0" cellpadding="2"> | |
+ <table class="indextable modindextable"> | |
<tr class="pcap"><td></td><td> </td><td></td></tr> | |
<tr class="cap" id="cap-s"><td></td><td> | |
<strong>s</strong></td><td></td></tr> | |
t@@ -78,13 +67,13 @@ | |
<div class="sphinxsidebar" role="navigation" aria-label="main navigation… | |
<div class="sphinxsidebarwrapper"> | |
<div id="searchbox" style="display: none" role="search"> | |
- <h3>Quick search</h3> | |
+ <h3 id="searchlabel">Quick search</h3> | |
+ <div class="searchformwrapper"> | |
<form class="search" action="search.html" method="get"> | |
- <div><input type="text" name="q" /></div> | |
- <div><input type="submit" value="Go" /></div> | |
- <input type="hidden" name="check_keywords" value="yes" /> | |
- <input type="hidden" name="area" value="default" /> | |
+ <input type="text" name="q" aria-labelledby="searchlabel" /> | |
+ <input type="submit" value="Go" /> | |
</form> | |
+ </div> | |
</div> | |
<script type="text/javascript">$('#searchbox').show(0);</script> | |
</div> | |
t@@ -105,7 +94,7 @@ | |
</div> | |
<div class="footer" role="contentinfo"> | |
© Copyright 2014, Anders Damsgaard. | |
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. | |
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0. | |
</div> | |
</body> | |
</html> | |
\ No newline at end of file | |
diff --git a/doc/html/python_api.html b/doc/html/python_api.html | |
t@@ -1,35 +1,24 @@ | |
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
+<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
- | |
+ <meta charset="utf-8" /> | |
<title>Python API — sphere 2.15-beta documentation</title> | |
- | |
<link rel="stylesheet" href="_static/classic.css" type="text/css" /> | |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
- <script type="text/javascript"> | |
- var DOCUMENTATION_OPTIONS = { | |
- URL_ROOT: './', | |
- VERSION: '2.15-beta', | |
- COLLAPSE_INDEX: false, | |
- FILE_SUFFIX: '.html', | |
- HAS_SOURCE: true | |
- }; | |
- </script> | |
+ <script type="text/javascript" id="documentation_options" data-url_root=".… | |
<script type="text/javascript" src="_static/jquery.js"></script> | |
<script type="text/javascript" src="_static/underscore.js"></script> | |
<script type="text/javascript" src="_static/doctools.js"></script> | |
+ <script type="text/javascript" src="_static/language_data.js"></script> | |
+ | |
<link rel="index" title="Index" href="genindex.html" /> | |
<link rel="search" title="Search" href="search.html" /> | |
- <link rel="top" title="sphere 2.15-beta documentation" href="index.html" /> | |
<link rel="next" title="sphere internals" href="sphere_internals.html" /> | |
<link rel="prev" title="Fluid simulation and particle-fluid interaction" h… | |
- </head> | |
- <body role="document"> | |
+ </head><body> | |
<div class="related" role="navigation" aria-label="related navigation"> | |
<h3>Navigation</h3> | |
<ul> | |
t@@ -56,17 +45,17 @@ | |
<div class="section" id="python-api"> | |
<h1>Python API<a class="headerlink" href="#python-api" title="Permalink to thi… | |
-<p>The Python module <code class="docutils literal"><span class="pre">sphere</… | |
+<p>The Python module <code class="docutils literal notranslate"><span class="p… | |
application. It is recommended to use this module for simulation setup, | |
simulation execution, and analysis of the simulation output data.</p> | |
-<p>In order to use the API, the file <code class="docutils literal"><span clas… | |
+<p>In order to use the API, the file <code class="docutils literal notranslate… | |
directory as the Python files.</p> | |
<div class="section" id="sample-usage"> | |
<h2>Sample usage<a class="headerlink" href="#sample-usage" title="Permalink to… | |
<p>Below is a simple, annotated example of how to setup, execute, and post-pro… | |
-a <code class="docutils literal"><span class="pre">sphere</span></code> simula… | |
-<code class="docutils literal"><span class="pre">collision.py</span></code>.</… | |
-<div class="highlight-python"><table class="highlighttable"><tr><td class="lin… | |
+a <code class="docutils literal notranslate"><span class="pre">sphere</span></… | |
+<code class="docutils literal notranslate"><span class="pre">collision.py</spa… | |
+<div class="highlight-python notranslate"><table class="highlighttable"><tr><t… | |
2 | |
3 | |
4 | |
t@@ -185,680 +174,594 @@ a <code class="docutils literal"><span class="pre">sph… | |
<span class="n">SB</span><span class="o">.</span><span class="n">writeVTKall</… | |
</pre></div> | |
</td></tr></table></div> | |
-<p>The full documentation of the <code class="docutils literal"><span class="p… | |
+<p>The full documentation of the <code class="docutils literal notranslate"><s… | |
</div> | |
<div class="section" id="module-sphere"> | |
-<span id="the-sphere-module"></span><h2>The <code class="docutils literal"><sp… | |
+<span id="the-sphere-module"></span><h2>The <code class="docutils literal notr… | |
<dl class="function"> | |
<dt id="sphere.V_sphere"> | |
-<code class="descclassname">sphere.</code><code class="descname">V_sphere</cod… | |
+<code class="sig-prename descclassname">sphere.</code><code class="sig-name de… | |
<dd><p>Calculates the volume of a sphere with radius r</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The sphere volume [m^3]</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="function"> | |
<dt id="sphere.cleanup"> | |
-<code class="descclassname">sphere.</code><code class="descname">cleanup</code… | |
+<code class="sig-prename descclassname">sphere.</code><code class="sig-name de… | |
<dd><p>Removes the input/output files and images belonging to the object simul… | |
-ID from the <code class="docutils literal"><span class="pre">input/</span></co… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+ID from the <code class="docutils literal notranslate"><span class="pre">input… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>spherebin</strong> (<a class="reference inter… | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="function"> | |
<dt id="sphere.convert"> | |
-<code class="descclassname">sphere.</code><code class="descname">convert</code… | |
-<dd><p>Converts all PPM images in img_out to graphics_format using Imagemagick… | |
-PPM images are subsequently removed.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>graphics_format</strong> (<em>str</em>) – Convert the images… | |
-<li><strong>folder</strong> (<em>str</em>) – The folder containing the P… | |
+<code class="sig-prename descclassname">sphere.</code><code class="sig-name de… | |
+<dd><p>Converts all PPM images in img_out to graphics_format using ImageMagick… | |
+PPM images are subsequently removed if <cite>remove_ppm</cite> is <cite>True</… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Convert the images … | |
+<li><p><strong>folder</strong> (<em>str</em>) – The folder containing the PP… | |
+<li><p><strong>remove_ppm</strong> (<em>bool</em>) – Remove ALL ppm files in… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="function"> | |
<dt id="sphere.render"> | |
-<code class="descclassname">sphere.</code><code class="descname">render</code>… | |
-<dd><p>Render target binary using the <code class="docutils literal"><span cla… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>method</strong> (<em>str</em>) – The color visualization met… | |
-Possible values are: ‘normal’: color all particles with the same | |
-color, ‘pres’: color by pressure, ‘vel’: color by tran… | |
-velocity, ‘angvel’: color by rotational velocity, ‘xdispR… | |
-total displacement along the x-axis, ‘angpos’: color by angular | |
-position.</li> | |
-<li><strong>max_val</strong> (<em>float</em>) – The maximum value of the… | |
-<li><strong>lower_cutoff</strong> (<em>float</em>) – Do not render parti… | |
-value, of the field selected by <code class="docutils literal"><span class="pr… | |
-<li><strong>graphics_format</strong> (<em>str</em>) – Convert the PPM im… | |
-tracer to this image format using Imagemagick</li> | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show verbose information … | |
+<code class="sig-prename descclassname">sphere.</code><code class="sig-name de… | |
+<dd><p>Render target binary using the <code class="docutils literal notranslat… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>method</strong> (<em>str</em>) – The color visualization meth… | |
+Possible values are: ‘normal’: color all particles with the same | |
+color, ‘pres’: color by pressure, ‘vel’: color by translational | |
+velocity, ‘angvel’: color by rotational velocity, ‘xdisp’: color by | |
+total displacement along the x-axis, ‘angpos’: color by angular | |
+position.</p></li> | |
+<li><p><strong>max_val</strong> (<em>float</em>) – The maximum value of the … | |
+<li><p><strong>lower_cutoff</strong> (<em>float</em>) – Do not render partic… | |
+value, of the field selected by <code class="docutils literal notranslate"><sp… | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Convert the PPM ima… | |
+tracer to this image format using Imagemagick</p></li> | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show verbose information d… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="function"> | |
<dt id="sphere.run"> | |
-<code class="descclassname">sphere.</code><code class="descname">run</code><sp… | |
-<dd><p>Execute <code class="docutils literal"><span class="pre">sphere</span><… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>binary</strong> (<em>str</em>) – Input file for <code class=… | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show <code class="docutil… | |
-<li><strong>hideinputfile</strong> (<em>bool</em>) – Hide the input file… | |
+<code class="sig-prename descclassname">sphere.</code><code class="sig-name de… | |
+<dd><p>Execute <code class="docutils literal notranslate"><span class="pre">sp… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>binary</strong> (<em>str</em>) – Input file for <code class="… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show <code class="docutils… | |
+<li><p><strong>hideinputfile</strong> (<em>bool</em>) – Hide the input file<… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="class"> | |
<dt id="sphere.sim"> | |
-<em class="property">class </em><code class="descclassname">sphere.</code><cod… | |
-<dd><p>Class containing all <code class="docutils literal"><span class="pre">s… | |
+<em class="property">class </em><code class="sig-prename descclassname">sphere… | |
+<dd><p>Class containing all <code class="docutils literal notranslate"><span c… | |
<p>Contains functions for reading and writing binaries, as well as simulation | |
setup and data analysis. Most arrays are initialized to default values.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>np</strong> (<em>int</em>) – The number of particles to allo… | |
-<li><strong>nd</strong> (<em>int</em>) – The number of spatial dimension… | |
-1D simulations currently are not possible.</li> | |
-<li><strong>nw</strong> (<em>int</em>) – The number of dynamic walls (de… | |
-<li><strong>sid</strong> (<em>str</em>) – The simulation id (default = &… | |
-will be written with this base name.</li> | |
-<li><strong>fluid</strong> (<em>bool</em>) – Setup fluid simulation (def… | |
-<li><strong>cfd_solver</strong> (<em>int</em>) – Fluid solver to use if … | |
-(default), 1: Darcy.</li> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>np</strong> (<em>int</em>) – The number of particles to alloc… | |
+<li><p><strong>nd</strong> (<em>int</em>) – The number of spatial dimensions… | |
+1D simulations currently are not possible.</p></li> | |
+<li><p><strong>nw</strong> (<em>int</em>) – The number of dynamic walls (def… | |
+<li><p><strong>sid</strong> (<em>str</em>) – The simulation id (default=’u… | |
+will be written with this base name.</p></li> | |
+<li><p><strong>fluid</strong> (<em>bool</em>) – Setup fluid simulation (defa… | |
+<li><p><strong>cfd_solver</strong> (<em>int</em>) – Fluid solver to use if f… | |
+(default), 1: Darcy.</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
<dl class="method"> | |
<dt id="sphere.sim.ReynoldsNumber"> | |
-<code class="descname">ReynoldsNumber</code><span class="sig-paren">(</span><s… | |
-<dd><p>Estimate the per-cell Reynolds number by: Re = rho * ||v_f|| * dx/mu. | |
+<code class="sig-name descname">ReynoldsNumber</code><span class="sig-paren">(… | |
+<dd><p>Estimate the per-cell Reynolds number by: Re=rho * ||v_f|| * dx/mu. | |
This value is returned and also stored in <cite>self.Re</cite>.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>Reynolds number</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>Numpy array with dimensions like the fluid grid</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.acceleration"> | |
-<code class="descname">acceleration</code><span class="sig-paren">(</span><em>… | |
+<code class="sig-name descname">acceleration</code><span class="sig-paren">(</… | |
<dd><p>Returns the acceleration of one or more particles, selected by their | |
index. If the index is equal to -1 (default value), all accelerations | |
are returned.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em><em>, </em><em>list… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>n-by-3 matrix of acceleration(s)</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>numpy.array</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.adaptiveGrid"> | |
-<code class="descname">adaptiveGrid</code><span class="sig-paren">(</span><spa… | |
+<code class="sig-name descname">adaptiveGrid</code><span class="sig-paren">(</… | |
<dd><p>Set the height of the fluid grid to automatically readjust to the | |
height of the granular assemblage, as dictated by the position of the | |
top wall. This will readjust <cite>self.L[2]</cite> during the simulation to | |
equal the position of the top wall <cite>self.w_x[0]</cite>.</p> | |
-<p>See also <a class="reference internal" href="#sphere.sim.staticGrid" title=… | |
+<p>See also <a class="reference internal" href="#sphere.sim.staticGrid" title=… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.addParticle"> | |
-<code class="descname">addParticle</code><span class="sig-paren">(</span><em>x… | |
+<code class="sig-name descname">addParticle</code><span class="sig-paren">(</s… | |
<dd><p>Add a single particle to the simulation object. The only required | |
parameters are the position (x) and the radius (radius).</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>x</strong> (<em>numpy.array</em>) – A vector pointing to the… | |
-<li><strong>radius</strong> (<em>float</em>) – The particle radius</li> | |
-<li><strong>vel</strong> (<em>numpy.array</em>) – The particle linear ve… | |
-<li><strong>fixvel</strong> (<em>float</em>) – 0: Do not fix particle ve… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>x</strong> (<em>numpy.array</em>) – A vector pointing to the … | |
+<li><p><strong>radius</strong> (<em>float</em>) – The particle radius</p></l… | |
+<li><p><strong>vel</strong> (<em>numpy.array</em>) – The particle linear vel… | |
+<li><p><strong>fixvel</strong> (<em>float</em>) – 0: Do not fix particle vel… | |
horizontal linear velocity, -1: Fix horizontal and vertical linear | |
-velocity</li> | |
-<li><strong>angpos</strong> (<em>numpy.array</em>) – The particle angula… | |
-<li><strong>angvel</strong> (<em>numpy.array</em>) – The particle angula… | |
-<li><strong>torque</strong> (<em>numpy.array</em>) – The particle torque… | |
-<li><strong>es_dot</strong> (<em>float</em>) – The particle shear energy… | |
-<li><strong>es</strong> (<em>float</em>) – The particle shear energy los… | |
-<li><strong>ev_dot</strong> (<em>float</em>) – The particle viscous ener… | |
-<li><strong>ev</strong> (<em>float</em>) – The particle viscous energy l… | |
-<li><strong>p</strong> (<em>float</em>) – The particle pressure (default… | |
+velocity</p></li> | |
+<li><p><strong>angpos</strong> (<em>numpy.array</em>) – The particle angular… | |
+<li><p><strong>angvel</strong> (<em>numpy.array</em>) – The particle angular… | |
+<li><p><strong>torque</strong> (<em>numpy.array</em>) – The particle torque … | |
+<li><p><strong>es_dot</strong> (<em>float</em>) – The particle shear energy … | |
+<li><p><strong>es</strong> (<em>float</em>) – The particle shear energy loss… | |
+<li><p><strong>ev_dot</strong> (<em>float</em>) – The particle viscous energ… | |
+<li><p><strong>ev</strong> (<em>float</em>) – The particle viscous energy lo… | |
+<li><p><strong>p</strong> (<em>float</em>) – The particle pressure (default=… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.adjustUpperWall"> | |
-<code class="descname">adjustUpperWall</code><span class="sig-paren">(</span><… | |
-<dd><p>Included for legacy purposes, calls <a class="reference internal" href=… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-allow for wall movement.</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+<code class="sig-name descname">adjustUpperWall</code><span class="sig-paren">… | |
+<dd><p>Included for legacy purposes, calls <a class="reference internal" href=… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>z_adjust</strong> (<em>float</em>) – Increa… | |
+allow for wall movement.</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.adjustWall"> | |
-<code class="descname">adjustWall</code><span class="sig-paren">(</span><em>id… | |
+<code class="sig-name descname">adjustWall</code><span class="sig-paren">(</sp… | |
<dd><p>Adjust grid and dynamic wall to max. particle position. The wall | |
thickness will by standard equal the maximum particle diameter. The | |
density equals the particle density, and the wall size is equal to the | |
-width and depth of the simulation domain (<cite>self.L[0]</cite> and <cite>sel… | |
-The total wall mass can be linearly scaled by the <cite>wall_mass_factor</cite> | |
-parameter.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Param:</th><td class="field… | |
-left wall, 2 = +x, right wall, 3 = -y, front wall, 4 = +y, back | |
-wall.</td> | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Parameters:</th><td class=… | |
-allow for wall movement.</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>:param</p> | |
+width and depth of the simulation domain (<cite>self.L[0]</cite> and <cite>sel… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Param</dt> | |
+<dd class="field-odd"><p>idx: The wall to adjust. 0=+z, upper wall (default), … | |
+left wall, 2=+x, right wall, 3=-y, front wall, 4=+y, back | |
+wall.</p> | |
+</dd> | |
+<dt class="field-even">Parameters</dt> | |
+<dd class="field-even"><p><strong>adjust</strong> (<em>float</em>) – Increas… | |
+allow for wall movement.</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.bond"> | |
-<code class="descname">bond</code><span class="sig-paren">(</span><em>i</em>, … | |
+<code class="sig-name descname">bond</code><span class="sig-paren">(</span><em… | |
<dd><p>Create a bond between particles with index i and j</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>i</strong> (<em>int</em>) – Index of first particle in bond<… | |
-<li><strong>j</strong> (<em>int</em>) – Index of second particle in bond… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>i</strong> (<em>int</em>) – Index of first particle in bond</… | |
+<li><p><strong>j</strong> (<em>int</em>) – Index of second particle in bond<… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.bondsRose"> | |
-<code class="descname">bondsRose</code><span class="sig-paren">(</span><em>gra… | |
+<code class="sig-name descname">bondsRose</code><span class="sig-paren">(</spa… | |
<dd><p>Visualize the trend and plunge angles of the bond pairs in a rose plot. | |
The plot is saved in the current folder as | |
-‘bonds-<simulation id>-rose.<graphics_format>’.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+‘bonds-<simulation id>-rose.<graphics_format>’.</p> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>graphics_format</strong> (<em>str</em>) – S… | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.bulkPorosity"> | |
-<code class="descname">bulkPorosity</code><span class="sig-paren">(</span><em>… | |
+<code class="sig-name descname">bulkPorosity</code><span class="sig-paren">(</… | |
<dd><p>Calculates the bulk porosity of the particle assemblage.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-containing all particles.</td> | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>trim</strong> (<em>bool</em>) – Trim the to… | |
+containing all particles.</p> | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The bulk porosity, in [0:1]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.cellSize"> | |
-<code class="descname">cellSize</code><span class="sig-paren">(</span><span cl… | |
+<code class="sig-name descname">cellSize</code><span class="sig-paren">(</span… | |
<dd><p>Calculate the particle sorting (and fluid) cell dimensions. | |
These values are stored in <cite>self.dx</cite> and are NOT returned.</p> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.checkerboardColors"> | |
-<code class="descname">checkerboardColors</code><span class="sig-paren">(</spa… | |
+<code class="sig-name descname">checkerboardColors</code><span class="sig-pare… | |
<dd><p>Assign checkerboard color values to the particles in an orthogonal grid… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>nx</strong> (<em>int</em>) – Number of color values along th… | |
-<li><strong>ny</strong> (<em>int</em>) – Number of color values along th… | |
-<li><strong>nz</strong> (<em>int</em>) – Number of color values along th… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>nx</strong> (<em>int</em>) – Number of color values along the… | |
+<li><p><strong>ny</strong> (<em>int</em>) – Number of color values along the… | |
+<li><p><strong>nz</strong> (<em>int</em>) – Number of color values along the… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.cleanup"> | |
-<code class="descname">cleanup</code><span class="sig-paren">(</span><span cla… | |
+<code class="sig-name descname">cleanup</code><span class="sig-paren">(</span>… | |
<dd><p>Removes the input/output files and images belonging to the object | |
-simulation ID from the <code class="docutils literal"><span class="pre">input/… | |
+simulation ID from the <code class="docutils literal notranslate"><span class=… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.consolidate"> | |
-<code class="descname">consolidate</code><span class="sig-paren">(</span><em>n… | |
+<code class="sig-name descname">consolidate</code><span class="sig-paren">(</s… | |
<dd><p>Setup consolidation experiment. Specify the upper wall normal stress in | |
Pascal, default value is 10 kPa.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>normal_stress</strong> (<em>float</em>) – T… | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.contactModel"> | |
-<code class="descname">contactModel</code><span class="sig-paren">(</span><em>… | |
+<code class="sig-name descname">contactModel</code><span class="sig-paren">(</… | |
<dd><p>Define which contact model to use for the tangential component of | |
particle-particle interactions. The elastic-viscous-frictional contact | |
model (2) is considered to be the most realistic contact model, while | |
the viscous-frictional contact model is significantly faster.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-(visco-frictional = 1, elasto-visco-frictional = 2)</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>contactmodel</strong> (<em>int</em>) – The … | |
+(visco-frictional=1, elasto-visco-frictional=2)</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.contactParticleArea"> | |
-<code class="descname">contactParticleArea</code><span class="sig-paren">(</sp… | |
+<code class="sig-name descname">contactParticleArea</code><span class="sig-par… | |
<dd><p>Finds the average area of an two particles in an inter-particle contact… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>i</strong> (<em>int or array of ints</em>) – Index of first … | |
-<li><strong>j</strong> (<em>int or array of ints</em>) – Index of second… | |
-<li><strong>d</strong> (<em>float or array of floats</em>) – Overlap dis… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>i</strong> (<em>int</em><em> or </em><em>array of ints</em>) �… | |
+<li><p><strong>j</strong> (<em>int</em><em> or </em><em>array of ints</em>) �… | |
+<li><p><strong>d</strong> (<em>float</em><em> or </em><em>array of floats</em>… | |
</ul> | |
-</td> | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</td> | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>Contact area [m*m]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float or array of floats</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.contactSurfaceArea"> | |
-<code class="descname">contactSurfaceArea</code><span class="sig-paren">(</spa… | |
+<code class="sig-name descname">contactSurfaceArea</code><span class="sig-pare… | |
<dd><p>Finds the contact surface area of an inter-particle contact.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>i</strong> (<em>int or array of ints</em>) – Index of first … | |
-<li><strong>j</strong> (<em>int or array of ints</em>) – Index of second… | |
-<li><strong>d</strong> (<em>float or array of floats</em>) – Overlap dis… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>i</strong> (<em>int</em><em> or </em><em>array of ints</em>) �… | |
+<li><p><strong>j</strong> (<em>int</em><em> or </em><em>array of ints</em>) �… | |
+<li><p><strong>d</strong> (<em>float</em><em> or </em><em>array of floats</em>… | |
</ul> | |
-</td> | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</td> | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>Contact area [m*m]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float or array of floats</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.convergence"> | |
-<code class="descname">convergence</code><span class="sig-paren">(</span><span… | |
+<code class="sig-name descname">convergence</code><span class="sig-paren">(</s… | |
<dd><p>Read the convergence evolution in the CFD solver. The values are stored | |
in <cite>self.conv</cite> with iteration number in the first column and iterat… | |
count in the second column.</p> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.plotConvergence" … | |
+<p>See also: <a class="reference internal" href="#sphere.sim.plotConvergence" … | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.createBondPair"> | |
-<code class="descname">createBondPair</code><span class="sig-paren">(</span><e… | |
+<code class="sig-name descname">createBondPair</code><span class="sig-paren">(… | |
<dd><p>Bond particles i and j. Particle j is moved adjacent to particle i, | |
and oriented randomly.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>i</strong> (<em>int</em>) – Index of first particle in bond<… | |
-<li><strong>j</strong> (<em>int</em>) – Index of second particle in bond… | |
-<li><strong>spacing</strong> (<em>float</em>) – The inter-particle dista… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>i</strong> (<em>int</em>) – Index of first particle in bond</… | |
+<li><p><strong>j</strong> (<em>int</em>) – Index of second particle in bond<… | |
+<li><p><strong>spacing</strong> (<em>float</em>) – The inter-particle distan… | |
values result in a inter-particle distance, negative equal an | |
-overlap. The value is relative to the sum of the two radii.</li> | |
+overlap. The value is relative to the sum of the two radii.</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.currentNormalStress"> | |
-<code class="descname">currentNormalStress</code><span class="sig-paren">(</sp… | |
+<code class="sig-name descname">currentNormalStress</code><span class="sig-par… | |
<dd><p>Calculates the current magnitude of the defined or effective top wall | |
normal stress.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>type</strong> (<em>str</em>) – Find the ‘… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The current top wall normal stress in Pascal</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.currentTime"> | |
-<code class="descname">currentTime</code><span class="sig-paren">(</span><em>v… | |
+<code class="sig-name descname">currentTime</code><span class="sig-paren">(</s… | |
<dd><p>Get or set the current time. If called without arguments the current | |
-time is returned. If a new time is passed in the ‘value’ argument,… | |
+time is returned. If a new time is passed in the ‘value’ argument, the | |
time is written to the object.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>value</strong> (<em>float</em>) – The new c… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The current time</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.defaultParams"> | |
-<code class="descname">defaultParams</code><span class="sig-paren">(</span><em… | |
+<code class="sig-name descname">defaultParams</code><span class="sig-paren">(<… | |
<dd><p>Initialize particle parameters to default values.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>mu_s</strong> (<em>float</em>) – The coefficient of static f… | |
-<li><strong>mu_d</strong> (<em>float</em>) – The coefficient of dynamic … | |
-<li><strong>rho</strong> (<em>float</em>) – The density of the particle … | |
-<li><strong>k_n</strong> (<em>float</em>) – The normal stiffness of the … | |
-<li><strong>k_t</strong> (<em>float</em>) – The tangential stiffness of … | |
-<li><strong>k_r</strong> (<em>float</em>) – The rolling stiffness of the… | |
-not used</em></li> | |
-<li><strong>gamma_n</strong> (<em>float</em>) – Particle-particle contac… | |
-<li><strong>gamma_t</strong> (<em>float</em>) – Particle-particle contac… | |
-<li><strong>gamma_r</strong> (<em>float</em>) – Particle-particle contac… | |
-not used</em></li> | |
-<li><strong>gamma_wn</strong> (<em>float</em>) – Wall-particle contact n… | |
-<li><strong>gamma_wt</strong> (<em>float</em>) – Wall-particle contact t… | |
-<li><strong>capillaryCohesion</strong> (<em>int</em>) – Enable particle-… | |
-interaction model (0 = no (default), 1 = yes)</li> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>mu_s</strong> (<em>float</em>) – The coefficient of static fr… | |
+<li><p><strong>mu_d</strong> (<em>float</em>) – The coefficient of dynamic f… | |
+<li><p><strong>rho</strong> (<em>float</em>) – The density of the particle m… | |
+<li><p><strong>k_n</strong> (<em>float</em>) – The normal stiffness of the p… | |
+<li><p><strong>k_t</strong> (<em>float</em>) – The tangential stiffness of t… | |
+<li><p><strong>k_r</strong> (<em>float</em>) – The rolling stiffness of the … | |
+not used</em></p></li> | |
+<li><p><strong>gamma_n</strong> (<em>float</em>) – Particle-particle contact… | |
+<li><p><strong>gamma_t</strong> (<em>float</em>) – Particle-particle contact… | |
+<li><p><strong>gamma_r</strong> (<em>float</em>) – Particle-particle contact… | |
+not used</em></p></li> | |
+<li><p><strong>gamma_wn</strong> (<em>float</em>) – Wall-particle contact no… | |
+<li><p><strong>gamma_wt</strong> (<em>float</em>) – Wall-particle contact ta… | |
+<li><p><strong>capillaryCohesion</strong> (<em>int</em>) – Enable particle-p… | |
+interaction model (0=no (default), 1=yes)</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.defineWorldBoundaries"> | |
-<code class="descname">defineWorldBoundaries</code><span class="sig-paren">(</… | |
+<code class="sig-name descname">defineWorldBoundaries</code><span class="sig-p… | |
<dd><p>Set the boundaries of the world. Particles will only be able to interact | |
within this domain. With dynamic walls, allow space for expansions. | |
<em>Important</em>: The particle radii have to be set beforehand. The world | |
edges act as static walls.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>L</strong> (<em>numpy.array</em>) – The upper boundary of th… | |
-<li><strong>origo</strong> (<em>numpy.array</em>) – The lower boundary o… | |
-won’t work. Default = [0.0, 0.0, 0.0].</li> | |
-<li><strong>dx</strong> (<em>float</em>) – The cell width in any directi… | |
-(-1), the cell width is calculated to fit the largest particle.</li> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>L</strong> (<em>numpy.array</em>) – The upper boundary of the… | |
+<li><p><strong>origo</strong> (<em>numpy.array</em>) – The lower boundary of… | |
+won’t work. Default=[0.0, 0.0, 0.0].</p></li> | |
+<li><p><strong>dx</strong> (<em>float</em>) – The cell width in any directio… | |
+(-1), the cell width is calculated to fit the largest particle.</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.deleteAllParticles"> | |
-<code class="descname">deleteAllParticles</code><span class="sig-paren">(</spa… | |
+<code class="sig-name descname">deleteAllParticles</code><span class="sig-pare… | |
<dd><p>Deletes all particles in the simulation object.</p> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.deleteParticle"> | |
-<code class="descname">deleteParticle</code><span class="sig-paren">(</span><e… | |
-<dd><p>Delete particle(s) with index <code class="docutils literal"><span clas… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<code class="sig-name descname">deleteParticle</code><span class="sig-paren">(… | |
+<dd><p>Delete particle(s) with index <code class="docutils literal notranslate… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>i</strong> (<em>int</em><em>, </em><em>list</… | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.disableFluidPressureModulation"> | |
-<code class="descname">disableFluidPressureModulation</code><span class="sig-p… | |
+<code class="sig-name descname">disableFluidPressureModulation</code><span cla… | |
<dd><p>Set the parameters for the sine wave modulating the fluid pressures | |
at the top boundary to zero.</p> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.setFluidPressureM… | |
+<p>See also: <a class="reference internal" href="#sphere.sim.setFluidPressureM… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.disableTopWallNormalStressModulation"> | |
-<code class="descname">disableTopWallNormalStressModulation</code><span class=… | |
+<code class="sig-name descname">disableTopWallNormalStressModulation</code><sp… | |
<dd><p>Set the parameters for the sine wave modulating the normal stress | |
at the top dynamic wall to zero.</p> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.setTopWallNormalS… | |
+<p>See also: <a class="reference internal" href="#sphere.sim.setTopWallNormalS… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.dry"> | |
-<code class="descname">dry</code><span class="sig-paren">(</span><span class="… | |
+<code class="sig-name descname">dry</code><span class="sig-paren">(</span><spa… | |
<dd><p>Set the simulation to be dry (no fluids).</p> | |
-<p>See also <a class="reference internal" href="#sphere.sim.wet" title="sphere… | |
+<p>See also <a class="reference internal" href="#sphere.sim.wet" title="sphere… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.energy"> | |
-<code class="descname">energy</code><span class="sig-paren">(</span><em>method… | |
+<code class="sig-name descname">energy</code><span class="sig-paren">(</span><… | |
<dd><p>Calculates the sum of the energy components of all particles.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-for potential energy [J], ‘kin’ for kinetic energy [J], ‘rot… | |
-rotational energy [J], ‘shear’ for energy lost by friction, | |
-‘shearrate’ for the rate of frictional energy loss [W], ‘vis… | |
-viscous losses normal to the contact [J], ‘visc_n_rate’ for the ra… | |
-of viscous losses normal to the contact [W], and finally ‘bondpot’ | |
-for the potential energy stored in bonds [J]</td> | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>method</strong> (<em>str</em>) – The type o… | |
+for potential energy [J], ‘kin’ for kinetic energy [J], ‘rot’ for | |
+rotational energy [J], ‘shear’ for energy lost by friction, | |
+‘shearrate’ for the rate of frictional energy loss [W], ‘visc_n’ for | |
+viscous losses normal to the contact [J], ‘visc_n_rate’ for the rate | |
+of viscous losses normal to the contact [W], and finally ‘bondpot’ | |
+for the potential energy stored in bonds [J]</p> | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The value of the selected energy type</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.findAllAverageParticlePairAreas"> | |
-<code class="descname">findAllAverageParticlePairAreas</code><span class="sig-… | |
+<code class="sig-name descname">findAllAverageParticlePairAreas</code><span cl… | |
<dd><p>Finds the average area of an inter-particle contact. This | |
-function requires a prior call to <a class="reference internal" href="#sphere.… | |
-from the <code class="docutils literal"><span class="pre">self.pairs</span></c… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
+function requires a prior call to <a class="reference internal" href="#sphere.… | |
+from the <code class="docutils literal notranslate"><span class="pre">self.pai… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>Array of contact surface areas</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>array of floats</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.findAllContactSurfaceAreas"> | |
-<code class="descname">findAllContactSurfaceAreas</code><span class="sig-paren… | |
+<code class="sig-name descname">findAllContactSurfaceAreas</code><span class="… | |
<dd><p>Finds the contact surface area of an inter-particle contact. This | |
-function requires a prior call to <a class="reference internal" href="#sphere.… | |
-from the <code class="docutils literal"><span class="pre">self.pairs</span></c… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
+function requires a prior call to <a class="reference internal" href="#sphere.… | |
+from the <code class="docutils literal notranslate"><span class="pre">self.pai… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>Array of contact surface areas</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>array of floats</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.findContactStresses"> | |
-<code class="descname">findContactStresses</code><span class="sig-paren">(</sp… | |
+<code class="sig-name descname">findContactStresses</code><span class="sig-par… | |
<dd><p>Finds all particle-particle uniaxial normal stresses (by first calling | |
-<a class="reference internal" href="#sphere.sim.findNormalForces" title="spher… | |
+<a class="reference internal" href="#sphere.sim.findNormalForces" title="spher… | |
dividing the normal force magnitude with the average particle area | |
-(‘average’) or by the contact surface area (‘contact’)… | |
-<p>The result is saved in <code class="docutils literal"><span class="pre">sel… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.findNormalForces"… | |
+(‘average’) or by the contact surface area (‘contact’).</p> | |
+<p>The result is saved in <code class="docutils literal notranslate"><span cla… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>area</strong> (<em>str</em>) – Area to use:… | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.findNormalForces"… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.findCoordinationNumber"> | |
-<code class="descname">findCoordinationNumber</code><span class="sig-paren">(<… | |
+<code class="sig-name descname">findCoordinationNumber</code><span class="sig-… | |
<dd><p>Finds the coordination number (the average number of contacts per | |
-particle). Requires a previous call to <a class="reference internal" href="#sp… | |
-are stored in <code class="docutils literal"><span class="pre">self.coordinati… | |
+particle). Requires a previous call to <a class="reference internal" href="#sp… | |
+are stored in <code class="docutils literal notranslate"><span class="pre">sel… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.findHydraulicConductivities"> | |
-<code class="descname">findHydraulicConductivities</code><span class="sig-pare… | |
+<code class="sig-name descname">findHydraulicConductivities</code><span class=… | |
<dd><p>Calculates the hydrological conductivities from the Kozeny-Carman | |
relationship. These values are only relevant when the Darcy solver is | |
-used (<cite>self.cfd_solver = 1</cite>). The permeability pre-factor <cite>sel… | |
+used (<cite>self.cfd_solver=1</cite>). The permeability pre-factor <cite>self.… | |
and the assemblage porosities must be set beforehand. The former values | |
are set if a file from the <cite>output/</cite> folder is read using | |
<cite>self.readbin</cite>.</p> | |
t@@ -866,67 +769,64 @@ are set if a file from the <cite>output/</cite> folder i… | |
<dl class="method"> | |
<dt id="sphere.sim.findLoadedContacts"> | |
-<code class="descname">findLoadedContacts</code><span class="sig-paren">(</spa… | |
+<code class="sig-name descname">findLoadedContacts</code><span class="sig-pare… | |
<dd><p>Finds the indices of contact pairs where the contact stress magnitude | |
exceeds or is equal to a specified threshold value. This function calls | |
-<a class="reference internal" href="#sphere.sim.findContactStresses" title="sp… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<a class="reference internal" href="#sphere.sim.findContactStresses" title="sp… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>threshold</strong> (<em>float</em>) – Thres… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>Array of contact indices</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>array of ints</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.findMeanCoordinationNumber"> | |
-<code class="descname">findMeanCoordinationNumber</code><span class="sig-paren… | |
+<code class="sig-name descname">findMeanCoordinationNumber</code><span class="… | |
<dd><p>Returns the coordination number (the average number of contacts per | |
-particle). Requires a previous call to <a class="reference internal" href="#sp… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
+particle). Requires a previous call to <a class="reference internal" href="#sp… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The mean particle coordination number</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.findNormalForces"> | |
-<code class="descname">findNormalForces</code><span class="sig-paren">(</span>… | |
+<code class="sig-name descname">findNormalForces</code><span class="sig-paren"… | |
<dd><p>Finds all particle-particle overlaps (by first calling | |
-<a class="reference internal" href="#sphere.sim.findOverlaps" title="sphere.si… | |
-multiplying the overlaps with the elastic stiffness <code class="docutils lite… | |
-<p>The result is saved in <code class="docutils literal"><span class="pre">sel… | |
-<p>See also: <a class="reference internal" href="#sphere.sim.findOverlaps" tit… | |
+<a class="reference internal" href="#sphere.sim.findOverlaps" title="sphere.si… | |
+multiplying the overlaps with the elastic stiffness <code class="docutils lite… | |
+<p>The result is saved in <code class="docutils literal notranslate"><span cla… | |
+<p>See also: <a class="reference internal" href="#sphere.sim.findOverlaps" tit… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.findOverlaps"> | |
-<code class="descname">findOverlaps</code><span class="sig-paren">(</span><spa… | |
+<code class="sig-name descname">findOverlaps</code><span class="sig-paren">(</… | |
<dd><p>Find all particle-particle overlaps by a n^2 contact search, which is | |
done in C++. The particle pair indexes and the distance of the overlaps | |
-is saved in the object itself as the <code class="docutils literal"><span clas… | |
+is saved in the object itself as the <code class="docutils literal notranslate… | |
members.</p> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.findNormalForces"… | |
+<p>See also: <a class="reference internal" href="#sphere.sim.findNormalForces"… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.findPermeabilities"> | |
-<code class="descname">findPermeabilities</code><span class="sig-paren">(</spa… | |
+<code class="sig-name descname">findPermeabilities</code><span class="sig-pare… | |
<dd><p>Calculates the hydrological permeabilities from the Kozeny-Carman | |
relationship. These values are only relevant when the Darcy solver is | |
-used (<cite>self.cfd_solver = 1</cite>). The permeability pre-factor <cite>sel… | |
+used (<cite>self.cfd_solver=1</cite>). The permeability pre-factor <cite>self.… | |
and the assemblage porosities must be set beforehand. The former values | |
are set if a file from the <cite>output/</cite> folder is read using | |
<cite>self.readbin</cite>.</p> | |
t@@ -934,92 +834,79 @@ are set if a file from the <cite>output/</cite> folder i… | |
<dl class="method"> | |
<dt id="sphere.sim.forcechains"> | |
-<code class="descname">forcechains</code><span class="sig-paren">(</span><em>l… | |
+<code class="sig-name descname">forcechains</code><span class="sig-paren">(</s… | |
<dd><p>Visualizes the force chains in the system from the magnitude of the | |
normal contact forces, and produces an image of them. Warning: Will | |
segfault if no contacts are found.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>lc</strong> (<em>float</em>) – Lower cutoff of contact force… | |
-visualized</li> | |
-<li><strong>uc</strong> (<em>float</em>) – Upper cutoff of contact force… | |
-visualized with this value</li> | |
-<li><strong>outformat</strong> (<em>str</em>) – Format of output image. … | |
-‘interactive’, ‘png’, ‘epslatex’, ‘e… | |
-<li><strong>disp</strong> (<em>str</em>) – Display forcechains in ‘… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>lc</strong> (<em>float</em>) – Lower cutoff of contact forces… | |
+visualized</p></li> | |
+<li><p><strong>uc</strong> (<em>float</em>) – Upper cutoff of contact forces… | |
+visualized with this value</p></li> | |
+<li><p><strong>outformat</strong> (<em>str</em>) – Format of output image. P… | |
+‘interactive’, ‘png’, ‘epslatex’, ‘epslatex-color’</p></li> | |
+<li><p><strong>disp</strong> (<em>str</em>) – Display forcechains in ‘2d�… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.forcechainsRose"> | |
-<code class="descname">forcechainsRose</code><span class="sig-paren">(</span><… | |
+<code class="sig-name descname">forcechainsRose</code><span class="sig-paren">… | |
<dd><p>Visualize trend and plunge angles of the strongest force chains in a | |
rose plot. The plots are saved in the current folder with the name | |
-‘fc-<simulation id>-rose.pdf’.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>lower_limit</strong> (<em>float</em>) – Do not visualize for… | |
-contact force magnitude, in ]0;1[</li> | |
-<li><strong>graphics_format</strong> (<em>str</em>) – Save the plot in t… | |
+‘fc-<simulation id>-rose.pdf’.</p> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>lower_limit</strong> (<em>float</em>) – Do not visualize forc… | |
+contact force magnitude, in ]0;1[</p></li> | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Save the plot in th… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.frictionalEnergy"> | |
-<code class="descname">frictionalEnergy</code><span class="sig-paren">(</span>… | |
+<code class="sig-name descname">frictionalEnergy</code><span class="sig-paren"… | |
<dd><p>Returns the frictional dissipated energy for a particle.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em>) – Particle inde… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The frictional energy lost of the particle [J]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.generateBimodalRadii"> | |
-<code class="descname">generateBimodalRadii</code><span class="sig-paren">(</s… | |
+<code class="sig-name descname">generateBimodalRadii</code><span class="sig-pa… | |
<dd><p>Draw random radii from two distinct sizes.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>r_small</strong> (<em>float</em>) – Radii of small populatio… | |
-<li><strong>r_large</strong> (<em>float</em>) – Radii of large populatio… | |
-<li><strong>ratio</strong> (<em>float</em>) – Approximate volumetric rat… | |
-populations (large/small).</li> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>r_small</strong> (<em>float</em>) – Radii of small population… | |
+<li><p><strong>r_large</strong> (<em>float</em>) – Radii of large population… | |
+<li><p><strong>ratio</strong> (<em>float</em>) – Approximate volumetric rati… | |
+populations (large/small).</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.generateRadii" ti… | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.generateRadii" ti… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.generateRadii"> | |
-<code class="descname">generateRadii</code><span class="sig-paren">(</span><em… | |
+<code class="sig-name descname">generateRadii</code><span class="sig-paren">(<… | |
<dd><p>Draw random particle radii from a selected probability distribution. | |
The larger the variance of radii is, the slower the computations will | |
run. The reason is two-fold: The smallest particle dictates the time | |
t@@ -1027,50 +914,45 @@ step length, where smaller particles cause shorter time… | |
same time, the largest particle determines the sorting cell size, where | |
larger particles cause larger cells. Larger cells are likely to contain | |
more particles, causing more contact checks.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>psd</strong> (<em>str</em>) – The particle side distribution… | |
-<code class="docutils literal"><span class="pre">logn</span></code>, which is … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>psd</strong> (<em>str</em>) – The particle side distribution.… | |
+<code class="docutils literal notranslate"><span class="pre">logn</span></code… | |
for approximating well-sorted, coarse sediments. The other possible | |
-value is <code class="docutils literal"><span class="pre">uni</span></code>, w… | |
-<code class="docutils literal"><span class="pre">mean</span> <span class="pre"… | |
-<li><strong>mean</strong> (<em>float</em>) – The mean radius [m] (defaul… | |
-<li><strong>variance</strong> (<em>float</em>) – The variance in the pro… | |
-[m].</li> | |
+value is <code class="docutils literal notranslate"><span class="pre">uni</spa… | |
+<code class="docutils literal notranslate"><span class="pre">mean</span> <span… | |
+<li><p><strong>mean</strong> (<em>float</em>) – The mean radius [m] (default… | |
+<li><p><strong>variance</strong> (<em>float</em>) – The variance in the prob… | |
+[m].</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.generateBimodalRa… | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.generateBimodalRa… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.hydraulicConductivity"> | |
-<code class="descname">hydraulicConductivity</code><span class="sig-paren">(</… | |
+<code class="sig-name descname">hydraulicConductivity</code><span class="sig-p… | |
<dd><p>Determine the hydraulic conductivity (K) [m/s] from the permeability | |
prefactor and a chosen porosity. This value is stored in <cite>self.K_c</cite… | |
This function only works for the Darcy solver (<cite>self.cfd_solver == 1</cit… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>phi</strong> (<em>float</em>) – The porosit… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The hydraulic conductivity [m/s]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.hydraulicDiffusivity"> | |
-<code class="descname">hydraulicDiffusivity</code><span class="sig-paren">(</s… | |
+<code class="sig-name descname">hydraulicDiffusivity</code><span class="sig-pa… | |
<dd><p>Determine the hydraulic diffusivity (D) [m*m/s]. The result is stored in | |
<cite>self.D</cite>. This function only works for the Darcy solver | |
(<cite>self.cfd_solver[0] == 1</cite>)</p> | |
t@@ -1078,7 +960,7 @@ This function only works for the Darcy solver (<cite>self… | |
<dl class="method"> | |
<dt id="sphere.sim.hydraulicPermeability"> | |
-<code class="descname">hydraulicPermeability</code><span class="sig-paren">(</… | |
+<code class="sig-name descname">hydraulicPermeability</code><span class="sig-p… | |
<dd><p>Determine the hydraulic permeability (k) [m*m] from the Kozeny-Carman | |
relationship, using the permeability prefactor (<cite>self.k_c</cite>), and the | |
range of valid porosities set in <cite>src/darcy.cuh</cite>, by default in the | |
t@@ -1089,239 +971,207 @@ range 0.1 to 0.9.</p> | |
<dl class="method"> | |
<dt id="sphere.sim.id"> | |
-<code class="descname">id</code><span class="sig-paren">(</span><em>sid=''</em… | |
+<code class="sig-name descname">id</code><span class="sig-paren">(</span><em c… | |
<dd><p>Returns or sets the simulation id/name, which is used to identify | |
simulation files in the output folders.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-simulation id will be returned.</td> | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>sid</strong> (<em>str</em>) – The desired s… | |
+simulation id will be returned.</p> | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The current simulation id if no new value is set.</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>str</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.idAppend"> | |
-<code class="descname">idAppend</code><span class="sig-paren">(</span><em>stri… | |
+<code class="sig-name descname">idAppend</code><span class="sig-paren">(</span… | |
<dd><p>Append a string to the simulation id/name, which is used to identify | |
simulation files in the output folders.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>string</strong> (<em>str</em>) – The string… | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.inertiaParameterPlanarShear"> | |
-<code class="descname">inertiaParameterPlanarShear</code><span class="sig-pare… | |
+<code class="sig-name descname">inertiaParameterPlanarShear</code><span class=… | |
<dd><p>Returns the value of the inertia parameter $I$ during planar shear | |
proposed by GDR-MiDi 2004.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.shearStrainRate" … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The value of $I$</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>float</p> | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.shearStrainRate" … | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.initFluid"> | |
-<code class="descname">initFluid</code><span class="sig-paren">(</span><em>mu=… | |
+<code class="sig-name descname">initFluid</code><span class="sig-paren">(</spa… | |
<dd><p>Initialize the fluid arrays and the fluid viscosity. The default value | |
-of <code class="docutils literal"><span class="pre">mu</span></code> equals th… | |
+of <code class="docutils literal notranslate"><span class="pre">mu</span></cod… | |
The value for water at 0 degrees Celcius is 17.87e-4 kg/(m*s).</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>mu</strong> (<em>float</em>) – The fluid dynamic viscosity [… | |
-<li><strong>rho</strong> (<em>float</em>) – The fluid density [kg/(m^3)]… | |
-<li><strong>p</strong> – The hydraulic pressure to initialize the cells … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>mu</strong> (<em>float</em>) – The fluid dynamic viscosity [k… | |
+<li><p><strong>rho</strong> (<em>float</em>) – The fluid density [kg/(m^3)]<… | |
+<li><p><strong>p</strong> – The hydraulic pressure to initialize the cells t… | |
parameter <cite>hydrostatic</cite> is set to <cite>True</cite>, this value wil… | |
-the fluid cells at the top</li> | |
-<li><strong>hydrostatic</strong> (<em>bool</em>) – Initialize the fluid … | |
+the fluid cells at the top</p></li> | |
+<li><p><strong>hydrostatic</strong> (<em>bool</em>) – Initialize the fluid p… | |
pressure distribution. A pressure gradient with depth is only | |
-created if a gravitational acceleration along <img class="math" src="_images/m… | |
-has been specified</li> | |
-<li><strong>cfd_solver</strong> (<em>int</em>) – Solver to use for the c… | |
-Accepted values: 0 (Navier Stokes, default) and 1 (Darcy).</li> | |
+created if a gravitational acceleration along <img class="math" src="_images/m… | |
+has been specified</p></li> | |
+<li><p><strong>cfd_solver</strong> (<em>int</em>) – Solver to use for the co… | |
+Accepted values: 0 (Navier Stokes, default) and 1 (Darcy).</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.initGrid"> | |
-<code class="descname">initGrid</code><span class="sig-paren">(</span><em>dx=-… | |
+<code class="sig-name descname">initGrid</code><span class="sig-paren">(</span… | |
<dd><p>Initialize grid suitable for the particle positions set previously. | |
The margin parameter adjusts the distance (in no. of max. radii) | |
from the particle boundaries. | |
<em>Important</em>: The particle radii have to be set beforehand if the cell | |
-width isn’t specified by <cite>dx</cite>.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-(-1), the cell width is calculated to fit the largest particle.</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+width isn’t specified by <cite>dx</cite>.</p> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>dx</strong> (<em>float</em>) – The cell wid… | |
+(-1), the cell width is calculated to fit the largest particle.</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.initGridAndWorldsize"> | |
-<code class="descname">initGridAndWorldsize</code><span class="sig-paren">(</s… | |
+<code class="sig-name descname">initGridAndWorldsize</code><span class="sig-pa… | |
<dd><p>Initialize grid suitable for the particle positions set previously. | |
The margin parameter adjusts the distance (in no. of max. radii) | |
from the particle boundaries. If the upper wall is dynamic, it is placed | |
at the top boundary of the world.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>margin</strong> (<em>float</em>) – Distance… | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.initGridPos"> | |
-<code class="descname">initGridPos</code><span class="sig-paren">(</span><em>g… | |
+<code class="sig-name descname">initGridPos</code><span class="sig-paren">(</s… | |
<dd><p>Initialize particle positions in loose, cubic configuration. | |
-<code class="docutils literal"><span class="pre">gridnum</span></code> is the … | |
+<code class="docutils literal notranslate"><span class="pre">gridnum</span></c… | |
<em>Important</em>: The particle radii and the boundary conditions (periodic or | |
not) for the x and y boundaries have to be set beforehand.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>gridnum</strong> (<em>numpy.array</em>) – T… | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.initRandomGridPos"> | |
-<code class="descname">initRandomGridPos</code><span class="sig-paren">(</span… | |
+<code class="sig-name descname">initRandomGridPos</code><span class="sig-paren… | |
<dd><p>Initialize particle positions in loose, cubic configuration with some | |
-variance. <code class="docutils literal"><span class="pre">gridnum</span></cod… | |
+variance. <code class="docutils literal notranslate"><span class="pre">gridnum… | |
directions. <em>Important</em>: The particle radii and the boundary conditions | |
(periodic or not) for the x and y boundaries have to be set beforehand. | |
The world size and grid height (in the z direction) is readjusted to fit | |
the particle positions.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>gridnum</strong> (<em>numpy.array</em>) – The number of part… | |
-<li><strong>padding</strong> (<em>float</em>) – Increase distance betwee… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>gridnum</strong> (<em>numpy.array</em>) – The number of parti… | |
+<li><p><strong>padding</strong> (<em>float</em>) – Increase distance between… | |
directions with this multiplier. Large values create more random | |
-packings.</li> | |
+packings.</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.initRandomPos"> | |
-<code class="descname">initRandomPos</code><span class="sig-paren">(</span><em… | |
+<code class="sig-name descname">initRandomPos</code><span class="sig-paren">(<… | |
<dd><p>Initialize particle positions in completely random configuration. Radii | |
<em>must</em> be set beforehand. If the x and y boundaries are set as periodic, | |
the particle centers will be placed all the way to the edge. On regular, | |
non-periodic boundaries, the particles are restrained at the edges to | |
make space for their radii within the bounding box.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>gridnum</strong> (<em>numpy.array</em>) – The number of sort… | |
-(default = [12, 12, 36])</li> | |
-<li><strong>dx</strong> (<em>float</em>) – The cell width in any directi… | |
-(-1), the cell width is calculated to fit the largest particle.</li> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>gridnum</strong> (<em>numpy.array</em>) – The number of sorti… | |
+(default=[12, 12, 36])</p></li> | |
+<li><p><strong>dx</strong> (<em>float</em>) – The cell width in any directio… | |
+(-1), the cell width is calculated to fit the largest particle.</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.initTemporal"> | |
-<code class="descname">initTemporal</code><span class="sig-paren">(</span><em>… | |
+<code class="sig-name descname">initTemporal</code><span class="sig-paren">(</… | |
<dd><p>Set temporal parameters for the simulation. <em>Important</em>: Particl… | |
physical parameters, and the optional fluid grid need to be set prior to | |
-these if the computational time step (dt) isn’t set explicitly. If the | |
+these if the computational time step (dt) isn’t set explicitly. If the | |
parameter <cite>dt</cite> is the default value (-1), the function will estimat… | |
best time step length. The value of the computational time step for the | |
DEM is checked for stability in the CFD solution if fluid simulation is | |
included.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>total</strong> (<em>float</em>) – The time at which to end t… | |
-<li><strong>current</strong> – The current time [s] (default = 0.0 s)</l… | |
-<li><strong>file_dt</strong> – The interval between output files [s] (de… | |
-<li><strong>dt</strong> – The computational time step length [s]</li> | |
-<li><strong>epsilon</strong> (<em>float</em>) – Time step multiplier (de… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>total</strong> (<em>float</em>) – The time at which to end th… | |
+<li><p><strong>current</strong> – The current time [s] (default=0.0 s)</p></… | |
+<li><p><strong>file_dt</strong> – The interval between output files [s] (def… | |
+<li><p><strong>dt</strong> – The computational time step length [s]</p></li> | |
+<li><p><strong>epsilon</strong> (<em>float</em>) – Time step multiplier (def… | |
</ul> | |
-</td> | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Step_count:</th><td class=… | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+<dt class="field-even">Step_count</dt> | |
+<dd class="field-even"><p>The number of the first output file (default=0)</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.kineticEnergy"> | |
-<code class="descname">kineticEnergy</code><span class="sig-paren">(</span><em… | |
+<code class="sig-name descname">kineticEnergy</code><span class="sig-paren">(<… | |
<dd><p>Returns the (linear) kinetic energy for a particle.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em>) – Particle inde… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The kinetic energy of the particle [J]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.largestFluidTimeStep"> | |
-<code class="descname">largestFluidTimeStep</code><span class="sig-paren">(</s… | |
+<code class="sig-name descname">largestFluidTimeStep</code><span class="sig-pa… | |
<dd><p>Finds and returns the largest time step in the fluid phase by von | |
Neumann and Courant-Friedrichs-Lewy analysis given the current | |
velocities. This ensures stability in the diffusive and advective parts | |
t@@ -1329,1065 +1179,939 @@ of the momentum equation.</p> | |
<p>The value of the time step decreases with increasing fluid viscosity | |
(<cite>self.mu</cite>), and increases with fluid cell size (<cite>self.L/self.… | |
<p>and fluid velocities (<cite>self.v_f</cite>)</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>safety</strong> (<em>float</em>) – Safety factor which is mu… | |
-step.</li> | |
-<li><strong>v_max</strong> (<em>float</em>) – The largest anticipated ab… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>safety</strong> (<em>float</em>) – Safety factor which is mul… | |
+step.</p></li> | |
+<li><p><strong>v_max</strong> (<em>float</em>) – The largest anticipated abs… | |
</ul> | |
-</td> | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</td> | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The largest timestep stable for the current fluid st… | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.largestMass"> | |
-<code class="descname">largestMass</code><span class="sig-paren">(</span><span… | |
+<code class="sig-name descname">largestMass</code><span class="sig-paren">(</s… | |
<dd><p>Returns the mass of the heaviest particle.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em>) – Particle inde… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The mass of the particle [kg]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.mass"> | |
-<code class="descname">mass</code><span class="sig-paren">(</span><em>idx</em>… | |
+<code class="sig-name descname">mass</code><span class="sig-paren">(</span><em… | |
<dd><p>Returns the mass of a particle.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em>) – Particle inde… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The mass of the particle [kg]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.momentOfInertia"> | |
-<code class="descname">momentOfInertia</code><span class="sig-paren">(</span><… | |
+<code class="sig-name descname">momentOfInertia</code><span class="sig-paren">… | |
<dd><p>Returns the moment of inertia of a particle.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em>) – Particle inde… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The moment of inertia [kg*m^2]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.momentum"> | |
-<code class="descname">momentum</code><span class="sig-paren">(</span><em>idx<… | |
+<code class="sig-name descname">momentum</code><span class="sig-paren">(</span… | |
<dd><p>Returns the momentum (m*v) of a particle.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em>) – The particle … | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The particle momentum [N*s]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>numpy.array</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.normalBoundariesXY"> | |
-<code class="descname">normalBoundariesXY</code><span class="sig-paren">(</spa… | |
+<code class="sig-name descname">normalBoundariesXY</code><span class="sig-pare… | |
<dd><p>Set the x and y boundary conditions to be static walls.</p> | |
-<p>See also <a class="reference internal" href="#sphere.sim.periodicBoundaries… | |
-<a class="reference internal" href="#sphere.sim.periodicBoundariesX" title="sp… | |
+<p>See also <a class="reference internal" href="#sphere.sim.periodicBoundaries… | |
+<a class="reference internal" href="#sphere.sim.periodicBoundariesX" title="sp… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.periodicBoundariesX"> | |
-<code class="descname">periodicBoundariesX</code><span class="sig-paren">(</sp… | |
+<code class="sig-name descname">periodicBoundariesX</code><span class="sig-par… | |
<dd><p>Set the x boundary conditions to be periodic.</p> | |
-<p>See also <a class="reference internal" href="#sphere.sim.normalBoundariesXY… | |
-<a class="reference internal" href="#sphere.sim.periodicBoundariesXY" title="s… | |
+<p>See also <a class="reference internal" href="#sphere.sim.normalBoundariesXY… | |
+<a class="reference internal" href="#sphere.sim.periodicBoundariesXY" title="s… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.periodicBoundariesXY"> | |
-<code class="descname">periodicBoundariesXY</code><span class="sig-paren">(</s… | |
+<code class="sig-name descname">periodicBoundariesXY</code><span class="sig-pa… | |
<dd><p>Set the x and y boundary conditions to be periodic.</p> | |
-<p>See also <a class="reference internal" href="#sphere.sim.normalBoundariesXY… | |
-<a class="reference internal" href="#sphere.sim.periodicBoundariesX" title="sp… | |
+<p>See also <a class="reference internal" href="#sphere.sim.normalBoundariesXY… | |
+<a class="reference internal" href="#sphere.sim.periodicBoundariesX" title="sp… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.plotContacts"> | |
-<code class="descname">plotContacts</code><span class="sig-paren">(</span><em>… | |
+<code class="sig-name descname">plotContacts</code><span class="sig-paren">(</… | |
<dd><p>Plot current contact orientations on polar plot</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>lower_limit</strong> (<em>float</em>) – Do not visualize for… | |
-contact force magnitude, in ]0;1[</li> | |
-<li><strong>upper_limit</strong> (<em>float</em>) – Visualize force chai… | |
-contact force magnitude but cap color bar range, in ]0;1[</li> | |
-<li><strong>graphics_format</strong> (<em>str</em>) – Save the plot in t… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>lower_limit</strong> (<em>float</em>) – Do not visualize forc… | |
+contact force magnitude, in ]0;1[</p></li> | |
+<li><p><strong>upper_limit</strong> (<em>float</em>) – Visualize force chain… | |
+contact force magnitude but cap color bar range, in ]0;1[</p></li> | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Save the plot in th… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.plotConvergence"> | |
-<code class="descname">plotConvergence</code><span class="sig-paren">(</span><… | |
+<code class="sig-name descname">plotConvergence</code><span class="sig-paren">… | |
<dd><p>Plot the convergence evolution in the CFD solver. The plot is saved | |
in the output folder with the file name | |
-‘<simulation id>-conv.<graphics_format>’.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.convergence" titl… | |
+‘<simulation id>-conv.<graphics_format>’.</p> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Save the plot in th… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Print output filename afte… | |
+</ul> | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.convergence" titl… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.plotFluidDiffAdvPresZ"> | |
-<code class="descname">plotFluidDiffAdvPresZ</code><span class="sig-paren">(</… | |
+<code class="sig-name descname">plotFluidDiffAdvPresZ</code><span class="sig-p… | |
<dd><p>Compare contributions to the velocity from diffusion and advection, | |
-assuming the flow is 1D along the z-axis, phi = 1, and dphi = 0. This | |
+assuming the flow is 1D along the z-axis, phi=1, and dphi=0. This | |
solution is analog to the predicted velocity and not constrained by the | |
conservation of mass. The plot is saved in the output folder with the | |
-name format ‘<simulation id>-diff_adv-t=<current time>s-mu=&… | |
-viscosity>Pa-s.<graphics_format>’.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+name format ‘<simulation id>-diff_adv-t=<current time>s-mu=<d… | |
+viscosity>Pa-s.<graphics_format>’.</p> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Save the plot in th… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Print output filename afte… | |
+</ul> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.plotFluidPressuresY"> | |
-<code class="descname">plotFluidPressuresY</code><span class="sig-paren">(</sp… | |
+<code class="sig-name descname">plotFluidPressuresY</code><span class="sig-par… | |
<dd><p>Plot fluid pressures in a plane normal to the second axis. | |
The plot is saved in the current folder with the format | |
-‘p_f-<simulation id>-y<y value>.<graphics_format>̵… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>y</strong> (<em>int</em>) – Plot pressures in fluid cells wi… | |
-this value is -1, the center y position is used.</li> | |
-<li><strong>graphics_format</strong> (<em>str</em>) – Save the plot in t… | |
+‘p_f-<simulation id>-y<y value>.<graphics_format>’.</p> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>y</strong> (<em>int</em>) – Plot pressures in fluid cells wit… | |
+this value is -1, the center y position is used.</p></li> | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Save the plot in th… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Print output filename afte… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.writeFluidVTK" ti… | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.writeFluidVTK" ti… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.plotFluidPressuresZ"> | |
-<code class="descname">plotFluidPressuresZ</code><span class="sig-paren">(</sp… | |
+<code class="sig-name descname">plotFluidPressuresZ</code><span class="sig-par… | |
<dd><p>Plot fluid pressures in a plane normal to the third axis. | |
The plot is saved in the current folder with the format | |
-‘p_f-<simulation id>-z<z value>.<graphics_format>̵… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>z</strong> (<em>int</em>) – Plot pressures in fluid cells wi… | |
-this value is -1, the center z position is used.</li> | |
-<li><strong>graphics_format</strong> (<em>str</em>) – Save the plot in t… | |
+‘p_f-<simulation id>-z<z value>.<graphics_format>’.</p> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>z</strong> (<em>int</em>) – Plot pressures in fluid cells wit… | |
+this value is -1, the center z position is used.</p></li> | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Save the plot in th… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Print output filename afte… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.writeFluidVTK" ti… | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.writeFluidVTK" ti… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.plotFluidVelocitiesY"> | |
-<code class="descname">plotFluidVelocitiesY</code><span class="sig-paren">(</s… | |
+<code class="sig-name descname">plotFluidVelocitiesY</code><span class="sig-pa… | |
<dd><p>Plot fluid velocities in a plane normal to the second axis. | |
The plot is saved in the current folder with the format | |
-‘v_f-<simulation id>-z<z value>.<graphics_format>̵… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>y</strong> (<em>int</em>) – Plot velocities in fluid cells w… | |
-this value is -1, the center y position is used.</li> | |
-<li><strong>graphics_format</strong> (<em>str</em>) – Save the plot in t… | |
+‘v_f-<simulation id>-z<z value>.<graphics_format>’.</p> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>y</strong> (<em>int</em>) – Plot velocities in fluid cells wi… | |
+this value is -1, the center y position is used.</p></li> | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Save the plot in th… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Print output filename afte… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.writeFluidVTK" ti… | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.writeFluidVTK" ti… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.plotFluidVelocitiesZ"> | |
-<code class="descname">plotFluidVelocitiesZ</code><span class="sig-paren">(</s… | |
+<code class="sig-name descname">plotFluidVelocitiesZ</code><span class="sig-pa… | |
<dd><p>Plot fluid velocities in a plane normal to the third axis. | |
The plot is saved in the current folder with the format | |
-‘v_f-<simulation id>-z<z value>.<graphics_format>̵… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>z</strong> (<em>int</em>) – Plot velocities in fluid cells w… | |
-this value is -1, the center z position is used.</li> | |
-<li><strong>graphics_format</strong> (<em>str</em>) – Save the plot in t… | |
+‘v_f-<simulation id>-z<z value>.<graphics_format>’.</p> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>z</strong> (<em>int</em>) – Plot velocities in fluid cells wi… | |
+this value is -1, the center z position is used.</p></li> | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Save the plot in th… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Print output filename afte… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.writeFluidVTK" ti… | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.writeFluidVTK" ti… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.plotLoadCurve"> | |
-<code class="descname">plotLoadCurve</code><span class="sig-paren">(</span><em… | |
+<code class="sig-name descname">plotLoadCurve</code><span class="sig-paren">(<… | |
<dd><p>Plot the load curve (log time vs. upper wall movement). The plot is | |
saved in the current folder with the file name | |
-‘<simulation id>-loadcurve.<graphics_format>’. | |
+‘<simulation id>-loadcurve.<graphics_format>’. | |
The consolidation coefficient calculations are done on the base of | |
-Bowles 1992, p. 129–139, using the “Casagrande” method. | |
+Bowles 1992, p. 129–139, using the “Casagrande” method. | |
It is assumed that the consolidation has stopped at the end of the | |
simulation (i.e. flat curve).</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Save the plot in th… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Print output filename afte… | |
+</ul> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.plotPrescribedFluidPressures"> | |
-<code class="descname">plotPrescribedFluidPressures</code><span class="sig-par… | |
+<code class="sig-name descname">plotPrescribedFluidPressures</code><span class… | |
<dd><p>Plot the prescribed fluid pressures through time that may be | |
modulated through the class parameters p_mod_A, p_mod_f, and p_mod_phi. | |
The plot is saved in the output folder with the file name | |
-‘<simulation id>-pres.<graphics_format>’.</p> | |
+‘<simulation id>-pres.<graphics_format>’.</p> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.plotSinFunction"> | |
-<code class="descname">plotSinFunction</code><span class="sig-paren">(</span><… | |
+<code class="sig-name descname">plotSinFunction</code><span class="sig-paren">… | |
<dd><p>Plot the values of a sinusoidal modulated base value. Saves the output | |
as a plot in the current folder. | |
The time values will range from <cite>self.time_current</cite> to | |
<cite>self.time_total</cite>.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>baseval</strong> (<em>float</em>) – The center value which t… | |
-modulating</li> | |
-<li><strong>A</strong> (<em>float</em>) – The fluctuation amplitude</li> | |
-<li><strong>phi</strong> (<em>float</em>) – The phase shift [s]</li> | |
-<li><strong>xlabel</strong> (<em>str</em>) – The label for the x axis</l… | |
-<li><strong>ylabel</strong> (<em>str</em>) – The label for the y axis</l… | |
-<li><strong>plotstyle</strong> (<em>str</em>) – Matplotlib-string for sp… | |
-<li><strong>outformat</strong> (<em>str</em>) – File format of the outpu… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>baseval</strong> (<em>float</em>) – The center value which th… | |
+modulating</p></li> | |
+<li><p><strong>A</strong> (<em>float</em>) – The fluctuation amplitude</p></… | |
+<li><p><strong>phi</strong> (<em>float</em>) – The phase shift [s]</p></li> | |
+<li><p><strong>xlabel</strong> (<em>str</em>) – The label for the x axis</p>… | |
+<li><p><strong>ylabel</strong> (<em>str</em>) – The label for the y axis</p>… | |
+<li><p><strong>plotstyle</strong> (<em>str</em>) – Matplotlib-string for spe… | |
+<li><p><strong>outformat</strong> (<em>str</em>) – File format of the output… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Print output filename afte… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.porosities"> | |
-<code class="descname">porosities</code><span class="sig-paren">(</span><em>gr… | |
+<code class="sig-name descname">porosities</code><span class="sig-paren">(</sp… | |
<dd><p>Plot the averaged porosities with depth. The plot is saved in the format | |
-‘<simulation id>-porosity.<graphics_format>’.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>graphics_format</strong> (<em>str</em>) – Save the plot in t… | |
-<li><strong>zslices</strong> (<em>int</em>) – The number of points along… | |
-the porosity in</li> | |
+‘<simulation id>-porosity.<graphics_format>’.</p> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Save the plot in th… | |
+<li><p><strong>zslices</strong> (<em>int</em>) – The number of points along … | |
+the porosity in</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.porosity"> | |
-<code class="descname">porosity</code><span class="sig-paren">(</span><em>slic… | |
+<code class="sig-name descname">porosity</code><span class="sig-paren">(</span… | |
<dd><p>Calculates the porosity as a function of depth, by averaging values in | |
horizontal slabs. Returns porosity values and their corresponding depth. | |
-The values are calculated using the external <code class="docutils literal"><s… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>slices</strong> (<em>int</em>) – The number of vertical slab… | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show the file name of the… | |
-disk</li> | |
+The values are calculated using the external <code class="docutils literal not… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>slices</strong> (<em>int</em>) – The number of vertical slabs… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show the file name of the … | |
+disk</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</td> | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>A 2d array of depths and their averaged porosities</… | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>numpy.array</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.randomBondPairs"> | |
-<code class="descname">randomBondPairs</code><span class="sig-paren">(</span><… | |
+<code class="sig-name descname">randomBondPairs</code><span class="sig-paren">… | |
<dd><p>Bond an amount of particles in two-particle clusters. The particles | |
should be initialized beforehand. Note: The actual number of bonds is | |
likely to be somewhat smaller than specified, due to the random | |
selection algorithm.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>ratio</strong> (<em>float</em>) – The amount of particles to… | |
-<li><strong>spacing</strong> (<em>float</em>) – The distance relative to… | |
-particles, neg. values denote an overlap. Values in ]0.0,inf[.</li> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>ratio</strong> (<em>float</em>) – The amount of particles to … | |
+<li><p><strong>spacing</strong> (<em>float</em>) – The distance relative to … | |
+particles, neg. values denote an overlap. Values in ]0.0,inf[.</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.readTime"> | |
-<code class="descname">readTime</code><span class="sig-paren">(</span><em>time… | |
+<code class="sig-name descname">readTime</code><span class="sig-paren">(</span… | |
<dd><p>Read the output file most closely corresponding to the time given as an | |
argument.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
-<a class="reference internal" href="#sphere.sim.readstep" title="sphere.sim.re… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>time</strong> (<em>float</em>) – The desire… | |
+</dd> | |
+</dl> | |
+<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
+<a class="reference internal" href="#sphere.sim.readstep" title="sphere.sim.re… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.readbin"> | |
-<code class="descname">readbin</code><span class="sig-paren">(</span><em>targe… | |
-<dd><p>Reads a target <code class="docutils literal"><span class="pre">sphere<… | |
-<p>See also <a class="reference internal" href="#sphere.sim.writebin" title="s… | |
-<a class="reference internal" href="#sphere.sim.readsecond" title="sphere.sim.… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>targetbin</strong> (<em>str</em>) – The path to the binary <… | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informati… | |
-<li><strong>bonds</strong> (<em>bool</em>) – The input file contains bon… | |
-This parameter should be true for all recent <code class="docutils literal"><s… | |
-<li><strong>sigma0mod</strong> (<em>bool</em>) – The input file contains… | |
-stresses at the top wall (default = True). This parameter should be | |
-true for all recent <code class="docutils literal"><span class="pre">sphere</s… | |
-<li><strong>esysparticle</strong> (<em>bool</em>) – Stop reading the fil… | |
+<code class="sig-name descname">readbin</code><span class="sig-paren">(</span>… | |
+<dd><p>Reads a target <code class="docutils literal notranslate"><span class="… | |
+<p>See also <a class="reference internal" href="#sphere.sim.writebin" title="s… | |
+<a class="reference internal" href="#sphere.sim.readsecond" title="sphere.sim.… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>targetbin</strong> (<em>str</em>) – The path to the binary <c… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informatio… | |
+<li><p><strong>bonds</strong> (<em>bool</em>) – The input file contains bond… | |
+This parameter should be true for all recent <code class="docutils literal not… | |
+<li><p><strong>sigma0mod</strong> (<em>bool</em>) – The input file contains … | |
+stresses at the top wall (default=True). This parameter should be | |
+true for all recent <code class="docutils literal notranslate"><span class="pr… | |
+<li><p><strong>esysparticle</strong> (<em>bool</em>) – Stop reading the file… | |
which is useful for reading output files from other DEM programs. | |
-(default = False)</li> | |
+(default=False)</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.readfirst"> | |
-<code class="descname">readfirst</code><span class="sig-paren">(</span><em>ver… | |
-<dd><p>Read the first output file from the <code class="docutils literal"><spa… | |
-to the object simulation id (<code class="docutils literal"><span class="pre">… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
-<a class="reference internal" href="#sphere.sim.readstep" title="sphere.sim.re… | |
+<code class="sig-name descname">readfirst</code><span class="sig-paren">(</spa… | |
+<dd><p>Read the first output file from the <code class="docutils literal notra… | |
+to the object simulation id (<code class="docutils literal notranslate"><span … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>verbose</strong> (<em>bool</em>) – Display … | |
+</dd> | |
+</dl> | |
+<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
+<a class="reference internal" href="#sphere.sim.readstep" title="sphere.sim.re… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.readlast"> | |
-<code class="descname">readlast</code><span class="sig-paren">(</span><em>verb… | |
-<dd><p>Read the last output file from the <code class="docutils literal"><span… | |
-to the object simulation id (<code class="docutils literal"><span class="pre">… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
-<a class="reference internal" href="#sphere.sim.readstep" title="sphere.sim.re… | |
+<code class="sig-name descname">readlast</code><span class="sig-paren">(</span… | |
+<dd><p>Read the last output file from the <code class="docutils literal notran… | |
+to the object simulation id (<code class="docutils literal notranslate"><span … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>verbose</strong> (<em>bool</em>) – Display … | |
+</dd> | |
+</dl> | |
+<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
+<a class="reference internal" href="#sphere.sim.readstep" title="sphere.sim.re… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.readsecond"> | |
-<code class="descname">readsecond</code><span class="sig-paren">(</span><em>ve… | |
-<dd><p>Read the second output file from the <code class="docutils literal"><sp… | |
-corresponding to the object simulation id (<code class="docutils literal"><spa… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
-and <a class="reference internal" href="#sphere.sim.readstep" title="sphere.si… | |
+<code class="sig-name descname">readsecond</code><span class="sig-paren">(</sp… | |
+<dd><p>Read the second output file from the <code class="docutils literal notr… | |
+corresponding to the object simulation id (<code class="docutils literal notra… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>verbose</strong> (<em>bool</em>) – Display … | |
+</dd> | |
+</dl> | |
+<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
+and <a class="reference internal" href="#sphere.sim.readstep" title="sphere.si… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.readstep"> | |
-<code class="descname">readstep</code><span class="sig-paren">(</span><em>step… | |
-<dd><p>Read a output file from the <code class="docutils literal"><span class=… | |
-to the object simulation id (<code class="docutils literal"><span class="pre">… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>step</strong> (<em>int</em>) – The output file number to rea… | |
-<li><strong>verbose</strong> (<em>bool</em>) – Display diagnostic inform… | |
+<code class="sig-name descname">readstep</code><span class="sig-paren">(</span… | |
+<dd><p>Read a output file from the <code class="docutils literal notranslate">… | |
+to the object simulation id (<code class="docutils literal notranslate"><span … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>step</strong> (<em>int</em>) – The output file number to read… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Display diagnostic informa… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
-and <a class="reference internal" href="#sphere.sim.readsecond" title="sphere.… | |
+</dd> | |
+</dl> | |
+<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
+and <a class="reference internal" href="#sphere.sim.readsecond" title="sphere.… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.render"> | |
-<code class="descname">render</code><span class="sig-paren">(</span><em>method… | |
+<code class="sig-name descname">render</code><span class="sig-paren">(</span><… | |
<dd><p>Using the built-in ray tracer, render all output files that belong to | |
-the simulation, determined by the simulation id (<code class="docutils literal… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>method</strong> (<em>str</em>) – The color visualization met… | |
-Possible values are: ‘normal’: color all particles with the same | |
-color, ‘pres’: color by pressure, ‘vel’: color by tran… | |
-velocity, ‘angvel’: color by rotational velocity, ‘xdispR… | |
-total displacement along the x-axis, ‘angpos’: color by angular | |
-position.</li> | |
-<li><strong>max_val</strong> (<em>float</em>) – The maximum value of the… | |
-<li><strong>lower_cutoff</strong> (<em>float</em>) – Do not render parti… | |
-value, of the field selected by <code class="docutils literal"><span class="pr… | |
-<li><strong>graphics_format</strong> (<em>str</em>) – Convert the PPM im… | |
-tracer to this image format using Imagemagick</li> | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show verbose information … | |
+the simulation, determined by the simulation id (<code class="docutils literal… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>method</strong> (<em>str</em>) – The color visualization meth… | |
+Possible values are: ‘normal’: color all particles with the same | |
+color, ‘pres’: color by pressure, ‘vel’: color by translational | |
+velocity, ‘angvel’: color by rotational velocity, ‘xdisp’: color by | |
+total displacement along the x-axis, ‘angpos’: color by angular | |
+position.</p></li> | |
+<li><p><strong>max_val</strong> (<em>float</em>) – The maximum value of the … | |
+<li><p><strong>lower_cutoff</strong> (<em>float</em>) – Do not render partic… | |
+value, of the field selected by <code class="docutils literal notranslate"><sp… | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Convert the PPM ima… | |
+tracer to this image format using Imagemagick</p></li> | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show verbose information d… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.rotationalEnergy"> | |
-<code class="descname">rotationalEnergy</code><span class="sig-paren">(</span>… | |
+<code class="sig-name descname">rotationalEnergy</code><span class="sig-paren"… | |
<dd><p>Returns the rotational energy for a particle.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em>) – Particle inde… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The rotational kinetic energy of the particle [J]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.run"> | |
-<code class="descname">run</code><span class="sig-paren">(</span><em>verbose=T… | |
-<dd><p>Start <code class="docutils literal"><span class="pre">sphere</span></c… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show <code class="docutil… | |
-<li><strong>hideinputfile</strong> (<em>bool</em>) – Hide the file name … | |
-<li><strong>dry</strong> (<em>bool</em>) – Perform a dry run. Important … | |
-the <code class="docutils literal"><span class="pre">sphere</span></code> prog… | |
-<li><strong>valgrind</strong> (<em>bool</em>) – Run the program with <co… | |
+<code class="sig-name descname">run</code><span class="sig-paren">(</span><em … | |
+<dd><p>Start <code class="docutils literal notranslate"><span class="pre">sphe… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show <code class="docutils… | |
+<li><p><strong>hideinputfile</strong> (<em>bool</em>) – Hide the file name o… | |
+<li><p><strong>dry</strong> (<em>bool</em>) – Perform a dry run. Important p… | |
+the <code class="docutils literal notranslate"><span class="pre">sphere</span>… | |
+<li><p><strong>valgrind</strong> (<em>bool</em>) – Run the program with <cod… | |
memory leaks in the host code. This causes a significant increase in | |
-computational time.</li> | |
-<li><strong>cudamemcheck</strong> (<em>bool</em>) – Run the program with… | |
+computational time.</p></li> | |
+<li><p><strong>cudamemcheck</strong> (<em>bool</em>) – Run the program with … | |
check for device memory leaks and errors. This causes a significant | |
-increase in computational time.</li> | |
-<li><strong>device</strong> (<em>int</em>) – Specify the GPU device to e… | |
+increase in computational time.</p></li> | |
+<li><p><strong>device</strong> (<em>int</em>) – Specify the GPU device to ex… | |
If not specified, sphere will use the device with the most CUDA cores. | |
-To see a list of devices, run <code class="docutils literal"><span class="pre"… | |
+To see a list of devices, run <code class="docutils literal notranslate"><span… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.scaleSize"> | |
-<code class="descname">scaleSize</code><span class="sig-paren">(</span><em>fac… | |
+<code class="sig-name descname">scaleSize</code><span class="sig-paren">(</spa… | |
<dd><p>Scale the positions, linear velocities, forces, torques and radii of all | |
particles and mobile walls.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>factor</strong> (<em>float</em>) – Spatial … | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setBeta"> | |
-<code class="descname">setBeta</code><span class="sig-paren">(</span><em>beta<… | |
+<code class="sig-name descname">setBeta</code><span class="sig-paren">(</span>… | |
<dd><p>Beta is a fluid solver parameter, used in velocity prediction and | |
pressure iteration 1.0: Use old pressures for fluid velocity prediction | |
(see Langtangen et al. 2002) 0.0: Do not use old pressures for fluid | |
-velocity prediction (Chorin’s original projection method, see Chorin | |
-(1968) and “Projection method (fluid dynamics)” page on Wikipedia.… | |
+velocity prediction (Chorin’s original projection method, see Chorin | |
+(1968) and “Projection method (fluid dynamics)” page on Wikipedia. The | |
best results precision and performance-wise are obtained by using a beta | |
of 0 and a low tolerance criteria value.</p> | |
<p>The default and recommended value is 0.0.</p> | |
-<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
-<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se… | |
-<a class="reference internal" href="#sphere.sim.setDEMstepsPerCFDstep" title="… | |
-<a class="reference internal" href="#sphere.sim.setMaxIterations" title="spher… | |
+<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
+<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se… | |
+<a class="reference internal" href="#sphere.sim.setDEMstepsPerCFDstep" title="… | |
+<a class="reference internal" href="#sphere.sim.setMaxIterations" title="spher… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setDEMstepsPerCFDstep"> | |
-<code class="descname">setDEMstepsPerCFDstep</code><span class="sig-paren">(</… | |
+<code class="sig-name descname">setDEMstepsPerCFDstep</code><span class="sig-p… | |
<dd><p>A fluid solver parameter, the value of the maxiter parameter denotes the | |
number of DEM time steps to be performed per CFD time step.</p> | |
<p>The default value is 1.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
-<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se… | |
-<a class="reference internal" href="#sphere.sim.setMaxIterations" title="spher… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>ndem</strong> (<em>int</em>) – The DEM/CFD … | |
+</dd> | |
+</dl> | |
+<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
+<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se… | |
+<a class="reference internal" href="#sphere.sim.setMaxIterations" title="spher… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setDampingNormal"> | |
-<code class="descname">setDampingNormal</code><span class="sig-paren">(</span>… | |
+<code class="sig-name descname">setDampingNormal</code><span class="sig-paren"… | |
<dd><p>Set the dampening coefficient (gamma) in the normal direction of the | |
particle-particle contact model. The function will print the fraction | |
between the chosen damping and the critical damping value.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>gamma</strong> (<em>float</em>) – The viscous damping consta… | |
-<li><strong>over_damping</strong> (<em>boolean</em>) – Accept overdampen… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>gamma</strong> (<em>float</em>) – The viscous damping constan… | |
+<li><p><strong>over_damping</strong> (<em>boolean</em>) – Accept overdampeni… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <code class="xref py py-func docutils literal"><span class="pre">… | |
+</dd> | |
+</dl> | |
+<p>See also: <code class="xref py py-func docutils literal notranslate"><span … | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setDampingTangential"> | |
-<code class="descname">setDampingTangential</code><span class="sig-paren">(</s… | |
+<code class="sig-name descname">setDampingTangential</code><span class="sig-pa… | |
<dd><p>Set the dampening coefficient (gamma) in the tangential direction of the | |
particle-particle contact model. The function will print the fraction | |
between the chosen damping and the critical damping value.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>gamma</strong> (<em>float</em>) – The viscous damping consta… | |
-<li><strong>over_damping</strong> (<em>boolean</em>) – Accept overdampen… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>gamma</strong> (<em>float</em>) – The viscous damping constan… | |
+<li><p><strong>over_damping</strong> (<em>boolean</em>) – Accept overdampeni… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <code class="xref py py-func docutils literal"><span class="pre">… | |
+</dd> | |
+</dl> | |
+<p>See also: <code class="xref py py-func docutils literal notranslate"><span … | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setDynamicFriction"> | |
-<code class="descname">setDynamicFriction</code><span class="sig-paren">(</spa… | |
+<code class="sig-name descname">setDynamicFriction</code><span class="sig-pare… | |
<dd><p>Set the dynamic friction coefficient for particle-particle interactions | |
(<cite>self.mu_d</cite>). This value describes the resistance to a shearing mo… | |
while it is happening (contact tangential velocity larger than 0). | |
Strain softening can be introduced by having a smaller dynamic | |
frictional coefficient than the static fricion coefficient. Usually this | |
value is identical to the static friction coefficient.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-Usually between 0 and 1.</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <code class="xref py py-func docutils literal"><span class="pre">… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>mu_d</strong> (<em>float</em>) – Value of t… | |
+Usually between 0 and 1.</p> | |
+</dd> | |
+</dl> | |
+<p>See also: <code class="xref py py-func docutils literal notranslate"><span … | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidBottomFixedFlux"> | |
-<code class="descname">setFluidBottomFixedFlux</code><span class="sig-paren">(… | |
+<code class="sig-name descname">setFluidBottomFixedFlux</code><span class="sig… | |
<dd><p>Define a constant fluid flux normal to the boundary.</p> | |
<p>The default behavior for the boundary is fixed value (Dirichlet), see | |
-<a class="reference internal" href="#sphere.sim.setFluidBottomFixedPressure" t… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-values upwards), [m/s]</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+<a class="reference internal" href="#sphere.sim.setFluidBottomFixedPressure" t… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>specific_flux</strong> – Specific flux valu… | |
+values upwards), [m/s]</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidBottomFixedPressure"> | |
-<code class="descname">setFluidBottomFixedPressure</code><span class="sig-pare… | |
+<code class="sig-name descname">setFluidBottomFixedPressure</code><span class=… | |
<dd><p>Set the lower boundary of the fluid domain to follow the fixed pressure | |
value (Dirichlet) boundary condition.</p> | |
<p>This is the default behavior for the boundary. See also | |
-<a class="reference internal" href="#sphere.sim.setFluidBottomNoFlow" title="s… | |
+<a class="reference internal" href="#sphere.sim.setFluidBottomNoFlow" title="s… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidBottomNoFlow"> | |
-<code class="descname">setFluidBottomNoFlow</code><span class="sig-paren">(</s… | |
+<code class="sig-name descname">setFluidBottomNoFlow</code><span class="sig-pa… | |
<dd><p>Set the lower boundary of the fluid domain to follow the no-flow | |
(Neumann) boundary condition with free slip parallel to the boundary.</p> | |
<p>The default behavior for the boundary is fixed value (Dirichlet), see | |
-<a class="reference internal" href="#sphere.sim.setFluidBottomFixedPressure" t… | |
+<a class="reference internal" href="#sphere.sim.setFluidBottomFixedPressure" t… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidBottomNoFlowNoSlip"> | |
-<code class="descname">setFluidBottomNoFlowNoSlip</code><span class="sig-paren… | |
+<code class="sig-name descname">setFluidBottomNoFlowNoSlip</code><span class="… | |
<dd><p>Set the lower boundary of the fluid domain to follow the no-flow | |
(Neumann) boundary condition with no slip parallel to the boundary.</p> | |
<p>The default behavior for the boundary is fixed value (Dirichlet), see | |
-<a class="reference internal" href="#sphere.sim.setFluidBottomFixedPressure" t… | |
+<a class="reference internal" href="#sphere.sim.setFluidBottomFixedPressure" t… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidCompressibility"> | |
-<code class="descname">setFluidCompressibility</code><span class="sig-paren">(… | |
+<code class="sig-name descname">setFluidCompressibility</code><span class="sig… | |
<dd><p>Set the fluid adiabatic compressibility [1/Pa]. This value is equal to | |
<cite>1/K</cite> where <cite>K</cite> is the bulk modulus [Pa]. The value for … | |
for water at 0 degrees Celcius. This parameter is used for the Darcy | |
solver exclusively.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.setFluidDensity" … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>beta_f</strong> (<em>float</em>) – The flui… | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.setFluidDensity" … | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidDensity"> | |
-<code class="descname">setFluidDensity</code><span class="sig-paren">(</span><… | |
+<code class="sig-name descname">setFluidDensity</code><span class="sig-paren">… | |
<dd><p>Set the fluid density [kg/(m*m*m)]. The value for water is 1000. This | |
parameter is used for the Navier-Stokes fluid solver exclusively.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<dl class="docutils"> | |
-<dt>See also: <a class="reference internal" href="#sphere.sim.setFluidViscosit… | |
-<dd><a class="reference internal" href="#sphere.sim.setFluidCompressibility" t… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>rho_f</strong> (<em>float</em>) – The fluid… | |
+</dd> | |
+</dl> | |
+<dl class="simple"> | |
+<dt>See also: <a class="reference internal" href="#sphere.sim.setFluidViscosit… | |
+</dd> | |
</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidPressureModulation"> | |
-<code class="descname">setFluidPressureModulation</code><span class="sig-paren… | |
+<code class="sig-name descname">setFluidPressureModulation</code><span class="… | |
<dd><p>Set the parameters for the sine wave modulating the fluid pressures | |
at the top boundary. Note that a cos-wave is obtained with phi=pi/2.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>A</strong> (<em>float</em>) – Fluctuation amplitude [Pa]</li> | |
-<li><strong>f</strong> (<em>float</em>) – Fluctuation frequency [Hz]</li> | |
-<li><strong>phi</strong> (<em>float</em>) – Fluctuation phase shift (def… | |
-<li><strong>plot</strong> (<em>bool</em>) – Show a plot of the resulting… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>A</strong> (<em>float</em>) – Fluctuation amplitude [Pa]</p><… | |
+<li><p><strong>f</strong> (<em>float</em>) – Fluctuation frequency [Hz]</p><… | |
+<li><p><strong>phi</strong> (<em>float</em>) – Fluctuation phase shift (defa… | |
+<li><p><strong>plot</strong> (<em>bool</em>) – Show a plot of the resulting … | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.setTopWallNormalS… | |
-<a class="reference internal" href="#sphere.sim.disableFluidPressureModulation… | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.setTopWallNormalS… | |
+<a class="reference internal" href="#sphere.sim.disableFluidPressureModulation… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidTopFixedFlux"> | |
-<code class="descname">setFluidTopFixedFlux</code><span class="sig-paren">(</s… | |
+<code class="sig-name descname">setFluidTopFixedFlux</code><span class="sig-pa… | |
<dd><p>Define a constant fluid flux normal to the boundary.</p> | |
<p>The default behavior for the boundary is fixed value (Dirichlet), see | |
-<a class="reference internal" href="#sphere.sim.setFluidBottomFixedPressure" t… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-values upwards), [m/s]</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+<a class="reference internal" href="#sphere.sim.setFluidBottomFixedPressure" t… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>specific_flux</strong> – Specific flux valu… | |
+values upwards), [m/s]</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidTopFixedPressure"> | |
-<code class="descname">setFluidTopFixedPressure</code><span class="sig-paren">… | |
+<code class="sig-name descname">setFluidTopFixedPressure</code><span class="si… | |
<dd><p>Set the upper boundary of the fluid domain to follow the fixed pressure | |
value (Dirichlet) boundary condition.</p> | |
<p>This is the default behavior for the boundary. See also | |
-<a class="reference internal" href="#sphere.sim.setFluidTopNoFlow" title="sphe… | |
+<a class="reference internal" href="#sphere.sim.setFluidTopNoFlow" title="sphe… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidTopNoFlow"> | |
-<code class="descname">setFluidTopNoFlow</code><span class="sig-paren">(</span… | |
+<code class="sig-name descname">setFluidTopNoFlow</code><span class="sig-paren… | |
<dd><p>Set the upper boundary of the fluid domain to follow the no-flow | |
(Neumann) boundary condition with free slip parallel to the boundary.</p> | |
<p>The default behavior for the boundary is fixed value (Dirichlet), see | |
-<a class="reference internal" href="#sphere.sim.setFluidTopFixedPressure" titl… | |
+<a class="reference internal" href="#sphere.sim.setFluidTopFixedPressure" titl… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidTopNoFlowNoSlip"> | |
-<code class="descname">setFluidTopNoFlowNoSlip</code><span class="sig-paren">(… | |
+<code class="sig-name descname">setFluidTopNoFlowNoSlip</code><span class="sig… | |
<dd><p>Set the upper boundary of the fluid domain to follow the no-flow | |
(Neumann) boundary condition with no slip parallel to the boundary.</p> | |
<p>The default behavior for the boundary is fixed value (Dirichlet), see | |
-<a class="reference internal" href="#sphere.sim.setFluidTopFixedPressure" titl… | |
+<a class="reference internal" href="#sphere.sim.setFluidTopFixedPressure" titl… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidViscosity"> | |
-<code class="descname">setFluidViscosity</code><span class="sig-paren">(</span… | |
+<code class="sig-name descname">setFluidViscosity</code><span class="sig-paren… | |
<dd><p>Set the fluid dynamic viscosity [Pa*s]. The value for water is | |
1.797e-3 at 0 degrees Celcius. This parameter is used for both the Darcy | |
and Navier-Stokes fluid solver.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<dl class="docutils"> | |
-<dt>See also: <a class="reference internal" href="#sphere.sim.setFluidDensity"… | |
-<dd><a class="reference internal" href="#sphere.sim.setFluidCompressibility" t… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>mu</strong> (<em>float</em>) – The fluid dy… | |
+</dd> | |
+</dl> | |
+<dl class="simple"> | |
+<dt>See also: <a class="reference internal" href="#sphere.sim.setFluidDensity"… | |
+</dd> | |
</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidXFixedPressure"> | |
-<code class="descname">setFluidXFixedPressure</code><span class="sig-paren">(<… | |
+<code class="sig-name descname">setFluidXFixedPressure</code><span class="sig-… | |
<dd><p>Set the X boundaries of the fluid domain to follow the fixed pressure | |
value (Dirichlet) boundary condition.</p> | |
<p>This is not the default behavior for the boundary. See also | |
-<a class="reference internal" href="#sphere.sim.setFluidXFixedPressure" title=… | |
-<a class="reference internal" href="#sphere.sim.setFluidXNoFlow" title="sphere… | |
-<a class="reference internal" href="#sphere.sim.setFluidXPeriodic" title="sphe… | |
+<a class="reference internal" href="#sphere.sim.setFluidXFixedPressure" title=… | |
+<a class="reference internal" href="#sphere.sim.setFluidXNoFlow" title="sphere… | |
+<a class="reference internal" href="#sphere.sim.setFluidXPeriodic" title="sphe… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidXNoFlow"> | |
-<code class="descname">setFluidXNoFlow</code><span class="sig-paren">(</span><… | |
+<code class="sig-name descname">setFluidXNoFlow</code><span class="sig-paren">… | |
<dd><p>Set the X boundaries of the fluid domain to follow the no-flow | |
(Neumann) boundary condition.</p> | |
<p>This is not the default behavior for the boundary. See also | |
-<a class="reference internal" href="#sphere.sim.setFluidXFixedPressure" title=… | |
-<a class="reference internal" href="#sphere.sim.setFluidXNoFlow" title="sphere… | |
-<a class="reference internal" href="#sphere.sim.setFluidXPeriodic" title="sphe… | |
+<a class="reference internal" href="#sphere.sim.setFluidXFixedPressure" title=… | |
+<a class="reference internal" href="#sphere.sim.setFluidXNoFlow" title="sphere… | |
+<a class="reference internal" href="#sphere.sim.setFluidXPeriodic" title="sphe… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidXPeriodic"> | |
-<code class="descname">setFluidXPeriodic</code><span class="sig-paren">(</span… | |
+<code class="sig-name descname">setFluidXPeriodic</code><span class="sig-paren… | |
<dd><p>Set the X boundaries of the fluid domain to follow the periodic | |
(cyclic) boundary condition.</p> | |
<p>This is the default behavior for the boundary. See also | |
-<a class="reference internal" href="#sphere.sim.setFluidXFixedPressure" title=… | |
-<a class="reference internal" href="#sphere.sim.setFluidXNoFlow" title="sphere… | |
+<a class="reference internal" href="#sphere.sim.setFluidXFixedPressure" title=… | |
+<a class="reference internal" href="#sphere.sim.setFluidXNoFlow" title="sphere… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidYFixedPressure"> | |
-<code class="descname">setFluidYFixedPressure</code><span class="sig-paren">(<… | |
+<code class="sig-name descname">setFluidYFixedPressure</code><span class="sig-… | |
<dd><p>Set the Y boundaries of the fluid domain to follow the fixed pressure | |
value (Dirichlet) boundary condition.</p> | |
<p>This is not the default behavior for the boundary. See also | |
-<a class="reference internal" href="#sphere.sim.setFluidYNoFlow" title="sphere… | |
-<a class="reference internal" href="#sphere.sim.setFluidYPeriodic" title="sphe… | |
+<a class="reference internal" href="#sphere.sim.setFluidYNoFlow" title="sphere… | |
+<a class="reference internal" href="#sphere.sim.setFluidYPeriodic" title="sphe… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidYNoFlow"> | |
-<code class="descname">setFluidYNoFlow</code><span class="sig-paren">(</span><… | |
+<code class="sig-name descname">setFluidYNoFlow</code><span class="sig-paren">… | |
<dd><p>Set the Y boundaries of the fluid domain to follow the no-flow | |
(Neumann) boundary condition.</p> | |
<p>This is not the default behavior for the boundary. See also | |
-<a class="reference internal" href="#sphere.sim.setFluidYFixedPressure" title=… | |
-<a class="reference internal" href="#sphere.sim.setFluidYPeriodic" title="sphe… | |
+<a class="reference internal" href="#sphere.sim.setFluidYFixedPressure" title=… | |
+<a class="reference internal" href="#sphere.sim.setFluidYPeriodic" title="sphe… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setFluidYPeriodic"> | |
-<code class="descname">setFluidYPeriodic</code><span class="sig-paren">(</span… | |
+<code class="sig-name descname">setFluidYPeriodic</code><span class="sig-paren… | |
<dd><p>Set the Y boundaries of the fluid domain to follow the periodic | |
(cyclic) boundary condition.</p> | |
<p>This is the default behavior for the boundary. See also | |
-<a class="reference internal" href="#sphere.sim.setFluidYFixedPressure" title=… | |
-<a class="reference internal" href="#sphere.sim.setFluidYNoFlow" title="sphere… | |
+<a class="reference internal" href="#sphere.sim.setFluidYFixedPressure" title=… | |
+<a class="reference internal" href="#sphere.sim.setFluidYNoFlow" title="sphere… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setGamma"> | |
-<code class="descname">setGamma</code><span class="sig-paren">(</span><em>gamm… | |
+<code class="sig-name descname">setGamma</code><span class="sig-paren">(</span… | |
<dd><p>Gamma is a fluid solver parameter, used for smoothing the pressure | |
values. The epsilon (pressure) values are smoothed by including the | |
average epsilon value of the six closest (face) neighbor cells. This | |
parameter should be in the range [0.0;1.0[. The higher the value, the | |
more averaging is introduced. A value of 0.0 disables all averaging.</p> | |
<p>The default and recommended value is 0.0.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
-<a class="reference internal" href="#sphere.sim.setBeta" title="sphere.sim.set… | |
-<a class="reference internal" href="#sphere.sim.setDEMstepsPerCFDstep" title="… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>theta</strong> (<em>float</em>) – The smoot… | |
+</dd> | |
+</dl> | |
+<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
+<a class="reference internal" href="#sphere.sim.setBeta" title="sphere.sim.set… | |
+<a class="reference internal" href="#sphere.sim.setDEMstepsPerCFDstep" title="… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setMaxIterations"> | |
-<code class="descname">setMaxIterations</code><span class="sig-paren">(</span>… | |
+<code class="sig-name descname">setMaxIterations</code><span class="sig-paren"… | |
<dd><p>A fluid solver parameter, the value of the maxiter parameter denotes the | |
maximal allowed number of fluid solver iterations before ending the | |
fluid solver loop prematurely. The residual values are at that point not | |
fulfilling the tolerance criteria. The parameter is included to avoid | |
infinite hangs.</p> | |
<p>The default and recommended value is 1e4.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-solver</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
-<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se… | |
-and <a class="reference internal" href="#sphere.sim.setTolerance" title="spher… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>maxiter</strong> (<em>int</em>) – The maxim… | |
+solver</p> | |
+</dd> | |
+</dl> | |
+<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
+<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se… | |
+and <a class="reference internal" href="#sphere.sim.setTolerance" title="spher… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setPermeabilityGrainSize"> | |
-<code class="descname">setPermeabilityGrainSize</code><span class="sig-paren">… | |
+<code class="sig-name descname">setPermeabilityGrainSize</code><span class="si… | |
<dd><p>Set the permeability prefactor based on the mean grain size (Damsgaard | |
et al., 2015, eq. 10).</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>verbose</strong> (<em>bool</em>) – Print in… | |
hydraulic conductivities to expect with the chosen permeability | |
-prefactor.</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+prefactor.</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setPermeabilityPrefactor"> | |
-<code class="descname">setPermeabilityPrefactor</code><span class="sig-paren">… | |
+<code class="sig-name descname">setPermeabilityPrefactor</code><span class="si… | |
<dd><p>Set the permeability prefactor from Goren et al 2011, eq. 24. The | |
function will print the limits of permeabilities to be simulated. This | |
parameter is only used in the Darcy solver.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>k_c</strong> (<em>float</em>) – Permeability prefactor value… | |
-<li><strong>verbose</strong> (<em>bool</em>) – Print information about t… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>k_c</strong> (<em>float</em>) – Permeability prefactor value … | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Print information about th… | |
hydraulic conductivities to expect with the chosen permeability | |
-prefactor.</li> | |
+prefactor.</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setStaticFriction"> | |
-<code class="descname">setStaticFriction</code><span class="sig-paren">(</span… | |
+<code class="sig-name descname">setStaticFriction</code><span class="sig-paren… | |
<dd><p>Set the static friction coefficient for particle-particle interactions | |
(<cite>self.mu_s</cite>). This value describes the resistance to a shearing mo… | |
while it is not happenind (contact tangential velocity zero).</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-Usually between 0 and 1.</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <code class="xref py py-func docutils literal"><span class="pre">… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>mu_s</strong> (<em>float</em>) – Value of t… | |
+Usually between 0 and 1.</p> | |
+</dd> | |
+</dl> | |
+<p>See also: <code class="xref py py-func docutils literal notranslate"><span … | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setStiffnessNormal"> | |
-<code class="descname">setStiffnessNormal</code><span class="sig-paren">(</spa… | |
+<code class="sig-name descname">setStiffnessNormal</code><span class="sig-pare… | |
<dd><p>Set the elastic stiffness (<cite>k_n</cite>) in the normal direction of… | |
contact.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>k_n</strong> (<em>float</em>) – The elastic… | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setStiffnessTangential"> | |
-<code class="descname">setStiffnessTangential</code><span class="sig-paren">(<… | |
+<code class="sig-name descname">setStiffnessTangential</code><span class="sig-… | |
<dd><p>Set the elastic stiffness (<cite>k_t</cite>) in the tangential directio… | |
contact.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>k_t</strong> (<em>float</em>) – The elastic… | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setTheta"> | |
-<code class="descname">setTheta</code><span class="sig-paren">(</span><em>thet… | |
+<code class="sig-name descname">setTheta</code><span class="sig-paren">(</span… | |
<dd><p>Theta is a fluid solver under-relaxation parameter, used in solution of | |
Poisson equation. The value should be within the range ]0.0;1.0]. At a | |
value of 1.0, the new estimate of epsilon values is used exclusively. At | |
t@@ -2395,856 +2119,732 @@ lower values, a linear interpolation between new and… | |
The solution typically converges faster with a value of 1.0, but | |
instabilities may be avoided with lower values.</p> | |
<p>The default and recommended value is 1.0.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
-<a class="reference internal" href="#sphere.sim.setBeta" title="sphere.sim.set… | |
-<a class="reference internal" href="#sphere.sim.setDEMstepsPerCFDstep" title="… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>theta</strong> (<em>float</em>) – The under… | |
+</dd> | |
+</dl> | |
+<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
+<a class="reference internal" href="#sphere.sim.setBeta" title="sphere.sim.set… | |
+<a class="reference internal" href="#sphere.sim.setDEMstepsPerCFDstep" title="… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setTolerance"> | |
-<code class="descname">setTolerance</code><span class="sig-paren">(</span><em>… | |
+<code class="sig-name descname">setTolerance</code><span class="sig-paren">(</… | |
<dd><p>A fluid solver parameter, the value of the tolerance parameter denotes | |
the required value of the maximum normalized residual for the fluid | |
solver.</p> | |
<p>The default and recommended value is 1.0e-3.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-residual</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
-<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se… | |
-<a class="reference internal" href="#sphere.sim.setMaxIterations" title="spher… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>tolerance</strong> (<em>float</em>) – The t… | |
+residual</p> | |
+</dd> | |
+</dl> | |
+<p>Other solver parameter setting functions: <a class="reference internal" hre… | |
+<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se… | |
+<a class="reference internal" href="#sphere.sim.setMaxIterations" title="spher… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setTopWallNormalStressModulation"> | |
-<code class="descname">setTopWallNormalStressModulation</code><span class="sig… | |
+<code class="sig-name descname">setTopWallNormalStressModulation</code><span c… | |
<dd><p>Set the parameters for the sine wave modulating the normal stress | |
at the top wall. Note that a cos-wave is obtained with phi=pi/2.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>A</strong> (<em>float</em>) – Fluctuation amplitude [Pa]</li> | |
-<li><strong>f</strong> (<em>float</em>) – Fluctuation frequency [Hz]</li> | |
-<li><strong>plot</strong> (<em>bool</em>) – Show a plot of the resulting… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>A</strong> (<em>float</em>) – Fluctuation amplitude [Pa]</p><… | |
+<li><p><strong>f</strong> (<em>float</em>) – Fluctuation frequency [Hz]</p><… | |
+<li><p><strong>plot</strong> (<em>bool</em>) – Show a plot of the resulting … | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.setFluidPressureM… | |
-<a class="reference internal" href="#sphere.sim.disableTopWallNormalStressModu… | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.setFluidPressureM… | |
+<a class="reference internal" href="#sphere.sim.disableTopWallNormalStressModu… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.setYoungsModulus"> | |
-<code class="descname">setYoungsModulus</code><span class="sig-paren">(</span>… | |
-<dd><p>Set the elastic Young’s modulus (<cite>E</cite>) for the contact … | |
+<code class="sig-name descname">setYoungsModulus</code><span class="sig-paren"… | |
+<dd><p>Set the elastic Young’s modulus (<cite>E</cite>) for the contact mode… | |
parameter is used over normal stiffness (<cite>k_n</cite>) and tangential | |
stiffness (<cite>k_t</cite>) when its value is greater than zero. Using this | |
parameter produces size-invariant behavior.</p> | |
<p>Example values are ~70e9 Pa for quartz, | |
<a class="reference external" href="http://www.engineeringtoolbox.com/young-mo… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>E</strong> (<em>float</em>) – The elastic m… | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.shear"> | |
-<code class="descname">shear</code><span class="sig-paren">(</span><em>shear_s… | |
+<code class="sig-name descname">shear</code><span class="sig-paren">(</span><e… | |
<dd><p>Setup shear experiment either by a constant shear rate or a constant | |
shear stress. The shear strain rate is the shear velocity divided by | |
the initial height per second. The shear movement is along the positive | |
x axis. The function zeroes the tangential wall viscosity (gamma_wt) and | |
the wall friction coefficients (mu_ws, mu_wn).</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>shear_strain_rate</strong> (<em>float</em>) – The shear stra… | |
-shear_stress isn’t False.</li> | |
-<li><strong>shear_stress</strong> (<em>float or bool</em>) – The shear s… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>shear_strain_rate</strong> (<em>float</em>) – The shear strai… | |
+shear_stress isn’t False.</p></li> | |
+<li><p><strong>shear_stress</strong> (<em>float</em><em> or </em><em>bool</em>… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.shearDisplacement"> | |
-<code class="descname">shearDisplacement</code><span class="sig-paren">(</span… | |
+<code class="sig-name descname">shearDisplacement</code><span class="sig-paren… | |
<dd><p>Calculates and returns the current shear displacement. The displacement | |
is found by determining the total x-axis displacement of the upper, | |
fixed particles.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.shearStrain" titl… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The total shear displacement [m]</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>float</p> | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.shearStrain" titl… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.shearStrain"> | |
-<code class="descname">shearStrain</code><span class="sig-paren">(</span><span… | |
+<code class="sig-name descname">shearStrain</code><span class="sig-paren">(</s… | |
<dd><p>Calculates and returns the current shear strain (gamma) value of the | |
experiment. The shear strain is found by determining the total x-axis | |
displacement of the upper, fixed particles.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.shearStrainRate" … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The total shear strain [-]</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>float</p> | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.shearStrainRate" … | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.shearStrainRate"> | |
-<code class="descname">shearStrainRate</code><span class="sig-paren">(</span><… | |
+<code class="sig-name descname">shearStrainRate</code><span class="sig-paren">… | |
<dd><p>Calculates the shear strain rate (dot(gamma)) value of the experiment.<… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.shearStrain" titl… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The value of dot(gamma)</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>float</p> | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.shearStrain" titl… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.shearStress"> | |
-<code class="descname">shearStress</code><span class="sig-paren">(</span><em>t… | |
+<code class="sig-name descname">shearStress</code><span class="sig-paren">(</s… | |
<dd><p>Calculates the sum of shear stress values measured on any moving | |
particles with a finite and fixed velocity.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>type</strong> (<em>str</em>) – Find the ‘… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The shear stress in Pa</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>numpy.array</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.shearVel"> | |
-<code class="descname">shearVel</code><span class="sig-paren">(</span><span cl… | |
-<dd><p>Alias of <a class="reference internal" href="#sphere.sim.shearVelocity"… | |
+<code class="sig-name descname">shearVel</code><span class="sig-paren">(</span… | |
+<dd><p>Alias of <a class="reference internal" href="#sphere.sim.shearVelocity"… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.shearVelocity"> | |
-<code class="descname">shearVelocity</code><span class="sig-paren">(</span><sp… | |
+<code class="sig-name descname">shearVelocity</code><span class="sig-paren">(<… | |
<dd><p>Calculates and returns the current shear velocity. The displacement | |
is found by determining the total x-axis velocity of the upper, | |
fixed particles.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also: <a class="reference internal" href="#sphere.sim.shearStrainRate" … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The shear velocity [m/s]</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>float</p> | |
+</dd> | |
+</dl> | |
+<p>See also: <a class="reference internal" href="#sphere.sim.shearStrainRate" … | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.sheardisp"> | |
-<code class="descname">sheardisp</code><span class="sig-paren">(</span><em>gra… | |
+<code class="sig-name descname">sheardisp</code><span class="sig-paren">(</spa… | |
<dd><p>Plot the particle x-axis displacement against the original vertical | |
particle position. The plot is saved in the current directory with the | |
-file name ‘<simulation id>-sheardisp.<graphics_format>’… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-</tbody> | |
-</table> | |
+file name ‘<simulation id>-sheardisp.<graphics_format>’.</p> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>graphics_format</strong> (<em>str</em>) – S… | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.show"> | |
-<code class="descname">show</code><span class="sig-paren">(</span><em>coloring… | |
+<code class="sig-name descname">show</code><span class="sig-paren">(</span><em… | |
<dd><p>Show a rendering of all particles in a window.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>coloring</strong> (<em>numpy.array</em>) – Color the particl… | |
-to the values in this array.</li> | |
-<li><strong>resolution</strong> (<em>int</em>) – The resolution of the r… | |
-increase the performance requirements.</li> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>coloring</strong> (<em>numpy.array</em>) – Color the particle… | |
+to the values in this array.</p></li> | |
+<li><p><strong>resolution</strong> (<em>int</em>) – The resolution of the re… | |
+increase the performance requirements.</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.smallestMass"> | |
-<code class="descname">smallestMass</code><span class="sig-paren">(</span><spa… | |
+<code class="sig-name descname">smallestMass</code><span class="sig-paren">(</… | |
<dd><p>Returns the mass of the leightest particle.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em>) – Particle inde… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The mass of the particle [kg]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.staticGrid"> | |
-<code class="descname">staticGrid</code><span class="sig-paren">(</span><span … | |
+<code class="sig-name descname">staticGrid</code><span class="sig-paren">(</sp… | |
<dd><p>Set the height of the fluid grid to be constant as set in <cite>self.L[… | |
-<p>See also <a class="reference internal" href="#sphere.sim.adaptiveGrid" titl… | |
+<p>See also <a class="reference internal" href="#sphere.sim.adaptiveGrid" titl… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.status"> | |
-<code class="descname">status</code><span class="sig-paren">(</span><span clas… | |
+<code class="sig-name descname">status</code><span class="sig-paren">(</span><… | |
<dd><p>Returns the current simulation status by using the simulation id | |
-(<code class="docutils literal"><span class="pre">sid</span></code>) as an ide… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
+(<code class="docutils literal notranslate"><span class="pre">sid</span></code… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The number of the last output file written</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>int</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.surfaceArea"> | |
-<code class="descname">surfaceArea</code><span class="sig-paren">(</span><em>i… | |
+<code class="sig-name descname">surfaceArea</code><span class="sig-paren">(</s… | |
<dd><p>Returns the surface area of a particle.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em>) – Particle inde… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The surface area of the particle [m^2]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.thinsection_x1x3"> | |
-<code class="descname">thinsection_x1x3</code><span class="sig-paren">(</span>… | |
+<code class="sig-name descname">thinsection_x1x3</code><span class="sig-paren"… | |
<dd><p>Produce a 2D image of particles on a x1,x3 plane, intersecting the | |
-second axis at x2. Output is saved as ‘<sid>-ts-x1x3.txt’ in… | |
+second axis at x2. Output is saved as ‘<sid>-ts-x1x3.txt’ in the | |
current folder.</p> | |
<p>An upper limit to the pressure color bar range can be set by the | |
cbmax parameter.</p> | |
-<dl class="docutils"> | |
-<dt>The data can be plotted in gnuplot with:</dt> | |
-<dd>gnuplot> set size ratio -1 | |
-gnuplot> set palette defined (0 “blue”, 0.5 “gray”,… | |
-gnuplot> plot ‘<sid>-ts-x1x3.txt’ with circles palette fs… | |
+<dl class="simple"> | |
+<dt>The data can be plotted in gnuplot with:</dt><dd><p>gnuplot> set size r… | |
+gnuplot> set palette defined (0 “blue”, 0.5 “gray”, 1 “red”) | |
+gnuplot> plot ‘<sid>-ts-x1x3.txt’ with circles palette fs … | |
+</dd> | |
</dl> | |
<p>This function also saves a plot of the inter-particle slip angles.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>x2</strong> (<em>foat</em>) – The position along the second … | |
-<li><strong>graphics_format</strong> (<em>str</em>) – Save the slip angl… | |
-<li><strong>cbmax</strong> (<em>float</em>) – The maximal value of the p… | |
-<li><strong>arrowscale</strong> (<em>float</em>) – Scale the rotational … | |
-<li><strong>velarrowscale</strong> (<em>float</em>) – Scale the translat… | |
-<li><strong>slipscale</strong> (<em>float</em>) – Scale the slip arrows … | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show function output duri… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>x2</strong> (<em>foat</em>) – The position along the second a… | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – Save the slip angle… | |
+<li><p><strong>cbmax</strong> (<em>float</em>) – The maximal value of the pr… | |
+<li><p><strong>arrowscale</strong> (<em>float</em>) – Scale the rotational a… | |
+<li><p><strong>velarrowscale</strong> (<em>float</em>) – Scale the translati… | |
+<li><p><strong>slipscale</strong> (<em>float</em>) – Scale the slip arrows b… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show function output durin… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.torqueScript"> | |
-<code class="descname">torqueScript</code><span class="sig-paren">(</span><em>… | |
-<dd><p>Creates a job script for the Torque queue manager for the simulation | |
-object.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>email</strong> (<em>str</em>) – The e-mail address that Torq… | |
-<li><strong>email_alerts</strong> (<em>str</em>) – The type of Torque me… | |
-address. The character ‘b’ causes a mail to be sent when the | |
-execution begins. The character ‘e’ causes a mail to be sent when | |
-the execution ends normally. The character ‘a’ causes a mail to be | |
-sent if the execution ends abnormally. The characters can be written | |
-in any order.</li> | |
-<li><strong>walltime</strong> (<em>str</em>) – The maximal allowed time … | |
-‘HH:MM:SS’.</li> | |
-<li><strong>queue</strong> (<em>str</em>) – The Torque queue to schedule… | |
-<li><strong>cudapath</strong> (<em>str</em>) – The path of the CUDA libr… | |
-nodes</li> | |
-<li><strong>spheredir</strong> (<em>str</em>) – The path to the root dir… | |
-cluster</li> | |
-<li><strong>use_workdir</strong> (<em>bool</em>) – Use a different worki… | |
-folder</li> | |
-<li><strong>workdir</strong> (<em>str</em>) – The working directory duri… | |
-<cite>use_workdir=True</cite></li> | |
-</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-</dd></dl> | |
- | |
-<dl class="method"> | |
-<dt id="sphere.sim.torqueScriptPenguin"> | |
-<code class="descname">torqueScriptPenguin</code><span class="sig-paren">(</sp… | |
+<code class="sig-name descname">torqueScript</code><span class="sig-paren">(</… | |
<dd><p>Creates a job script for the Torque queue manager for the simulation | |
object.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>email</strong> (<em>str</em>) – The e-mail address that Torq… | |
-<li><strong>email_alerts</strong> (<em>str</em>) – The type of Torque me… | |
-address. The character ‘b’ causes a mail to be sent when the | |
-execution begins. The character ‘e’ causes a mail to be sent when | |
-the execution ends normally. The character ‘a’ causes a mail to be | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>email</strong> (<em>str</em>) – The e-mail address that Torqu… | |
+<li><p><strong>email_alerts</strong> (<em>str</em>) – The type of Torque mes… | |
+address. The character ‘b’ causes a mail to be sent when the | |
+execution begins. The character ‘e’ causes a mail to be sent when | |
+the execution ends normally. The character ‘a’ causes a mail to be | |
sent if the execution ends abnormally. The characters can be written | |
-in any order.</li> | |
-<li><strong>walltime</strong> (<em>str</em>) – The maximal allowed time … | |
-‘HH:MM:SS’.</li> | |
-<li><strong>queue</strong> (<em>str</em>) – The Torque queue to schedule… | |
-<li><strong>spheredir</strong> (<em>str</em>) – The path to the root dir… | |
-cluster</li> | |
+in any order.</p></li> | |
+<li><p><strong>walltime</strong> (<em>str</em>) – The maximal allowed time f… | |
+‘HH:MM:SS’.</p></li> | |
+<li><p><strong>queue</strong> (<em>str</em>) – The Torque queue to schedule … | |
+<li><p><strong>cudapath</strong> (<em>str</em>) – The path of the CUDA libra… | |
+nodes</p></li> | |
+<li><p><strong>spheredir</strong> (<em>str</em>) – The path to the root dire… | |
+cluster</p></li> | |
+<li><p><strong>use_workdir</strong> (<em>bool</em>) – Use a different workin… | |
+folder</p></li> | |
+<li><p><strong>workdir</strong> (<em>str</em>) – The working directory durin… | |
+<cite>use_workdir=True</cite></p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.totalFrictionalEnergy"> | |
-<code class="descname">totalFrictionalEnergy</code><span class="sig-paren">(</… | |
+<code class="sig-name descname">totalFrictionalEnergy</code><span class="sig-p… | |
<dd><p>Returns the total frictional dissipated energy for all particles.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The total frictional energy lost of all particles [J]… | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.totalKineticEnergy"> | |
-<code class="descname">totalKineticEnergy</code><span class="sig-paren">(</spa… | |
+<code class="sig-name descname">totalKineticEnergy</code><span class="sig-pare… | |
<dd><p>Returns the total linear kinetic energy for all particles.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The kinetic energy of all particles [J]</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.totalMass"> | |
-<code class="descname">totalMass</code><span class="sig-paren">(</span><span c… | |
+<code class="sig-name descname">totalMass</code><span class="sig-paren">(</spa… | |
<dd><p>Returns the total mass of all particles.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The total mass in [kg]</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.totalMomentum"> | |
-<code class="descname">totalMomentum</code><span class="sig-paren">(</span><sp… | |
+<code class="sig-name descname">totalMomentum</code><span class="sig-paren">(<… | |
<dd><p>Returns the sum of particle momentums.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The sum of particle momentums (m*v) [N*s]</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>numpy.array</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.totalRotationalEnergy"> | |
-<code class="descname">totalRotationalEnergy</code><span class="sig-paren">(</… | |
+<code class="sig-name descname">totalRotationalEnergy</code><span class="sig-p… | |
<dd><p>Returns the total rotational kinetic energy for all particles.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The rotational energy of all particles [J]</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.totalViscousEnergy"> | |
-<code class="descname">totalViscousEnergy</code><span class="sig-paren">(</spa… | |
+<code class="sig-name descname">totalViscousEnergy</code><span class="sig-pare… | |
<dd><p>Returns the total viscous dissipated energy for all particles.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The normal viscous energy lost by all particles [J]</… | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.triaxial"> | |
-<code class="descname">triaxial</code><span class="sig-paren">(</span><em>wvel… | |
+<code class="sig-name descname">triaxial</code><span class="sig-paren">(</span… | |
<dd><p>Setup triaxial experiment. The upper wall is moved at a fixed velocity | |
in m/s, default values is -0.001 m/s (i.e. downwards). The side walls | |
are exerting a defined normal stress.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>wvel</strong> (<em>float</em>) – Upper wall velocity. Negati… | |
-moves downwards.</li> | |
-<li><strong>normal_stress</strong> (<em>float</em>) – The normal stress … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>wvel</strong> (<em>float</em>) – Upper wall velocity. Negativ… | |
+moves downwards.</p></li> | |
+<li><p><strong>normal_stress</strong> (<em>float</em>) – The normal stress t… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.uniaxialStrainRate"> | |
-<code class="descname">uniaxialStrainRate</code><span class="sig-paren">(</spa… | |
+<code class="sig-name descname">uniaxialStrainRate</code><span class="sig-pare… | |
<dd><p>Setup consolidation experiment. Specify the upper wall velocity in m/s, | |
default value is -0.001 m/s (i.e. downwards).</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-moves downwards.</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>wvel</strong> (<em>float</em>) – Upper wall… | |
+moves downwards.</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.video"> | |
-<code class="descname">video</code><span class="sig-paren">(</span><em>out_fol… | |
+<code class="sig-name descname">video</code><span class="sig-paren">(</span><e… | |
<dd><p>Uses ffmpeg to combine images to animation. All images should be | |
-rendered beforehand using <a class="reference internal" href="#sphere.render" … | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>out_folder</strong> (<em>str</em>) – The output folder for t… | |
-<li><strong>video_format</strong> (<em>str</em>) – The format of the out… | |
-<li><strong>graphics_folder</strong> (<em>str</em>) – The folder contain… | |
-<li><strong>graphics_format</strong> (<em>str</em>) – The format of the … | |
-<li><strong>fps</strong> (<em>int</em>) – The number of frames per secon… | |
-<li><strong>qscale</strong> (<em>float</em>) – The output video quality,… | |
-<li><strong>bitrate</strong> (<em>int</em>) – The bitrate to use in the … | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show ffmpeg output</li> | |
+rendered beforehand using <a class="reference internal" href="#sphere.render" … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>out_folder</strong> (<em>str</em>) – The output folder for th… | |
+<li><p><strong>video_format</strong> (<em>str</em>) – The format of the outp… | |
+<li><p><strong>graphics_folder</strong> (<em>str</em>) – The folder containi… | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – The format of the r… | |
+<li><p><strong>fps</strong> (<em>int</em>) – The number of frames per second… | |
+<li><p><strong>qscale</strong> (<em>float</em>) – The output video quality, … | |
+<li><p><strong>bitrate</strong> (<em>int</em>) – The bitrate to use in the o… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show ffmpeg output</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.viscousEnergy"> | |
-<code class="descname">viscousEnergy</code><span class="sig-paren">(</span><em… | |
+<code class="sig-name descname">viscousEnergy</code><span class="sig-paren">(<… | |
<dd><p>Returns the viscous dissipated energy for a particle.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em>) – Particle inde… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The energy lost by the particle by viscous dissipati… | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.visualize"> | |
-<code class="descname">visualize</code><span class="sig-paren">(</span><em>met… | |
+<code class="sig-name descname">visualize</code><span class="sig-paren">(</spa… | |
<dd><p>Visualize output from the simulation, where the temporal progress is | |
of interest. The output will be saved in the current folder with a name | |
combining the simulation id of the simulation, and the visualization | |
method.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>method</strong> (<em>str</em>) – The type of plot to render.… | |
-‘walls’, ‘triaxial’, ‘inertia’, ‘mea… | |
-‘fluid-pressure’, ‘shear’, ‘shear-displacement&#… | |
-‘rate-dependence’, ‘contacts’</li> | |
-<li><strong>savefig</strong> (<em>bool</em>) – Save the image instead of… | |
-<li><strong>outformat</strong> – The output format of the plot data. Thi… | |
-image format, or in text (‘txt’).</li> | |
-<li><strong>figsize</strong> (<em>array</em>) – Specify output figure si… | |
-<li><strong>pickle</strong> (<em>bool</em>) – Save all figure content as… | |
-be opened later using <cite>fig = pickle.load(open(‘file.pickle’,&… | |
-<li><strong>xlim</strong> (<em>array</em>) – Set custom limits to the x … | |
-range will correspond to the entire data interval.</li> | |
-<li><strong>firststep</strong> (<em>int</em>) – The first output file st… | |
-<li><strong>cmap</strong> (<em>matplotlib.colors.LinearSegmentedColormap</em>)… | |
-<cite>cmap=matplotlib.cm.get_cmap(‘afmhot’)</cite></li> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>method</strong> (<em>str</em>) – The type of plot to render. … | |
+‘walls’, ‘triaxial’, ‘inertia’, ‘mean-fluid-pressure’, | |
+‘fluid-pressure’, ‘shear’, ‘shear-displacement’, ‘porosity’, | |
+‘rate-dependence’, ‘contacts’</p></li> | |
+<li><p><strong>savefig</strong> (<em>bool</em>) – Save the image instead of … | |
+<li><p><strong>outformat</strong> – The output format of the plot data. This… | |
+image format, or in text (‘txt’).</p></li> | |
+<li><p><strong>figsize</strong> (<em>array</em>) – Specify output figure siz… | |
+<li><p><strong>pickle</strong> (<em>bool</em>) – Save all figure content as … | |
+be opened later using <cite>fig=pickle.load(open(‘file.pickle’,’rb’))<… | |
+<li><p><strong>xlim</strong> (<em>array</em>) – Set custom limits to the x a… | |
+range will correspond to the entire data interval.</p></li> | |
+<li><p><strong>firststep</strong> (<em>int</em>) – The first output file ste… | |
+<li><p><strong>cmap</strong> (<em>matplotlib.colors.LinearSegmentedColormap</e… | |
+<cite>cmap=matplotlib.cm.get_cmap(‘afmhot’)</cite></p></li> | |
+<li><p><strong>smoothing</strong> (<em>int</em>) – Apply smoothing across a … | |
+<cite>method=’shear’</cite> plot. A value of less than 3 means that no | |
+smoothing occurs.</p></li> | |
+<li><p><strong>smoothing_window</strong> (<em>str</em>) – Type of smoothing … | |
+Valid values are ‘flat’, ‘hanning’ (default), ‘hamming’, ‘bartle… | |
+and ‘blackman’.</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.voidRatio"> | |
-<code class="descname">voidRatio</code><span class="sig-paren">(</span><span c… | |
+<code class="sig-name descname">voidRatio</code><span class="sig-paren">(</spa… | |
<dd><p>Calculates the current void ratio</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>The void ratio (pore volume relative to solid volume)… | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.volume"> | |
-<code class="descname">volume</code><span class="sig-paren">(</span><em>idx</e… | |
+<code class="sig-name descname">volume</code><span class="sig-paren">(</span><… | |
<dd><p>Returns the volume of a particle.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>idx</strong> (<em>int</em>) – Particle inde… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The volume of the particle [m^3]</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>float</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.wall0iz"> | |
-<code class="descname">wall0iz</code><span class="sig-paren">(</span><span cla… | |
+<code class="sig-name descname">wall0iz</code><span class="sig-paren">(</span>… | |
<dd><p>Returns the cell index of wall 0 along z.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Returns:</th><td class="fie… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Return type:</th><td class… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Returns</dt> | |
+<dd class="field-odd"><p>z cell index</p> | |
+</dd> | |
+<dt class="field-even">Return type</dt> | |
+<dd class="field-even"><p>int</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.wet"> | |
-<code class="descname">wet</code><span class="sig-paren">(</span><span class="… | |
+<code class="sig-name descname">wet</code><span class="sig-paren">(</span><spa… | |
<dd><p>Set the simulation to be wet (total fluid saturation).</p> | |
-<p>See also <a class="reference internal" href="#sphere.sim.dry" title="sphere… | |
+<p>See also <a class="reference internal" href="#sphere.sim.dry" title="sphere… | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.writeFluidVTK"> | |
-<code class="descname">writeFluidVTK</code><span class="sig-paren">(</span><em… | |
-<dd><p>Writes a VTK file for the fluid grid to the <code class="docutils liter… | |
-default. The file name will be in the format <code class="docutils literal"><s… | |
+<code class="sig-name descname">writeFluidVTK</code><span class="sig-paren">(<… | |
+<dd><p>Writes a VTK file for the fluid grid to the <code class="docutils liter… | |
+default. The file name will be in the format <code class="docutils literal not… | |
The vti files can be used for visualizing the fluid in ParaView.</p> | |
<p>The scalars (pressure, porosity, porosity change) and the velocity | |
vectors are either placed in a grid where the grid corners correspond to | |
-the computational grid center (cell_centered = False). This results in a | |
-grid that doesn’t appears to span the simulation domain, and values are | |
+the computational grid center (cell_centered=False). This results in a | |
+grid that doesn’t appears to span the simulation domain, and values are | |
smoothly interpolated on the cell faces. Alternatively, the | |
visualization grid is equal to the computational grid, and cells face | |
-colors are not interpolated (cell_centered = True, default behavior).</p> | |
+colors are not interpolated (cell_centered=True, default behavior).</p> | |
<p>The fluid grid is visualized by opening the vti files, and pressing | |
-“Apply” to import all fluid field properties. To visualize the sca… | |
+“Apply” to import all fluid field properties. To visualize the scalar | |
fields, such as the pressure, the porosity, the porosity change or the | |
-velocity magnitude, choose “Surface” or “Surface With Edges&… | |
-“Representation”. Choose the desired property as the “Colori… | |
-It may be desirable to show the color bar by pressing the “Show” b… | |
-and “Rescale” to fit the color range limits to the current file. T… | |
-coordinate system can be displayed by checking the “Show Axis” fie… | |
-All adjustments by default require the “Apply” button to be pressed | |
+velocity magnitude, choose “Surface” or “Surface With Edges” as the | |
+“Representation”. Choose the desired property as the “Coloring” field. | |
+It may be desirable to show the color bar by pressing the “Show” button, | |
+and “Rescale” to fit the color range limits to the current file. The | |
+coordinate system can be displayed by checking the “Show Axis” field. | |
+All adjustments by default require the “Apply” button to be pressed | |
before regenerating the view.</p> | |
<p>The fluid vector fields (e.g. the fluid velocity) can be visualizing by | |
-e.g. arrows. To do this, select the fluid data in the “Pipeline | |
-Browser”. Press “Glyph” from the “Common” toolba… | |
-“Filters” mennu, and press “Glyph” from the “Com… | |
-that “Arrow” is selected as the “Glyph type”, and R… | |
-“Vectors” value. Adjust the “Maximum Number of Points”… | |
-big as the number of fluid cells in the grid. Press “Apply” to vis… | |
+e.g. arrows. To do this, select the fluid data in the “Pipeline | |
+Browser”. Press “Glyph” from the “Common” toolbar, or go to the | |
+“Filters” mennu, and press “Glyph” from the “Common” list. Make su… | |
+that “Arrow” is selected as the “Glyph type”, and “Velocity” as the | |
+“Vectors” value. Adjust the “Maximum Number of Points” to be at least … | |
+big as the number of fluid cells in the grid. Press “Apply” to visualize | |
the arrows.</p> | |
<p>To visualize the cell-centered data with smooth interpolation, and in | |
order to visualize fluid vector fields, the cell-centered mesh is | |
-selected in the “Pipeline Browser”, and is filtered using “F… | |
-“Alphabetical” -> “Cell Data to Point Data”.</p> | |
+selected in the “Pipeline Browser”, and is filtered using “Filters” -&… | |
+“Alphabetical” -> “Cell Data to Point Data”.</p> | |
<p>If several data files are generated for the same simulation (e.g. using | |
-the <a class="reference internal" href="#sphere.sim.writeVTKall" title="sphere… | |
+the <a class="reference internal" href="#sphere.sim.writeVTKall" title="sphere… | |
visualization through time by using the ParaView controls.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>folder</strong> (<em>str</em>) – The folder where to place t… | |
-(default = ‘../output/’)</li> | |
-<li><strong>cell_centered</strong> (<em>bool</em>) – put scalars and vec… | |
-cell corners (False), (default = True)</li> | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informati… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>folder</strong> (<em>str</em>) – The folder where to place th… | |
+(default=’../output/’)</p></li> | |
+<li><p><strong>cell_centered</strong> (<em>bool</em>) – put scalars and vect… | |
+cell corners (False), (default=True)</p></li> | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informatio… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.writeVTK"> | |
-<code class="descname">writeVTK</code><span class="sig-paren">(</span><em>fold… | |
-<dd><p>Writes a VTK file with particle information to the <code class="docutil… | |
-by default. The file name will be in the format <code class="docutils literal"… | |
+<code class="sig-name descname">writeVTK</code><span class="sig-paren">(</span… | |
+<dd><p>Writes a VTK file with particle information to the <code class="docutil… | |
+by default. The file name will be in the format <code class="docutils literal … | |
The vtu files can be used to visualize the particles in ParaView.</p> | |
<p>After opening the vtu files, the particle fields will show up in the | |
-“Properties” list. Press “Apply” to import all fields … | |
+“Properties” list. Press “Apply” to import all fields into the ParaView | |
session. The particles are visualized by selecting the imported data in | |
-the “Pipeline Browser”. Afterwards, click the “Glyph” … | |
-“Common” toolbar, or go to the “Filters” menu, and pre… | |
-the “Common” list. Choose “Sphere” as the “Glyph… | |
-as the “Scale Mode”. Check the “Edit” checkbox, and se… | |
-Factor” to 1.0. The field “Maximum Number of Points” may be … | |
-the number of particles exceed the default value. Finally press “Apply&#… | |
+the “Pipeline Browser”. Afterwards, click the “Glyph” button in the | |
+“Common” toolbar, or go to the “Filters” menu, and press “Glyph” f… | |
+the “Common” list. Choose “Sphere” as the “Glyph Type”, choose “… | |
+as the “Scale Mode”. Check the “Edit” checkbox, and set the “Set Sca… | |
+Factor” to 1.0. The field “Maximum Number of Points” may be increased if | |
+the number of particles exceed the default value. Finally press “Apply”, | |
and the particles will appear in the main window.</p> | |
-<p>The sphere resolution may be adjusted (“Theta resolution”, R… | |
-resolution”) to increase the quality and the computational requirements | |
-of the rendering. All adjustments by default require the “Apply” b… | |
+<p>The sphere resolution may be adjusted (“Theta resolution”, “Phi | |
+resolution”) to increase the quality and the computational requirements | |
+of the rendering. All adjustments by default require the “Apply” button | |
to be pressed before regenerating the view.</p> | |
<p>If several vtu files are generated for the same simulation (e.g. using | |
-the <a class="reference internal" href="#sphere.sim.writeVTKall" title="sphere… | |
+the <a class="reference internal" href="#sphere.sim.writeVTKall" title="sphere… | |
visualization through time by using the ParaView controls.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>folder</strong> (<em>str</em>) – The folder where to place t… | |
-(default = ‘../output/’)</li> | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informati… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>folder</strong> (<em>str</em>) – The folder where to place th… | |
+(default=’../output/’)</p></li> | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informatio… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.writeVTKall"> | |
-<code class="descname">writeVTKall</code><span class="sig-paren">(</span><em>c… | |
+<code class="sig-name descname">writeVTKall</code><span class="sig-paren">(</s… | |
<dd><p>Writes a VTK file for each simulation output file with particle | |
-information and the fluid grid to the <code class="docutils literal"><span cla… | |
-The file name will be in the format <code class="docutils literal"><span class… | |
-<code class="docutils literal"><span class="pre">fluid-<self.sid>.vti</s… | |
+information and the fluid grid to the <code class="docutils literal notranslat… | |
+The file name will be in the format <code class="docutils literal notranslate"… | |
+<code class="docutils literal notranslate"><span class="pre">fluid-<self.si… | |
particles, and the vti files for visualizing the fluid in ParaView.</p> | |
<p>After opening the vtu files, the particle fields will show up in the | |
-“Properties” list. Press “Apply” to import all fields … | |
+“Properties” list. Press “Apply” to import all fields into the ParaView | |
session. The particles are visualized by selecting the imported data in | |
-the “Pipeline Browser”. Afterwards, click the “Glyph” … | |
-“Common” toolbar, or go to the “Filters” menu, and pre… | |
-the “Common” list. Choose “Sphere” as the “Glyph… | |
-1.0, choose “scalar” as the “Scale Mode”. Check the &#… | |
-set the “Set Scale Factor” to 1.0. The field “Maximum Number… | |
+the “Pipeline Browser”. Afterwards, click the “Glyph” button in the | |
+“Common” toolbar, or go to the “Filters” menu, and press “Glyph” f… | |
+the “Common” list. Choose “Sphere” as the “Glyph Type”, set “Rad… | |
+1.0, choose “scalar” as the “Scale Mode”. Check the “Edit” checkbo… | |
+set the “Set Scale Factor” to 1.0. The field “Maximum Number of Points” | |
may be increased if the number of particles exceed the default value. | |
-Finally press “Apply”, and the particles will appear in the main w… | |
-<p>The sphere resolution may be adjusted (“Theta resolution”, R… | |
-resolution”) to increase the quality and the computational requirements | |
+Finally press “Apply”, and the particles will appear in the main window.</… | |
+<p>The sphere resolution may be adjusted (“Theta resolution”, “Phi | |
+resolution”) to increase the quality and the computational requirements | |
of the rendering.</p> | |
<p>The fluid grid is visualized by opening the vti files, and pressing | |
-“Apply” to import all fluid field properties. To visualize the sca… | |
+“Apply” to import all fluid field properties. To visualize the scalar | |
fields, such as the pressure, the porosity, the porosity change or the | |
-velocity magnitude, choose “Surface” or “Surface With Edges&… | |
-“Representation”. Choose the desired property as the “Colori… | |
-It may be desirable to show the color bar by pressing the “Show” b… | |
-and “Rescale” to fit the color range limits to the current file. T… | |
-coordinate system can be displayed by checking the “Show Axis” fie… | |
-All adjustments by default require the “Apply” button to be pressed | |
+velocity magnitude, choose “Surface” or “Surface With Edges” as the | |
+“Representation”. Choose the desired property as the “Coloring” field. | |
+It may be desirable to show the color bar by pressing the “Show” button, | |
+and “Rescale” to fit the color range limits to the current file. The | |
+coordinate system can be displayed by checking the “Show Axis” field. | |
+All adjustments by default require the “Apply” button to be pressed | |
before regenerating the view.</p> | |
<p>The fluid vector fields (e.g. the fluid velocity) can be visualizing by | |
-e.g. arrows. To do this, select the fluid data in the “Pipeline | |
-Browser”. Press “Glyph” from the “Common” toolba… | |
-“Filters” mennu, and press “Glyph” from the “Com… | |
-that “Arrow” is selected as the “Glyph type”, and R… | |
-“Vectors” value. Adjust the “Maximum Number of Points”… | |
-big as the number of fluid cells in the grid. Press “Apply” to vis… | |
+e.g. arrows. To do this, select the fluid data in the “Pipeline | |
+Browser”. Press “Glyph” from the “Common” toolbar, or go to the | |
+“Filters” mennu, and press “Glyph” from the “Common” list. Make su… | |
+that “Arrow” is selected as the “Glyph type”, and “Velocity” as the | |
+“Vectors” value. Adjust the “Maximum Number of Points” to be at least … | |
+big as the number of fluid cells in the grid. Press “Apply” to visualize | |
the arrows.</p> | |
<p>If several data files are generated for the same simulation (e.g. using | |
-the <a class="reference internal" href="#sphere.sim.writeVTKall" title="sphere… | |
+the <a class="reference internal" href="#sphere.sim.writeVTKall" title="sphere… | |
visualization through time by using the ParaView controls.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informati… | |
-<li><strong>cell_centered</strong> (<em>bool</em>) – Write fluid values … | |
-(default = true)</li> | |
-<li><strong>forces</strong> (<em>bool</em>) – Write contact force files … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informatio… | |
+<li><p><strong>cell_centered</strong> (<em>bool</em>) – Write fluid values t… | |
+(default=true)</p></li> | |
+<li><p><strong>forces</strong> (<em>bool</em>) – Write contact force files (… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.writeVTKforces"> | |
-<code class="descname">writeVTKforces</code><span class="sig-paren">(</span><e… | |
+<code class="sig-name descname">writeVTKforces</code><span class="sig-paren">(… | |
<dd><p>Writes a VTK file with particle-interaction information to the | |
-<code class="docutils literal"><span class="pre">../output/</span></code> fold… | |
-<code class="docutils literal"><span class="pre"><self.sid>.vtp</span></… | |
-particle interactions in ParaView. First use the “Cell Data to Point | |
-Data” filter, and afterwards show the contact network with the “Tu… | |
+<code class="docutils literal notranslate"><span class="pre">../output/</span>… | |
+<code class="docutils literal notranslate"><span class="pre"><self.sid>.… | |
+particle interactions in ParaView. First use the “Cell Data to Point | |
+Data” filter, and afterwards show the contact network with the “Tube” | |
filter.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>folder</strong> (<em>str</em>) – The folder where to place t… | |
-(default = ‘../output/’)</li> | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informati… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>folder</strong> (<em>str</em>) – The folder where to place th… | |
+(default=’../output/’)</p></li> | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informatio… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.writebin"> | |
-<code class="descname">writebin</code><span class="sig-paren">(</span><em>fold… | |
-<dd><p>Writes a <code class="docutils literal"><span class="pre">sphere</span>… | |
-The file name will be in the format <code class="docutils literal"><span class… | |
-<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>folder</strong> (<em>str</em>) – The folder where to place t… | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informati… | |
+<code class="sig-name descname">writebin</code><span class="sig-paren">(</span… | |
+<dd><p>Writes a <code class="docutils literal notranslate"><span class="pre">s… | |
+The file name will be in the format <code class="docutils literal notranslate"… | |
+<p>See also <a class="reference internal" href="#sphere.sim.readbin" title="sp… | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>folder</strong> (<em>str</em>) – The folder where to place th… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show diagnostic informatio… | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="method"> | |
<dt id="sphere.sim.zeroKinematics"> | |
-<code class="descname">zeroKinematics</code><span class="sig-paren">(</span><s… | |
+<code class="sig-name descname">zeroKinematics</code><span class="sig-paren">(… | |
<dd><p>Zero all kinematic parameters of the particles. This function is useful | |
when output from one simulation is reused in another simulation.</p> | |
</dd></dl> | |
t@@ -3253,110 +2853,97 @@ when output from one simulation is reused in another … | |
<dl class="function"> | |
<dt id="sphere.status"> | |
-<code class="descclassname">sphere.</code><code class="descname">status</code>… | |
+<code class="sig-prename descclassname">sphere.</code><code class="sig-name de… | |
<dd><p>Check the status.dat file for the target project, and return the last o… | |
file number.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</tr> | |
-</tbody> | |
-</table> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><p><strong>project</strong> (<em>str</em>) – The simul… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The last output file written in the simulation calcu… | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>int</p> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="function"> | |
<dt id="sphere.thinsectionVideo"> | |
-<code class="descclassname">sphere.</code><code class="descname">thinsectionVi… | |
+<code class="sig-prename descclassname">sphere.</code><code class="sig-name de… | |
<dd><p>Uses ffmpeg to combine thin section images to an animation. This functi… | |
will implicity render the thin section images beforehand.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>project</strong> (<em>str</em>) – The simulation id of the p… | |
-<li><strong>out_folder</strong> (<em>str</em>) – The output folder for t… | |
-<li><strong>video_format</strong> (<em>str</em>) – The format of the out… | |
-<li><strong>fps</strong> (<em>int</em>) – The number of frames per secon… | |
-<li><strong>qscale</strong> (<em>float</em>) – The output video quality,… | |
-<li><strong>bitrate</strong> (<em>int</em>) – The bitrate to use in the … | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show ffmpeg output</li> | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>project</strong> (<em>str</em>) – The simulation id of the pr… | |
+<li><p><strong>out_folder</strong> (<em>str</em>) – The output folder for th… | |
+<li><p><strong>video_format</strong> (<em>str</em>) – The format of the outp… | |
+<li><p><strong>fps</strong> (<em>int</em>) – The number of frames per second… | |
+<li><p><strong>qscale</strong> (<em>float</em>) – The output video quality, … | |
+<li><p><strong>bitrate</strong> (<em>int</em>) – The bitrate to use in the o… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show ffmpeg output</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
<dl class="function"> | |
<dt id="sphere.torqueScriptParallel3"> | |
-<code class="descclassname">sphere.</code><code class="descname">torqueScriptP… | |
+<code class="sig-prename descclassname">sphere.</code><code class="sig-name de… | |
<dd><p>Create job script for the Torque queue manager for three binaries, | |
executed in parallel, ideally on three GPUs.</p> | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>email</strong> (<em>str</em>) – The e-mail address that Torq… | |
-<li><strong>email_alerts</strong> (<em>str</em>) – The type of Torque me… | |
-address. The character ‘b’ causes a mail to be sent when the | |
-execution begins. The character ‘e’ causes a mail to be sent when | |
-the execution ends normally. The character ‘a’ causes a mail to be | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>email</strong> (<em>str</em>) – The e-mail address that Torqu… | |
+<li><p><strong>email_alerts</strong> (<em>str</em>) – The type of Torque mes… | |
+address. The character ‘b’ causes a mail to be sent when the | |
+execution begins. The character ‘e’ causes a mail to be sent when | |
+the execution ends normally. The character ‘a’ causes a mail to be | |
sent if the execution ends abnormally. The characters can be written | |
-in any order.</li> | |
-<li><strong>walltime</strong> (<em>str</em>) – The maximal allowed time … | |
-‘HH:MM:SS’.</li> | |
-<li><strong>queue</strong> (<em>str</em>) – The Torque queue to schedule… | |
-<li><strong>cudapath</strong> (<em>str</em>) – The path of the CUDA libr… | |
-<li><strong>spheredir</strong> (<em>str</em>) – The path to the root dir… | |
-<li><strong>use_workdir</strong> (<em>bool</em>) – Use a different worki… | |
-<li><strong>workdir</strong> (<em>str</em>) – The working directory duri… | |
-<cite>use_workdir=True</cite></li> | |
+in any order.</p></li> | |
+<li><p><strong>walltime</strong> (<em>str</em>) – The maximal allowed time f… | |
+‘HH:MM:SS’.</p></li> | |
+<li><p><strong>queue</strong> (<em>str</em>) – The Torque queue to schedule … | |
+<li><p><strong>cudapath</strong> (<em>str</em>) – The path of the CUDA libra… | |
+<li><p><strong>spheredir</strong> (<em>str</em>) – The path to the root dire… | |
+<li><p><strong>use_workdir</strong> (<em>bool</em>) – Use a different workin… | |
+<li><p><strong>workdir</strong> (<em>str</em>) – The working directory durin… | |
+<cite>use_workdir=True</cite></p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-<tr class="field-even field"><th class="field-name">Returns:</th><td class="fi… | |
-</td> | |
-</tr> | |
-<tr class="field-odd field"><th class="field-name">Return type:</th><td class=… | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
-<p>See also <code class="xref py py-func docutils literal"><span class="pre">t… | |
+</dd> | |
+<dt class="field-even">Returns</dt> | |
+<dd class="field-even"><p>The filename of the script</p> | |
+</dd> | |
+<dt class="field-odd">Return type</dt> | |
+<dd class="field-odd"><p>str</p> | |
+</dd> | |
+</dl> | |
+<p>See also <code class="xref py py-func docutils literal notranslate"><span c… | |
</dd></dl> | |
<dl class="function"> | |
<dt id="sphere.video"> | |
-<code class="descclassname">sphere.</code><code class="descname">video</code><… | |
+<code class="sig-prename descclassname">sphere.</code><code class="sig-name de… | |
<dd><p>Uses ffmpeg to combine images to animation. All images should be | |
-rendered beforehand using <a class="reference internal" href="#sphere.render" … | |
-<table class="docutils field-list" frame="void" rules="none"> | |
-<col class="field-name" /> | |
-<col class="field-body" /> | |
-<tbody valign="top"> | |
-<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="… | |
-<li><strong>project</strong> (<em>str</em>) – The simulation id of the p… | |
-<li><strong>out_folder</strong> (<em>str</em>) – The output folder for t… | |
-<li><strong>video_format</strong> (<em>str</em>) – The format of the out… | |
-<li><strong>graphics_folder</strong> (<em>str</em>) – The folder contain… | |
-<li><strong>graphics_format</strong> (<em>str</em>) – The format of the … | |
-<li><strong>fps</strong> (<em>int</em>) – The number of frames per secon… | |
-<li><strong>qscale</strong> (<em>float</em>) – The output video quality,… | |
-<li><strong>bitrate</strong> (<em>int</em>) – The bitrate to use in the … | |
-<li><strong>verbose</strong> (<em>bool</em>) – Show ffmpeg output</li> | |
+rendered beforehand using <a class="reference internal" href="#sphere.render" … | |
+<dl class="field-list simple"> | |
+<dt class="field-odd">Parameters</dt> | |
+<dd class="field-odd"><ul class="simple"> | |
+<li><p><strong>project</strong> (<em>str</em>) – The simulation id of the pr… | |
+<li><p><strong>out_folder</strong> (<em>str</em>) – The output folder for th… | |
+<li><p><strong>video_format</strong> (<em>str</em>) – The format of the outp… | |
+<li><p><strong>graphics_folder</strong> (<em>str</em>) – The folder containi… | |
+<li><p><strong>graphics_format</strong> (<em>str</em>) – The format of the r… | |
+<li><p><strong>fps</strong> (<em>int</em>) – The number of frames per second… | |
+<li><p><strong>qscale</strong> (<em>float</em>) – The output video quality, … | |
+<li><p><strong>bitrate</strong> (<em>int</em>) – The bitrate to use in the o… | |
+<li><p><strong>verbose</strong> (<em>bool</em>) – Show ffmpeg output</p></li> | |
</ul> | |
-</td> | |
-</tr> | |
-</tbody> | |
-</table> | |
+</dd> | |
+</dl> | |
</dd></dl> | |
</div> | |
t@@ -3368,11 +2955,11 @@ rendered beforehand using <a class="reference internal… | |
</div> | |
<div class="sphinxsidebar" role="navigation" aria-label="main navigation… | |
<div class="sphinxsidebarwrapper"> | |
- <h3><a href="index.html">Table Of Contents</a></h3> | |
+ <h3><a href="index.html">Table of Contents</a></h3> | |
<ul> | |
<li><a class="reference internal" href="#">Python API</a><ul> | |
<li><a class="reference internal" href="#sample-usage">Sample usage</a></li> | |
-<li><a class="reference internal" href="#module-sphere">The <code class="docut… | |
+<li><a class="reference internal" href="#module-sphere">The <code class="docut… | |
</ul> | |
</li> | |
</ul> | |
t@@ -3386,18 +2973,18 @@ rendered beforehand using <a class="reference internal… | |
<div role="note" aria-label="source link"> | |
<h3>This Page</h3> | |
<ul class="this-page-menu"> | |
- <li><a href="_sources/python_api.txt" | |
+ <li><a href="_sources/python_api.rst.txt" | |
rel="nofollow">Show Source</a></li> | |
</ul> | |
</div> | |
<div id="searchbox" style="display: none" role="search"> | |
- <h3>Quick search</h3> | |
+ <h3 id="searchlabel">Quick search</h3> | |
+ <div class="searchformwrapper"> | |
<form class="search" action="search.html" method="get"> | |
- <div><input type="text" name="q" /></div> | |
- <div><input type="submit" value="Go" /></div> | |
- <input type="hidden" name="check_keywords" value="yes" /> | |
- <input type="hidden" name="area" value="default" /> | |
+ <input type="text" name="q" aria-labelledby="searchlabel" /> | |
+ <input type="submit" value="Go" /> | |
</form> | |
+ </div> | |
</div> | |
<script type="text/javascript">$('#searchbox').show(0);</script> | |
</div> | |
t@@ -3424,7 +3011,7 @@ rendered beforehand using <a class="reference internal" … | |
</div> | |
<div class="footer" role="contentinfo"> | |
© Copyright 2014, Anders Damsgaard. | |
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. | |
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0. | |
</div> | |
</body> | |
</html> | |
\ No newline at end of file | |
diff --git a/doc/html/search.html b/doc/html/search.html | |
t@@ -1,41 +1,27 @@ | |
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
+<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
- | |
+ <meta charset="utf-8" /> | |
<title>Search — sphere 2.15-beta documentation</title> | |
- | |
<link rel="stylesheet" href="_static/classic.css" type="text/css" /> | |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
- <script type="text/javascript"> | |
- var DOCUMENTATION_OPTIONS = { | |
- URL_ROOT: './', | |
- VERSION: '2.15-beta', | |
- COLLAPSE_INDEX: false, | |
- FILE_SUFFIX: '.html', | |
- HAS_SOURCE: true | |
- }; | |
- </script> | |
+ | |
+ <script type="text/javascript" id="documentation_options" data-url_root=".… | |
<script type="text/javascript" src="_static/jquery.js"></script> | |
<script type="text/javascript" src="_static/underscore.js"></script> | |
<script type="text/javascript" src="_static/doctools.js"></script> | |
+ <script type="text/javascript" src="_static/language_data.js"></script> | |
+ | |
<script type="text/javascript" src="_static/searchtools.js"></script> | |
<link rel="index" title="Index" href="genindex.html" /> | |
<link rel="search" title="Search" href="#" /> | |
- <link rel="top" title="sphere 2.15-beta documentation" href="index.html" /> | |
- <script type="text/javascript"> | |
- jQuery(function() { Search.loadIndex("searchindex.js"); }); | |
- </script> | |
- | |
- <script type="text/javascript" id="searchindexloader"></script> | |
+ <script type="text/javascript" src="searchindex.js" defer></script> | |
- </head> | |
- <body role="document"> | |
+ </head><body> | |
<div class="related" role="navigation" aria-label="related navigation"> | |
<h3>Navigation</h3> | |
<ul> | |
t@@ -69,7 +55,7 @@ | |
containing fewer words won't appear in the result list. | |
</p> | |
<form action="" method="get"> | |
- <input type="text" name="q" value="" /> | |
+ <input type="text" name="q" aria-labelledby="search-documentation" value="… | |
<input type="submit" value="search" /> | |
<span id="search-progress" style="padding-left: 10px"></span> | |
</form> | |
t@@ -101,7 +87,7 @@ | |
</div> | |
<div class="footer" role="contentinfo"> | |
© Copyright 2014, Anders Damsgaard. | |
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. | |
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0. | |
</div> | |
</body> | |
</html> | |
\ No newline at end of file | |
diff --git a/doc/html/searchindex.js b/doc/html/searchindex.js | |
t@@ -1 +1 @@ | |
-Search.setIndex({envversion:49,filenames:["cfd","dem","index","introduction","… | |
-\ No newline at end of file | |
+Search.setIndex({docnames:["cfd","dem","index","introduction","python_api","sp… | |
+\ No newline at end of file | |
diff --git a/doc/html/sphere_internals.html b/doc/html/sphere_internals.html | |
t@@ -1,34 +1,23 @@ | |
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
+<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
- | |
+ <meta charset="utf-8" /> | |
<title>sphere internals — sphere 2.15-beta documentation</title> | |
- | |
<link rel="stylesheet" href="_static/classic.css" type="text/css" /> | |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | |
- <script type="text/javascript"> | |
- var DOCUMENTATION_OPTIONS = { | |
- URL_ROOT: './', | |
- VERSION: '2.15-beta', | |
- COLLAPSE_INDEX: false, | |
- FILE_SUFFIX: '.html', | |
- HAS_SOURCE: true | |
- }; | |
- </script> | |
+ <script type="text/javascript" id="documentation_options" data-url_root=".… | |
<script type="text/javascript" src="_static/jquery.js"></script> | |
<script type="text/javascript" src="_static/underscore.js"></script> | |
<script type="text/javascript" src="_static/doctools.js"></script> | |
+ <script type="text/javascript" src="_static/language_data.js"></script> | |
+ | |
<link rel="index" title="Index" href="genindex.html" /> | |
<link rel="search" title="Search" href="search.html" /> | |
- <link rel="top" title="sphere 2.15-beta documentation" href="index.html" /> | |
<link rel="prev" title="Python API" href="python_api.html" /> | |
- </head> | |
- <body role="document"> | |
+ </head><body> | |
<div class="related" role="navigation" aria-label="related navigation"> | |
<h3>Navigation</h3> | |
<ul> | |
t@@ -53,7 +42,7 @@ | |
<div class="section" id="sphere-internals"> | |
<h1>sphere internals<a class="headerlink" href="#sphere-internals" title="Perm… | |
<p>The <em>sphere</em> executable has the following options:</p> | |
-<div class="highlight-text"><div class="highlight"><pre><span></span>$ ../../s… | |
+<div class="highlight-text notranslate"><div class="highlight"><pre><span></sp… | |
../../sphere: particle dynamics simulator | |
Usage: ../../sphere [OPTION[S]]... [FILE1 ...] | |
Options: | |
t@@ -77,64 +66,47 @@ Raytracer (-r) specific options: | |
-c, --contacts Print a list of particle-particle contacts | |
</pre></div> | |
</div> | |
-<p>The most common way to invoke <em>sphere</em> is however via the Python API… | |
+<p>The most common way to invoke <em>sphere</em> is however via the Python API… | |
<p>subsection{The <em>sphere</em> algorithm} | |
label{subsec:spherealgo} | |
The <em>sphere</em>-binary is launched from the system terminal by passing the… | |
#. System check, including search for NVIDIA CUDA compatible devices (texttt{m… | |
<ol class="arabic simple"> | |
-<li>Initial data import from binary input file (texttt{main.cpp}).</li> | |
-<li>Allocation of memory for all host variables (particles, grid, walls, etc.)… | |
-<li>Continued import from binary input file (texttt{main.cpp}).</li> | |
-<li>Control handed to GPU-specific function texttt{gpuMain(ldots)} (texttt{dev… | |
-<li>Memory allocation of device memory (texttt{device.cu}).</li> | |
-<li>Transfer of data from host to device variables (texttt{device.cu}).</li> | |
-<li>Initialization of Thrustfootnote{url{<a class="reference external" href="h… | |
-<li>Calculation of GPU workload configuration (thread and block layout) (textt… | |
-<li>Status and data written to verb”<simulation_ID>.status.datR… | |
-<li>Main loop (while texttt{time.current <= time.total}) (functions called … | |
+<li><p>Initial data import from binary input file (texttt{main.cpp}).</p></li> | |
+<li><p>Allocation of memory for all host variables (particles, grid, walls, et… | |
+<li><p>Continued import from binary input file (texttt{main.cpp}).</p></li> | |
+<li><p>Control handed to GPU-specific function texttt{gpuMain(ldots)} (texttt{… | |
+<li><p>Memory allocation of device memory (texttt{device.cu}).</p></li> | |
+<li><p>Transfer of data from host to device variables (texttt{device.cu}).</p>… | |
+<li><p>Initialization of Thrustfootnote{url{<a class="reference external" href… | |
+<li><p>Calculation of GPU workload configuration (thread and block layout) (te… | |
+<li><p>Status and data written to verb”<simulation_ID>.status.dat” a… | |
+<li><p>Main loop (while texttt{time.current <= time.total}) (functions call… | |
</ol> | |
<blockquote> | |
<div><ol class="arabic"> | |
-<li><p class="first">label{loopstart}CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{calcParticleCellID<<<,>>>(ldots)… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{thrust::sort_by_key(ldots)}: Thrust radix sort of … | |
-</li> | |
-<li><p class="first">texttt{cudaMemset(ldots)}: Writing zero value (texttt{0xf… | |
-</li> | |
-<li><p class="first">texttt{reorderArrays<<<,>>>(ldots)}: Re… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">Optional: texttt{topology<<<,>>>(ldots)… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{interact<<<,>>>(ldots)}: For eac… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{integrate<<<,>>>(ldots)}: Updati… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{summation<<<,>>>(ldots)}: Partic… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{integrateWalls<<<,>>>(ldots)}: U… | |
-</li> | |
-<li><p class="first">Update of timers and loop-related counters (e.g. texttt{t… | |
-</li> | |
-<li><p class="first">If file output interval is reached:</p> | |
+<li><p>label{loopstart}CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{calcParticleCellID<<<,>>>(ldots)}: Particle-gr… | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{thrust::sort_by_key(ldots)}: Thrust radix sort of particle-grid … | |
+<li><p>texttt{cudaMemset(ldots)}: Writing zero value (texttt{0xffffffff}) to e… | |
+<li><p>texttt{reorderArrays<<<,>>>(ldots)}: Reordering of pa… | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>Optional: texttt{topology<<<,>>>(ldots)}: If particle… | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{interact<<<,>>>(ldots)}: For each particle: Se… | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{integrate<<<,>>>(ldots)}: Updating of spatial … | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{summation<<<,>>>(ldots)}: Particle contributio… | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{integrateWalls<<<,>>>(ldots)}: Updating of spa… | |
+<li><p>Update of timers and loop-related counters (e.g. texttt{time.current}),… | |
+<li><p>If file output interval is reached:</p> | |
<blockquote> | |
<div><blockquote> | |
-<div><p>item Optional write of data to output binary (verb”<simulatio… | |
-item Update of verb”<simulation_ID>.status#..bin” (texttt{de… | |
+<div><p>item Optional write of data to output binary (verb”<simulation_ID… | |
+item Update of verb”<simulation_ID>.status#..bin” (texttt{device.cu}… | |
</div></blockquote> | |
<p>item Return to point ref{loopstart}, unless texttt{time.current >= time.… | |
</div></blockquote> | |
t@@ -142,110 +114,92 @@ item Update of verb”<simulation_ID>.status#… | |
</ol> | |
</div></blockquote> | |
<ol class="arabic simple"> | |
-<li>label{loopend}Liberation of device memory (texttt{device.cu}).</li> | |
-<li>Control returned to texttt{main(ldots)}, liberation of host memory (texttt… | |
-<li>End of program, return status equal to zero (0) if no problems where encou… | |
+<li><p>label{loopend}Liberation of device memory (texttt{device.cu}).</p></li> | |
+<li><p>Control returned to texttt{main(ldots)}, liberation of host memory (tex… | |
+<li><p>End of program, return status equal to zero (0) if no problems where en… | |
</ol> | |
<div class="section" id="numerical-algorithm"> | |
<h2>Numerical algorithm<a class="headerlink" href="#numerical-algorithm" title… | |
<p>The <em>sphere</em>-binary is launched from the system terminal by passing … | |
<ol class="arabic simple"> | |
-<li>System check, including search for NVIDIA CUDA compatible devices (texttt{… | |
-<li>Initial data import from binary input file (texttt{main.cpp}).</li> | |
-<li>Allocation of memory for all host variables (particles, grid, walls, etc.)… | |
-<li>Continued import from binary input file (texttt{main.cpp}).</li> | |
-<li>Control handed to GPU-specific function texttt{gpuMain(ldots)} (texttt{dev… | |
-<li>Memory allocation of device memory (texttt{device.cu}).</li> | |
-<li>Transfer of data from host to device variables (texttt{device.cu}).</li> | |
-<li>Initialization of Thrustfootnote{url{<a class="reference external" href="h… | |
-<li>Calculation of GPU workload configuration (thread and block layout) (textt… | |
-<li>Status and data written to verb”<simulation_ID>.status.datR… | |
-<li>Main loop (while texttt{time.current <= time.total}) (functions called … | |
+<li><p>System check, including search for NVIDIA CUDA compatible devices (text… | |
+<li><p>Initial data import from binary input file (texttt{main.cpp}).</p></li> | |
+<li><p>Allocation of memory for all host variables (particles, grid, walls, et… | |
+<li><p>Continued import from binary input file (texttt{main.cpp}).</p></li> | |
+<li><p>Control handed to GPU-specific function texttt{gpuMain(ldots)} (texttt{… | |
+<li><p>Memory allocation of device memory (texttt{device.cu}).</p></li> | |
+<li><p>Transfer of data from host to device variables (texttt{device.cu}).</p>… | |
+<li><p>Initialization of Thrustfootnote{url{<a class="reference external" href… | |
+<li><p>Calculation of GPU workload configuration (thread and block layout) (te… | |
+<li><p>Status and data written to verb”<simulation_ID>.status.dat” a… | |
+<li><p>Main loop (while texttt{time.current <= time.total}) (functions call… | |
</ol> | |
<blockquote> | |
<div><ol class="arabic"> | |
-<li><p class="first">label{loopstart}CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{calcParticleCellID<<<,>>>(ldots)… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{thrust::sort_by_key(ldots)}: Thrust radix sort of … | |
-</li> | |
-<li><p class="first">texttt{cudaMemset(ldots)}: Writing zero value (texttt{0xf… | |
-</li> | |
-<li><p class="first">texttt{reorderArrays<<<,>>>(ldots)}: Re… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">Optional: texttt{topology<<<,>>>(ldots)… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{interact<<<,>>>(ldots)}: For eac… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{integrate<<<,>>>(ldots)}: Updati… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{summation<<<,>>>(ldots)}: Partic… | |
-</li> | |
-<li><p class="first">CUDA thread synchronization point.</p> | |
-</li> | |
-<li><p class="first">texttt{integrateWalls<<<,>>>(ldots)}: U… | |
-</li> | |
-<li><p class="first">Update of timers and loop-related counters (e.g. texttt{t… | |
-</li> | |
-<li><p class="first">If file output interval is reached:</p> | |
+<li><p>label{loopstart}CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{calcParticleCellID<<<,>>>(ldots)}: Particle-gr… | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{thrust::sort_by_key(ldots)}: Thrust radix sort of particle-grid … | |
+<li><p>texttt{cudaMemset(ldots)}: Writing zero value (texttt{0xffffffff}) to e… | |
+<li><p>texttt{reorderArrays<<<,>>>(ldots)}: Reordering of pa… | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>Optional: texttt{topology<<<,>>>(ldots)}: If particle… | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{interact<<<,>>>(ldots)}: For each particle: Se… | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{integrate<<<,>>>(ldots)}: Updating of spatial … | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{summation<<<,>>>(ldots)}: Particle contributio… | |
+<li><p>CUDA thread synchronization point.</p></li> | |
+<li><p>texttt{integrateWalls<<<,>>>(ldots)}: Updating of spa… | |
+<li><p>Update of timers and loop-related counters (e.g. texttt{time.current}),… | |
+<li><p>If file output interval is reached:</p> | |
<blockquote> | |
<div><ul class="simple"> | |
-<li>Optional write of data to output binary (verb”<simulation_ID>.… | |
-<li>Update of verb”<simulation_ID>.status#..bin” (texttt{dev… | |
+<li><p>Optional write of data to output binary (verb”<simulation_ID>.o… | |
+<li><p>Update of verb”<simulation_ID>.status#..bin” (texttt{device.c… | |
</ul> | |
</div></blockquote> | |
</li> | |
-<li><p class="first">Return to point ref{loopstart}, unless texttt{time.curren… | |
-</li> | |
+<li><p>Return to point ref{loopstart}, unless texttt{time.current >= time.t… | |
</ol> | |
</div></blockquote> | |
<ol class="arabic simple"> | |
-<li>label{loopend}Liberation of device memory (texttt{device.cu}).</li> | |
-<li>Control returned to texttt{main(ldots)}, liberation of host memory (texttt… | |
-<li>End of program, return status equal to zero (0) if no problems where encou… | |
+<li><p>label{loopend}Liberation of device memory (texttt{device.cu}).</p></li> | |
+<li><p>Control returned to texttt{main(ldots)}, liberation of host memory (tex… | |
+<li><p>End of program, return status equal to zero (0) if no problems where en… | |
</ol> | |
<p>The length of the computational time steps (texttt{time.dt}) is calculated … | |
<div class="math"> | |
-<p><img src="_images/math/f068b70724ff65c62363e69535c2b276fab6dad3.png" alt="\… | |
-</div><p>where <img class="math" src="_images/math/edba97b4c0d864d26e92ea7ea73… | |
-The time step is set by this relationship in <code class="xref py py-func docu… | |
+<p><img src="_images/math/e721d97e515c11c9ef7209be37e1c98029ffdfa2.png" alt="\… | |
+</div><p>where <img class="math" src="_images/math/e9bc7da808d33a16a8347f27a51… | |
+The time step is set by this relationship in <code class="xref py py-func docu… | |
This equation ensures that the elastic wave (traveling at the speed of sound) … | |
<p>subsubsection{Host and device memory types} | |
label{subsubsec:memorytypes} | |
A full, listed description of the <em>sphere</em> source code variables can be… | |
<p>The floating point precision operating internally in <em>sphere</em> is def… | |
-<p>Three-dimensional variables (e.g. spatial vectors in <cite>E^3</cite>) are … | |
+<p>Three-dimensional variables (e.g. spatial vectors in <cite>E^3</cite>) are … | |
<p>paragraph{Host memory} is the main random-access computer memory (RAM), i.e… | |
-<p>paragraph{Device memory} is the main, global device memory. It resides off-… | |
+<p>paragraph{Device memory} is the main, global device memory. It resides off-… | |
<p>marginpar{Todo: Expand section on device memory types}</p> | |
-<p>paragraph{Constant memory} values cannot be changed after they are set, and… | |
+<p>paragraph{Constant memory} values cannot be changed after they are set, and… | |
<p>%subsection{The main loop} | |
%label{subsec:mainloop} | |
-%The <em>sphere</em> software calculates particle movement and rotation based … | |
+%The <em>sphere</em> software calculates particle movement and rotation based … | |
<p>subsection{Performance} | |
marginpar{Todo: insert graph of performance vs. np and performance vs. <cite>D… | |
subsubsection{Particles and computational time}</p> | |
<p>subsection{Compilation} | |
label{subsec:compilation} | |
An important note is that the texttt{C} examples of the NVIDIA CUDA SDK should… | |
-<p><em>sphere</em> is supplied with several Makefiles, which automate the comp… | |
+<p><em>sphere</em> is supplied with several Makefiles, which automate the comp… | |
</div> | |
<div class="section" id="c-reference"> | |
<h2>C++ reference<a class="headerlink" href="#c-reference" title="Permalink to… | |
<dl class="class"> | |
-<dt id="_CPPv23DEM"> | |
-<span id="DEM"></span><span class="target" id="classDEM"></span><em class="pro… | |
+<dt id="_CPPv43DEM"> | |
+<span id="_CPPv33DEM"></span><span id="_CPPv23DEM"></span><span id="DEM"></spa… | |
<dd></dd></dl> | |
</div> | |
t@@ -257,7 +211,7 @@ An important note is that the texttt{C} examples of the NV… | |
</div> | |
<div class="sphinxsidebar" role="navigation" aria-label="main navigation… | |
<div class="sphinxsidebarwrapper"> | |
- <h3><a href="index.html">Table Of Contents</a></h3> | |
+ <h3><a href="index.html">Table of Contents</a></h3> | |
<ul> | |
<li><a class="reference internal" href="#">sphere internals</a><ul> | |
<li><a class="reference internal" href="#numerical-algorithm">Numerical algori… | |
t@@ -272,18 +226,18 @@ An important note is that the texttt{C} examples of the … | |
<div role="note" aria-label="source link"> | |
<h3>This Page</h3> | |
<ul class="this-page-menu"> | |
- <li><a href="_sources/sphere_internals.txt" | |
+ <li><a href="_sources/sphere_internals.rst.txt" | |
rel="nofollow">Show Source</a></li> | |
</ul> | |
</div> | |
<div id="searchbox" style="display: none" role="search"> | |
- <h3>Quick search</h3> | |
+ <h3 id="searchlabel">Quick search</h3> | |
+ <div class="searchformwrapper"> | |
<form class="search" action="search.html" method="get"> | |
- <div><input type="text" name="q" /></div> | |
- <div><input type="submit" value="Go" /></div> | |
- <input type="hidden" name="check_keywords" value="yes" /> | |
- <input type="hidden" name="area" value="default" /> | |
+ <input type="text" name="q" aria-labelledby="searchlabel" /> | |
+ <input type="submit" value="Go" /> | |
</form> | |
+ </div> | |
</div> | |
<script type="text/javascript">$('#searchbox').show(0);</script> | |
</div> | |
t@@ -307,7 +261,7 @@ An important note is that the texttt{C} examples of the NV… | |
</div> | |
<div class="footer" role="contentinfo"> | |
© Copyright 2014, Anders Damsgaard. | |
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. | |
+ Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0. | |
</div> | |
</body> | |
</html> | |
\ No newline at end of file | |
diff --git a/doc/pdf/darcy.pdf b/doc/pdf/darcy.pdf | |
Binary files differ. | |
diff --git a/doc/pdf/sphere.pdf b/doc/pdf/sphere.pdf | |
Binary files differ. | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -2984,23 +2984,20 @@ class sim: | |
self.w_m=numpy.zeros(1) | |
self.adjustWall(idx=0, adjust=z_adjust) | |
- def adjustWall(self, idx, adjust=1.1, wall_mass_factor=1.0): | |
+ def adjustWall(self, idx, adjust=1.1): | |
''' | |
Adjust grid and dynamic wall to max. particle position. The wall | |
thickness will by standard equal the maximum particle diameter. The | |
density equals the particle density, and the wall size is equal to the | |
width and depth of the simulation domain (`self.L[0]` and `self.L[1]`). | |
- The total wall mass can be linearly scaled by the `wall_mass_factor` | |
- parameter. | |
:param: idx: The wall to adjust. 0=+z, upper wall (default), 1=-x, | |
left wall, 2=+x, right wall, 3=-y, front wall, 4=+y, back | |
wall. | |
:type idx: int | |
- :param z_adjust: Increase the world and grid size by this amount to | |
+ :param adjust: Increase the world and grid size by this amount to | |
allow for wall movement. | |
- :type z_adjust: float | |
- :param | |
+ :type adjust: float | |
''' | |
if idx == 0: |