1
\section*{Preface to \Rheolef\ version 6.0}
3
% ===========================================================================
4
\subsection*{What is new in \Rheolef\ 6.0 ?}
5
% ===========================================================================
7
The major main features are:
8
\cindex{distributed computation}%
10
\item support {\bf distributed achitectures}: the code looks sequential, is easy to read and write
11
but can be run massively parallel and distributed, based on the MPI library.
15
\item {\bf high order polynomial} approximation:
16
$P_k$ basis are introduced in this version, for $k\geq 0$.
17
This feature will be improved in the future developments.
19
\cindex{characteristic method}%
20
\cindex{mesh!adaptation}%
21
\item {\bf mesh adaptation} and the {\bf charateristic method} are now available
22
for {\bf three-dimensional} problems.
24
In order to evoluate in these directions, internal data structures inside the library
25
are completely rewritten in a different way, and thus this version is a completely new library.
27
Conversely, the library and unix command interfaces was as less as possible modified.
29
Nevertheless, the user will find some few backward incompatibilities:
30
5.93 based codes will not directly compile with the 6.0 library version.
31
Let us review how to move a code from 5.93 to 6.0 version.
33
% ===========================================================================
34
\subsection*{Moving to \Rheolef\ 6.0}
35
% ===========================================================================
37
\subsubsection*{1. Namespace}
38
% ---------------------------
39
\cindex{namespace!rheolef}%
40
The \code{namespace rheolef} was already introduced in last 5.93 version.
41
Recall that a code usually starts with:
42
\begin{lstlisting}[numbers=none,frame=none]
44
using namespace rheolef;
47
% ----------------------------
48
\subsubsection*{2. Environment}
49
% ---------------------------
50
\clindex{environment}%
51
\toindex{library!boost}%
52
\cindex{argc, argv, command line arguments}%
53
The MPI library requires initialisation and the two command line arguments.
54
This initialisation is performed via the \code{boost::mpi} class \code{environment}:
55
The code entry point writes:
56
\begin{lstlisting}[numbers=none,frame=none]
57
int main (int argc, char** argv) {
58
environment rheolef (argc,argv);
61
% --------------------------------------------------
62
\subsubsection*{3. Fields and forms data accessors}
63
% -------------------------------------------------
65
The accesses to unknown and blocked data was of a \code{field uh}
66
was direct, as \code{uh.u} and \code{uh.b}.
67
This access is no more possible in a distributed environment, as
68
non-local value requests may be optimized and thus, read and
69
write access may be controled thought accessors.
70
These accessors are named \code{uh.u()} and \code{uh.b()}
71
for read access, and \code{uh.set\_u()} and \code{uh.set\_b()}
73
Similarly, a \code{form a} has accessors as \code{a.uu()}.
75
A typical 5.93 code writes:
76
\begin{lstlisting}[numbers=none,frame=none]
77
ssk<Float> sa = ldlt(a.uu);
78
uh.u = sa.solve (lh.u - a.ub*uh.b);
80
and the corresponding 6.0 code is:
81
\begin{lstlisting}[numbers=none,frame=none]
83
uh.set_u() = sa.solve (lh.u() - a.ub()*uh.b());
86
This major change in the library interface induces the most important
87
work when porting to the 6.0 version.
90
Notice also that the old \code{ssk<Float>} class has been
91
supersetted by the \code{solver} class, that manages
92
both direct and iterative solvers in a more effective way.
93
For three-dimensional problems, the iterative solver is the default
94
while direct solvers are used otherwise.
95
\clindex{solver\_abtb}%
96
In the same spirit, a \code{solver\_abtb} has been introduced,
97
for Stokes-like mixed problem.
98
These features facilitate the dimension-independent coding style
99
provided by the \Rheolef\ library.
101
% ---------------------------------------------------------------------------
102
\subsubsection*{4. Distributed input and output streams}
103
% --------------------------------------------------------------------------
104
\cindex{variable!\code{din}}%
105
\cindex{variable!\code{dout}}%
106
\cindex{variable!\code{derr}}%
107
Input and output {\em sequential} standard streams \code{cin}, \code{cout} and \code{cerr}
108
may now replaced by {\em distributed} \Rheolef\ streams \code{din}, \code{dout} and \code{derr} as:
109
\begin{lstlisting}[numbers=none,frame=none]
113
\clindex{idiststream}%
114
\clindex{odiststream}%
115
These new streams are available togeher with the \code{idiststream} and \code{odiststream}
116
classes of the \Rheolef\ library.
118
% ---------------------------------------------------------------------------
119
\subsubsection*{5. File formats \file{.geo} and \code{.field} have changed}
120
% --------------------------------------------------------------------------
121
\fiindex{\file{.geo} mesh}%
122
\fiindex{\file{.field} field}%
123
\fiindex{\file{.field} multi-component field}%
124
The \file{.geo} and \file{.field} file formats have changed.
125
The \code{.mfield} is now obsolete: it has been merged into
126
the \code{.field} format that supports now multi-component fields.
128
Also, the corresponding \code{mfield} unix command is obsolete,
129
as these features are integrated in the \code{field} unix command.
131
%TODO: relire les anciens formats en sequentiel et les convertir
132
At this early stage of the 6.0 version, it is not yet possible to read
133
the old \code{.geo} format, but this backward compatibility will be
136
% ---------------------------------------------------------------------------
137
\subsubsection*{6. Space on a domain}
138
% --------------------------------------------------------------------------
140
A space defined on a domain~\code{"boundary"} of a mesh \code{omega}
141
was defined in the 5.93 version as:
142
\begin{lstlisting}[numbers=none,frame=none]
143
space Wh (omega["boundary"], omega, "P1");
146
\begin{lstlisting}[numbers=none,frame=none]
147
space Wh (omega["boundary"], "P1");
149
as the repetition of \code{omega} is no more required.