Tags: feellgood/FeeLLGood
Tags
Fix sign of demagnetizing energy in the right place The previous commit changed the sign of the contribution of the volume charges to the demagnetizing energy. It turns out the sign within the expression was right to begin with. However, it relied on Tet::interpolation(), which had the wrong sign. This error did not affect the magnetization dynamics because that particular overload of Tet::interpolation() is only used to compute the demagnetizing energy. For sanity's sake, use the right sign in both places.
Fix the serialization of multiline functions As both Bext and initial_magnetization can be defined as JavaScript function expressions, this encourages the use of YAML multiline strings. Let `feellgood --verify` properly serialize them as "literal style" multiline strings, e.g. Bext: | function(t) { // ... }
Replace exprtk with Duktape Duktape is a compact, easy to integrate embeddable JavaScript engine.[1] Use it, instead of exprtk, to reimplement MagnetizationParser and TimeDepFieldParser, without touching their interface. The expressions of the initial magnetization provided by the user can be converted into JavaScript function expressions by this string concatenation: "function(x,y,z) { return (" + expression + "); }" Update the documentation files README.md and License.txt accordingly. Also update install-dependencies.sh in order to install Duktape instead of exprtk. Tests show a spectacular reduction in build time and binary size. These were measured by doing a clean build on an Intel Xeon W-2255 (10 cores, 20 threads), with `make -j 20`, no ccache, and a warm disk cache. Duktape was linked statically in order to make the size comparison fair: exprtk duktape ───────────────────────────────────── build time (s) 52.257 5.316 binary size 12,440,856 1,409,112 There is no measurable difference in feeLLGood's performance. Note that the set of primitives available for building expressions has changed: these are now interpreted according to the standard JavaScript syntax, with the addition that all properties of the `Math` object can be accessed without the `Math.` prefix. Worth noting: * π is `PI` (in upper case) * the exponentiation operator is `**` * the `random()` function returns a pseudo-random number within [0, 1) [1] https://duktape.org/
Add example shell script This script simulates ferromagnetic resonance on a nanoparticle. It illustrates how bash can be used to: - run multiple simulations in a loop - generate the settings file programmatically and feed it to feeLLGood's standard input - extract data from multiple simulations and consolidate it in a single file - use gnuplot to plot the consolidated data
PreviousNext