NumLabs features Print

Math features

The principal and unique feature of any lab from NumLabs is the support for arbitrary-precision numbers in all the numerical algorithms implemented. User can choose double precision (8 bytes) or single precision (4 bytes) or arbitrary precision (with arbitrary number of decimal digits). In the last case computations are performed with integer arithmetics so the rounding errors are minimal. If double precision is chosen there is one more opportunity: the number of function calls and the number of arithmetic operations can be counted (that is useful to compare numerical methods). The time of computations is also shown by the lab but the difference in time is often difficult to interpret since computers perform various optimizations.

User interface features

Labs of NumLabs project can be launched in several ways:

  • as Java applets (in a web browser);
  • as standalone applications;
  • within a special environment “General interface” (available in full NumLabs version only) that presents all labs and their data versions in a tree.

Student can save all the parameters of the problem, method, etc. to a file (called version) for further loading it (e.g. to show the results to the tutor). Teachers can also prepare such files in order to quicken demonstration of the topic in question. The version file have human-readable XML format so it is editable not only by means of the lab but by any text editor.

The menu and the toolbar of a lab contain no frequently used actions (except of start/pause/stop actions) because the main principle of the labs is “All the data and controls should be shown immediately in the main screen”. Nevertheless there are the following groups of auxiliary actions common for all labs:

  • Saving lab versions and opening them with file browser (“File” menu; not available in applets). The general interface also has actions for closing labs and for saving all open labs.
  • Starting, pausing and stopping computations (“Computation” menu). Not all the labs of NumLabs support pausing and even stopping because these features is useful for long computations only. It is worth mentioning that the explicit starting computation is not required (if the option “Recalculate automatically” is checked).
  • Changing the style of UI as well as settings of numbers and plots (“Options” menu).
  • Switching between labs / lab variants (“Window” menu; available only in the General interface).
  • Opening links to various chapters of HTML help reference on labs (“Help” menu); most of the links depend on the lab that is now open/active. In applications, help pages are opened by a default system browser, in applets they are opened in a new window of the browser showing the applet.

The essential part of any lab is the parameters panel that is usually organized as a hierarchy according to the structure of the lab’s input data. The parameters panel usually contains:

  • text fields for numbers input (with check for the predefined value range and with quick changing values by stroking arrow keys),
  • text fields for formulas input (with formula validation and with the ability to get formula pattern from a drop-down box),
  • tables (with support for numbers, fractions, math constants, formulas).

The default policy of the parameters panel (that can be changed by the checkbox “Recalculate automatically”) results in obtaining new results (in performing computations and updating plots) on a change of any parameter.

Results of computations are shown simultaneously in several plots (and often in several curves of the plot). Each plot has the following features:

  • Zooming by selecting the desired rectangle with the mouse cursor.
  • Showing x and y coordinates of the curve point near cursor position.
  • Measuring the slope coefficient of the line (curve interval). It is usually available for logarithmic-scale plots where the slope denotes the power coefficient of the function.
  • Saving current plot state to a file as a picture (in PNG, JPEG or BMP formats).
  • Saving plot data (all points of all curves of the plot) to a tab-separated or comma-separated text file. It can be useful for detailed analysis either by viewing the numbers (number precision in the file is more than in the plot) or by any external tool.
  • Automatic scaling the plot after obtaining new data for it with the ability to fix current scale for next computations.
  • All the features above are invoked by menu items from the context menu of a plot.

The General interface (available only in the full version of NumLabs) manages both predefined and user versions of lab data files for all labs. The General interface shows labs and their versions in tabs or in internal windows. The navigator tree of the interface allows not only to open labs/versions (in the same or in a new tab/window) but to compare input/output parameters of several versions, etc. You can also use the General interface to open any external programs (with a command line having the version file name chosen in the navigator tree).

Features of specific labs

8 labs of NumLabs project can be conditionally categorized in the following 3 groups.

  • Operations on functions: Expansion to series [1a], Numerical differentiation [1b], Numerical integration [3].
  • Approximation of lookup tables: Interpolation [2], Least squares approximation (Overdetermined systems) [6].
  • Algebraic equations: Linear systems [4], Nonlinear systems [5], Grid equations solving (Boundary problem for Poisson equation) [7].

The numbers in square brackets are indices of the labs in a proposed sequence of the course.

