rita is an open-source interactive software for numerical
analysis and simulation.
rita enables solving numerical analysis problems using scientific
computing tools. It handles:
Running rita creates a command line environment that enables
defining problems to solve and data for these problems.
Here is a list of available commands in the rita console application.
These commands can be classified in categories:
In the present documentation, rita commands are presented according to the following rules:
command arg1|arg2=<v> [arg3|arg4=<v1>,<v2>]
This means that the arguments arg1 and arg2
are mandatory but exclusive. Argument arg1 needs a value v.
The arguments arg3 and
arg4 are optional but exclusive. In addition, arg4
needs two values: v1 and v2.
Examples of possible combinations:
nm | Name of (column) vector. This argument is optional. |
n | Size of vector when this one is defined by its size. |
g | A vector can be associated to a grid. In this case, its size is the total number Size of vector when this one is defined by its size. For this purpose, g is the grid name, assumed to be defined already. |
m | A vector can be associated to a mesh. In this case m is the mesh name, assumed to be defined already. |
f | Name of a file from which vector contents are read. The vector must have the ofeli format. |
nm | Name of matrix. This argument is optional. |
f | Name of a file containing the matrix. This file must and XML file as defined in ofeli. |
n1 | Number of rows of matrix. |
n2 | Number of columns of matrix. If only the number of rows is given, the matrix is a square one. |
m, M | Extremal coordinates of interval ends. The default values are 0., 1. |
n | Number of elements in the interval. Its default value is 10. |
c1, c2 | Codes associated to the first and the last node. These integer values are necessary to enforce boundary conditions. A code 0 (Default value) means no condition to prescribe. |
d | Number of degrees of freedom associated to any generated node. Default value is 1. |
mx, my | Coordinates of the lower left corner of the rectangle. The default values are 0., 0. |
Mx, My | Coordinates of the upper right corner of the rectangle. The default values are 1., 1. |
nx, ny | is the number of elements in x and y direction respectively. Their default value is 10. |
c1, c2, c3, c4 | Codes associated to the nodes generated on the lines y=my, x=Mx, y=My, x=mx respectively. These integer values are necessary to enforce boundary conditions. A code 0 (Default value) means no condition to prescribe. |
d | Number of degrees of freedom associated to any generated node. Default value is 1. |
mx, my, mz | Minimal coordinates in each direction. The default values are 0., 0., 0. |
Mx, My, Mz | Maximal coordinates in each direction. The default values are 1., 1., 1. |
nx, ny, nz | Number of elements in x, y and z direction respectively. Their default values are 10. |
cxm, cxM, cym, cyM, czm, czM | Codes associated to the nodes generated on the face x=mx, x=Mx, y=my, y=My, z=mz, z=Mz respectively. These integer values are necessary to enforce boundary conditions. A code 0 (Default value) means no condition to prescribe. |
d | Number of degrees of freedom associated to any generated node. Default value is 1 |
n | Point's label. |
x, y, z | Point coordinates. If y and/or z are not given, their value is set to 0. This can be the case for 1-D and 2-D. |
h | Mesh size around the point. |
n | Label of curve. |
n1, n2 | Labels of points defining a line. |
n1, n2, n3 | Labels of points defining a circular arc, n1 and n2 are the two points defining the extremities of the arc and n3 is the point defining the center of the circular arc. |
n | Label of contour. |
c1, c2, ... | Labels of curves defining the contour. |
n | Label of surface. |
c1, c2, ... | Labels of contours defining the surface. |
v | Code value (integer) to assign to an entity. |
p1, p2, ... | Points to which the code v is assigned. |
c1, c2, ... | Curves to which the code v is assigned. |
s1, s2, ... | surfaces to which the code v is assigned. |
v1, v2, ... | Volumes to which the code v is assigned. |
nm | Name of grid. This argument is optional. |
mx, my, mz | Minimal value of the intervals: The gridded domain is defined by (mx,Mx)*(my,My)*(mz,Mz). If the parameters my and mz are absent, the domain is the interval (mx,Mx) and if only mz is absent, the domain is the rectangle (mx,Mx)*(my,My). |
Mx, My, Mz | Maximal value of the intervals: The gridded domain is defined by (mx,Mx)*(my,My)*(mz,Mz). If the parameters My and Mz are absent, the domain is the interval (m1,M1) and if only Mz is absent, the domain is the rectangle (mx,Mx)*(my,My). |
nx, ny, nz | Subdivision of the grid, nx (resp. ny, nz) is the number of intervals in the x (resp. y, z) direction. The default value of these parameters is 10. |
nm | Name of function. This argument is optional, but a name of a function is the only way to retrieve it. |
v | Name of variable. In the case of a multivariable function, the name of variables is defined by v1, v2, ... |
n | Number of variables. By default this value is 1. |
d | String defining an expression of the function definition. If the string must contain blank spaces, it must enclosed in ". This argument is mandatory. |
f | Name of a defined function. This argument is mandatory. |
nx | Number of sampling points in the x-direction |
ny | Number of sampling points in the y-direction if this is a 2-D or 3-D case |
nz | Number of sampling points in the z-direction if this is a 3-D case |
mx, Mx | Minimum and maximum coordinates in the x-direction |
my, My | Minimum and maximum coordinates in the y-direction if this is a 2-D or 3-D case |
mz, Mz | Minimum and maximum coordinates in the z-direction if this is a 3-D case |
g | Name of a defined grid on which the function f is evaluated. The number of variables must be at least equal to the space dimension. |
ms | Name of a defined mesh on which the function f is evaluated. The number of variables must be at least equal to the space dimension. |
v | Name of the vector to create that contains the sampling. This argument is mandatory. |
f | Function name to plot. Note that only one-variable functions can be plotted with this argument. |
t | Name of tabulation to plot. |
v | Vector name to plot. Only vectors associated to a mesh can be plotted. |
h | Name of history vector to plot. If vector contains more than one value per time step to plot, the first component is plotted. Otherwise, a value of the argument component must be specified. |
ms | Mesh to plot. |
mx, Mx | Minimum and maximum value for the x-axis. This argument is useful for the case of graph of a function only. |
my, My | Minimum and maximum value for the y-axis. This argument is useful for the case of graph of a function only. |
lx, ly | Switches (0 or 1) to choose a logarithmic scale for the x and axes respectively. |
ti | Title of plot. |
l | Label of curve. |
u | Software for plotting. Must be gnuplot (Default), or gmsh if available. |
c | Component label to plot for a vector with multiple components at each abcissa value (Default: 1). |
nm | Name of data. Note that only vectors, matrices, history vectors, meshes or grids can be saved in files. |
f | File name where data are to ne saved.. |
fo | Format of file. This format is to be chosen among the values: ofeli, gnuplot, vtk, tecplot, matlab. Note that all formats are not available for all data. The default is the ofeli format. |
e | Frequency of saving data for the case of history vector saving. The default value is 1. |
n | Size of the system of algebraic equations. Default size is 1. |
f | Name of an already defined function (Functions can be defined in data). For a system, this argument must be repeated as many times as the number of equations. |
d | Expression defining a function. For a system, this argument must be repeated as many times as the number of equations. |
x | Name of the variable. If the size is greater than 1 (a system),
the unknowns are x1, x2, ... This argument is unnecessary in the case where a defined function is used (The variable name is the one of that function), but mandatory otherwise. |
m | Iterative method to solve the system. This is a string to choose among the values bisection, regula-falsi, secant, newton. Note that the methods bisection and regula-falsi are to be used for the case of a unique equation. The default method is newton. |
In its extended version, the command algebraic has no arguments, but rather
initiates a submenu with the available keywords:
size, function, definition, jacobian, init, variable, nls
In its short version the command synopsis is:
ode [size=<n>] [function=<f> | definition=<d>] [var=<x>]
[initial=<v1>,<v2>,...] [final-time=<ft>] [time-step=<ts>]
[scheme=<s>]
n | Size of the system of ode's. Default size is 1. |
f | Name of an already defined function (Functions can be defined in data). For a system, this argument must be repeated as many times as the number of differential equations. |
d | Expression defining a function. For a system, this argument must be repeated as many times as the number of differential equations. |
y | Name of the variable, other than the time variable, which is
necessarily t. If the size is greater than 1 (a system),
the unknowns are y1, y2, ... This argument is unnecessary in the case where a defined function is used (The variable name is the one of that function), but mandatory otherwise. |
v1, v2, ... | Initial condition values. |
ft | Final (or maximal) time value. The default value of this parameter is 1. |
ts | Time step value. The default value of this parameter is 0.1. |
s | Time integration scheme. This is a string to choose among the values: forward-euler, backward-euler, crank-nicolson, heun, newmark, leap-frog, AB2 (Adams-Bashforth, 2nd Order), RK4 (Runge-Kutta, 4th Order), RK3-TVD (Runge-Kutta, 3rd order, TVD), BDF2 (Backward Difference Formula, 2nd Order). The default value for this argument is backward-euler. |
In its extended version, the command ode has no arguments, but rather, it
initiates a submenu with the available keywords:
size, function, definition, variable, jacobian, initial, final-time, time-step, scheme
n | Number of optimization variables. Default value is 1. |
f | Name of an already defined function as the objective function to mimimize (Functions can be defined in data). |
d | Expression defining the objective function to minimize. |
lp | Toggle to say if we are dealing with the linear programming problem. By default, we are considering a nonlinear objective function. |
g1, g2, ... | Partial derivatives of the objective function defined analytically. By default the partial derivatives are computed analytically from the expression of the objective function. |
i, lb | Enables prescribing a lower bound constraint, i.e., here we can impose x(i)≥lb. It must be used once for each bound constraint. |
j, ub | Enables prescribing an upper bound constraint, i.e., here we can impose x(j)≤ub. It must be used once for each bound constraint. |
x | Name of the variable (or vector). This keyword is mandatory if the keyword definition is used. If the size of the system is greater than 1, the unknowns are necessarily x1, x2, ... |
a | String defining the used optimization method. This string is to pick in the following values: gradient, truncated-newton, simulated annealing, nelder-mead, newton. The default value of this parameter is gradient. |
In its extended version, the command optim has no arguments, but rather, it initiates a submenu with the available keywords:
M | Name of an already defined matrix. |
symmetric | Switch to say that matrix is symmetric. By default, the matrix is assumed unsymmetric. |
a | Method for extraction of eigenvalues. It must take one of the values subspace or qr. |
n | Number of eigenvalues to extract. By default, all eigenvalues are extracted. |
eigv | Switch to compute eigenvectors as well. By default, eigenvectors are not computed. Except for some methods where this is done automatically. |
p | Prefix of names of eigenvectors. |
f | Name of an already defined function. |
d | Expression defining a function. |
v | Name of the variable. |
mx, Mx | Values of extremities of the integration interval. |
n | Number of subdivisions of the integration interval. Default value is 10. |
m | Numerical integration formula. The possible choices are left-rectangle, right-rectangle, mid-point, trapezoidal, simpson, gauss-legendre, gauss-lobatto. For the Gauss formulae, the number of points can be specified by typing gauss-legendre,2 for instance. |
p1, p2, ... | List of names of problems to solve |
a | Analysis type. This string is to choose among the values: stationary, transient, eigen, optimization. Note that in most cases, this value is automatically assigned in function of the defined problem(s). |
rita is freely available under the GPL (Gnu Public License).
Copyright © 2021-2024 Rachid Touzani
rita is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
rita is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the
GNU General Public License for more details.
rita is available in the OFELI
package. Once OFELI is installed, rita is available as an
executable application.
The whole package can be downloaded from here.