# GRLite and GRTensorJ: Graphical user interfaces to the computer algebra system GRTensorII

## Introduction

GRLitegrlite  and GRTensorJ are first- and second- generation graphical user interfaces to the computer algebra system GRTensorII grtensorII . They allow students and researchers in the area of General Relativity and related fields to perform symbolic calculations either locally or through the Web. GRLite is a calculator-style tool for evaluating more common tensors and scalars, reducing them to elementary functions. GRTensorJ provides fully customizable symbolic procedures without recompilation. These interfaces, which are open source, are written in Java and will run on any platform with browser support for JDK1.1.

## I Description

Any user can initiate a GRLite or GRTensorJ session remotely on the Web by logging onto the GRTensorII home page and following the links. All that is needed is a browser with support for JDK1.1. The user initiates a session by clicking on the Java applet that opens the GRLite or GRTensorJ graphical user interfaces. They appear as in figures 1 and 2. Behind the scenes, a computer algebra session in GRTensorII is started automatically. GRLite and GRTensorJ use MapleVmaplev  as the algebraic engine. They are in fact compatible with any engine that can output an ASCII stream.

### I.1 GRLite

GRLite is a proof of concept study. It is perhaps most appropriate for beginning students as it is restricted to classical tensor analysis. The commands are performed through a predefined menu and selection of buttons. The first step is to select a spacetime. This choice automatically displays the components of the metric tensor. The second step is to simply click on the object to be calculated. GRLite includes the 35 pre-defined functions as shown in figure 1. After the calculation is displayed the user can apply to it eight simplification procedures from the menu. There is also some support, like buffer clearing and a help system. GRLite comes with a set of pre-defined spacetimes but also offers a graphical sub-interface for entering new spacetimes defined for a given session. The development of GRLite is complete but it will be maintained in the interim. Our current development effort concentrates on GRTensorJ.

Figure 1 GRLite Graphical User Interface. Calculation of the differential invariant $`R_{abcd;e}R^{abcd;e}`$ for the Kerr metric. At the time of writing, this calculation executes in about one second on a contemporary PC with MapleV Release 5.1 and GRTensorII 1.76.

### I.2 GRTensorJ

GRTensorJ provides all the functionality of GRLite and much more. It has a different architecture that allows it to be expanded and programmed by the user. The commands are accessed through menu and sub-menu selections. The first step is to select a spacetime in coordinates or in tetrads. Then, the user can select the object(s) to be calculated from the corresponding menus. After the result of the calculation is displayed the user can apply to it any simplification procedure supported by the engine. The help system is built into the menu system as shown in figure 2. GRTensorJ comes with a selection of spacetimes and a set of pre-defined commands. Further, the user can define new metrics, tetrads and procedures through the GRTensorII definition facilities. These are entered through a sub-interface with the option of saving them on the users disk space (locally) or in temporary space when used over the internet. When a session begins, GRTensorJ reads a directory on the server named TextSheets (not to be confused with “worksheets”) and builds the menu and sub-menus for the interface from the underlying structure. All sub-directories to TextSheets will appear as primary menu bar items. The names of ASCII files contained within these sub-directories will be displayed as menu selections. These files contain a sequence of commands written in the syntax of the computer algebra engine being usedmaplemath . By selecting a menu item the user sends these commands to the engine. Items to be displayed in the interface window are distinguished simply by an asterisk in the file. In other words, creating new menu items and calculation commands is as simple as creating and editing very simple ASCII files. Yet, the file, and resultant menu item, can be the equivalent of an entire worksheet with only the result chosen for display.

Figure 2 GRTensorJ Graphical User Interface. An example of the embedded help system is shown. By the nature of the interface, the “help” system is more of the nature of an information system.

## II Internal Design overview

GRLite and GRTensorJ are written in Java and have been designed using an object-oriented approach. In addition, all communication between the user and the server are object-based. GRTensorJ has a multi-layer architecture that allows the generic functionality described above. This architecture is outlined below.

| GUI (Graphical User Interface) |
| --- |
| User Functional Interface |
| User ICM Handler |
| Interchange Modules (ICMs) |
| Server ICM Handler |
| Server Functional Interface |
| Algebraic Engine - Server Structure |

## III Future development

A number of useful features are easily added to GRTensorJ. For example, recently automatic Latex, Fortran and C output has been addedpapers . More involved is the current development of a dynamic database of solutions to Einstein’s field equations.