~ubuntu-branches/ubuntu/raring/rheolef/raring-proposed

« back to all changes in this revision

Viewing changes to doc/pusrman/preface-v6.tex

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito, Pierre Saramito, Sylvestre Ledru
  • Date: 2012-05-14 14:02:09 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120514140209-dzbdlidkotyflf9e
Tags: 6.1-1
[ Pierre Saramito ]
* New upstream release 6.1 (minor changes):
  - support arbitrarily polynomial order Pk
  - source code supports g++-4.7 (closes: #671996)

[ Sylvestre Ledru ]
* update of the watch file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
\section*{Preface to \Rheolef\  version 6.0}
2
 
 
3
 
% ===========================================================================
4
 
\subsection*{What is new in \Rheolef\  6.0 ?}
5
 
% ===========================================================================
6
 
 
7
 
The major main features are:
8
 
\cindex{distributed computation}%
9
 
\begin{itemize}
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.
12
 
 
13
 
\apindex{high-order}%
14
 
\apindex{Pk}%
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.
18
 
 
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.
23
 
\end{itemize}
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.
26
 
 
27
 
Conversely, the library and unix command interfaces was as less as possible modified.
28
 
 
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.
32
 
 
33
 
% ===========================================================================
34
 
\subsection*{Moving to \Rheolef\  6.0}
35
 
% ===========================================================================
36
 
 
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]
43
 
    #include "rheolef.h"
44
 
    using namespace rheolef;
45
 
  \end{lstlisting}
46
 
 
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);
59
 
      ...
60
 
  \end{lstlisting}
61
 
% --------------------------------------------------
62
 
\subsubsection*{3. Fields and forms data accessors}
63
 
% -------------------------------------------------
64
 
\clindex{field}%
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()}
72
 
for write access.
73
 
Similarly, a \code{form a} has accessors as \code{a.uu()}.
74
 
 
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);
79
 
  \end{lstlisting}
80
 
and the corresponding 6.0 code is:
81
 
  \begin{lstlisting}[numbers=none,frame=none]
82
 
        solver sa (a.uu());
83
 
        uh.set_u() = sa.solve (lh.u() - a.ub()*uh.b());
84
 
  \end{lstlisting}
85
 
 
86
 
This major change in the library interface induces the most important
87
 
work when porting to the 6.0 version.
88
 
 
89
 
\clindex{solver}%
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.
100
 
 
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]
110
 
        din >> omega;
111
 
        dout << uh;
112
 
  \end{lstlisting}
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.
117
 
 
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.
127
 
\toindex{field}%
128
 
Also, the corresponding \code{mfield} unix command is obsolete,
129
 
as these features are integrated in the \code{field} unix command.
130
 
 
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
134
 
assured soon.
135
 
 
136
 
% ---------------------------------------------------------------------------
137
 
\subsubsection*{6. Space on a domain}
138
 
% --------------------------------------------------------------------------
139
 
\clindex{space}%
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");
144
 
  \end{lstlisting}
145
 
It writes now:
146
 
  \begin{lstlisting}[numbers=none,frame=none]
147
 
    space Wh (omega["boundary"], "P1");
148
 
  \end{lstlisting}
149
 
as the repetition of \code{omega} is no more required.
150
 
 
151
 
\vfill