The labs #1a and #1b address the same topic that can be referred to as “Computational errors”, so they can be treated as alternatives. Both of them assume varying number precision as an obligatory part of the training so they have appropriate controls in their parameters panels (whereas all other labs have such controls available only from menu).

  • The lab #1a can also vary the method of summation of series terms: from the first or last term or with Horner scheme (it is useful to understand the reason of rounding errors).
  • In addition to illustration of rounding and methodical errors (and the optimal step minimizing the total error), the lab #1b has the 2nd purpose: it introduces several commonly used methods of numerical differentiation (from 1st to 4th order).
  • The lab #3 also introduces several practical methods (rectangle, trapezia and Simpson’s methods of numerical integration).

2 labs from the category “Approximation of lookup tables” have much in common because they have the same input data. The lookup table in both labs can be calculated by a function, loaded from file or entered manually. Both labs have an exhaustive set of methods. The lab #2 includes methods both for global interpolation (including interpolation on special grids like grid of zeros or extremums of Chebyshev’s polynomials) and for local interpolation (splines). The lab #6 includes more than 8 sets of basis functions (and 3 types of the weight matrix) to implement the least squares approximation. In addition to lookup table approximation, the lab #6 can be formulated in the view of overdetermined systems of algebraic equations; and it uses algebraic solver (Gauss method or conjugate gradients method) to find the solution of intermediate system. That is why the recommended place of this lab (#6) in the sequence is after the lab on linear algebraic systems (#4).

3 labs concerning algebraic equations contain almost all numerical methods known for this class of mathematical problems. And these labshave very flexible structure so a set of available numerical methods can be easily changed or even extended (the names of computational classes and the structure of their parameters are defined in a lab version file). The investigation of convergence processes and the criteria of stopping iterations are among the main purposes of the labs. In the labs #4 and #7 (for linear systems) non-iterative solvers are included too (all versions of Gauss method and efficient methods for 3-diagonal and 5-diagonal matrices). User interface features of specific labs are the following:

  • Among many other features, lab #4 (“Linear systems”) can generate systems to solve (with random numbers or by a formula). Matrix and vector elements can be entered not only as numbers but as constant expressions (with math constants, square roots, etc.) which are properly rendered. One should mention very evident visualization of the solution process (for the case of 2-equation system) and the opportunity to perform parameter studies by only one keystroke (with ability to compare parameter-dependent curves for several methods, several systems, etc.)
  • The interface of the lab #5 (“Nonlinear systems”) is quite similar to the lab #4; the most evident visualizations are available for 2-equation systems too. It should be mentioned that solving a system of dimension 1 (1 nonlinear equation) also makes sense and results in interesting effects (i.e. the main differences between all nonlinear methods can be demonstrated with 1 equation). Although the lab allows systems of any dimension, solving 3 or more nonlinear equations is almost senseless from the educational viewpoint.
  • Lab #7 (“Poisson equation”) can be put to any reasonable place in the sequence of labs after the lab #4. E.g. in MIPT the index if this lab is #12 because there are 5 more labs (on ordinary and partial differential equations) between the end of non-differential topics and the “Poisson equation” topic. The formulation of the problem (two-dimensional rectangle area, uniform grid, standard 5-point scheme) is quite simple but the main purpose of the lab is the capabilities of grid equation solvers in their application to PDEs. From this viewpoint the Poisson equation can be treated only as a special algebraic system generator, so the alternative title of the lab is “Grid equations solving”. The lab contains very many iterative and non-iterative algorithms for grid equations solving (and many of them have some options to vary by a student).

Thus,

  • The labs from “Operations on functions” category solve problems with very little practical sense. Their main purpose is introduction to concepts of computational mathematics, including the idea of obtaining the desired accuracy by increasing computational effort: increasing step number (lab #3) or increasing a number of series terms (lab #1a).
  • The labs devoted to “Approximation of lookup tables” have a multitude of professional methods but it is also difficult to use them for real data analysis because they deal with only one part of the features peculiar to professional data analysis tools.
  • The labs from “Algebraic equations” category are the most complex and close-to-life applications among NumLabs project. They solve real problems (in their standard mathematical formalization) and they do exceed most of other equation solving tools by the number of implemented numerical algorithms.
In addition to the labs mentioned above, there are two more Java labs on computational mathematics – labs for nonlinear ordinary differential equations – initial value and boundary value problems. They have a multitude of methods, various visualizations and other professional features which enable the usage of the labs for real life research (not only for education). But those labs are not based on the same UI engine as the other 8 labs so they are not parts of open source NumLabs project. As for topics related with partial differential equations, there are another project (NumLabs2) implemented in C++ and based on the same methodical concepts as NumLabs. 
Last Updated on Saturday, 21 November 2009 17:17
 
Joomla Templates by Joomlashack