The user interfaces for the solvers have been written in HTML5, using inline SVG for visualization purposes,
with active content coded in JavaScript. The routines at the cores of the solvers have been compiled to JavaScript / WebAssembly. Comments:
-
Browser support for HTML5 is required, JavaScript needs to be enabled, a WebAssembly engine must be available. The pages pass the W3C validator (11.2021) without error messages or warnings.
So far the execution has been observed to be reasonably platform- and browser-independent, tested for up-to-date versions (11.2021) of several major browsers, including
variants for mobile. Nevertheless, not all browsers implement the full HTML5 specification, in particular older variants may lack certain functionality (this also concerns the last versions of MS Internet Explorer).
Functions that are triggered by the hovering of a (mouse) pointer are obviously not available with a touch-based browser.
-
Beyond these standard browser features, no further plugins are required. In particular, when compared to the preceding Java Applets, no more unsettling security warnings or confirmation dialogs should appear.
-
The code has been compiled from the original
Metric or
WMM
C++ sources to JavaScript/Wasm using the emscripten tools. The outcome should thus be
identical, in principle (it is, as far as has been observed so far).
-
The program code is executed after ahead of time or just in time compilation by the JavaScript engine of your browser. Still, its execution may take somewhat longer than running the analogous compiled C++ code directly,
and the speed depends on your hardware.
-
After accessing the pages on the SiIO website, and downloading the solver script, the programs run locally on your
machine. None of the input data is being sent over your internet connection (that is, unless things happen
that remain outside the control of the solver programs ...).
-
Depending (sensitively) on the selected computational parameters, and on your hardware, specific calculations may take a while (this concerns in particular the QuEPS solver). The respective parts of the scripts then block the interactivity of the browser; the page appears "to hang", while the scripts are still executed. After some time the
browser might complain with a message "page not responding", or similar (try giving the script permission to continue). Note that this does not constitute erroneous
behaviour, but is related to the computational effort required for the task that you specified. Some care has been taken to avoid these scenarios, in
the form of splitting the original code into smaller parts, and including progress bars. Still, tasks of higher computational complexity can easily be formulated.
In those cases it might be advisable to move to a computer a little more powerful than your mobile or tablet.
-
Those parts of the scripts that concern the user interface are directly embedded in the solvers html file. Upon opening the page, the browser loads the actual core code ("preparing scripts") from separate files. Now and then the solver pages and the scripts change; try to clear the cache of your browser in case of problems.
-
The text fields accept ordinary numbers as well as simple C-style expressions (cf. the Teval script), provided that the result is reasonable for the particular problem.
Try e.g. an input '1.234*2' to double a value '1.234'.
-
Since direct access to local files is restricted for security reasons,
indirect means have been adopted for data export. Options for "downloading" data files and SVG figures are provided
(note that these are Object/Blob-URLs, generated on your local computer).
If that fails, due to lack of support by your browser, just open an empty file
in your favorite text editor (preferably one that supports Unicode / UTF-8 character encoding). Then use a "select all, copy, paste"-procedure to transfer the data / SVG-code supplied in the text windows, and save the respective file with the appropriate extension.
-
You might wish to employ a suitable drawing program for vector graphics (e.g. Inkscape),
to edit the .svg-figures produced by the solvers, and to convert these to other
formats like .eps or .pdf.
The programs are meant as a kind of pocket calculator for a quick
assessment of the corresponding problems in photonics, and for purposes of
demonstration. The limited functionality is hardly sufficient for more
extensive design tasks, where one should resort to other computational
means. Analogous programs (e.g. the
Metric and
WMM
tools) are available from this site, without a
graphical user interface, but applicable to a substantially larger variety of
problems.