~ubuntu-branches/ubuntu/saucy/rheolef/saucy

« back to all changes in this revision

Viewing changes to doc/refman/rheolef.info

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Saramito
  • Date: 2011-03-23 11:14:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110323111426-cjvhey7lxt6077ty
Tags: 5.93-1
* New upstream release (minor changes):
  - some extra warning message deleted in heap_allocator
  - graphic output with mayavi2 fixed
  - add doc refman in .info and .pdf format

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This is ./rheolef.info, produced by makeinfo version 4.13 from
 
2
./rheolef.texi.
 
3
 
 
4
This file documents the the `rheolef' system for performing finite
 
5
element computations.
 
6
 
 
7
Copyright (C) 1996, 1998, 2001, 2002 by Pierre Saramito. All rights
 
8
reserved.
 
9
 
 
10
Permission is granted to make and distribute verbatim copies of this
 
11
manual provided the copyright notice and this permission notice are
 
12
preserved on all copies.
 
13
 
 
14
Permission is granted to copy and distribute modified versions of this
 
15
manual under the conditions for verbatim copying, provided that the
 
16
entire resulting derived work is distributed under the terms of a
 
17
permission notice identical to this one.
 
18
 
 
19
INFO-DIR-SECTION Mathematics
 
20
START-INFO-DIR-ENTRY
 
21
* rheolef: rheolef               The finite element system.
 
22
END-INFO-DIR-ENTRY
 
23
 
 
24
 
 
25
File: rheolef.info,  Node: Top,  Prev: (dir),  Up: (dir)
 
26
 
 
27
Rheolef, the finite element system.
 
28
***********************************
 
29
 
 
30
This file documents the the `rheolef' system for performing finite
 
31
element computations.
 
32
 
 
33
* Menu:
 
34
 
 
35
* Abstract::            Preliminary information.
 
36
* Installing::          How to install `rheolef'.
 
37
* Problems::            Reporting bugs.
 
38
* Commands::
 
39
* Classes::
 
40
* Algorithms::
 
41
* Forms::
 
42
* Internals::
 
43
* FAQ for developers::  How to develop `rheolef'
 
44
* Copying::             How you can copy and share `rheolef'.
 
45
* Concept Index::       Index of concepts.
 
46
* Program Index::       Index of programs.
 
47
* Class Index::         Index of classes.
 
48
* Bilinear Form Index:: Index of bilinear forms.
 
49
* Approximation Index:: Index of polynomial approximations.
 
50
* Function Index::      Index of functions.
 
51
* File Format Index::   Index of file formats.
 
52
* Related Tool Index::  Index of related tools.
 
53
 
 
54
 
 
55
File: rheolef.info,  Node: Abstract,  Up: Top
 
56
 
 
57
1 Abstract
 
58
**********
 
59
 
 
60
`rheolef' is a computer environment that serves as a convenient
 
61
_laboratory_ for computations involving finite element-like methods.
 
62
It provides a set of unix commands and C++ algorithms and containers.
 
63
This environment is currently under development.
 
64
 
 
65
Algorithms are related, from one hand to _sparse matrix_ basic linear
 
66
algebra, e.g. x+y, A*x, A+B, A*B, ...  From other hand, we focus
 
67
development on preconditionned linear and non-linear solver e.g. direct
 
68
and iterative methods for A*x=b, iterative solvers for Stokes and
 
69
Bingham flows  problems.  Future developments will consider also
 
70
viscoelastic flows problems.
 
71
 
 
72
Containers covers first the classic graph data structure for sparse
 
73
matrix formats and finite element _meshes_.  An higher level of
 
74
abstraction is provided by containers related to approximate finite
 
75
element _spaces_, discrete _fields_ and bilinear _forms_.  Current
 
76
developments concerns distributed sparse matrix.  Future developments
 
77
will consider also 3D anisotropic _adaptative_ mesh generation.
 
78
 
 
79
Please send all comments and bug reports by electronic mail to
 
80
<Pierre.Saramito@imag.fr>.
 
81
 
 
82
 
 
83
File: rheolef.info,  Node: Installing,  Up: Top
 
84
 
 
85
2 Installing rheolef
 
86
********************
 
87
 
 
88
(Source file: `configure.ac') 
 
89
 
 
90
             ./configure
 
91
             make
 
92
             make install
 
93
Successfull compilation and installation   require the GNU `make'
 
94
command.    Check your installation by running a small test:
 
95
             make installcheck
 
96
 
 
97
2.1 Reading the documentation
 
98
=============================
 
99
 
 
100
`rheolef' comes with three documentations:
 
101
 
 
102
 
 
103
   * an users guide with a set of complete examples
 
104
 
 
105
   * a reference manual for unix commands an C++ classes
 
106
 
 
107
   * the full browsable source code in html format
 
108
 
 
109
All these documentations are downloadable in various formats from the
 
110
`rheolef' home page.    These files are also locally installed   during
 
111
the `make install' stage.  The users guide is generated in `pdf' format:
 
112
              evince usrman.pdf
 
113
 
 
114
The reference manual is generated in `html' format:
 
115
              firefox http://ljk.imag.fr/membres/Pierre.Saramito/rheolef/rheolef.html
 
116
and you could add it to your bookmarks.    Moreover, after performing
 
117
`make install',   unix manuals are available for commands and classes:
 
118
 
 
119
 
 
120
              man field
 
121
              man 3 field
 
122
The browsable source code is generated in `html' format:
 
123
              firefox http://ljk.imag.fr/membres/Pierre.Saramito/rheolef/source_html/
 
124
 
 
125
2.2 Using and alternative installation directory
 
126
================================================
 
127
 
 
128
The default install prefix is `/usr/local'.     If you prefer an
 
129
alternative directory, e.g. `HOME/sys',    you should enter:
 
130
              ./configure --prefix=$HOME/sys
 
131
In that case, you have to add the folowing lines at the end    of your
 
132
`.profile' or `.bash_profile' file:
 
133
              export PATH="$PATH:$HOME/sys/bin"
 
134
              export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/sys/lib"
 
135
              export MANPATH="$MANPATH:$HOME/man"
 
136
assuming you are using the `sh' or the `bash' unix interpreter.
 
137
Conversely, if you are using `csh' or `tcsh', add    at the bottom of
 
138
your `.cshrc' file:
 
139
              set path = ($path $HOME/sys/bin)
 
140
              setenv LD_LIBRARY_PATH "$LD_LIBRARY_PATH:$HOME/sys/lib"
 
141
              setenv MANPATH "$MANPATH:$HOME/sys/man"
 
142
   If you are unure about unix interpreter, get the SHELL value:
 
143
              echo $SHELL
 
144
Then, you have to _source_ the modified file, e.g.:
 
145
              source ~/.cshrc
 
146
hpux users should replace `LD_LIBRARY_PATH' by `SHLIB_PATH'.     If you
 
147
are unure, get the shared library path variable:
 
148
              rheolef-config --shlibpath-var
 
149
Check also your installation by compiling a sample    program with the
 
150
installed library:
 
151
              make installcheck
 
152
Since it is a common mistake, you can later, at each time, test    your
 
153
run-time environment sanity with:
 
154
              rheolef-config --check
 
155
 
 
156
2.3 Recommanded library
 
157
=======================
 
158
 
 
159
The use of implicit numerical schemes leads to the   resolution of
 
160
large sparse linear systems.    `rheolef' installation optionally
 
161
recognizes both   `umfpack' and `spooles', two multifrontal direct
 
162
solvers libraries, and   `taucs', an out-of-core sparse direct solver,
 
163
When no efficient sparse direct solver library is not available,
 
164
rheolef uses a direct solver based upon a traditionnal skyline Choleski
 
165
factorisation   combined with a reverse Cuthill-Mc Kee reordering.
 
166
Here is the time complexity for 2d and 3d regular grid-based   Poisson
 
167
problems.
 
168
                              skyline     multifrontal
 
169
             factorization    N^2         N log N
 
170
              2d
 
171
             resolution       N^3/2       N log N
 
172
 
 
173
             factorization    N^7/3       N^2
 
174
              3d
 
175
             resolution       N^5/2       N^4/3
 
176
The out-of-core strategy is efficient for very large problems   or if
 
177
your computer has few memory.    The complexity estimation has been
 
178
shown by A. George,   NESTED DISSECTION OF A REGULAR FINITE ELEMENT
 
179
MESH,   SIAM J. Numer. Anal., 10:345-363, 1973.
 
180
 
 
181
2.4 The umfpack library
 
182
=======================
 
183
 
 
184
The `umfpack' library, if present, is auto-detected and used.    It is
 
185
widely available, as a debian package.
 
186
 
 
187
2.5 The spooles library
 
188
=======================
 
189
 
 
190
The optional `spooles-2.2' multifrontal linear solver   from A. George,
 
191
october 1998, is recommended for solving efficiently   large linear
 
192
systems.
 
193
 
 
194
It is available at `http://www.netlib.org/linalg/spooles/'.    This
 
195
library is free software.    A default skyline strategy is used when
 
196
it is not founded by `configure'.    Both the version 2.2. and the
 
197
older `2.0' library interface are supported   by `rheolef'.
 
198
 
 
199
First build the spooles library:
 
200
              cd /usr/local/src
 
201
              mkdir spooles-2.2
 
202
              gzip -dc < ../spooles.2.2.tar.gz | tar xvf -
 
203
              make CC=gcc CFLAGS="-O9" lib
 
204
Better, you can build spooles as a shared library, as follow
 
205
(assuming GNU C++):
 
206
              make CC=gcc CFLAGS="-O9 -fPIC" lib
 
207
              mkdir tmp
 
208
              cd tmp/
 
209
              ar x ../spooles.a
 
210
              gcc -shared -o ../libspooles.so *.o
 
211
              cd ..
 
212
              rm -rf tmp spooles.a
 
213
              make clean
 
214
Note that on `hpux' systems, the `.sl' suffix is used     instead of
 
215
the `.so' one.  Then, go to the rheolef directory:
 
216
              ./configure --with-spooles=/usr/local/src/spooles-2.2
 
217
              make
 
218
              make install
 
219
 
 
220
2.6 The taucs library
 
221
=====================
 
222
 
 
223
The optional `taucs-2.0' out-of-core sparse linear solver   from S.
 
224
Toledo and D. Chen, may 2002, is recommended   for very large linear
 
225
systems   or if your computer has few memory.    `taucs' can factor a
 
226
matrix whose factors are larger than   the main memory by storing the
 
227
factors on disk files.    In that case, this strategy is significantly
 
228
faster than paging activity   when running an in-core algorithm such as
 
229
`spooles'.
 
230
 
 
231
It is available at `http://www.tau.ac.il/~stoledo/taucs/'.    This
 
232
library is free software.
 
233
 
 
234
The `taucs' installation requires `metis', `lapack' and `blas'
 
235
libraries. Assuming all these libraries are installed in
 
236
`/usr/local/lib'   and the taucs header `taucs.h' is located in
 
237
`/usr/local/include',   the configuration for `rheolef' writes:
 
238
 
 
239
              ./configure --with-taucs-ldadd='-ltaucs -llapack -lblas -lmetis -lg2c'
 
240
An alternative is to `blas' is to use the more efficient `atlas'
 
241
libraries.    See the installation notes for the taucs library.
 
242
 
 
243
2.7 Too long compilations
 
244
=========================
 
245
 
 
246
On platforms with small memory, the `c++' compilation could be long.
 
247
By default, the `configure' scripts uses a `-O2'  compilation level.
 
248
Turn it off either by:
 
249
 
 
250
              setenv CXXFLAGS "-O0"
 
251
              ./configure
 
252
              make
 
253
or by editing directly `config/config.mk'.
 
254
 
 
255
2.8 Portability issues
 
256
======================
 
257
 
 
258
rheolef is based on STL. Therefore you need a compiler     that
 
259
supports the ANSI C++ standards. STL and rheolef especially depend
 
260
heavily on the template support of the compiler.
 
261
 
 
262
current version of rheolef has only been tested with
 
263
              GNU  C++ compiler (g++-2.95.4, 2.96, 3.0.2, 3.0.4, 4.0, 4.3)
 
264
              Compaq C++ compiler (V6.3, V6.5)
 
265
    on the following operating systems: 
 
266
              linux debian, pentium 3 and 4, using GNU C++
 
267
              mac os x (i386-apple-darwin9.8.0), using GNU C++
 
268
              sun solaris 2.8, ultrasparc, using GNU C++
 
269
              compacq OSF1 alpha (V5.1, V4.0), using Compacq C++
 
270
  The GNU C++ compiler is a free software   available at
 
271
`http://www.gnu.org'.    The Compacq C++ compiler is available on
 
272
Compacq (DEC) platforms.
 
273
 
 
274
Previous versions was tested also on the     KAI  C++ compiler
 
275
(KCC-3.2b) and the     CRAY C++ compiler (CC-3.0.2.0).      on the
 
276
following operating systems: 
 
277
              aix 4.1 ibm sp2, multiprocessor based on rs6000
 
278
              cray unicos t3e, multiprocessor based on 64 bits dec alpha
 
279
              cray unicos c94
 
280
              hpux 9.05 and 10.20, hppa
 
281
              linux (redhat, suze and slackware), pentium (2,3,pro)
 
282
              sgi irix 6.3, mips
 
283
              sun solaris 2.5.1, sparc
 
284
  The KAI C++ is available at `http://www.kai.com'.      The CRAY C++
 
285
is available on CRAY platforms.      Nevertheless, the current version
 
286
has no more been tested          on these compilers and systems.
 
287
 
 
288
If you are running a another compiler and operating system combination,
 
289
 please run the non-regression test suite:
 
290
              make check
 
291
and reports us the result. If all is ok, please, send us a mail,   and
 
292
we will add your configuration to the   list, and else we will try to
 
293
circumvent the problem.
 
294
 
 
295
2.9 Known portability limitations
 
296
=================================
 
297
 
 
298
On compacq alpha, the old cxx V6.1 (DIGITAL UNIX V4.0)   compiles well
 
299
but scratches on   non-regression tests, due to a bug in shared
 
300
libraries managment.    Please, update to cxx V6.3 or more, it will
 
301
work well.
 
302
 
 
303
On some hpux and GNU C++ version combinations,   building shared
 
304
libraries could be broken.    Uses instead:
 
305
              ./configure --disable-shared
 
306
It should work. Building static libraries leads to larger executable
 
307
files, and then more disk space available. This limitation depends upon
 
308
 compilers and systems compatibilities, not upon rheolef source code
 
309
portability.
 
310
 
 
311
Please read `http://www.gnu.org/software/gcc/install/specific.html'.
 
312
A recent version of `binutils' and a hpux patch are recommended.
 
313
 
 
314
Osman F. Buyukisik <<osman.buyukisik@ae.ge.com>> reported that
 
315
              export LIBS=" -ldce -static "
 
316
              ./configure
 
317
works also well on hpux-10.20.
 
318
 
 
319
 
 
320
 
 
321
2.10 Related tools
 
322
==================
 
323
 
 
324
Using rheolef suggests the use of the following optional tools:
 
325
 
 
326
               gnuplot
 
327
               plotmtv
 
328
               mayavi
 
329
               paraview
 
330
               vtk
 
331
               geomview
 
332
               qmg
 
333
               grummp
 
334
 
 
335
 
 
336
2.11 Advanced configuration
 
337
===========================
 
338
 
 
339
Note that each `--with' option has a corresponding     `--without'
 
340
option.
 
341
 
 
342
 
 
343
`--enable-optim'
 
344
     Turns compile-time optimization to maximum available.
 
345
     Default is on.
 
346
 
 
347
`--with-bigfloat=DIGITS10'
 
348
     Turn on Bruno Haible's `cln' arbitrary         precision float
 
349
     library with DIGITS10 precision,
 
350
 
 
351
     See `http://clisp.cons.org/~haible/packages-cln.html'.
 
352
     Default is off.          The DIGITS10 value is optional and
 
353
     default DIGITS10 value is 60.               This feature is still
 
354
     under development.
 
355
 
 
356
`--with-cln=DIR_CLN'
 
357
     Set the home directory for the `cln' library.          Default
 
358
     DIR_CLN is `/usr/local/math'.
 
359
 
 
360
`--with-doubledouble'
 
361
     Uses `doubledouble' class as the default rheolef `Float' type.
 
362
              This option is usefull for a quadruple-like precision on
 
363
                machines where this feature is not or incorrectly
 
364
     available.          Default is off.
 
365
 
 
366
`--enable-debian-packaging=DEBIAN_PACKAGING'
 
367
     Generate files the debian way         by respecting the `Debian
 
368
     Policy Manual`.
 
369
 
 
370
`--with-boost-incdir=INCDIR_BOOST'
 
371
     Turns on/off the `boost' boost/numeric/uBlas         dense and
 
372
     sparse matrix library.          This library is required by
 
373
     rheolef.
 
374
 
 
375
`--enable-debug'
 
376
     Produce a `c++ -g' like code.
 
377
 
 
378
`--enable-dmalloc'
 
379
     With debugging, also uses dynamic allocation runtime checking
 
380
            with `dmalloc' when available.
 
381
 
 
382
`--enable-distributed'
 
383
     Turns on/off the distributed memory and parallel computation
 
384
     features.          Default is off. This feature is currently in
 
385
     development.          When on, configure try to detect either the
 
386
     mpi, and cotch or the parmetis libraries.
 
387
 
 
388
`--enable-mpi'
 
389
     Turns on/off the distributed memory and parallel computation
 
390
     features.          Default is on when distributed is on. This
 
391
     feature is currently in development.          When on, configure
 
392
     try to detect either the scotch or the parmetis libraries.  
 
393
 
 
394
`--with-scotch'
 
395
`--with-scotch=LIBDIR_SCOTCH'
 
396
     Turns on/off the `scotch' distributed mesh partitionner.
 
397
     Check in LIBDIR_SCOTCH for `libptscotchparmetis.so',
 
398
     `libptscotch.so' and `libptscotcherrexit.so' or
 
399
     corresponding `.a' libraries.          Default is to auto-detect
 
400
     when mpi is available.  
 
401
 
 
402
`--with-parmetis'
 
403
`--with-parmetis=LIBDIR_PARMETIS'
 
404
     Turns on/off the `parmetis' distributed mesh partitionner.
 
405
     Check in LIBDIR_PARMETIS for `libparmetis.so',
 
406
     `libparmetis.a' and also `libmetis.a'         `libmetis.so'.
 
407
       Default is to autodetect when mpi is available and scotch
 
408
     unavailable.  
 
409
 
 
410
`--with-blas-ldadd'
 
411
`--with-blas-ldadd=RHEO_LDADD_BLAS'
 
412
     Turns on/off the `blas' libraries.          Check in
 
413
     RHEO_LDADD_BLAS for `libblas.so',         or the corresponding
 
414
     `.a' libraries.          Default is to auto-detect.          This
 
415
     librariy is required for the pastix library.  
 
416
 
 
417
`--with-pastix'
 
418
`--with-pastix=LIBDIR_PASTIX'
 
419
     Turns on/off the `scotch' distributed mesh partitionner.
 
420
     Check in LIBDIR_SCOTCH for `libptscotchparmetis.so',
 
421
     `libptscotch.so' and `libptscotcherrexit.so' or
 
422
     corresponding `.a' libraries.          Default is to auto-detect
 
423
     when mpi is available.
 
424
 
 
425
`--with-umfpack=LIBDIR_UMFPACK'
 
426
`--with-umfpack-incdir=INCDIR_UMFPACK'
 
427
     Turns on/off the `umfpack' version 4.3 multifrontal direct solver.
 
428
            Default INCDIR_UMFPACK is LIBDIR_UMFPACK.          Check in
 
429
     LIBDIR_UMFPACK for `libumfpack.so' or         `libumfpack.a' and
 
430
     for header         INCDIR_UMFPACK/umfpack.h or
 
431
     INCDIR_UMFPACK/umfpack/umfpack.h.               When this library
 
432
     is not available, the direct solver         bases upon a
 
433
     traditionnal skyline Choleski factorisation         combined with
 
434
     a reverse Cuthill-Mc Kee reordering.
 
435
 
 
436
`--with-taucs-ldadd=TAUCS_LDADD'
 
437
`--with-taucs-incdir=TAUCS_INCDIR'
 
438
     Turns on/off the `taucs' version 2.0 out-of-core sparse direct
 
439
     solver.               When this library is not available, the
 
440
     configure script         check for the spooles multifrontal (see
 
441
     below).
 
442
 
 
443
`--with-spooles-libdir=LIBDIR_SPOOLES'
 
444
`--with-spooles-incdir=INCDIR_SPOOLES'
 
445
     Turns on/off the `spooles' version 2.2 multifrontal direct solver.
 
446
            Default INCDIR_SPOOLES is LIBDIR_SPOOLES.          Check in
 
447
     LIBDIR_SPOOLES for `libspooles.so',         `libspooles.a' or
 
448
     `spooles.a' and for header         INCDIR_SPOOLES/FrontMtx.h.
 
449
             When this library is not available, the direct solver
 
450
       bases upon a traditionnal skyline Choleski factorisation
 
451
     combined with a reverse Cuthill-Mc Kee reordering.   Generic or
 
452
     hardware-dependant optimization
 
453
 
 
454
2.12 Future configure options
 
455
=============================
 
456
 
 
457
These options will be implemented in the future:
 
458
 
 
459
`--with-long-double'
 
460
     Defines `long double' as the default         rheolef `Float' type.
 
461
     Default is off and defines `double' as         `Float' type.
 
462
            Warning: most of architectures does not provides
 
463
     mathematical library in              `long double', e.g.
 
464
     `sqrt((long double)2)' returns only double precision
 
465
     result on Sun architectures, despites it uses a double memory
 
466
     space.          Thus use `--with-doubledouble' instead.
 
467
 
 
468
2.13 Rebuilding the documentation
 
469
=================================
 
470
 
 
471
You can rebuild the documentation by entering:
 
472
              make dvi
 
473
 
 
474
The user's manual goes into `doc/usrman/' and the  the reference manual
 
475
into `doc/refman/'.
 
476
 
 
477
The user's manual becomes available in `.dvi',  `.ps' and `.pdf'
 
478
formats.
 
479
 
 
480
Regenerating the full documention requires also optional tools.
 
481
 
 
482
 
 
483
              xdvi      doc/usrman/usrman.dvi
 
484
              ghostview doc/usrman/usrman.ps
 
485
              xpdf      doc/usrman/usrman.pdf
 
486
 
 
487
The reference manual is available in `.info', `.dvi',  `.ps', `.pdf',
 
488
`.html' and `.txt' formats:
 
489
 
 
490
 
 
491
              info -f   doc/refman/rheolef.info
 
492
              xdvi      doc/refman/rheolef.dvi
 
493
              ghostview doc/refman/rheolef.ps
 
494
              xpdf      doc/refman/rheolef.pdf
 
495
              lynx      doc/refman/rheolef_toc.html
 
496
              vi        doc/refman/rheolef.txt
 
497
 
 
498
2.14 Documentation using doxygen
 
499
================================
 
500
 
 
501
`doxygen' is a documentation system  and can be found at
 
502
`http://www.doxygen.org'.
 
503
 
 
504
`doxygen' has built-in support to generate inheritance diagrams for C++
 
505
classes.   `doxygen' can use the `dot' tool from `graphviz' to generate
 
506
more advanced diagrams  and graphs. `graphviz' is an open-sourced,
 
507
cross-platform graph drawing toolkit  from AT&T and Lucent Bell Labs
 
508
and can be found at  `http://www.research.att.com/sw/tools/graphviz/'.
 
509
 
 
510
 
 
511
              mozilla file:`pwd`/doc/doxygen/html/index.html
 
512
 
 
513
2.15 Compile-time optional tools
 
514
================================
 
515
 
 
516
Installation has been tested with the indicated version number.
 
517
Later version should also work well.
 
518
 
 
519
 
 
520
`doubledouble-2.2'
 
521
     The definitive site for this code is
 
522
 
 
523
     `http://www-epidem.plantsci.cam.ac.uk/~kbriggs/doubledouble.html'.
 
524
 
 
525
     The 2.2 version is included in this distribution for convenience.
 
526
 
 
527
`cln-1.0.2'
 
528
     Bruno Haible's arbitrary precision float library.
 
529
 
 
530
     See `http://clisp.cons.org/~haible/packages-cln.html'.
 
531
 
 
532
`dmalloc-4.8.2'
 
533
     For dynamic allocation checking in conjuction      with `configure
 
534
     --with-debug'.
 
535
 
 
536
 
 
537
2.16 The directory structure
 
538
============================
 
539
 
 
540
`config'
 
541
     portability related files and documentation extractors
 
542
 
 
543
`util'
 
544
     a collection of useful C++ classes                 and functions
 
545
     for smart pointers,                 handling files and
 
546
     directories, using strings, timing.
 
547
 
 
548
`skit'
 
549
     sparse matrix library, renumbering and factorization,
 
550
       linear solvers.
 
551
 
 
552
`fem'
 
553
     finite element library, mesh, spaces and forms.
 
554
 
 
555
`doc'
 
556
     reference manual, user's guide, web site.
 
557
 
 
558
`examples'
 
559
     demonstrations as in users'guide.
 
560
 
 
561
2.17 Compiling from development version
 
562
=======================================
 
563
 
 
564
The installation process is preceeded by an extra `bootstrap' stage,
 
565
and the `configure' stage takes an extra `--enable-ginac' flag.    An
 
566
example writes:
 
567
             ./bootstrap
 
568
             ./configure --enable-ginac
 
569
             make
 
570
             make install
 
571
You will need some extra-development tools that are used   by
 
572
maintainers.
 
573
 
 
574
* for configuration files:
 
575
 
 
576
 
 
577
             autoconf-2.59
 
578
             automake-1.7.9
 
579
             m4-1.4 (GNU m4)
 
580
 
 
581
* for automatically builted files:
 
582
 
 
583
 
 
584
             ginac-1.1.6
 
585
             flex-2.5.4
 
586
             bison-1.875a
 
587
 
 
588
* for maintaining documentation:
 
589
 
 
590
 
 
591
              makeinfo-4.6
 
592
              texi2html-1.65
 
593
              tex-3.14159
 
594
              texinfo-4.6
 
595
              latex 2e (2001/06/01)
 
596
              dvips-5.92b
 
597
              gnuplot-3.7
 
598
              transfig-3.2
 
599
              doxygen-1.2.13.1
 
600
 
 
601
* Version numbers are indicative: others versionnumbers sould also work.
 
602
   Nevertheless, these version numbers are known to work well.
 
603
 
 
604
* For participating to the rheolef concurrent development,   please
 
605
contact also <Pierre.Saramito@imag.fr> for concurrent   development.
 
606
 
 
607
 
 
608
File: rheolef.info,  Node: Problems,  Up: Top
 
609
 
 
610
3 Reporting Bugs
 
611
****************
 
612
 
 
613
This software is still under development.  Please, run the `make check'
 
614
non-regression tests.  Send comments and bug repports to
 
615
<Pierre.Saramito@imag.fr>.  Include the version number, which you can
 
616
find at the top of this document.  Also include in your message the
 
617
input and the output that the program produced and some comments on the
 
618
output you expected.
 
619
 
 
620
 
 
621
File: rheolef.info,  Node: Commands,  Up: Top
 
622
 
 
623
4 Commands
 
624
**********
 
625
 
 
626
* Menu:
 
627
 
 
628
* mkgeo_grid command::
 
629
* mfield command::
 
630
* grummp2geo command::
 
631
* tetgen2geo command::
 
632
* geo command::
 
633
* bamg2geo command::
 
634
* mesh2geo command::
 
635
* field command::
 
636
* cemagref2field command::
 
637
* qmg2geo command::
 
638
* space command::
 
639
* msh2geo command::
 
640
* branch command::
 
641
* cad command::
 
642
* rheolef-config command::
 
643
 
 
644
 
 
645
File: rheolef.info,  Node: mkgeo_grid command,  Up: Commands
 
646
 
 
647
4.1 mkgeo_grid - build a regular grid mesh in 1d, 2d or 3d
 
648
==========================================================
 
649
 
 
650
(Source file: `nfem/bin/mkgeo_grid') 
 
651
 
 
652
Synopsis
 
653
--------
 
654
 
 
655
             mkgeo_grid OPTIONS [NX [NY [NZ]]]
 
656
 
 
657
Example
 
658
-------
 
659
 
 
660
The following command build a triangular based 2d 10x10 grid   of the
 
661
unit square:
 
662
             mkgeo_grid -t 10 > square-10.geo
 
663
             geo square-10.geo
 
664
or in one comand line:
 
665
             mkgeo_grid -t 10 | geo -
 
666
 
 
667
Description
 
668
-----------
 
669
 
 
670
This command is usefull when testing programs on simple geometries.
 
671
It avoid the preparation of an input file for a mesh generator.    The
 
672
optional NX, NY and NZ arguments are integer   that specifies the
 
673
subdivision in each direction. By default   NX=10, NY=NX and NZ=NY.
 
674
The mesh files goes on standard output.
 
675
 
 
676
The command supports all the possible element types: edges, triangles,
 
677
rectangles, tetraedra, prisms and hexahedra.
 
678
 
 
679
Element type options
 
680
--------------------
 
681
 
 
682
`-e'
 
683
     1d mesh using edges.
 
684
 
 
685
`-t'
 
686
     2d mesh using triangles.
 
687
 
 
688
`-q'
 
689
     2d mesh using quadrangles (rectangles).
 
690
 
 
691
`-T'
 
692
     3d mesh using tetraedra.
 
693
 
 
694
`-P'
 
695
     3d mesh using prisms.
 
696
 
 
697
`-H'
 
698
     3d mesh using hexahedra.
 
699
 
 
700
The geometry
 
701
------------
 
702
 
 
703
The geometry can be any [a,b] segment, [a,b]x[c,d] rectangle   or
 
704
[a,b]x[c,d]x[f,g] parallelotope. By default a=c=f=0 and b=d=g=1, thus,
 
705
the unit boxes are considered. For instance, the following   command
 
706
meshes the [-2,2]x[-1.5, 1.5] rectangle:
 
707
             mkgeo_grid -t 10 -a -2 -b 2 -c -1.5 -d 1.5 | geo -
 
708
 
 
709
`-a FLOAT'
 
710
`-b FLOAT'
 
711
`-c FLOAT'
 
712
`-d FLOAT'
 
713
`-f FLOAT'
 
714
`-g FLOAT'
 
715
 
 
716
Boundary domains
 
717
----------------
 
718
 
 
719
`-boundary'
 
720
     The boundary domains for boxes uses names: `left', `right',
 
721
     `top', `bottom',`front' and `back'.    Instead of splitting the
 
722
     boundary in faces, this option   groups all boundary faces in one
 
723
     domain named `boundary'.
 
724
 
 
725
             mkgeo_grid -t 10 -boundary | geo -
 
726
 
 
727
Regions
 
728
-------
 
729
 
 
730
`-region'
 
731
     The whole domain is splitted into two subdomains: `east' and
 
732
     `west',   This option is used for testing computations with
 
733
     subdomains (e.g. transmission   problem; see the user manual).
 
734
 
 
735
             mkgeo_grid -t 10 -region | geo -
 
736
 
 
737
Corners
 
738
-------
 
739
 
 
740
`-corner'
 
741
     The corners (four in 2D and eight in 3D) are defined as OD-domains.
 
742
      This could be usefull for some special boundary conditions.
 
743
 
 
744
             mkgeo_grid -t 10 -corner | geo -
 
745
             mkgeo_grid -T  5 -corner | geo -
 
746
 
 
747
Coordinate system option
 
748
------------------------
 
749
 
 
750
Most of rheolef codes are coordinate-system independant.     The
 
751
coordinate system is specified in the geometry file `.geo'.
 
752
`-rz'
 
753
     the 2d mesh is axisymmetric.
 
754
 
 
755
 
 
756
File: rheolef.info,  Node: mfield command,  Up: Commands
 
757
 
 
758
4.2 `mfield' - handle multi-field files
 
759
=======================================
 
760
 
 
761
(Source file: `nfem/bin/mfield.cc') 
 
762
 
 
763
Synopsis
 
764
--------
 
765
 
 
766
             mfield {-FIELD-NAME}+ [-IDIR] FILENAME
 
767
 
 
768
Example
 
769
-------
 
770
 
 
771
This command performs a _velocity_ graphical   output for vector-valued
 
772
fields:
 
773
             mfield -u square.mfield -velocity
 
774
             mfield -u square.mfield -deformation
 
775
             mfield -s square.mfield -proj -tensor
 
776
  It is also convenient for selecting some scalar fields, e.g.    to
 
777
pipe to another processor
 
778
             mfield -psi square.mfield | field -
 
779
             mfield -u0  square.mfield | field -
 
780
             mfield -u1  square.mfield | field -
 
781
 
 
782
Description
 
783
-----------
 
784
 
 
785
Read and output multiple finite element fields from file,   in field
 
786
text file format.    Fields are preceded by a label, in the following
 
787
`.mfield' file format:
 
788
           mfield
 
789
           1 2
 
790
           #u0
 
791
             FIELD U0...
 
792
           #u1
 
793
             FIELD U1...
 
794
           #p
 
795
             FIELD P...
 
796
           #psi
 
797
             FIELD PSI...
 
798
  Such labeled file format could be easily generated   using the
 
799
`catchmark' stream manipulator   (*note iorheo class::).
 
800
           cout << catchmark("u")   << uh
 
801
                << catchmark("p")   << ph
 
802
                << catchmark("psi") << psih;
 
803
 
 
804
Options
 
805
-------
 
806
 
 
807
`-IDIR'
 
808
     add DIR to the RHEOPATH search path.          See also *note geo
 
809
     class:: for RHEOPATH mechanism.
 
810
 
 
811
`FILENAME'
 
812
     specifies the name of the file containing         the input field.
 
813
 
 
814
`-all'
 
815
     all fields are selected for stdout printing.
 
816
 
 
817
`-'
 
818
     read field on standard input instead on a file.
 
819
 
 
820
`-ndigit INT'
 
821
     number of digits used to print floating point values         when
 
822
     using the `-geo' option.          Default depends upon the machine
 
823
     precision associated to the         `Float' type.
 
824
 
 
825
`-verbose'
 
826
     print messages related to graphic files created and        command
 
827
     system calls (this is the default).
 
828
 
 
829
`-noverbose'
 
830
     does not print previous messages.
 
831
 
 
832
`-round [FLOAT]'
 
833
     Round the output, in order for the non-regression tests to
 
834
     be portable across platforms. Floating point are machine-dependent.
 
835
            The round value is optional. default value is 1e-10.
 
836
 
 
837
 
 
838
Render options
 
839
--------------
 
840
 
 
841
`-velocity'
 
842
     Render vector-valued fields as arrows         using `plotmtv',
 
843
     `mayavi' or `vtk'.          The the numeric extension is assumed:
 
844
           use e.g. `-u' option instead of `-u0', `-u1' options.
 
845
 
 
846
`-deformation'
 
847
     Render vector-valued fields as deformed mesh         using
 
848
     `plotmtv', `mayavi' or `vtk'.          The the numeric extension
 
849
     is assumed:         use e.g. `-u' option instead of `-u0', `-u1'
 
850
     options.
 
851
 
 
852
`-tensor'
 
853
     Render tensor-valued fields as ellipses         using `mayavi'.
 
854
          The the numeric extension is assumed:         use e.g. `-tau'
 
855
     option instead of `-tau00', `-tau01'...          Warning: in
 
856
     development stage.
 
857
 
 
858
`-vscale FLOAT'
 
859
     scale vector values by specified factor. Default value is 1.
 
860
 
 
861
`-proj'
 
862
     Convert all selected fields to P1-continuous approximation by
 
863
     using a L2 projection.          Only valid yet together with the
 
864
     `-tensor' option.
 
865
 
 
866
Render tool selection
 
867
---------------------
 
868
 
 
869
`-mayavi'
 
870
     use `mayavi' tool.          This is the default for bi- and
 
871
     tridimensional geometries.          The environment variable
 
872
     RHEOLEF_RENDER may be set to one of the choices below to override
 
873
     this default.
 
874
 
 
875
`-plotmtv'
 
876
     use `plotmtv' plotting command.
 
877
 
 
878
`-vtk'
 
879
     use `vtk' tool.          Old style for 3d problems: superseted by
 
880
     `-mayavi'.
 
881
 
 
882
 
 
883
Others render options
 
884
---------------------
 
885
 
 
886
`-color'
 
887
`-gray'
 
888
`-black-and-white'
 
889
     Use (color/gray scale/black and white) rendering.          Color
 
890
     rendering is the default.      
 
891
 
 
892
`-stereo'
 
893
`-nostereo'
 
894
     rendering mode: suitable for red-blue anaglyph 3D stereoscopic
 
895
     glasses.
 
896
 
 
897
`-fill'
 
898
     vector norm isolines intervals are filled with color.
 
899
 
 
900
`-nofill'
 
901
     vector norm isolines are drawed by using colored mesh edges.
 
902
       This is the default.
 
903
 
 
904
`-verbose'
 
905
     print messages related to graphic files created and        command
 
906
     system calls (this is the default).
 
907
 
 
908
`-noverbose'
 
909
     does not print previous messages.
 
910
 
 
911
`-clean'
 
912
     clear temporary graphic files (this is the default).
 
913
 
 
914
`-noclean'
 
915
     does not clear temporary graphic files.
 
916
 
 
917
`-execute'
 
918
     execute graphic command (this is the default).
 
919
 
 
920
`-noexecute'
 
921
     does not execute graphic command. Generates only         graphic
 
922
     files. This is usefull in conjuction with the         `-noclean'
 
923
     command.
 
924
 
 
925
To do
 
926
-----
 
927
 
 
928
Check if selected fields appear in file.      Otherwise, send some
 
929
error message.
 
930
 
 
931
 
 
932
File: rheolef.info,  Node: grummp2geo command,  Up: Commands
 
933
 
 
934
4.3 grummp2geo - convert grummp mesh in geo format
 
935
==================================================
 
936
 
 
937
(Source file: `nfem/bin/grummp2geo') 
 
938
 
 
939
Synopsis
 
940
--------
 
941
 
 
942
       grummp OPTIONS INPUT[.g] [INPUT[.dmn]]
 
943
 
 
944
Description
 
945
-----------
 
946
 
 
947
Convert a grummp `.g' into `.geo' one.  The output goes to standart
 
948
output.  The `.dmn' file specifies the domain names, since `grummp'
 
949
mesh generators use numbers as domain labels.
 
950
 
 
951
Example
 
952
-------
 
953
 
 
954
       grummp2geo toto.g toto.dmn > toto.geo
 
955
 
 
956
 
 
957
File: rheolef.info,  Node: tetgen2geo command,  Up: Commands
 
958
 
 
959
4.4 tetgen2geo - convert tetgen mesh in geo format
 
960
==================================================
 
961
 
 
962
(Source file: `nfem/bin/tetgen2geo') 
 
963
 
 
964
Synopsis
 
965
--------
 
966
 
 
967
       tetgen2geo OPTIONS INPUT[.node] INPUT[.ele] INPUT[.face] INPUT[.dmn]
 
968
 
 
969
Description
 
970
-----------
 
971
 
 
972
Convert a tetgen mesh into `.geo' one.  The output goes to standart
 
973
output.  The `.dmn' file specifies the domain names, since `tetgen'
 
974
mesh generator uses numbers as domain labels.
 
975
 
 
976
Example
 
977
-------
 
978
 
 
979
       tetgen toto.smesh
 
980
       tetgen2geo toto.1.node toto.1.ele toto.1.face toto.dmn > toto.geo
 
981
 
 
982
Domain name file
 
983
----------------
 
984
 
 
985
This auxilliary `.dmn' file defines the boundary domain names as used
 
986
by Rheolef, since `tetgen' uses numeric labels for domains.
 
987
 
 
988
Options
 
989
-------
 
990
 
 
991
`-upgrade'
 
992
`-noupgrade'
 
993
     Default is to output a version 2 `.geo' file format. *Note geo
 
994
     command::.          With the `-noupgrade', a version 1 file format
 
995
     is assumed.
 
996
 
 
997
 
 
998
File: rheolef.info,  Node: geo command,  Up: Commands
 
999
 
 
1000
4.5 `geo' - plot a finite element mesh
 
1001
======================================
 
1002
 
 
1003
(Source file: `nfem/bin/xgeo.cc') 
 
1004
 
 
1005
Synopsis
 
1006
--------
 
1007
 
 
1008
             geo OPTIONS MESH[.geo]
 
1009
 
 
1010
Description
 
1011
-----------
 
1012
 
 
1013
Plot a 2d or 3d finite element mesh.
 
1014
 
 
1015
The input file format is described with the `geo'   class manual (*note
 
1016
geo class::).
 
1017
 
 
1018
Example
 
1019
-------
 
1020
 
 
1021
Enter commands as:
 
1022
             geo -vtk bielle.geo
 
1023
             geo -vtk -fill bielle.geo
 
1024
  or, for 2D meshes:
 
1025
             geo -plotmtv square.geo
 
1026
 
 
1027
Input file specification
 
1028
------------------------
 
1029
 
 
1030
`FILENAME'
 
1031
     specifies the name of the file containing         the input mesh.
 
1032
     The ".geo" extension is assumed.
 
1033
 
 
1034
`-IGEODIR'
 
1035
     add GEODIR to the mesh search path.          This mechanism
 
1036
     initializes a search path given by the environment variable
 
1037
     `RHEOPATH'. If the environment variable         `RHEOPATH' is not
 
1038
     set, the         default value is the current directory
 
1039
     (*note geo class::).
 
1040
 
 
1041
`-'
 
1042
     read mesh on standard input instead on a file.
 
1043
 
 
1044
`-name'
 
1045
     when mesh comes from standard input, the mesh name         is not
 
1046
     known and is set to "output" by default.          This option
 
1047
     allows to change this default.          Useful when dealing with
 
1048
     output formats (graphic, format conversion)         that creates
 
1049
     auxilliary files, based on this name.
 
1050
 
 
1051
Inquire options
 
1052
---------------
 
1053
 
 
1054
`-size'
 
1055
     print the number of elements in the mesh and exit.
 
1056
 
 
1057
`-n-node'
 
1058
     print the number of nodes in the mesh and exit.
 
1059
 
 
1060
`-hmin'
 
1061
     print the smallest edge length in the mesh and exit.
 
1062
 
 
1063
`-hmax'
 
1064
     print the largest edge length in the mesh and exit.
 
1065
 
 
1066
`-xmin'
 
1067
     print the lower-left-bottom vertice in the mesh and exit.
 
1068
 
 
1069
`-xmax'
 
1070
     print the upper-right-top vertice in the mesh and exit.
 
1071
 
 
1072
Render options
 
1073
--------------
 
1074
 
 
1075
The default render could also specified by using the RHEOLEF_RENDER
 
1076
environment variable.
 
1077
`-mayavi'
 
1078
     use Mayavi.          This is the default.
 
1079
 
 
1080
`-plotmtv'
 
1081
     use plotmtv tool.
 
1082
 
 
1083
`-gnuplot'
 
1084
     use gnuplot tool.
 
1085
 
 
1086
`-vtk'
 
1087
     use Visualization Toolkit.
 
1088
 
 
1089
`-x3d'
 
1090
     use x3d visualization tool.
 
1091
 
 
1092
`-atom'
 
1093
     use PlotM atom representation (from lassp, Cornell).
 
1094
 
 
1095
Graphic options
 
1096
---------------
 
1097
 
 
1098
`-color'
 
1099
     use colors. This is the default.
 
1100
 
 
1101
`-black-and-white'
 
1102
     Option only available with `mayavi'.
 
1103
 
 
1104
`-stereo'
 
1105
     Rendering mode suitable for red-blue anaglyph 3D stereoscopic
 
1106
     glasses.          Option only available with `mayavi'.
 
1107
 
 
1108
`-grid'
 
1109
     rendering mode. This is the default.
 
1110
 
 
1111
`-fill'
 
1112
     rendering mode. Fill mesh faces using light effects when available.
 
1113
 
 
1114
`-shrink'
 
1115
     rendering mode. Shrink 3d elements (with vtk only).
 
1116
 
 
1117
`-tube'
 
1118
     rendering mode. All edges appears as tubes (with vtk only).
 
1119
 
 
1120
`-ball'
 
1121
     rendering mode. Vertices appears as balls (with vtk only).
 
1122
 
 
1123
`-full'
 
1124
     rendering mode. All edges appears (with vtk only).
 
1125
 
 
1126
`-cut'
 
1127
     rendering mode. cut by plane and clip (with vtk only).
 
1128
     Works with `-full', `-tube' or `-ball' modes.          Does not
 
1129
     clip mesh with `-fill' and `-grid' modes.          Does not work
 
1130
     yet with `-shrink' mode.          This option is still in
 
1131
     development.
 
1132
 
 
1133
`-origin X [Y [Z]]'
 
1134
     set the origin point of the cutting plane         when using with
 
1135
     the `-cut' option.          Default is (0.5,0.5,0.5).
 
1136
 
 
1137
`-normal NX [NY [NZ]]'
 
1138
     set the normal vector of the cutting plane.          when using
 
1139
     with the `-cut' option.          Default is (1,0,0).
 
1140
 
 
1141
`-split'
 
1142
     split each edge by inserting a node.          The resulting mesh
 
1143
     is P2-iso-P1.
 
1144
 
 
1145
Output format options
 
1146
---------------------
 
1147
 
 
1148
`-geo'
 
1149
     output mesh on standard output stream in geo text file format,
 
1150
        instead of plotting it.
 
1151
 
 
1152
`-bamg'
 
1153
     output mesh on standard output stream in bamg text file format,
 
1154
         instead of plotting it.
 
1155
 
 
1156
`-gmsh'
 
1157
     output mesh on standard output stream in gmsh ascii file format,
 
1158
          instead of plotting it.
 
1159
 
 
1160
`-tegen'
 
1161
     output mesh on stream in tegen text file format,         instead
 
1162
     of plotting it (TODO).
 
1163
 
 
1164
`-mmg3d'
 
1165
     output mesh on standard output stream in mmg3d text file format,
 
1166
          instead of plotting it.
 
1167
 
 
1168
`-cemagref'
 
1169
     output mesh on standard output stream in cemagref text file format,
 
1170
            instead of plotting it. Notices that the mesh does not
 
1171
     contains         the topographic elevation. If you want to include
 
1172
     the elevation,         in the output, use the `field' command with
 
1173
     the `-cemagref' option.
 
1174
 
 
1175
`-upgrade'
 
1176
     edges and faces are numbered. This numbering is required
 
1177
     for the quadratic approximation.
 
1178
 
 
1179
`-ndigit INT'
 
1180
     number of digits used to print floating point values         when
 
1181
     using the `-geo' option.          Default depends upon the machine
 
1182
     precision         of the `Float' type.
 
1183
 
 
1184
`-output-as-double'
 
1185
     Avoid variation of output float formats         when using high
 
1186
     precision `doubledouble' or         `bigfloat' classes.
 
1187
     This option is used for non-regression test purpose.
 
1188
 
 
1189
 
 
1190
Input format options
 
1191
--------------------
 
1192
 
 
1193
`-input-geo'
 
1194
     read the mesh in the `.geo' format.          This is the default.
 
1195
 
 
1196
`-input-bamg'
 
1197
     read the mesh in the `.bamg' format.          Since edges are not
 
1198
     numbered in `.bamg' format,         this file format is not
 
1199
     suitable for using P2 elements.          This format is supported
 
1200
     only for format conversion purpose.          See `-upgrade' for
 
1201
     edge numbering while         converting to `.geo'.
 
1202
 
 
1203
`-input-gmsh'
 
1204
     read the mesh in the `.msh' format.          Since edges in 2D and
 
1205
     faces in 3D are not numbered in `.msh'         format, this file
 
1206
     format is not suitable for using P2 elements.          This format
 
1207
     is supported only for format conversion purpose.          See
 
1208
     `-upgrade' for edge numbering while         converting to `.geo'.
 
1209
 
 
1210
`-input-tetgen'
 
1211
     read the mesh as the concatenation of `.node', `.ele' and `.face'
 
1212
     tetgen format.          Since in 3D are not all numbered in tetgen
 
1213
            format, this file format is not suitable for using P2
 
1214
     elements.          This format is supported only for format
 
1215
     conversion purpose.          See `-upgrade' for edge numbering
 
1216
     while         converting to `.geo'.
 
1217
 
 
1218
`-input-mmg3d'
 
1219
     read the mesh in the `.mmg3d' format.          Since edges and
 
1220
     faces are not numbered in `.mmg3d' format,         this file
 
1221
     format is not suitable for using P2 elements.          This format
 
1222
     is supported only for format conversion purpose.          See
 
1223
     `-upgrade' for edge numbering while         converting to `.geo'.
 
1224
 
 
1225
`-input-grummp'
 
1226
     read the mesh on standard input stream in grummp text file format.
 
1227
            The `.g' grummp file format is defined         grummp
 
1228
     `.template' specification file
 
1229
                    newfile g
 
1230
                    "grummp"
 
1231
                    "2" nverts ncells nbfaces
 
1232
                    verts: coords
 
1233
                    cells: verts region
 
1234
                    bdryfaces: verts bc
 
1235
             Conversely, for tridimensionnal meshes, the         grummp
 
1236
     `.template' specification file is:
 
1237
                    newfile g
 
1238
                    "grummp"
 
1239
                    "3" nverts ncells nbfaces
 
1240
                    verts: coords
 
1241
                    cells: verts region
 
1242
                    bdryfaces: verts bc
 
1243
             Such files can be generated with the `tri' and `tetra'
 
1244
        grummp mesh file generators. The grummp mesh generators suport
 
1245
           multi-regions geometries. These regions are translated to
 
1246
     bi- or         tri-dimensional domains, that are no boundary
 
1247
     domains.          A file format conversion writes:
 
1248
                     geo -input-grummp -geo -upgrade -noverbose - < hex-multi.g > hex-multi.geo
 
1249
 
 
1250
`-input-qmg'
 
1251
     output mesh on standard output stream in qmg text file format.
 
1252
         instead of plotting it.          Since edges are not numbered
 
1253
     in `.qmg' format,         this file format is not suitable for
 
1254
     using P2 elements.          This format is supported only for
 
1255
     format conversion purpose.          See `-upgrade' for edge
 
1256
     numbering while         converting to `.geo'.
 
1257
 
 
1258
`-dmn DOMAIN-NAMES-FILE'
 
1259
     An auxilliary `.dmn' file defining the boundary domain names
 
1260
      as used by `rheolef' could be used, since `bamg', `mmg3d',
 
1261
     `tetgen'         and `grummp' use numeric         labels for
 
1262
     domains. Example of a `multi-domain.dmn'         with two regions
 
1263
     and four boundary domains file:
 
1264
                    EdgeDomainNames
 
1265
                      4
 
1266
                      bottom
 
1267
                      right
 
1268
                      top
 
1269
                      left
 
1270
                    FaceDomainNames
 
1271
                      2
 
1272
                      hard
 
1273
                      soft
 
1274
             `geo' recognized this format as an extension at the end
 
1275
         of the `.bamg', `.mesh' (mmg3d) or the `.g' file.          The
 
1276
     complete file format conversion writes:
 
1277
                    cat multi-domain.g multi-domain.dmn | \\
 
1278
                      geo -input-grummp -upgrade -geo -  > multi-domain.geo
 
1279
             If this file is not provided, boundary domains are named
 
1280
          `boundary1', `boundary2', ...          and region domain are
 
1281
     named         `region1', `region2', ...          The
 
1282
     tridimensionnal domain name file contains         the
 
1283
     `FaceDomainNames' and `VolumeDomainNames'         keywords, for
 
1284
     boundary and region domains, respectively.
 
1285
 
 
1286
`-input-cemagref'
 
1287
     read the mesh in the `.cemagref' format.          Notices that the
 
1288
     reader skip the topographic elevation informations.          If
 
1289
     you want to load the elevation, use the `field'         command
 
1290
     with the `-input-cemagref' option.
 
1291
 
 
1292
 
 
1293
Others options
 
1294
--------------
 
1295
 
 
1296
`-verbose'
 
1297
     print messages related to graphic files created and
 
1298
     command system calls (this is the default).
 
1299
 
 
1300
`-noverbose'
 
1301
     does not print previous messages.
 
1302
 
 
1303
`-clean'
 
1304
     clear temporary graphic files (this is the default).
 
1305
 
 
1306
`-noclean'
 
1307
     does not clear temporary graphic files.
 
1308
 
 
1309
`-execute'
 
1310
     execute graphic command (this is the default).
 
1311
 
 
1312
`-noexecute'
 
1313
     does not execute graphic command. Generates only         graphic
 
1314
     files. This is usefull in conjuction with the         "-noclean"
 
1315
     command.
 
1316
 
 
1317
`-check'
 
1318
`-dump'
 
1319
     used for debug purpose.
 
1320
 
 
1321
Graphic output file
 
1322
-------------------
 
1323
 
 
1324
You can generate a `postscript',     `latex' or `Fig'     output of
 
1325
your mesh, using     the `geo' command with     `-gnuplot -noclean'
 
1326
options, and then modifying the     `.plot' generated file.
 
1327
 
 
1328
Geo file format
 
1329
---------------
 
1330
 
 
1331
This is the default mesh file format. It contains two entitiess, namely
 
1332
a mesh and a list of domains. The mesh entity starts with the header.
 
1333
The header contains the `mesh' keyword followed by a line containing a
 
1334
format version number, the space dimension (e.g. 1, 2 or 3), the number
 
1335
of vertices, the number of elements. For file format version 2, when
 
1336
dimension is three, the number of faces is specified, and then, when
 
1337
dimension is two or three, the number of edges is also specified.
 
1338
Follows the vertex coordinates, the elements and the faces or edges.
 
1339
One element starts with a letter indicating the element type
 
1340
`p'
 
1341
     point
 
1342
 
 
1343
`e'
 
1344
     edge
 
1345
 
 
1346
`t'
 
1347
     triangle
 
1348
 
 
1349
`q'
 
1350
     quadrangle
 
1351
 
 
1352
`T'
 
1353
     tetrahedron
 
1354
 
 
1355
`P'
 
1356
     prism
 
1357
 
 
1358
`H'
 
1359
     hexaedron
 
1360
Then, we have the vertex indexes.  A vertex index is numbered in the
 
1361
C-style, i.e. the first index is numbered 0.  An edge is a couple of
 
1362
index.
 
1363
 
 
1364
Geo version 1 file format (obsolete) does neither give any information
 
1365
about edges for 2d meshes nor for faces in 3d. This information is
 
1366
requiered for maintaining P2 approximation file in a consistent way,
 
1367
since edge and face numbering algorithm should vary from one version to
 
1368
another, and thus may be stored on file.
 
1369
 
 
1370
Nevertheless, geo version 1 file format is still supported, since it is
 
1371
a convenient way to build and import meshes (*note geo command::).
 
1372
 
 
1373
A sample mesh is in version 1 writes
 
1374
             mesh
 
1375
             1 2 4 2
 
1376
             0 0
 
1377
             1 0
 
1378
             1 1
 
1379
             0 1
 
1380
             t   0 1 3
 
1381
             t   1 2 3
 
1382
 
 
1383
the same in version 2
 
1384
             mesh
 
1385
             2 2 4 2 5
 
1386
             0 0
 
1387
             1 0
 
1388
             1 1
 
1389
             0 1
 
1390
             t   0 1 3
 
1391
             t   1 2 3
 
1392
             0 1
 
1393
             1 2
 
1394
             2 3
 
1395
             3 0
 
1396
             1 3
 
1397
 
 
1398
The second entity is a list of domains, that finishes with the end of
 
1399
file. A domain starts with the `domain' keyword, followed by a domain
 
1400
name.  Then, the format version number (i.e. 1 today), and the number
 
1401
of sides. Follows the sides
 
1402
             domain
 
1403
             bottom
 
1404
             1 1 1
 
1405
             e   0 1
 
1406
 
 
1407
             domain
 
1408
             top
 
1409
             1 1 1
 
1410
             e   2 3
 
1411
 
 
1412
 
 
1413
File: rheolef.info,  Node: bamg2geo command,  Up: Commands
 
1414
 
 
1415
4.6 bamg2geo - convert bamg mesh in geo format
 
1416
==============================================
 
1417
 
 
1418
(Source file: `nfem/bin/bamg2geo') 
 
1419
 
 
1420
Synopsis
 
1421
--------
 
1422
 
 
1423
       bamg2geo OPTIONS INPUT[.bamg] INPUT[.dmn]
 
1424
       bamg2geo OPTIONS INPUT[.bamg] -Cl DOMLABEL
 
1425
       bamg2geo OPTIONS INPUT[.bamg] {-dom DOMNAME}*
 
1426
 
 
1427
Description
 
1428
-----------
 
1429
 
 
1430
Convert a bamg `.bamg' into `.geo' one.  The output goes to standart
 
1431
output.  The `.dmn' file specifies the domain names, since `bamg' mesh
 
1432
generator uses numbers as domain labels.
 
1433
 
 
1434
Example
 
1435
-------
 
1436
 
 
1437
       bamg -g toto.bamgcad -o toto.bamg
 
1438
       bamg2geo toto.bamg toto.dmn > toto.geo
 
1439
 
 
1440
Bamg cad file
 
1441
-------------
 
1442
 
 
1443
This file describe the boundary of the mesh geometry.  A basic example
 
1444
writes (See bamg documentation for more);
 
1445
       MeshVersionFormatted
 
1446
         0
 
1447
       Dimension
 
1448
         2
 
1449
       Vertices
 
1450
         4
 
1451
         0  0     1
 
1452
         1  0     2
 
1453
         1  1     3
 
1454
         0  1     4
 
1455
       Edges
 
1456
         4
 
1457
         1  2     101
 
1458
         2  3     102
 
1459
         3  4     103
 
1460
         4  1     104
 
1461
       hVertices
 
1462
         0.1 0.1 0.1 0.1
 
1463
 
 
1464
Domain name file
 
1465
----------------
 
1466
 
 
1467
This auxilliary `.dmn' file defines the boundary domain names as used
 
1468
by Rheolef, since `bamg' uses numeric labels for domains.
 
1469
       EdgeDomainNames
 
1470
         4
 
1471
         bottom
 
1472
         right
 
1473
         top
 
1474
         left
 
1475
 
 
1476
The domain name file can also specify additional vertices domain
 
1477
----------------------------------------------------------------
 
1478
 
 
1479
       EdgeDomainNames
 
1480
         4
 
1481
         bottom
 
1482
         right
 
1483
         top
 
1484
         left
 
1485
       VerticeDomainNames
 
1486
         4
 
1487
         left_bottom
 
1488
         right_bottom
 
1489
         right_top
 
1490
         left_top
 
1491
Vertice domain names are usefull for some special boundary conditions.
 
1492
 
 
1493
Options
 
1494
-------
 
1495
 
 
1496
`-upgrade'
 
1497
`-noupgrade'
 
1498
     Default is to output a version 2 `.geo' file format. *Note geo
 
1499
     command::.          With the `-noupgrade', a version 1 file format
 
1500
     is assumed.
 
1501
 
 
1502
`-dom DOM1 ... -dom DOMN'
 
1503
`-Cl {poi|sed|sec|tro|con|NONE}'
 
1504
     Predefined domain name convention. See next section.
 
1505
 
 
1506
 
 
1507
File: rheolef.info,  Node: mesh2geo command,  Up: Commands
 
1508
 
 
1509
4.7 mesh2geo - convert mmg3d mesh in geo format
 
1510
===============================================
 
1511
 
 
1512
(Source file: `nfem/bin/mesh2geo') 
 
1513
 
 
1514
Synopsis
 
1515
--------
 
1516
 
 
1517
       mesh2geo OPTIONS INPUT[.mesh] INPUT[.dmn]
 
1518
 
 
1519
Description
 
1520
-----------
 
1521
 
 
1522
Convert a mesh `.mesh' into `.geo' one.  The output goes to standart
 
1523
output.  The `.dmn' file specifies the domain names, since `mmg3d' mesh
 
1524
generator uses numbers as domain labels.
 
1525
 
 
1526
Example
 
1527
-------
 
1528
 
 
1529
       mmg3d -O 1 -in toto.mesh -out toto-opt.mesh
 
1530
       mesh2geo toto-opt.mesh toto.dmn > toto-opt.geo
 
1531
 
 
1532
Domain name file
 
1533
----------------
 
1534
 
 
1535
This auxilliary `.dmn' file defines the boundary domain names as used
 
1536
by Rheolef, since `mmg3d' uses numeric labels for domains.
 
1537
 
 
1538
Options
 
1539
-------
 
1540
 
 
1541
`-upgrade'
 
1542
`-noupgrade'
 
1543
     Default is to output a version 2 `.geo' file format. *Note geo
 
1544
     command::.          With the `-noupgrade', a version 1 file format
 
1545
     is assumed.
 
1546
 
 
1547
 
 
1548
File: rheolef.info,  Node: field command,  Up: Commands
 
1549
 
 
1550
4.8 `field' - plot a field
 
1551
==========================
 
1552
 
 
1553
(Source file: `nfem/bin/xfield.cc') 
 
1554
 
 
1555
Synopsis
 
1556
--------
 
1557
 
 
1558
             field [-IDIR] FILENAME
 
1559
 
 
1560
Description
 
1561
-----------
 
1562
 
 
1563
Read and output a finite element field from file.
 
1564
 
 
1565
Example
 
1566
-------
 
1567
 
 
1568
             field square.field
 
1569
             field square.field -black-and-white
 
1570
             field box.field
 
1571
             field box.field -volume
 
1572
 
 
1573
Input file specification
 
1574
------------------------
 
1575
 
 
1576
`-IDIR'
 
1577
     add DIR to the RHEOPATH search path.          See also *note geo
 
1578
     class:: for RHEOPATH mechanism.
 
1579
 
 
1580
`FILENAME'
 
1581
     specifies the name of the file containing         the input field.
 
1582
 
 
1583
`-'
 
1584
     read field on standard input instead on a file.
 
1585
 
 
1586
`-name'
 
1587
     when field data comes from standard input, the field name
 
1588
     is not known and is set to "output" by default.          This
 
1589
     option allows to change this default.          Useful when dealing
 
1590
     with output formats (graphic, format conversion)         that
 
1591
     creates auxilliary files, based on this name.
 
1592
 
 
1593
 
 
1594
Input format options
 
1595
--------------------
 
1596
 
 
1597
`-input-field'
 
1598
     read the data in the `.field' format.          This is the default.
 
1599
 
 
1600
`-input-cemagref'
 
1601
     input data in cemagref file format.          The field represents
 
1602
     the topographic elevation         and is assumed to be a `P1'
 
1603
     approximation.
 
1604
 
 
1605
Output format options
 
1606
---------------------
 
1607
 
 
1608
`-field'
 
1609
`-text'
 
1610
     output field on standard output stream in field text file format.
 
1611
 
 
1612
`-bamg'
 
1613
     output field on standard output stream in bamg file format.
 
1614
 
 
1615
`-mmg3d'
 
1616
     output field on standard output stream in mmg3d file format.
 
1617
 
 
1618
`-gmsh'
 
1619
     output field on standard output stream in gmsh file format.
 
1620
 
 
1621
`-cemagref'
 
1622
     output field on standard output stream in cemagref file format.
 
1623
          The field represents         the topographic elevation and is
 
1624
     assumed to be a `P1' approximation.          This option is
 
1625
     suitable for file format conversion:
 
1626
 
 
1627
`-ndigit INT'
 
1628
     number of digits used to print floating point values.
 
1629
     Default depends upon the machine precision associated to the
 
1630
      `Float' type.
 
1631
 
 
1632
`-round'
 
1633
     Round the output, in order for the non-regression tests to
 
1634
     be portable across platforms. Floating point are machine-dependent.
 
1635
 
 
1636
 
 
1637
File format conversions
 
1638
-----------------------
 
1639
 
 
1640
Input and output options can be combined for efficient     file format
 
1641
conversion:
 
1642
                 field -input-cemagref -field - < mytopo.cemagref > mytopo.field
 
1643
                 field myfile.field -bamg > myfile.bb
 
1644
    can be performed in one pass:
 
1645
                 field -input-cemagref -bamg  - < mytopo.cemagref > myfile.bb
 
1646
 
 
1647
Getting information
 
1648
-------------------
 
1649
 
 
1650
`-min'
 
1651
`-max'
 
1652
     print the min (resp. max) value of the scalar field and then exit.
 
1653
 
 
1654
Render options
 
1655
--------------
 
1656
 
 
1657
The default render could also specified by using the RHEOLEF_RENDER
 
1658
environment variable.
 
1659
`-gnuplot'
 
1660
     use `gnuplot' tool.          This is the default for
 
1661
     monodimensional geometries.
 
1662
 
 
1663
`-mayavi'
 
1664
     use `mayavi' tool.          This is the default for bi- and
 
1665
     tridimensional geometries.
 
1666
 
 
1667
`-plotmtv'
 
1668
     use `plotmtv' plotting command, for bidimensional geometries.
 
1669
 
 
1670
`-vtk'
 
1671
     use `vtk' tool.          This is the old (no more supported) tool
 
1672
     for tridimensional geometries.          Could be used in 2d also.
 
1673
 
 
1674
 
 
1675
Rendering options
 
1676
-----------------
 
1677
 
 
1678
`-color'
 
1679
`-gray'
 
1680
`-black-and-white'
 
1681
     Use (color/gray scale/black and white) rendering.          Color
 
1682
     rendering is the default.      
 
1683
 
 
1684
`-stereo'
 
1685
`-nostereo'
 
1686
     rendering mode: suitable for red-blue anaglyph 3D stereoscopic
 
1687
     glasses.
 
1688
 
 
1689
`-fill'
 
1690
     isoline intervals are filled with color.          This is the
 
1691
     default.
 
1692
 
 
1693
`-nofill'
 
1694
     draw isolines by using lines.
 
1695
 
 
1696
`-grid'
 
1697
     mesh edges appear also.
 
1698
 
 
1699
`-nogrid'
 
1700
     prevent mesh edges drawing.          This is the default.
 
1701
 
 
1702
`-proj'
 
1703
     Convert all selected fields to P1-continuous approximation by
 
1704
     using a L2 projection.          Usefull when input is a
 
1705
     discontinuous field (e.g. P0 or P1d).
 
1706
 
 
1707
`-iso FLOAT'
 
1708
     extract an iso-value set of points (1d), lines (2d)         or
 
1709
     surfaces (3d) for a specified value. Output         the surface in
 
1710
     text format (with `-text' option)         or using a graphic
 
1711
     driver.          This option requires the `vtk' code.
 
1712
 
 
1713
`-noiso'
 
1714
     do not draw isosurface.
 
1715
 
 
1716
`-volume'
 
1717
`-novolume'
 
1718
     This is an experimental volume representation by using ray cast
 
1719
     (mayavi and vtk graphics).
 
1720
 
 
1721
`-n-iso INT'
 
1722
     For 2D visualizations, the isovalue table contains
 
1723
     regularly spaced values from fmin to fmax, the bounds         of
 
1724
     the field.  
 
1725
 
 
1726
`-n-iso-negative INT'
 
1727
     The isovalue table is splitted into negatives and positives values.
 
1728
            Assume there is n_iso=15 isolines: if 4 is requested by
 
1729
     this option,         then, there will be 4 negatives isolines,
 
1730
     regularly spaced         from fmin to 0 and 11=15-4 positive
 
1731
     isolines, regularly spaced         from 0 to fmax.          This
 
1732
     option is usefull when plotting e.g. vorticity or stream
 
1733
     functions, where the sign of the field is representative.
 
1734
 
 
1735
`-label'
 
1736
`-nolabel'
 
1737
     Write or do not write labels for values on isolines on         2d
 
1738
     contour plots when using  `plotmtv' output.  
 
1739
 
 
1740
`elevation'
 
1741
     For two dimensional field, represent values as elevation
 
1742
     in the third dimension.
 
1743
 
 
1744
`noelevation'
 
1745
     Prevent from the `elevation' representation.          This is the
 
1746
     default.
 
1747
 
 
1748
`-scale FLOAT'
 
1749
     applies a multiplicative factor to the field.          This is
 
1750
     useful e.g. in conjonction with the `elevation' option.
 
1751
     The default value is 1.
 
1752
 
 
1753
`-cut'
 
1754
     show a cut by a specified plane.          The cutting plane is
 
1755
     specified by its origin point and normal vector.          This
 
1756
     option requires the `vtk' code.
 
1757
 
 
1758
`-origin FLOAT [FLOAT [FLOAT]]'
 
1759
     set the origin of the cutting plane.          Default is (0.5,
 
1760
     0.5, 0.5).
 
1761
 
 
1762
`-normal FLOAT [FLOAT [FLOAT]]'
 
1763
     set the normal of the cutting plane.          Default is (1, 0, 0).
 
1764
 
 
1765
 
 
1766
Others options
 
1767
--------------
 
1768
 
 
1769
`-verbose'
 
1770
     print messages related to graphic files created and        command
 
1771
     system calls (this is the default).
 
1772
 
 
1773
`-noverbose'
 
1774
     does not print previous messages.
 
1775
 
 
1776
`-clean'
 
1777
     clear temporary graphic files (this is the default).
 
1778
 
 
1779
`-noclean'
 
1780
     does not clear temporary graphic files.
 
1781
 
 
1782
`-execute'
 
1783
     execute graphic command (this is the default).
 
1784
 
 
1785
`-noexecute'
 
1786
     does not execute graphic command. Generates only         graphic
 
1787
     files. This is usefull in conjuction with the         `-noclean'
 
1788
     command.
 
1789
 
 
1790
Field file format
 
1791
-----------------
 
1792
 
 
1793
It contains a header and a list values at degrees of freedom.  The
 
1794
header contains the `field' keyword followed by a line containing a
 
1795
format version number (presently 1), the number of degrees of freedom
 
1796
(i.e. the number of values listed), the mesh file name without the
 
1797
`.geo' extension the approximation (e.g. P1, P2, etc), and finaly the
 
1798
list of values: A sample field file (compatible with the sample mesh
 
1799
example presented in command manual; see *note geo command::) writes:
 
1800
             field
 
1801
             1 4
 
1802
             square
 
1803
             P1
 
1804
             0.0
 
1805
             1.0
 
1806
             2.0
 
1807
             3.0
 
1808
 
 
1809
Examples
 
1810
--------
 
1811
 
 
1812
         field cube.field -cut -normal 0 1 0 -origin 0.5 0.5 0.5 -vtk
 
1813
  This command send to `vtk' the cutted 2d plane of the 3d field.
 
1814
         field cube.field -cut -normal 0 1 0 -origin 0.5 0.5 0.5 -text > cube-cut.field
 
1815
  This command generates the cutted 2d field and its associated mesh.
 
1816
         field cube.field -iso 0.5 -plotmtv
 
1817
  This command draws the isosurface.
 
1818
         field cube.field -iso 0.5 -text > isosurf.geo
 
1819
  This command generates the isosurface as a 3d surface mesh in
 
1820
`.geo' format. This is suitable for others treatments.
 
1821
 
 
1822
 
 
1823
File: rheolef.info,  Node: cemagref2field command,  Up: Commands
 
1824
 
 
1825
4.9 cemagref2field - convert cemagref topography in field and geo formats
 
1826
=========================================================================
 
1827
 
 
1828
(Source file: `nfem/bin/cemagref2field') 
 
1829
 
 
1830
Synopsis
 
1831
--------
 
1832
 
 
1833
       cemagref2field OPTIONS INPUT[.cemagref]
 
1834
 
 
1835
Description
 
1836
-----------
 
1837
 
 
1838
Convert a cemagref `.cemagref' topography data file into `.field' and
 
1839
its associated `.geo' files.  The `.field' output goes to standart
 
1840
output, while the compressed `.geo' is created as INPUT.`geo.gz' using
 
1841
`gzip'.
 
1842
 
 
1843
Example
 
1844
-------
 
1845
 
 
1846
       cemagref2field toto.cemagref > toto-z.field
 
1847
       cemagref2field -cemagref toto.dat > toto-z.field
 
1848
and a `toto.geo.gz'.
 
1849
 
 
1850
Options
 
1851
-------
 
1852
 
 
1853
`-cemagref INPUT'
 
1854
     specifies directly the input file, for an alternate suffix
 
1855
     convention.
 
1856
 
 
1857
 
 
1858
File: rheolef.info,  Node: qmg2geo command,  Up: Commands
 
1859
 
 
1860
4.10 qmg2geo - convert qmg mesh in geo format
 
1861
=============================================
 
1862
 
 
1863
(Source file: `nfem/bin/qmg2geo') 
 
1864
 
 
1865
Description
 
1866
-----------
 
1867
 
 
1868
Convert a qmg `.qmg' into `.geo' one.  The output goes to standart
 
1869
output.
 
1870
 
 
1871
Synopsis
 
1872
--------
 
1873
 
 
1874
       qmg2geo [-qmg] INPUT.qmg INPUT.dmn
 
1875
 
 
1876
Domain name file
 
1877
----------------
 
1878
 
 
1879
This auxilliary `.dmn' file defines the boundary domain names as used
 
1880
by Rheolef, since `qmg' uses numeric labels for domains.
 
1881
       EdgeDomainNames
 
1882
         4
 
1883
         bottom
 
1884
         right
 
1885
         top
 
1886
         left
 
1887
 
 
1888
 
 
1889
File: rheolef.info,  Node: space command,  Up: Commands
 
1890
 
 
1891
4.11 `space' - print a finite element space
 
1892
===========================================
 
1893
 
 
1894
(Source file: `nfem/bin/xspace.cc')
 
1895
 
 
1896
Synopsis
 
1897
--------
 
1898
 
 
1899
            `space' FILENAME[.space]
 
1900
 
 
1901
Description
 
1902
-----------
 
1903
 
 
1904
Read and re-output a finite element space.
 
1905
 
 
1906
Example
 
1907
-------
 
1908
 
 
1909
enter command as:
 
1910
           space < my.space
 
1911
 
 
1912
Space format
 
1913
------------
 
1914
 
 
1915
This is the default space file format.      The file     starts with
 
1916
the header: the "space" keyword followed by     a line containing a
 
1917
format version number (i.e. 1 today),     and the number of degrees of
 
1918
freedom.      Follows the numbering and an optional 'B' label, if the
 
1919
 degree of freedom is blocked.      A sample space is:
 
1920
 
 
1921
            space
 
1922
            1 3
 
1923
            0 B
 
1924
            1 B
 
1925
            0
 
1926
            2 B
 
1927
            1
 
1928
 
 
1929
 
 
1930
File: rheolef.info,  Node: msh2geo command,  Up: Commands
 
1931
 
 
1932
4.12 msh2geo - convert gmsh mesh in geo format
 
1933
==============================================
 
1934
 
 
1935
(Source file: `nfem/bin/msh2geo') 
 
1936
 
 
1937
Synopsis
 
1938
--------
 
1939
 
 
1940
       msh2geo OPTIONS INPUT[.msh]
 
1941
 
 
1942
Description
 
1943
-----------
 
1944
 
 
1945
Convert a gmsh `.msh' into `.geo' one.  The output goes to standart
 
1946
output.
 
1947
 
 
1948
Example
 
1949
-------
 
1950
 
 
1951
       gmsh -2 toto.mshcad -o toto.msh
 
1952
       msh2geo toto.msh > toto.geo
 
1953
See the `gmsh' documentation for a detailed description  of the
 
1954
`.mshcad' input file for `gmsh'.
 
1955
 
 
1956
 
 
1957
File: rheolef.info,  Node: branch command,  Up: Commands
 
1958
 
 
1959
4.13 `branch' - handle a family of fields
 
1960
=========================================
 
1961
 
 
1962
(Source file: `nfem/bin/branch.cc')
 
1963
 
 
1964
Synopsis
 
1965
--------
 
1966
 
 
1967
             branch [OPTIONS] FILENAME
 
1968
 
 
1969
Example
 
1970
-------
 
1971
 
 
1972
Generates vtk file colection for visualization with paraview:
 
1973
             branch output.branch -paraview
 
1974
 
 
1975
Description
 
1976
-----------
 
1977
 
 
1978
Read and output a branch of finite element fields from file,   in field
 
1979
text file format.
 
1980
 
 
1981
Input file specification
 
1982
------------------------
 
1983
 
 
1984
`-IDIR'
 
1985
     add DIR to the RHEOPATH search path.          See also *note geo
 
1986
     class:: for RHEOPATH mechanism.
 
1987
 
 
1988
`FILENAME'
 
1989
     specifies the name of the file containing         the input field.
 
1990
 
 
1991
`-'
 
1992
     read field on standard input instead on a file.
 
1993
 
 
1994
`-ndigit INT'
 
1995
     Number of digits used to print floating point values         when
 
1996
     using the `-geo' option.          Default depends upon the machine
 
1997
     precision associated to the         `Float' type.
 
1998
 
 
1999
 
 
2000
Output and render specification
 
2001
-------------------------------
 
2002
 
 
2003
`-extract INT'
 
2004
     Extract the i-th record in the file. The output         is a field
 
2005
     or multi-field file format.
 
2006
 
 
2007
`-branch'
 
2008
     Output on stdout in `.branch' format.          This is the default.
 
2009
 
 
2010
`-paraview'
 
2011
     Generate a collection of `vtk' files         for using `paraview'.
 
2012
 
 
2013
`-vtk'
 
2014
     Generate a single `vtk' file         with numbered fields.
 
2015
 
 
2016
`-gnuplot'
 
2017
     Run 1d animation using `gnuplot'.
 
2018
 
 
2019
`-plotmtv'
 
2020
     This driver is unsupported for animations.
 
2021
 
 
2022
 
 
2023
Other options
 
2024
-------------
 
2025
 
 
2026
`-topography FILENAME[.field[.gz]]'
 
2027
     performs a tridimensionnal elevation view based         on the
 
2028
     topographic data.
 
2029
 
 
2030
`-proj'
 
2031
     performs a `P1' projection on the fly.          This option is
 
2032
     useful when rendering `P0' data         while `vtk' render
 
2033
     requieres `P1' description.
 
2034
 
 
2035
`-elevation'
 
2036
     For  two  dimensional  field, represent values as elevation in the
 
2037
     third dimension.          This is the default.
 
2038
 
 
2039
`-noelevation'
 
2040
     Prevent from the elevation representation.
 
2041
 
 
2042
`-scale FLOAT'
 
2043
     applies a multiplicative factor to the field.          This is
 
2044
     useful e.g. in conjonction with the `elevation' option.
 
2045
     The default value is 1.
 
2046
 
 
2047
`-verbose'
 
2048
     print messages related to graphic files created and        command
 
2049
     system calls (this is the default).
 
2050
 
 
2051
`-noverbose'
 
2052
     does not print previous messages.
 
2053
 
 
2054
`-clean'
 
2055
     clear temporary graphic files (this is the default).
 
2056
 
 
2057
`-noclean'
 
2058
     does not clear temporary graphic files.
 
2059
 
 
2060
`-execute'
 
2061
     execute graphic command (this is the default).
 
2062
 
 
2063
`-noexecute'
 
2064
     does not execute graphic command. Generates only         graphic
 
2065
     files. This is usefull in conjuction with the         `-noclean'
 
2066
     command.
 
2067
 
 
2068
 
 
2069
Branch file format
 
2070
------------------
 
2071
 
 
2072
The `.branch' file format bases on the `.field' one:
 
2073
            EXAMPLE          GENERAL FORM
 
2074
 
 
2075
             #!branch        #!branch
 
2076
             branch          branch
 
2077
               1 1 11        <version> <nfield=1> <nvalue=N>
 
2078
               time u        <key> <field name>
 
2079
 
 
2080
               #time 3.14    #<key> <key value 1>
 
2081
               #u            #<field name>
 
2082
               field         <field 1>
 
2083
               .....         ....
 
2084
 
 
2085
               .....         ....
 
2086
               #time 6.28    #<key> <key value N>
 
2087
               #u            #<field name>
 
2088
               field         <field N>
 
2089
               .....         ....
 
2090
   The key name is here `time', but could be any string (without
 
2091
spaces).     The previous example contains one `field' at each time
 
2092
step.     Labels appears all along the file to facilitate direct jumps
 
2093
and field and step skips.
 
2094
 
 
2095
The format supports several fields, such as (t,u(t),p(t)), where u could
 
2096
  be a multi-component (e.g. a vector) field:
 
2097
             #!branch
 
2098
             branch
 
2099
               1 2 11
 
2100
               time u p
 
2101
 
 
2102
               #time 3.14
 
2103
               #u
 
2104
               mfield
 
2105
               1 2
 
2106
               #u0
 
2107
               field
 
2108
               ...
 
2109
               #u1
 
2110
               field
 
2111
               ...
 
2112
               #p
 
2113
 
 
2114
               #time 6.28
 
2115
               ...
 
2116
 
 
2117
 
 
2118
File: rheolef.info,  Node: cad command,  Up: Commands
 
2119
 
 
2120
4.14 `cad' - plot a boundary file
 
2121
=================================
 
2122
 
 
2123
(Source file: `nfem/bin/cad.cc') 
 
2124
 
 
2125
Description
 
2126
-----------
 
2127
 
 
2128
Manipulates geometry boundary files (CAD, Computer Aid Design):
 
2129
visualizations and file conversions.    This command is under
 
2130
development.
 
2131
 
 
2132
Synopsis
 
2133
--------
 
2134
 
 
2135
             col < FILE[.qmgcad] | cad -input-qmg - OPTIONS...
 
2136
 
 
2137
Examples
 
2138
--------
 
2139
 
 
2140
The `qmg' logo:
 
2141
             col < ../data/logo2.qmgcad  | cad -input-qmg - -noclean
 
2142
             gnuplot output.plot
 
2143
  A torus:
 
2144
             col < ../data/test2-out.qmgcad | cad -input-qmg -
 
2145
  In the `geomview' window, enter '2as' key sequence to switch to a
 
2146
smooth   rendering.
 
2147
 
 
2148
Unresolved issues
 
2149
-----------------
 
2150
 
 
2151
The `qmg' demonstration files comes from PC-DOS and contains line-feed
 
2152
characters that are not filtered by `flex' when reading   file. Thus,
 
2153
the `col' filter is required.
 
2154
 
 
2155
Included surfaces, such as cracks, are hiden in 3D with `geomview'.
 
2156
Thus, `vtk' rendering with some transparency factor would be better.
 
2157
 
 
2158
`bamg' and `grummp' boundary files are not yet supported.    They will
 
2159
be in the future.
 
2160
 
 
2161
Input file specification
 
2162
------------------------
 
2163
 
 
2164
`FILENAME'
 
2165
     specifies the name of the file containing         the input mesh.
 
2166
     The ".cad" extension is assumed.
 
2167
 
 
2168
`-ICADDIR'
 
2169
     add CADDIR to the mesh search path.          This mechanism
 
2170
     initializes a search path given by the environment variable
 
2171
     `RHEOPATH'. If the environment variable         `RHEOPATH' is not
 
2172
     set, the         default value is the current directory
 
2173
     (*note cad class::).
 
2174
 
 
2175
`-'
 
2176
     read mesh on standard input instead on a file.
 
2177
 
 
2178
Input format options
 
2179
--------------------
 
2180
 
 
2181
`-input-cad'
 
2182
     read the boundary in the `.cad' format.          This is the
 
2183
     default         (TODO: not yet, uses qmg instead).
 
2184
 
 
2185
`-input-qmg'
 
2186
     read the boundary in the `.qmgcad' format.          In `qmg', this
 
2187
     file format is known as _brep_, that         stands for boundary
 
2188
     representation.
 
2189
 
 
2190
Output format options
 
2191
---------------------
 
2192
 
 
2193
`-cad'
 
2194
     output boundary on standard output stream in cad text file format,
 
2195
            instead of plotting it.
 
2196
 
 
2197
`-geomview'
 
2198
     use geomview rendering tool.          This is the default for
 
2199
     tridimensional data.
 
2200
 
 
2201
`-gnuplot'
 
2202
     use gnuplot rendering tool.          This is the default for
 
2203
     bidimensional data.
 
2204
 
 
2205
Render options
 
2206
--------------
 
2207
 
 
2208
`-subdivide NSUB'
 
2209
     Subdivide each Bezier patch in DEGREE*NSUB linear
 
2210
     sub-element.          For rendering tools that does not support
 
2211
     Bezier patches, such         as `gnuplot' or `geomview'.
 
2212
     Default is NSUB=3 for tridimensional data and         NSUB=50 for
 
2213
     bidimensional data.
 
2214
 
 
2215
`-no-bezier-adapt'
 
2216
     Subdivide each Bezier patch in NSUB instead         of DEGREE*NSUB.
 
2217
 
 
2218
`-bezier-adapt'
 
2219
     Subdivide each Bezier patch in of DEGREE*NSUB.          This is
 
2220
     the default.
 
2221
 
 
2222
Others options
 
2223
--------------
 
2224
 
 
2225
`-verbose'
 
2226
     print messages related to graphic files created and
 
2227
     command system calls (this is the default).
 
2228
 
 
2229
`-noverbose'
 
2230
     does not print previous messages.
 
2231
 
 
2232
`-clean'
 
2233
     clear temporary graphic files (this is the default).
 
2234
 
 
2235
`-noclean'
 
2236
     does not clear temporary graphic files.
 
2237
 
 
2238
`-execute'
 
2239
     execute graphic command (this is the default).
 
2240
 
 
2241
`-noexecute'
 
2242
     does not execute graphic command. Generates only         graphic
 
2243
     files. This is usefull in conjuction with the         "-noclean"
 
2244
     command.
 
2245
 
 
2246
 
 
2247
 
 
2248
File: rheolef.info,  Node: rheolef-config command,  Up: Commands
 
2249
 
 
2250
4.15 rheolef-config - get installation directories
 
2251
==================================================
 
2252
 
 
2253
(Source file: `rheolef-config.in') 
 
2254
 
 
2255
Example
 
2256
-------
 
2257
 
 
2258
The following command returns the rheolef libraries directory:
 
2259
             rheolef-config --libdir
 
2260
An environment sanity check writes:
 
2261
             rheolef-config --check
 
2262
 
 
2263
Description
 
2264
-----------
 
2265
 
 
2266
This command is usefull when linking executables with rheolef:
 
2267
libraries locations are required by the link editor.    Such
 
2268
directories are defined while configuring rheolef,   before to compile
 
2269
and install *note Installing::.    The `rheolef-config' command returns
 
2270
 these settings.
 
2271
 
 
2272
Note that `rheolef-config' could be used in Makefiles   for the
 
2273
determination of linker flags.
 
2274
 
 
2275
Another usefull feature is the `--check' option.    When `rheolef' is
 
2276
installed in a user directory,   i.e. not as root, the sane run-time
 
2277
environment depends   upon two environment variables. The first one is
 
2278
the   PATH: `bkindir' directory may be present in PATH.    The second
 
2279
environment variable is related to shared   libraries, and its name is
 
2280
system-dependent, e.g.    LD_LIBRARY_PATH on most platforms and
 
2281
SHLIB_PATH on HP-UX.    Its content may contains `bindir'.
 
2282
             rheolef-config --shlibpath-var
 
2283
  Since it is a common mistake to have incorrect values   for these
 
2284
variable, for novice users or for adanced ones,   especialy when
 
2285
dealing with several   installed versions, the environment sanity check
 
2286
writes:
 
2287
             rheolef-config --check
 
2288
  If there is mistakes, a hint is suggested to fix it   and the return
 
2289
status is 1. Instead, the return status is 0.
 
2290
 
 
2291
File options
 
2292
------------
 
2293
 
 
2294
`--version'
 
2295
     rheolef version.
 
2296
 
 
2297
`--help'
 
2298
     print option summary and exit.
 
2299
 
 
2300
`--prefix'
 
2301
     install architecture-independent files location.
 
2302
 
 
2303
`--exec-prefix'
 
2304
     architecture-dependent files location.
 
2305
 
 
2306
`--includedir'
 
2307
     include header directory.
 
2308
 
 
2309
`--bindir'
 
2310
     executables directory.
 
2311
 
 
2312
`--mandir'
 
2313
     man documentation directory.
 
2314
 
 
2315
`--libdir'
 
2316
     object code libraries directory.
 
2317
 
 
2318
`--datadir'
 
2319
`--datarootdir'
 
2320
     read-only architecture-independent data location.
 
2321
 
 
2322
`--pkgdatadir'
 
2323
     read-only architecture-independent data location; specific for
 
2324
     package.
 
2325
 
 
2326
`--includes'
 
2327
     include compiler flags.
 
2328
 
 
2329
`--libs'
 
2330
     library compiler flags.
 
2331
 
 
2332
`--shlibpath-var'
 
2333
     the shared library path variable.
 
2334
 
 
2335
`--library-interface-version'
 
2336
     the library interface version.
 
2337
 
 
2338
`--hardcode-libdir-flag-spec'
 
2339
     flag to hardcode a libdir into a binary during linking.
 
2340
 
 
2341
 
 
2342
File: rheolef.info,  Node: Classes,  Up: Top
 
2343
 
 
2344
5 Classes
 
2345
*********
 
2346
 
 
2347
* Menu:
 
2348
 
 
2349
* cad class::
 
2350
* geo class::
 
2351
* form_diag_manip class::
 
2352
* space class::
 
2353
* form_diag class::
 
2354
* form_manip class::
 
2355
* field class::
 
2356
* trace class::
 
2357
* domain class::
 
2358
* form class::
 
2359
* branch class::
 
2360
* tensor class::
 
2361
* point class::
 
2362
* ic0 class::
 
2363
* permutation class::
 
2364
* vec class::
 
2365
* ssk class::
 
2366
* csr class::
 
2367
* diag class::
 
2368
* iorheo class::
 
2369
* Vector class::
 
2370
* catchmark class::
 
2371
* rheostream class::
 
2372
 
 
2373
 
 
2374
File: rheolef.info,  Node: cad class,  Up: Classes
 
2375
 
 
2376
5.1 `cad' - the boundary definition class
 
2377
=========================================
 
2378
 
 
2379
(Source file: `nfem/lib/cad.h') 
 
2380
 
 
2381
Description
 
2382
-----------
 
2383
 
 
2384
The `cad' class defines a container for the   description of the
 
2385
boundary of a geometry, by using   Bezier patches.
 
2386
 
 
2387
The aim is to handle high-level polynomial interpolation   together
 
2388
with curved boundaries (non-polynomial). So, the   description bases on
 
2389
Bezier curves and surfaces.
 
2390
 
 
2391
Also, the adaptive mesh loop requieres interpolation on the   boundary,
 
2392
and this class should facilitates such procedures.
 
2393
 
 
2394
This class is actually under development.
 
2395
 
 
2396
File format
 
2397
-----------
 
2398
 
 
2399
Under definition.
 
2400
 
 
2401
File format conversion
 
2402
----------------------
 
2403
 
 
2404
Under development.    Conversion to geomview and vtk for visualization.
 
2405
 Also to and from qmg, grummp, modulef/ghs, opencascade for
 
2406
compatibility.
 
2407
 
 
2408
Implementation
 
2409
--------------
 
2410
 
 
2411
     class cad : public smart_pointer<cad_rep> {
 
2412
     public:
 
2413
     // typedefs:
 
2414
 
 
2415
             typedef cad_rep::size_type size_type;
 
2416
 
 
2417
 
 
2418
     // allocator:
 
2419
 
 
2420
             cad();
 
2421
             cad (const std::string& file_name);
 
2422
 
 
2423
     // accessors:
 
2424
 
 
2425
             size_type dimension() const;
 
2426
             size_type n_face() const;
 
2427
 
 
2428
             const point& xmin() const;
 
2429
             const point& xmax() const;
 
2430
 
 
2431
             void  eval (const cad_element& S, const point& ref_coord, point & real_coord) const;
 
2432
             point eval (const cad_element& S, const point& ref_coord) const;
 
2433
 
 
2434
     // input/output:
 
2435
 
 
2436
             friend std::istream& operator >> (std::istream& is, cad& x);
 
2437
             friend std::ostream& operator << (std::ostream& os, const cad& x);
 
2438
     };
 
2439
 
 
2440
 
 
2441
File: rheolef.info,  Node: geo class,  Up: Classes
 
2442
 
 
2443
5.2 `geo' - the finite element mesh class
 
2444
=========================================
 
2445
 
 
2446
(Source file: `nfem/lib/geo.h') 
 
2447
 
 
2448
Synopsys
 
2449
--------
 
2450
 
 
2451
The `geo' class defines a container for a finite element mesh. This
 
2452
describes the nodes coordinates and the connectivity.  `geo' can
 
2453
contains domains, usefull for boundary condition setting.
 
2454
 
 
2455
Example
 
2456
-------
 
2457
 
 
2458
A sample usage of the geo class writes
 
2459
        geo omega;
 
2460
        cin >> omega;
 
2461
        cout << mayavi << full << omega;
 
2462
 
 
2463
Description
 
2464
-----------
 
2465
 
 
2466
The empty constructor makes an empty geo.  A string argument, as
 
2467
             geo g("square");
 
2468
will recursively look for a `square.geo[.gz]' file in the directory
 
2469
mentionned by the RHEOPATH environment variable, while `gzip'
 
2470
decompression is assumed.  If the file starts with `.' as `./square' or
 
2471
with a `/' as in `/home/oscar/square', no search occurs.  Also, if the
 
2472
environment variable RHEOPATH is not set, the default value is the
 
2473
current directory.
 
2474
 
 
2475
Input and output on streams are available, and manipulators works for
 
2476
text or graphic output (*note geo command::).
 
2477
 
 
2478
Finally, an STL-like interface provides efficient accesses to nodes,
 
2479
elements and domains.
 
2480
 
 
2481
Mesh adaptation
 
2482
---------------
 
2483
 
 
2484
The `geo_adapt' functions performs a mesh adaptation to improve the
 
2485
`P1'-Lagrange interpolation of the `field' given in argument (*note
 
2486
field class::).
 
2487
 
 
2488
Axisymetric geometry
 
2489
--------------------
 
2490
 
 
2491
The `coordinate_system' and `set_coordinate_system' members supports
 
2492
both `cartesian', `rz' and `zr' (axisymmetric) coordinate systems. This
 
2493
information is used by the `form' class (*note form class::).
 
2494
 
 
2495
Access to connectivity
 
2496
----------------------
 
2497
 
 
2498
The folowing code prints triangle vertex numbers
 
2499
       geo omega ("circle");
 
2500
       for (geo::const_iterator i = g.begin(); i != i.end(); i++) {
 
2501
         const geo_element& K = *i;
 
2502
         if (K.name() != 't') continue;
 
2503
         for (geo::size_type j = 0; j < 3; j++)
 
2504
           cout << K [j] << " ";
 
2505
         cout << endl;
 
2506
       }
 
2507
*Note geo_element internal::.
 
2508
 
 
2509
Access to vertice coordinates
 
2510
-----------------------------
 
2511
 
 
2512
The folowing code prints vertices coordinate
 
2513
       for (geo::const_iterator_vertex i = g.begin_vertex(); i != g.end_node(); i++) {
 
2514
         const point& xi = *i;
 
2515
         for (geo::size_type j = 0; j < g.dimension(); j++)
 
2516
           cout << xi [j] << " ";
 
2517
         cout << endl;
 
2518
       }
 
2519
 
 
2520
Access to domains
 
2521
-----------------
 
2522
 
 
2523
The following code prints edges on domain:
 
2524
       for (geo::const_iterator_domain i = g.begin_domain(); i != i.end_domain(); i++) {
 
2525
         const domain& dom = *i;
 
2526
         if (dom.dimension() != 2) continue;
 
2527
         for (domain::const_iterator j = dom.begin(); j < dom.end(); j++) {
 
2528
           const geo_element& E = *j;
 
2529
           cout << E [0] << " " << E[1] << endl;
 
2530
         }
 
2531
         cout << endl;
 
2532
       }
 
2533
*Note domain class::.
 
2534
 
 
2535
Environs
 
2536
--------
 
2537
 
 
2538
RHEOPATH: search path for geo data file.     Also *note form class::.
 
2539
 
 
2540
Implementation
 
2541
--------------
 
2542
 
 
2543
     class geo : public smart_pointer<georep> {
 
2544
     public:
 
2545
 
 
2546
     // typedefs:
 
2547
 
 
2548
       typedef georep::plot_options          plot_options;
 
2549
       void write_gnuplot_postscript_options (std::ostream& plot, const plot_options& opt) const;
 
2550
 
 
2551
       typedef georep::iterator              iterator;
 
2552
       typedef georep::const_iterator        const_iterator;
 
2553
       typedef georep::elemlist_type         elemlist_type;
 
2554
       typedef georep::nodelist_type         nodelist_type;
 
2555
       typedef georep::size_type             size_type;
 
2556
       typedef georep::domlist_type          domlist_type;
 
2557
 
 
2558
       typedef georep::const_iterator_node   const_iterator_node;
 
2559
       typedef georep::const_iterator_vertex const_iterator_vertex;
 
2560
       typedef georep::const_iterator_domain const_iterator_domain;
 
2561
       typedef georep::iterator_node         iterator_node;
 
2562
       typedef georep::iterator_vertex       iterator_vertex;
 
2563
       typedef georep::iterator_domain       iterator_domain;
 
2564
 
 
2565
     // allocators/deallocators:
 
2566
 
 
2567
       explicit geo (const std::string& filename, const std::string& coord_sys = "cartesian");
 
2568
       geo(const geo& g, const domain& d);
 
2569
       geo(const nodelist_type& p, const geo& g);
 
2570
       geo();
 
2571
 
 
2572
       friend geo geo_adapt (const class field& criteria, const Float& hcoef,
 
2573
             bool reinterpolate_criteria = false);
 
2574
 
 
2575
       friend geo geo_adapt (const class field& criteria,
 
2576
             const adapt_option_type& = adapt_option_type(),
 
2577
             bool reinterpolate_criteria = false);
 
2578
 
 
2579
       friend geo geo_metric_adapt (const field& mh,
 
2580
             const adapt_option_type& = adapt_option_type());
 
2581
 
 
2582
     // input/output:
 
2583
 
 
2584
       friend std::istream& operator >> (std::istream&, geo&);
 
2585
       friend std::ostream& operator << (std::ostream&, const geo&);
 
2586
       void save () const;
 
2587
       void use_double_precision_in_saving();
 
2588
       std::ostream& dump (std::ostream& s = std::cerr) const;
 
2589
       std::ostream& put_mtv_domains (std::ostream&, size_type=0) const;
 
2590
 
 
2591
     // accessors:
 
2592
 
 
2593
       const point&       vertex  (size_type i) const;
 
2594
       const geo_element& element (size_type K_idx) const;
 
2595
       Float              measure (const geo_element& K) const;
 
2596
 
 
2597
       std::string name() const;
 
2598
       //  Family name plus number
 
2599
       std::string basename() const;
 
2600
       //  For moving boundary problems
 
2601
       std::string familyname() const;
 
2602
       //  Number of moving boundary mesh
 
2603
       size_type number() const;
 
2604
       //  Refinment iteration for the current mesh number
 
2605
       size_type version() const;
 
2606
       size_type dimension() const;
 
2607
       size_type map_dimension() const;
 
2608
       std::string coordinate_system () const; // "cartesian", "rz", "zr"
 
2609
       fem_helper::coordinate_type coordinate_system_type() const;
 
2610
 
 
2611
       size_type serial_number() const;
 
2612
 
 
2613
       const domain& boundary() const;
 
2614
       void build_subregion(const domain& start_from, const domain& dont_cross,
 
2615
             std::string name, std::string name_of_complement="");
 
2616
       //  Builds a new domain on the side of domain `dont_cross' on which `start_from'
 
2617
       //  lies. These must have no intersection.
 
2618
 
 
2619
       size_type size() const;
 
2620
       size_type n_element() const;  // same as size()
 
2621
       size_type n_vertex() const;
 
2622
       size_type n_vertice() const;
 
2623
       size_type n_node() const;     // same as n_vertex()
 
2624
       size_type n_edge() const ;
 
2625
       size_type n_face() const ;
 
2626
       size_type n_triangle() const ;
 
2627
       size_type n_quadrangle() const ;
 
2628
       size_type n_volume() const ;
 
2629
       size_type n_tetraedra() const ;
 
2630
       size_type n_prism() const ;
 
2631
       size_type n_hexaedra() const ;
 
2632
       size_type n_subgeo(size_type d) const ;
 
2633
       size_type n_element(reference_element::enum_type t) const;
 
2634
 
 
2635
       Float hmin() const;
 
2636
       Float hmax() const;
 
2637
       const point& xmin() const;
 
2638
       const point& xmax() const;
 
2639
 
 
2640
       meshpoint hatter (const point& x, size_type K) const;
 
2641
       point dehatter (const meshpoint& S) const;
 
2642
       point dehatter (const point& x_hat, size_type e) const;
 
2643
 
 
2644
       const_iterator begin() const;
 
2645
       const_iterator end() const;
 
2646
       const_iterator_node begin_node() const;
 
2647
       const_iterator_node end_node() const;
 
2648
       const_iterator_vertex begin_vertex() const;
 
2649
       const_iterator_vertex end_vertex() const;
 
2650
 
 
2651
       // localizer:
 
2652
       bool localize (const point& x, geo_element::size_type& element) const;
 
2653
       void localize_nearest (const point& x, point& y, geo_element::size_type& element) const;
 
2654
       bool trace (const point& x0, const point& v, point& x, Float& t, size_type& element) const;
 
2655
 
 
2656
       // access to domains:
 
2657
       const domain& get_domain(size_type i) const;
 
2658
       size_type n_domain() const;
 
2659
       bool has_domain (const std::string& domname) const;
 
2660
       const domain& operator[] (const std::string& domname) const;
 
2661
       const_iterator_domain begin_domain() const;
 
2662
       const_iterator_domain end_domain() const;
 
2663
 
 
2664
       point normal (const geo_element& S) const;
 
2665
       point normal (const geo_element& K, georep::size_type side_idx) const;
 
2666
       void
 
2667
       sort_interface(const domain&, const interface&) const;
 
2668
       class field
 
2669
       normal (const class space& Nh, const domain& d,
 
2670
             const std::string& region="") const;
 
2671
       class field
 
2672
       normal (const class space& Nh, const domain& d, const interface& bc) const;
 
2673
       class field
 
2674
       tangent (const class space& Nh, const domain& d,
 
2675
             const std::string& region="") const;
 
2676
       class field
 
2677
       tangent (const class space& Nh, const domain& d, const interface& bc) const;
 
2678
        //  Gives normal to d in discontinuous space Nh (P0 or P1d) and can
 
2679
        //  initialize orientation of domain through `bc' data structure.
 
2680
        //  Currently limited to straight-sided elements.
 
2681
       class field
 
2682
       tangent_spline (const space& Nh, const domain& d, const interface& bc) const;
 
2683
       class field
 
2684
       plane_curvature (const space& Nh, const domain& d,
 
2685
             const interface& bc) const;
 
2686
        //  Gives curvature of d in the (x,y) or (r,z) plane.
 
2687
        //  Currently limited to straight-sided elements.
 
2688
       class field
 
2689
       plane_curvature_spline (const space& Nh, const domain& d,
 
2690
             const interface& bc) const;
 
2691
        //  Gives curvature of d in the (x,y) or (r,z) plane based on a spline interpolation.
 
2692
       class field
 
2693
       plane_curvature_quadratic (const space& Nh, const domain& d,
 
2694
             const interface& bc) const;
 
2695
        //  Gives curvature of d in the (x,y) or (r,z) plane based on a local quadratic interpolation.
 
2696
 
 
2697
       class field
 
2698
       axisymmetric_curvature (const class space& Nh, const domain& d) const;
 
2699
       class field
 
2700
       axisymmetric_curvature (const class space& Nh, const domain& d,
 
2701
             const interface& bc) const;
 
2702
        //  Specific to "rz" and "zr" coordinate systems:
 
2703
        //  Gives curvature of d in a plane orthogonal to the (r,z) plane.
 
2704
        //  Can also initialize orientation of domain through `bc' data structure.
 
2705
        //  Currently limited to straight-sided elements.
 
2706
       void
 
2707
       interface_process (const domain& d, const interface& bc,
 
2708
             geometric_event& event) const;
 
2709
        //  Detects event along domain d sorted according to bc's.
 
2710
 
 
2711
       // construction of jump-interface domain data:
 
2712
       void jump_interface(const domain& interface, const domain& subgeo,
 
2713
             std::map<size_type, tiny_vector<size_type> >& special_elements,
 
2714
             std::map<size_type,size_type>& node_global_to_interface) const;
 
2715
 
 
2716
     // comparator:
 
2717
 
 
2718
       bool operator == (const geo&) const;
 
2719
       bool operator != (const geo&) const;
 
2720
 
 
2721
     // modifiers
 
2722
 
 
2723
       //  build from a list of vertex and elements:
 
2724
       template <class ElementContainer, class VertexContainer>
 
2725
       void build (const ElementContainer&, const VertexContainer&);
 
2726
 
 
2727
       void set_name (const std::string&);
 
2728
       void set_coordinate_system (const std::string&); // "cartesian", "rz", "zr"
 
2729
       void upgrade();
 
2730
       void label_interface(const domain& dom1, const domain& dom2, const std::string& name);
 
2731
 
 
2732
       // modify domains
 
2733
       void erase_domain (const std::string& name);
 
2734
       void insert_domain (const domain&);
 
2735
 
 
2736
     // accessors to internals:
 
2737
       bool localizer_initialized () const;
 
2738
       void init_localizer (const domain& boundary, Float tolerance=-1, int list_size=0) const;
 
2739
       const size_type* get_geo_counter() const;
 
2740
       const size_type* get_element_counter() const;
 
2741
 
 
2742
       // TO BE REMOVED
 
2743
       int gnuplot2d (const std::string& basename,
 
2744
                      plot_options& opt) const;
 
2745
 
 
2746
     // check consistency
 
2747
 
 
2748
       void check()  const;
 
2749
 
 
2750
     protected:
 
2751
 
 
2752
       friend class spacerep;
 
2753
       friend class field;
 
2754
 
 
2755
       void may_have_version_2() const; // fatal if not !
 
2756
 
 
2757
     // modifiers to internals:
 
2758
 
 
2759
       void set_dimension (size_type d);
 
2760
       iterator begin();
 
2761
       iterator end();
 
2762
       iterator_node begin_node();
 
2763
       iterator_node end_node();
 
2764
       iterator_vertex begin_vertex();
 
2765
       iterator_vertex end_vertex();
 
2766
     };
 
2767
 
 
2768
 
 
2769
File: rheolef.info,  Node: form_diag_manip class,  Up: Classes
 
2770
 
 
2771
5.3 `form_diag_manip' - concatenation on a product space
 
2772
========================================================
 
2773
 
 
2774
(Source file: `nfem/lib/form_diag_manip.h')
 
2775
 
 
2776
Description
 
2777
-----------
 
2778
 
 
2779
build a form_diag on a product space.
 
2780
 
 
2781
Example
 
2782
-------
 
2783
 
 
2784
The following example builds a 3-blocks diagonal form:
 
2785
         geo g("toto.geo");
 
2786
         space V(g,"P1");
 
2787
         space T = V*V*V;
 
2788
         form_diag Iv(V) ;
 
2789
         form_diag I(T) ;
 
2790
         form_manip I_manip;
 
2791
         I_manip << size(3) << Iv << Iv << Iv;
 
2792
         I_manip >> I;
 
2793
 
 
2794
Implementation
 
2795
--------------
 
2796
 
 
2797
     class form_diag_manip {
 
2798
     public:
 
2799
 
 
2800
     // typedefs:
 
2801
 
 
2802
         typedef form_diag::size_type size_type;
 
2803
 
 
2804
     // constructors/destructors:
 
2805
 
 
2806
         form_diag_manip();
 
2807
 
 
2808
     // accessors:
 
2809
 
 
2810
         size_type nbloc() const;
 
2811
         size_type nform() const;
 
2812
         form_diag& bloc(size_type i);
 
2813
         const form_diag& bloc(size_type i) const;
 
2814
 
 
2815
     // manipulators:
 
2816
 
 
2817
         form_diag_manip& operator << (const form_diag& a);
 
2818
         form_diag_manip& operator >> (form_diag& a);
 
2819
         friend form_diag_manip& verbose (form_diag_manip &fm);
 
2820
         friend form_diag_manip& noverbose (form_diag_manip &fm);
 
2821
         form_diag_manip& operator<< (form_diag_manip& (*pf)(form_diag_manip&));
 
2822
 
 
2823
     // implementation:
 
2824
 
 
2825
         friend class sized;
 
2826
         friend form_diag_manip& operator << (form_diag_manip &fm, const class sized& s);
 
2827
 
 
2828
     protected:
 
2829
         bool              _verbose;
 
2830
         size_type         _nform;
 
2831
         size_type         _nbloc;
 
2832
         std::vector<form_diag> _a;
 
2833
     };
 
2834
 
 
2835
 
 
2836
File: rheolef.info,  Node: space class,  Up: Classes
 
2837
 
 
2838
5.4 `space' - piecewise polynomial finite element space
 
2839
=======================================================
 
2840
 
 
2841
(Source file: `nfem/lib/space.h') 
 
2842
 
 
2843
Description
 
2844
-----------
 
2845
 
 
2846
The `space' class contains some numbering for unknowns and blocked
 
2847
_degrees of freedoms_ related to a given mesh and polynomial
 
2848
approximation.
 
2849
 
 
2850
Degree of freedom numbering
 
2851
---------------------------
 
2852
 
 
2853
Numbering of degrees of freedom (or shortly, "dof") depends upon the
 
2854
mesh and the piecewise polynomial approximation used.  This numbering
 
2855
is then used by the `field' and `form' classes.  See also *note field
 
2856
class:: and *note form class::.
 
2857
 
 
2858
The degree-of-freedom (or shortly, "dof") follows some simple rules,
 
2859
that depends of course of the approximation.  These rules are suitable
 
2860
for easy `.field' file retrieval (*note field class::).
 
2861
 
 
2862
`P0'
 
2863
`bubble'
 
2864
     dof numbers follow element numbers in mesh.
 
2865
 
 
2866
`P1'
 
2867
     dof numbers follow vertice numbers in mesh.
 
2868
 
 
2869
`P2'
 
2870
     dof numbers related to vertices follow vertice numbers in mesh.
 
2871
          Follow dof numbers related to edges, in the edge numbering
 
2872
     order.
 
2873
 
 
2874
`P1d'
 
2875
     dof numbers follow element numbers in mesh. In each element, we
 
2876
         loop on vertices following the local vertice order provided in
 
2877
            the mesh.
 
2878
 
 
2879
Unknown and blocked degree of freedom
 
2880
-------------------------------------
 
2881
 
 
2882
A second numbering is related to the "unknown" and "blocked" degrees of
 
2883
freedom.
 
2884
           geo omega("square");
 
2885
           space V(omega,"P1");
 
2886
           V.block ("boundary");
 
2887
Here, all degrees of freedom located on the domain `"boundary"' are
 
2888
marked as blocked.
 
2889
 
 
2890
File format
 
2891
-----------
 
2892
 
 
2893
File output format for `space' is not of practical interest.  This file
 
2894
format is provided for completness.  Here is a small example
 
2895
        space
 
2896
        1 6
 
2897
        square
 
2898
        P1
 
2899
           0 B
 
2900
           1 B
 
2901
           0
 
2902
           1
 
2903
           2 B
 
2904
           2
 
2905
where the `B' denotes blocked degres of freedom.  The method
 
2906
`set_dof(K, dof_array)' gives the numbering in `dof_array', supplying
 
2907
an element `K'.  The method `index(dof)' gives the unknown or blocked
 
2908
numbering from the initial numbering, suppling a given `dof'
 
2909
 
 
2910
Additional features
 
2911
-------------------
 
2912
 
 
2913
The method `xdof(K, i)' gives the geometrical location of the i-th
 
2914
degree of freedom in the element `K'.
 
2915
 
 
2916
Product spaces, for non-scalar fields, such as vector-valued or
 
2917
tensor-valued (symmetric) fields,
 
2918
 
 
2919
Can also be defined
 
2920
-------------------
 
2921
 
 
2922
           space U (omega, "P1", "vector");
 
2923
           space T (omega, "P1", "tensor");
 
2924
Then, the number of component depends upon the geometrical dimension of
 
2925
the mesh `omega'.
 
2926
 
 
2927
Arbitrarily product spaces can also be constructed
 
2928
           space X = V0*V1;
 
2929
Spaces for fields defined on a boundary domain can also be constructed
 
2930
           space W (omega, omega["top"], "P1");
 
2931
The correspondance between the degree-of-freedom numbering for the
 
2932
space `W' and the global degree-of-freedom numbering for the space `V'
 
2933
is supported.  The method `set_global_dof(S, dof_array)' gives the
 
2934
global numbering in `dof_array', supplying a boundary element `S'.  The
 
2935
method `domain_index(global_dof)' gives the unknown or blocked
 
2936
numbering from the initial numbering, suppling a given `global_dof',
 
2937
related to the space `V'.
 
2938
 
 
2939
Implementation
 
2940
--------------
 
2941
 
 
2942
     class space : public smart_pointer<spacerep> {
 
2943
     public:
 
2944
     // typdefs:
 
2945
 
 
2946
         typedef spacerep::size_type size_type;
 
2947
 
 
2948
     // allocator/deallocator:
 
2949
 
 
2950
         space ();
 
2951
         space (const geo& g, const std::string& approx_name, const std::string& valued = "scalar");
 
2952
         space (const geo& g, const std::string& approx_name,
 
2953
             const domain& interface, const domain& subgeo, const std::string& valued = "scalar");
 
2954
             //  For spaces with a discontinuity through domain `interface', but otherwise continuous
 
2955
         space (const geo& g, const domain& d, const std::string& approx_name);
 
2956
         space(const const_space_component&);
 
2957
 
 
2958
         space operator = (const const_space_component&);
 
2959
         friend space operator * (const space&, const space&);
 
2960
         friend space pow (const space&, size_type);
 
2961
 
 
2962
     // modifiers:
 
2963
 
 
2964
         void block () const;
 
2965
         void block_Lagrange () const;
 
2966
         void block (size_type i_comp) const;
 
2967
         void block_Lagrange (size_type i_comp) const;
 
2968
         void block (const std::string& d_name) const;
 
2969
         void block (const domain& d) const;
 
2970
         void block (const std::string& d_name,  size_type i_comp) const;
 
2971
         void block (const domain& d, size_type i_comp) const;
 
2972
         void block_dof (size_type dof_idx, size_type i_comp) const;
 
2973
         void block_dof (size_type dof_idx) const;
 
2974
         void unblock_dof (size_type dof_idx, size_type i_comp) const;
 
2975
         void unblock_dof (size_type dof_idx) const;
 
2976
         void set_periodic (const domain& d1, const domain& d2) const;
 
2977
         void set_periodic (const std::string& d1_name, const std::string& d2_name) const;
 
2978
         void lock_components (const domain& d, point locked_dir) const;
 
2979
         void lock_components (const std::string& d_name, point locked_dir) const;
 
2980
         template <class Function>
 
2981
         void lock_components (const std::string& d_name, Function locked_dir) const;
 
2982
             //  Allows to enforce vector-boundary conditions.
 
2983
             /*  Allows to enforce vector-boundary conditions.
 
2984
              *!
 
2985
              *! Current limitation: only 2D vector fields with components having same FE approximation.
 
2986
              *! The space has a dof for the direction normal to locked_dir, while the value in the
 
2987
              *! direction locked_dir is blocked.
 
2988
              *! The field::at function implements the reconstruction of the original cartesian components.
 
2989
              */
 
2990
         template <class Function>
 
2991
         void lock_components (const domain& d, Function locked_dir) const;
 
2992
 
 
2993
     // accessors:
 
2994
 
 
2995
         size_type  size()      const;
 
2996
         size_type  degree ()   const;
 
2997
         size_type  n_blocked() const;
 
2998
         size_type  n_unknown() const;
 
2999
         size_type  dimension() const;
 
3000
         std::string coordinate_system() const;
 
3001
         fem_helper::coordinate_type coordinate_system_type() const;
 
3002
 
 
3003
 
 
3004
         const geo&                get_geo   () const;
 
3005
         const basis&              get_basis (size_type i_component = 0) const;
 
3006
         const numbering&          get_numbering (size_type i_component = 0) const;
 
3007
         std::string               get_approx(size_type i_component = 0) const;
 
3008
         const basis&              get_p1_transformation () const;
 
3009
 
 
3010
         std::string               get_valued() const;
 
3011
         fem_helper::valued_field_type get_valued_type() const;
 
3012
 
 
3013
         size_type  n_component() const;
 
3014
         space_component operator [] (size_type i_comp);
 
3015
         const_space_component operator [] (size_type i_comp) const;
 
3016
 
 
3017
         size_type  size_component      (size_type i_component = 0) const;
 
3018
         size_type  n_unknown_component (size_type i_component = 0) const;
 
3019
         size_type  n_blocked_component (size_type i_component = 0) const;
 
3020
         size_type  start               (size_type i_component = 0) const;
 
3021
         size_type  start_unknown       (size_type i_component = 0) const;
 
3022
         size_type  start_blocked       (size_type i_component = 0) const;
 
3023
 
 
3024
         size_type  index              (size_type degree_of_freedom) const;
 
3025
         size_type  period_association (size_type degree_of_freedom) const;
 
3026
         bool       is_blocked         (size_type degree_of_freedom) const;
 
3027
         bool       is_periodic        (size_type degree_of_freedom) const;
 
3028
 
 
3029
         bool       has_locked         () const;
 
3030
                      //  for (2D) vector spaces only, field is only blocked along locked_dir
 
3031
         bool       is_locked          (size_type degree_of_freedom) const;
 
3032
             //  for tangential-normal representation
 
3033
         size_type  locked_with  (size_type degree_of_freedom) const;
 
3034
         size_type  index_locked_with  (size_type degree_of_freedom) const;
 
3035
             //  dof with the other component (thru space::index() as well)
 
3036
         Float      locked_component   (size_type dof, size_type i_comp) const;
 
3037
             //  i-th component of locked direction
 
3038
         Float      unlocked_component (size_type dof, size_type i_comp) const;
 
3039
             //  i-th component of unlocked direction
 
3040
 
 
3041
         void freeze () const;
 
3042
         bool is_frozen() const;
 
3043
 
 
3044
 
 
3045
         // informations related to boundary spaces
 
3046
         bool  is_on_boundary_domain() const;
 
3047
         const domain& get_boundary_domain() const;
 
3048
         const geo&    get_global_geo     () const;
 
3049
         size_type  global_size () const;
 
3050
         size_type  domain_dof   (size_type global_dof) const;
 
3051
         size_type  domain_index (size_type global_dof) const;
 
3052
 
 
3053
         // get indices of degrees of freedom associated to an element
 
3054
             //  the tiny_vector is a "local index" -> "global index" table
 
3055
             //      "global" variants differ only for boundary spaces (non-global uses domain-indices, global use
 
3056
             //  mesh-wide indices)
 
3057
         void  set_dof        (const geo_element& K, tiny_vector<size_type>& idx) const;
 
3058
         void  set_global_dof (const geo_element& K, tiny_vector<size_type>& idx) const;
 
3059
         void  set_dof        (const geo_element& K, tiny_vector<size_type>& idx, size_type i_comp) const;
 
3060
         void  set_global_dof (const geo_element& K, tiny_vector<size_type>& idx, size_type i_comp) const;
 
3061
         void  set_dof        (const geo_element& K, tiny_vector<size_type>& idx, size_type i_comp, reference_element::dof_family_type family) const;
 
3062
         point x_dof      (const geo_element& K, size_type i_local) const;
 
3063
          //  Hermite/Argyris: returns 1 if the global dof contains the derivative along outward normal of K, -1 else
 
3064
         void  dof_orientation(const geo_element& K, tiny_vector<int>& orientation) const;
 
3065
 
 
3066
         // piola transformation
 
3067
         meshpoint hatter (const point& x, size_type K) const;
 
3068
         point dehatter (const meshpoint& S) const;
 
3069
         point dehatter (const point& x_hat, size_type e) const;
 
3070
 
 
3071
     // comparator
 
3072
 
 
3073
         bool operator == (const space&) const;
 
3074
         bool operator != (const space&) const;
 
3075
 
 
3076
     // input/output
 
3077
 
 
3078
        friend std::ostream& operator << (std::ostream&, const space&);
 
3079
        friend std::istream& operator >> (std::istream&, space&);
 
3080
        std::ostream& dump(std::ostream& s = std::cerr) const;
 
3081
        void check() const;
 
3082
 
 
3083
     // inquires:
 
3084
 
 
3085
        static size_type inquire_size(const geo&, const numbering&);
 
3086
 
 
3087
     // implementation:
 
3088
     protected:
 
3089
        space(smart_pointer<spacerep>);
 
3090
        space (const space&, const space&); // X*Y
 
3091
        space (const space&, size_type i_comp); // X[i_comp]
 
3092
        friend class field;
 
3093
     };
 
3094
 
 
3095
 
 
3096
File: rheolef.info,  Node: form_diag class,  Up: Classes
 
3097
 
 
3098
5.5 `form_diag' - diagional form class
 
3099
======================================
 
3100
 
 
3101
(Source file: `nfem/lib/form_diag.h')
 
3102
 
 
3103
Description
 
3104
-----------
 
3105
 
 
3106
Implement a form using two diagonal matrix.
 
3107
 
 
3108
Example
 
3109
-------
 
3110
 
 
3111
Here is the computation of the mass matrix for   the P1 finite element:
 
3112
          geo m("square");
 
3113
          space V(m,"P1");
 
3114
          form_diag m(V,"mass");
 
3115
 
 
3116
Note
 
3117
----
 
3118
 
 
3119
Implementation
 
3120
--------------
 
3121
 
 
3122
     class form_diag {
 
3123
     public:
 
3124
     // typedefs:
 
3125
 
 
3126
         typedef basic_diag<Float>::size_type size_type;
 
3127
 
 
3128
     // allocator/deallocator:
 
3129
 
 
3130
         form_diag ();
 
3131
         form_diag (const space& X);
 
3132
         form_diag (const space& X, const char* op_name);
 
3133
         form_diag (const class field& dh);
 
3134
 
 
3135
     // accessors:
 
3136
 
 
3137
         const space& get_space() const;
 
3138
         const geo&   get_geo() const;
 
3139
         size_type size() const;
 
3140
         size_type nrow() const;
 
3141
         size_type ncol() const;
 
3142
 
 
3143
     // linear algebra (partial):
 
3144
 
 
3145
         friend form_diag operator * (const form_diag&, const form_diag&);
 
3146
         friend class field operator * (const form_diag& a, const class field& x);
 
3147
         friend form_diag operator / (const Float& lambda, const form_diag& m);
 
3148
         //new
 
3149
         friend form_diag operator * (const Float& lambda, const form_diag&);
 
3150
         friend form_diag operator + (const form_diag&, const form_diag&);
 
3151
         friend form_diag operator - (const form_diag&);
 
3152
         friend form_diag operator - (const form_diag&, const form_diag&);
 
3153
         //wen
 
3154
 
 
3155
     // input/output:
 
3156
 
 
3157
         friend std::ostream& operator << (std::ostream& s, const form_diag& a);
 
3158
 
 
3159
     // data
 
3160
     private :
 
3161
         space       X_;
 
3162
     public :
 
3163
         basic_diag<Float> uu;
 
3164
         basic_diag<Float> bb;
 
3165
     };
 
3166
 
 
3167
 
 
3168
File: rheolef.info,  Node: form_manip class,  Up: Classes
 
3169
 
 
3170
5.6 `form_manip' - form concatenation on a product space
 
3171
========================================================
 
3172
 
 
3173
(Source file: `nfem/lib/form_manip.h')
 
3174
 
 
3175
Description
 
3176
-----------
 
3177
 
 
3178
build a form on a product space
 
3179
 
 
3180
To do
 
3181
-----
 
3182
 
 
3183
a general implementation without switch and with a loop.
 
3184
 
 
3185
Implementation
 
3186
--------------
 
3187
 
 
3188
     class form_manip {
 
3189
     public:
 
3190
     // typedefs:
 
3191
 
 
3192
         typedef form::size_type size_type;
 
3193
 
 
3194
     // constructors/destructor:
 
3195
 
 
3196
         form_manip();
 
3197
 
 
3198
     // accessors:
 
3199
 
 
3200
         size_type nform() const;
 
3201
         size_type nrowbloc() const;
 
3202
         size_type ncolbloc() const;
 
3203
         form& bloc(size_type i, size_type j);
 
3204
         const form& bloc(size_type i, size_type j) const;
 
3205
 
 
3206
     // manipulators:
 
3207
 
 
3208
         form_manip& operator << (const form&);
 
3209
         form_manip& operator >> (form&);
 
3210
         form_manip& operator << (form_manip& (*)(form_manip&));
 
3211
 
 
3212
         friend form_manip& verbose (form_manip&);
 
3213
         friend form_manip& noverbose (form_manip&);
 
3214
 
 
3215
     // implementation:
 
3216
 
 
3217
         friend class size;
 
3218
         friend form_manip& operator << (form_manip&, const class size&);
 
3219
 
 
3220
     protected:
 
3221
         bool         _verbose;
 
3222
         size_type    _nform;
 
3223
         size_type    _nrowbloc;
 
3224
         size_type    _ncolbloc;
 
3225
         std::vector<form> _a;
 
3226
     };
 
3227
 
 
3228
 
 
3229
File: rheolef.info,  Node: field class,  Up: Classes
 
3230
 
 
3231
5.7 `field' - piecewise polynomial finite element field
 
3232
=======================================================
 
3233
 
 
3234
(Source file: `nfem/lib/field.h')
 
3235
 
 
3236
Description
 
3237
-----------
 
3238
 
 
3239
Store degrees of freedom associated to a mesh and   a piecewise
 
3240
polynomial approximation, with respect   to the numbering defined by
 
3241
the underlying *note space class::.
 
3242
 
 
3243
This class contains two vectors, namely unknown and blocked   degrees
 
3244
of freedoms, and the associated finite element space.    Blocked and
 
3245
unknown degrees of freedom can be set by using   domain name indexation:
 
3246
             geo omega_h ("circle");
 
3247
             space Vh (omega_h, "P1");
 
3248
             Vh.block ("boundary");
 
3249
             field uh (Vh);
 
3250
             uh ["boundary"] = 0;
 
3251
  Interpolation of a function `u' in a field `uh' with respect to   the
 
3252
interpolation writes:
 
3253
             Float u (const point&);
 
3254
             uh = interpolate (Vh, u);
 
3255
 
 
3256
Example
 
3257
-------
 
3258
 
 
3259
Here is a complete example   using the field class:
 
3260
             Float u (const point& x) { return x[0]*x[1]; }
 
3261
             main() {
 
3262
               geo omega_h ("square");
 
3263
               space Vh (omega_h, "P1");
 
3264
               field uh (Vh);
 
3265
               uh = interpolate (Vh, u);
 
3266
               cout << plotmtv << u;
 
3267
             }
 
3268
 
 
3269
Features
 
3270
--------
 
3271
 
 
3272
Algebra, such as x+y, x*y, x/y, lambda*x, ...are supported
 
3273
 
 
3274
Transformations applies to all values of a field:
 
3275
        field vh = compose(fabs, uh);
 
3276
        field wh = compose(atan2, uh, vh);
 
3277
   The composition supports also general unary and binary
 
3278
class-functions.
 
3279
 
 
3280
Vector-valued and tensor-valued field support is yet partial only.
 
3281
This feature will be more documented in the future.
 
3282
 
 
3283
 
 
3284
File: rheolef.info,  Node: trace class,  Up: Classes
 
3285
 
 
3286
5.8 `trace' - restriction to boundary values operator
 
3287
=====================================================
 
3288
 
 
3289
(Source file: `nfem/lib/trace.h') 
 
3290
 
 
3291
Description
 
3292
-----------
 
3293
 
 
3294
The `trace' operator restricts a field to its values located to a
 
3295
boundary value domain.    The `trace' class is a derived class of the
 
3296
`form' class   (*note form class::).    Thus, all operations, such as
 
3297
linear algebra, that applies   to `form', applies also to `trace'.
 
3298
 
 
3299
Example
 
3300
-------
 
3301
 
 
3302
The following example shows how to plot the   trace of a field, from
 
3303
standard input:
 
3304
         int main() {
 
3305
             geo omega ("square");
 
3306
             space Vh (omega "P1");
 
3307
             space Wh (omega, "P1", omega ["top"]);
 
3308
             trace gamma (Vh, Wh);
 
3309
 
 
3310
             field uh;
 
3311
             cin >> uh;
 
3312
             field wh (Wh);
 
3313
             wh = gamma*uh;
 
3314
             cout << wh;
 
3315
         }
 
3316
 
 
3317
Implementation
 
3318
--------------
 
3319
 
 
3320
     class trace : public form
 
3321
     {
 
3322
     public :
 
3323
 
 
3324
     //  allocator/deallocator:
 
3325
 
 
3326
       trace();
 
3327
       trace(const space& V, const space& W);
 
3328
 
 
3329
     // accessors:
 
3330
 
 
3331
       const space& get_space() const;
 
3332
       const space& get_boundary_space() const;
 
3333
       const geo&   get_geo() const;
 
3334
       const geo&   get_boundary_geo() const;
 
3335
     };
 
3336
 
 
3337
 
 
3338
File: rheolef.info,  Node: domain class,  Up: Classes
 
3339
 
 
3340
5.9 `domain' - part of a finite element mesh
 
3341
============================================
 
3342
 
 
3343
(Source file: `nfem/lib/domain.h') 
 
3344
 
 
3345
Description
 
3346
-----------
 
3347
 
 
3348
The `domain' class defines a container for a part of a   finite element
 
3349
mesh.    This describes the connectivity of edges or faces.    This
 
3350
class is usefull for boundary condition setting.
 
3351
 
 
3352
Implementation
 
3353
--------------
 
3354
 
 
3355
     class domain : public Vector<geo_element> {
 
3356
     public:
 
3357
 
 
3358
     // typedefs:
 
3359
 
 
3360
           typedef Vector<geo_element> sidelist_type;
 
3361
           typedef Vector<geo_element>::size_type size_type;
 
3362
 
 
3363
     // allocators/deallocators:
 
3364
 
 
3365
           domain(size_type sz = 0, const std::string& name = std::string());
 
3366
           domain(const domain&);
 
3367
 
 
3368
     // accessors:
 
3369
 
 
3370
           const std::string& name() const;
 
3371
           size_type dimension() const;
 
3372
 
 
3373
     // modifiers:
 
3374
 
 
3375
           void set_name(const std::string&);
 
3376
           void set_dimension(size_type d);
 
3377
           domain& operator=(const domain&);
 
3378
           domain& operator += (const domain&);
 
3379
           friend domain operator + (const domain&, const domain&);
 
3380
           void resize(size_type n);
 
3381
           void cat(const domain& d);
 
3382
           template <class IteratorPair>
 
3383
             void set(IteratorPair p, size_type n, const std::string& name);
 
3384
           template <class IteratorElement>
 
3385
             void set(IteratorElement p, size_type n, size_type dim, const std::string& name);
 
3386
 
 
3387
     //  input/ouput:
 
3388
 
 
3389
           friend std::ostream& operator << (std::ostream& s, const domain& d);
 
3390
           friend std::istream& operator >> (std::istream& s, domain& d);
 
3391
           std::ostream& put_vtk (std::ostream& vtk, Vector<point>::const_iterator first_p,
 
3392
                     Vector<point>::const_iterator last_p) const;
 
3393
           std::ostream& dump (std::ostream& s = std::cerr) const;
 
3394
           void check() const;
 
3395
 
 
3396
     // data:
 
3397
     protected:
 
3398
           std::string   _name;
 
3399
           size_type     _dim;
 
3400
 
 
3401
     };
 
3402
 
 
3403
 
 
3404
File: rheolef.info,  Node: form class,  Up: Classes
 
3405
 
 
3406
5.10 `form' - representation of a finite element operator
 
3407
=========================================================
 
3408
 
 
3409
(Source file: `nfem/lib/form.h')
 
3410
 
 
3411
Description
 
3412
-----------
 
3413
 
 
3414
The form class groups four sparse matrix, associated to   a bilinear
 
3415
form on finite element space.    This class is represented by four
 
3416
sparse matrix,   associated to unknown and blocked degrees of freedom
 
3417
of origin and destination spaces   (*note space class::).
 
3418
 
 
3419
Example
 
3420
-------
 
3421
 
 
3422
The operator A associated to a bilinear form a(.,.) by   the relation
 
3423
(Au,v) = a(u,v) could be applied by using   a sample matrix notation
 
3424
A*u, as shown by the following code:
 
3425
           geo m("square");
 
3426
           space V(m,"P1");
 
3427
           form a(V,V,"grad_grad");
 
3428
           field x(V);
 
3429
           x = fct;
 
3430
           field y = a*x;
 
3431
           cout << plotmtv << y;
 
3432
 
 
3433
This block-matrix operation is equivalent to:
 
3434
          y.u = a.uu*x.u + a.ub*x.b;
 
3435
          y.b = a.bu*x.u + a.bb*x.b;
 
3436
 
 
3437
Implementation
 
3438
--------------
 
3439
 
 
3440
     class form {
 
3441
     public :
 
3442
     // typedefs:
 
3443
 
 
3444
         typedef csr<Float>::size_type size_type;
 
3445
 
 
3446
     // allocator/deallocator:
 
3447
 
 
3448
         form ();
 
3449
         form (const space& X, const space& Y);
 
3450
             //  locked_boundaries means that special vector BCs are applied,
 
3451
             //  see space::lock_components()
 
3452
         form (const space& X, const space& Y, const std::string& op_name,
 
3453
             bool locked_boundaries=false);
 
3454
         form (const space& X, const space& Y, const std::string& op_name, const domain& d);
 
3455
             //  Currently weighted forms in P2 spaces use a quadrature formula which is
 
3456
             //  limited to double precision floats.
 
3457
         form (const space& X, const space& Y, const std::string& op_name, const field& wh,
 
3458
             bool use_coordinate_system_weight=true);
 
3459
         form (const space& X, const space& Y, const std::string& op_name,
 
3460
             const domain& d, const field& wh, bool use_coordinate_system_weight=true);
 
3461
         form (const space& X, const std::string& op_name);
 
3462
         form (const form_diag& X);
 
3463
 
 
3464
     // accessors:
 
3465
 
 
3466
         const geo&   get_geo() const;
 
3467
         const space& get_first_space() const;
 
3468
         const space& get_second_space() const;
 
3469
         size_type nrow() const;
 
3470
         size_type ncol() const;
 
3471
         bool for_locked_boundaries() const { return _for_locked_boundaries; }
 
3472
 
 
3473
     // linear algebra:
 
3474
 
 
3475
         Float operator () (const class field&, const class field&) const;
 
3476
         friend class field operator * (const form& a, const class field& x);
 
3477
         field trans_mult (const field& x) const;
 
3478
         friend form trans(const form&);
 
3479
         friend form operator * (const Float& lambda, const form&);
 
3480
         friend form operator + (const form&, const form&);
 
3481
         friend form operator - (const form&);
 
3482
         friend form operator - (const form&, const form&);
 
3483
         friend form operator * (const form&, const form&);
 
3484
         friend form operator * (const form&, const form_diag&);
 
3485
         friend form operator * (const form_diag&, const form&);
 
3486
 
 
3487
     // input/output:
 
3488
 
 
3489
         friend std::ostream& operator << (std::ostream& s, const form& a);
 
3490
         friend class form_manip;
 
3491
 
 
3492
     // data
 
3493
     protected:
 
3494
         space      X_;
 
3495
         space      Y_;
 
3496
         bool       _for_locked_boundaries;
 
3497
     public :
 
3498
         csr<Float> uu;
 
3499
         csr<Float> ub;
 
3500
         csr<Float> bu;
 
3501
         csr<Float> bb;
 
3502
     };
 
3503
     form form_nul(const space& X, const space& Y) ;
 
3504
 
 
3505
 
 
3506
File: rheolef.info,  Node: branch class,  Up: Classes
 
3507
 
 
3508
5.11 `branch' - (t,uh
 
3509
=====================
 
3510
 
 
3511
(Source file: `nfem/lib/branch.h')
 
3512
 
 
3513
Description
 
3514
-----------
 
3515
 
 
3516
Stores a `field' together with its associated parameter   value: a
 
3517
`branch' variable represents a pair (t,uh(t)) for   a specific value of
 
3518
the parameter t.    Applications concern time-dependent problems and
 
3519
continuation methods.
 
3520
 
 
3521
This class is convenient for file inputs/outputs   and building
 
3522
graphical animations.
 
3523
 
 
3524
Examples
 
3525
--------
 
3526
 
 
3527
Coming soon...
 
3528
 
 
3529
Limitations
 
3530
-----------
 
3531
 
 
3532
This class is under development.
 
3533
 
 
3534
The `branch' class store pointers on `field' class   without reference
 
3535
counting. Thus, `branch' automatic   variables cannot be returned by
 
3536
functions. `branch'   variable are limited to local variables.
 
3537
 
 
3538
At each step, meshes are reloaded and spaces are rebuilted, even   when
 
3539
they are identical.
 
3540
 
 
3541
The `vtk' render does not support mesh change during   the loop (e.g.
 
3542
when using adaptive mesh process).
 
3543
 
 
3544
Implementation
 
3545
--------------
 
3546
 
 
3547
     class branch : public std::vector<std::pair<std::string,field> > {
 
3548
     public :
 
3549
 
 
3550
     // allocators:
 
3551
 
 
3552
             branch ();
 
3553
             branch (const std::string& parameter_name, const std::string& u_name);
 
3554
             branch (const std::string& parameter_name, const std::string& u_name, const std::string& p_name);
 
3555
             ~branch ();
 
3556
 
 
3557
     // accessors:
 
3558
 
 
3559
             const Float&  parameter () const;
 
3560
             const std::string& parameter_name () const;
 
3561
             size_type     n_value () const;
 
3562
             size_type     n_field () const;
 
3563
 
 
3564
     // modifiers:
 
3565
 
 
3566
             void set_parameter (const Float& value);
 
3567
 
 
3568
     // input/output:
 
3569
 
 
3570
             // get/set current value
 
3571
             friend std::istream& operator >> (std::istream&, branch&);
 
3572
             friend std::ostream& operator << (std::ostream&, const branch&);
 
3573
 
 
3574
             __branch_header         header ();
 
3575
             __const_branch_header   header () const;
 
3576
             __const_branch_finalize finalize () const;
 
3577
 
 
3578
             __obranch operator() (const Float& t, const field& u);
 
3579
             __obranch operator() (const Float& t, const field& u, const field& p);
 
3580
 
 
3581
             __iobranch operator() (Float& t, field& u);
 
3582
             __iobranch operator() (Float& t, field& u, field& p);
 
3583
 
 
3584
 
 
3585
File: rheolef.info,  Node: tensor class,  Up: Classes
 
3586
 
 
3587
5.12 `tensor' - a N*N tensor, N=1,2,3
 
3588
=====================================
 
3589
 
 
3590
(Source file: `nfem/basis/tensor.h') 
 
3591
 
 
3592
Synopsys
 
3593
--------
 
3594
 
 
3595
The `tensor' class defines a 3*3 tensor, as the value of a tensorial
 
3596
valued field. Basic algebra with scalars, vectors of R^3 (i.e. the
 
3597
`point' class) and `tensor' objects are supported.
 
3598
 
 
3599
Implementation
 
3600
--------------
 
3601
 
 
3602
     class tensor {
 
3603
         public:
 
3604
 
 
3605
             typedef size_t size_type;
 
3606
             typedef Float  element_type;
 
3607
 
 
3608
     // allocators:
 
3609
 
 
3610
             tensor (const Float& init_val = 0);
 
3611
             tensor (Float x[3][3]);
 
3612
             tensor (const tensor& a);
 
3613
 
 
3614
     // affectation:
 
3615
 
 
3616
             tensor& operator = (const tensor& a);
 
3617
             tensor& operator = (const Float& val);
 
3618
 
 
3619
     // modifiers:
 
3620
 
 
3621
             void fill (const Float& init_val);
 
3622
             void reset ();
 
3623
             void set_row    (const point& r, size_t i, size_t d = 3);
 
3624
             void set_column (const point& c, size_t j, size_t d = 3);
 
3625
 
 
3626
     // accessors:
 
3627
 
 
3628
             Float& operator()(size_type i, size_type j);
 
3629
             Float  operator()(size_type i, size_type j) const;
 
3630
             point  row(size_type i) const;
 
3631
             point  col(size_type i) const;
 
3632
             size_t nrow() const; // = 3, for template matrix compatibility
 
3633
             size_t ncol() const;
 
3634
 
 
3635
     // inputs/outputs:
 
3636
 
 
3637
             friend std::istream& operator >> (std::istream& in, tensor& a);
 
3638
             friend std::ostream& operator << (std::ostream& out, const tensor& a);
 
3639
             std::ostream& put (std::ostream& s, size_type d = 3) const;
 
3640
 
 
3641
     // algebra:
 
3642
 
 
3643
             friend bool  operator == (const tensor&, const tensor&);
 
3644
             friend tensor operator - (const tensor&);
 
3645
             friend tensor operator + (const tensor&, const tensor&);
 
3646
             friend tensor operator - (const tensor&, const tensor&);
 
3647
             friend tensor operator * (Float, const tensor&);
 
3648
             friend tensor operator * (const tensor& a, Float k);
 
3649
             friend tensor operator / (const tensor& a, Float k);
 
3650
             friend point  operator * (const tensor& a, const point& x);
 
3651
             friend point  operator * (const point& yt, const tensor& a);
 
3652
                    point  trans_mult (const point& x) const;
 
3653
             friend tensor trans      (const tensor& a, size_type d = 3);
 
3654
             friend tensor operator * (const tensor& a, const tensor& b);
 
3655
             friend tensor inv        (const tensor& a, size_type d = 3);
 
3656
             friend tensor diag (const point& d);
 
3657
 
 
3658
     // metric and geometric transformations:
 
3659
 
 
3660
             friend Float dotdot (const tensor&, const tensor&);
 
3661
             friend Float norm2 (const tensor& a) { return dotdot(a,a); }
 
3662
             friend Float dist2 (const tensor& a, const tensor& b) { return norm2(a-b); }
 
3663
             friend Float norm  (const tensor& a) { return ::sqrt(norm2(a)); }
 
3664
             friend Float dist  (const tensor& a, const tensor& b) { return norm(a-b); }
 
3665
             Float determinant (size_type d = 3) const;
 
3666
             friend Float determinant (const tensor& A, size_t d = 3);
 
3667
             friend bool invert_3x3 (const tensor& A, tensor& result);
 
3668
 
 
3669
     // spectral:
 
3670
             // eigenvalues & eigenvectors:
 
3671
             // a = q*d*q^T
 
3672
             // a may be symmetric
 
3673
             // where q=(q1,q2,q3) are eigenvectors in rows (othonormal matrix)
 
3674
             // and   d=(d1,d2,d3) are eigenvalues, sorted in decreasing order d1 >= d2 >= d3
 
3675
             // return d
 
3676
             point eig (tensor& q, size_t dim = 3) const;
 
3677
             point eig (size_t dim = 3) const;
 
3678
 
 
3679
             // singular value decomposition:
 
3680
             // a = u*s*v^T
 
3681
             // a can be unsymmetric
 
3682
             // where u=(u1,u2,u3) are left pseudo-eigenvectors in rows (othonormal matrix)
 
3683
             //       v=(v1,v2,v3) are right pseudo-eigenvectors in rows (othonormal matrix)
 
3684
             // and   s=(s1,s2,s3) are eigenvalues, sorted in decreasing order s1 >= s2 >= s3
 
3685
             // return s
 
3686
             point svd (tensor& u, tensor& v, size_t dim = 3) const;
 
3687
 
 
3688
     // data:
 
3689
             Float _x[3][3];
 
3690
     // internal:
 
3691
             std::istream& get (std::istream&);
 
3692
     };
 
3693
     // t = a otimes b
 
3694
     tensor otimes (const point& a, const point& b, size_t na = 3);
 
3695
     // t += a otimes b
 
3696
     void cumul_otimes (tensor& t, const point& a, const point& b, size_t na = 3);
 
3697
     void cumul_otimes (tensor& t, const point& a, const point& b, size_t na, size_t nb);
 
3698
 
 
3699
 
 
3700
File: rheolef.info,  Node: point class,  Up: Classes
 
3701
 
 
3702
5.13 `point' - vertex of a mesh
 
3703
===============================
 
3704
 
 
3705
(Source file: `nfem/basis/basic_point.h') 
 
3706
 
 
3707
Description
 
3708
-----------
 
3709
 
 
3710
Defines geometrical vertex as an array of coordinates.    This array is
 
3711
also used as a vector of the three dimensional   physical space.
 
3712
 
 
3713
Implementation
 
3714
--------------
 
3715
 
 
3716
     template <class T>
 
3717
     class basic_point {
 
3718
         public:
 
3719
 
 
3720
     // typedefs:
 
3721
 
 
3722
             typedef size_t size_type;
 
3723
             typedef T      float_type;
 
3724
 
 
3725
     // allocators:
 
3726
 
 
3727
             explicit basic_point () { _x[0] = T();  _x[1] = T();  _x[2] = T(); }
 
3728
 
 
3729
             explicit basic_point (
 
3730
                     const T& x0,
 
3731
                     const T& x1 = 0,
 
3732
                     const T& x2 = 0)
 
3733
                             { _x[0] = x0; _x[1] = x1; _x[2] = x2; }
 
3734
 
 
3735
             template <class T1>
 
3736
             basic_point<T>(const basic_point<T1>& p)
 
3737
                     { _x[0] = p._x[0]; _x[1] = p._x[1]; _x[2] = p._x[2]; }
 
3738
 
 
3739
             template <class T1>
 
3740
             basic_point<T>& operator = (const basic_point<T1>& p)
 
3741
                     { _x[0] = p._x[0]; _x[1] = p._x[1]; _x[2] = p._x[2]; return *this; }
 
3742
 
 
3743
     // accessors:
 
3744
 
 
3745
             T& operator[](int i_coord)              { return _x[i_coord%3]; }
 
3746
             const T&  operator[](int i_coord) const { return _x[i_coord%3]; }
 
3747
             T& operator()(int i_coord)              { return _x[i_coord%3]; }
 
3748
             const T&  operator()(int i_coord) const { return _x[i_coord%3]; }
 
3749
 
 
3750
 
 
3751
     // inputs/outputs:
 
3752
 
 
3753
             std::istream& get (std::istream& s, int d = 3)
 
3754
             {
 
3755
                 switch (d) {
 
3756
                 case 1 : _x[1] = _x[2] = 0; return s >> _x[0];
 
3757
                 case 2 : _x[2] = 0; return s >> _x[0] >> _x[1];
 
3758
                 default: return s >> _x[0] >> _x[1] >> _x[2];
 
3759
                 }
 
3760
             }
 
3761
             // output
 
3762
             std::ostream& put (std::ostream& s, int d = 3) const;
 
3763
 
 
3764
     // ccomparators: lexicographic order
 
3765
 
 
3766
             template<int d>
 
3767
             friend bool lexicographically_less (
 
3768
                     const basic_point<T>& a, const basic_point<T>& b) {
 
3769
                 for (size_type i = 0; i < d; i++) {
 
3770
                   if (a[i] < b[i]) return true;
 
3771
                   if (a[i] > b[i]) return false;
 
3772
                 }
 
3773
                 return false; // equality
 
3774
             }
 
3775
     // algebra:
 
3776
 
 
3777
             friend bool operator == (const basic_point<T>& u, const basic_point<T>& v)
 
3778
                     { return u[0] == v[0] && u[1] == v[1] && u[2] == v[2]; }
 
3779
 
 
3780
             basic_point<T>& operator+= (const basic_point<T>& v)
 
3781
                     { _x[0] += v[0]; _x[1] += v[1]; _x[2] += v[2]; return *this; }
 
3782
 
 
3783
             basic_point<T>& operator-= (const basic_point<T>& v)
 
3784
                     { _x[0] -= v[0]; _x[1] -= v[1]; _x[2] -= v[2]; return *this; }
 
3785
 
 
3786
             basic_point<T>& operator*= (const T& a)
 
3787
                     { _x[0] *= a; _x[1] *= a; _x[2] *= a; return *this; }
 
3788
 
 
3789
             basic_point<T>& operator/= (const T& a)
 
3790
                     { _x[0] /= a; _x[1] /= a; _x[2] /= a; return *this; }
 
3791
 
 
3792
             friend basic_point<T> operator+ (const basic_point<T>& u, const basic_point<T>& v)
 
3793
                     { return basic_point<T> (u[0]+v[0], u[1]+v[1], u[2]+v[2]); }
 
3794
 
 
3795
             friend basic_point<T> operator- (const basic_point<T>& u)
 
3796
                     { return basic_point<T> (-u[0], -u[1], -u[2]); }
 
3797
 
 
3798
             friend basic_point<T> operator- (const basic_point<T>& u, const basic_point<T>& v)
 
3799
                     { return basic_point<T> (u[0]-v[0], u[1]-v[1], u[2]-v[2]); }
 
3800
 
 
3801
             template <class T1>
 
3802
             friend basic_point<T> operator* (const T1& a, const basic_point<T>& u)
 
3803
                     { return basic_point<T> (a*u[0], a*u[1], a*u[2]); }
 
3804
 
 
3805
             friend basic_point<T> operator* (const basic_point<T>& u, T a)
 
3806
                     { return basic_point<T> (a*u[0], a*u[1], a*u[2]); }
 
3807
 
 
3808
             friend basic_point<T> operator/ (const basic_point<T>& u, const T& a)
 
3809
                     { return basic_point<T> (u[0]/a, u[1]/a, u[2]/a); }
 
3810
 
 
3811
             friend basic_point<T> operator/ (const basic_point<T>& u, basic_point<T> v)
 
3812
                     { return basic_point<T> (u[0]/v[0], u[1]/v[1], u[2]/v[2]); }
 
3813
 
 
3814
             friend basic_point<T> vect (const basic_point<T>& v, const basic_point<T>& w)
 
3815
                     { return basic_point<T> (
 
3816
                             v[1]*w[2]-v[2]*w[1],
 
3817
                             v[2]*w[0]-v[0]*w[2],
 
3818
                             v[0]*w[1]-v[1]*w[0]); }
 
3819
     // metric:
 
3820
 
 
3821
             // TODO: non-constant metric
 
3822
             friend T dot (const basic_point<T>& u, const basic_point<T>& v)
 
3823
                     { return u[0]*v[0]+u[1]*v[1]+u[2]*v[2]; }
 
3824
 
 
3825
             friend T norm2 (const basic_point<T>& u)
 
3826
                     { return dot(u,u); }
 
3827
 
 
3828
             friend T norm (const basic_point<T>& u)
 
3829
                     { return ::sqrt(norm2(u)); }
 
3830
 
 
3831
             friend T dist2 (const basic_point<T>& x,  const basic_point<T>& y)
 
3832
                     { return norm2(x-y); }
 
3833
 
 
3834
             friend T dist (const basic_point<T>& x,  const basic_point<T>& y)
 
3835
                     { return norm(x-y); }
 
3836
 
 
3837
             friend T dist_infty (const basic_point<T>& x,  const basic_point<T>& y)
 
3838
                     { return max(_my_abs(x[0]-y[0]),
 
3839
                                  max(_my_abs(x[1]-y[1]), _my_abs(x[2]-y[2]))); }
 
3840
 
 
3841
     // data:
 
3842
             T _x[3];
 
3843
     // internal:
 
3844
     protected:
 
3845
             static T _my_abs(const T& x) { return (x > T(0)) ? x : -x; }
 
3846
     };
 
3847
     template <class T>
 
3848
     T vect2d (const basic_point<T>& v, const basic_point<T>& w);
 
3849
 
 
3850
     template <class T>
 
3851
     T mixt (const basic_point<T>& u, const basic_point<T>& v, const basic_point<T>& w);
 
3852
 
 
3853
     // robust(exact) floating point predicates: return value as (0, > 0, < 0)
 
3854
     // formally: orient2d(a,b,x) = vect2d(a-x,b-x)
 
3855
     template <class T>
 
3856
     T orient2d(const basic_point<T>& a, const basic_point<T>& b,
 
3857
             const basic_point<T>& x = basic_point<T>());
 
3858
 
 
3859
     // formally: orient3d(a,b,c,x) = mixt3d(a-x,b-x,c-x)
 
3860
     template <class T>
 
3861
     T orient3d(const basic_point<T>& a, const basic_point<T>& b,
 
3862
             const basic_point<T>& c, const basic_point<T>& x = basic_point<T>());
 
3863
 
 
3864
 
 
3865
File: rheolef.info,  Node: ic0 class,  Up: Classes
 
3866
 
 
3867
5.14 `ic0' - incomplete Choleski factorization
 
3868
==============================================
 
3869
 
 
3870
(Source file: `skit/lib/ic0.h') 
 
3871
 
 
3872
Description
 
3873
-----------
 
3874
 
 
3875
The class implements the icomplete Choleski factorization IC0(A)  when
 
3876
$A$ is a square symmetric matrix stored in CSR format.
 
3877
             csr<double> a = ...;
 
3878
             ic0<double> fact(a);
 
3879
 
 
3880
Implementation
 
3881
--------------
 
3882
 
 
3883
     template <class T>
 
3884
     class basic_ic0 : public csr<T> {
 
3885
     public:
 
3886
       typedef typename csr<T>::size_type size_type;
 
3887
       typedef          T                 element_type;
 
3888
     // constructors:
 
3889
       basic_ic0 ();
 
3890
       explicit basic_ic0 (const csr<T>& a);
 
3891
     // solver:
 
3892
       void inplace_solve (vec<T>& x) const;
 
3893
       void solve (const vec<T>& b, vec<T>& x) const;
 
3894
       vec<T> solve (const vec<T>& b) const;
 
3895
     // accessors:
 
3896
       size_type nrow () const { return csr<T>::nrow(); }
 
3897
       size_type ncol () const { return csr<T>::ncol(); }
 
3898
       size_type nnz  () const { return csr<T>::nnz(); }
 
3899
     };
 
3900
     template <class T>
 
3901
     basic_ic0<T> ic0 (const csr<T>& a);
 
3902
 
 
3903
 
 
3904
File: rheolef.info,  Node: permutation class,  Up: Classes
 
3905
 
 
3906
5.15 `permutation' - permutation matrix
 
3907
=======================================
 
3908
 
 
3909
(Source file: `skit/lib/permutation.h') 
 
3910
 
 
3911
Description
 
3912
-----------
 
3913
 
 
3914
This class implements a permutation matrix.   Permutation matrix are
 
3915
used in factorization  implementation for optimizing the skyline format,
 
3916
as used by the implementation of the  `ssk' class (*note ssk class::).
 
3917
 
 
3918
Let a be a square invertible matrix in `csr' format  (*note csr
 
3919
class::):
 
3920
             csr<double> a;
 
3921
 
 
3922
We get the optimal Gibbs permutation matrix using  Gibbs, Pooles and
 
3923
Stockmeyer renumbering algorithm by:
 
3924
          permutation p = gibbs(a);
 
3925
 
 
3926
Implementation
 
3927
--------------
 
3928
 
 
3929
     class permutation : public Array<std::vector<int>::size_type> {
 
3930
     public:
 
3931
 
 
3932
     // typedefs:
 
3933
 
 
3934
         typedef Array<int>::size_type       size_type;
 
3935
         typedef Array<int>::difference_type difference_type;
 
3936
 
 
3937
     // allocators/deallocators:
 
3938
 
 
3939
         explicit permutation (size_type n = 0);
 
3940
     };
 
3941
     template<class T>
 
3942
     permutation gibbs (const csr<T>& a);
 
3943
 
 
3944
 
 
3945
File: rheolef.info,  Node: vec class,  Up: Classes
 
3946
 
 
3947
5.16 `vec' - dense vector
 
3948
=========================
 
3949
 
 
3950
(Source file: `skit/lib/vec.h') 
 
3951
 
 
3952
Description
 
3953
-----------
 
3954
 
 
3955
The class implements an array.   A declaration whithout any parametrers
 
3956
correspond to an array with a null size:
 
3957
             vec<Float> x;
 
3958
 Here, a `Float' array is specified.   Note that the `Float' depends
 
3959
upon the configuration  (*note Installing::).   The constructor can be
 
3960
invocated whith a size parameter:
 
3961
             vec<Float> x(n);
 
3962
 Notes that the constructor can be invocated with an initializer:
 
3963
             vec<Float> y = x;
 
3964
 or
 
3965
             Float lambda = 1.3;
 
3966
             vec<Float> y = lambda;
 
3967
 Assignments are
 
3968
             x = y;
 
3969
 or
 
3970
             x = lambda;
 
3971
 Linear combinations are         `x+y',         `x-y',
 
3972
`x*lambda',         `lambda*x',         `x/lambda'.
 
3973
 
 
3974
Others combinations are         `x*y',         `x/y',
 
3975
`lambda/x'.
 
3976
 
 
3977
The euclidian norm is         `norm(x)'  while         `dot(x,y)'
 
3978
denotes the euclidian scalar product,
 
3979
 
 
3980
Input/output routines overload "<<" and ">>" operators:
 
3981
             cin  >> x;
 
3982
 and
 
3983
             cout << x;
 
3984
 *Note iorheo class::.
 
3985
 
 
3986
Note
 
3987
----
 
3988
 
 
3989
Since the `vec<T>' class derives from the  `Array<T>' class, the `vec'
 
3990
class  present also a STL-like container interface.
 
3991
 
 
3992
Actually, the `vec<T>' implementation uses a STL  `vector<T>' class.
 
3993
 
 
3994
Implementation
 
3995
--------------
 
3996
 
 
3997
     template <class T>
 
3998
     class vec : public Array<T>
 
3999
     {
 
4000
     public:
 
4001
 
 
4002
         typedef          T                   element_type;
 
4003
         typedef typename Array<T>::size_type size_type;
 
4004
 
 
4005
         // cstor, assignment
 
4006
             explicit vec (unsigned int n = 0, const T& init_value = std::numeric_limits<T>::max())
 
4007
               : Array<T>(n, init_value) {}
 
4008
             vec<T> operator = (T lambda);
 
4009
 
 
4010
         // accessors
 
4011
             unsigned int size () const { return Array<T>::size(); }
 
4012
             unsigned int n () const { return size(); }
 
4013
 
 
4014
     #ifdef _RHEOLEF_HAVE_EXPRESSION_TEMPLATE
 
4015
 
 
4016
             template <class X>
 
4017
             vec(const VExpr<X>& x) : Array<T>(x.size()) { assign (*this, x); }
 
4018
 
 
4019
             template <class X>
 
4020
             vec<T>& operator = (const VExpr<X>& x)
 
4021
                                     { logmodif(*this); return assign (*this, x); }
 
4022
     #endif // _RHEOLEF_HAVE_EXPRESSION_TEMPLATE
 
4023
     };
 
4024
     // io routines
 
4025
     template <class T> std::istream& operator >> (std::istream&, vec<T>&);
 
4026
     template <class T> std::ostream& operator << (std::ostream&, const vec<T>&);
 
4027
 
 
4028
 
 
4029
File: rheolef.info,  Node: ssk class,  Up: Classes
 
4030
 
 
4031
5.17 `ssk' - symmetric skyline matrix format
 
4032
============================================
 
4033
 
 
4034
(Source file: `skit/lib/ssk.h') 
 
4035
 
 
4036
Description
 
4037
-----------
 
4038
 
 
4039
The class implements a symmetric matrix Choleski factorization.   Let A
 
4040
be a square invertible matrix in  `csr' format (*note csr class::).
 
4041
             csr<Float> a;
 
4042
 We get the factorization by:
 
4043
             ssk<Float> m = ldlt(a);
 
4044
 Each call to the direct solver for a*x = b writes either:
 
4045
             vec<Float> x = m.solve(b);
 
4046
 or
 
4047
             m.solve(b,x);
 
4048
 
 
4049
Data structure
 
4050
--------------
 
4051
 
 
4052
The storage is either skyline, multi-file or  chevron.   This
 
4053
alternative depends upon the configuration  (*note Installing::).   The
 
4054
chevron data structure is related to the multifrontal  algorithm and is
 
4055
implemented by using the spooles library.   The multi-file data
 
4056
structure refers to the out-of-core  algorithm and is implemented by
 
4057
using the taucs library.   If such a library is not available, the
 
4058
`ssk' class  implements a skyline storage scheme and the profil storage
 
4059
of the  `ssk' matrix is optimized by optimizing the renumbering,  by
 
4060
using the Gibbs, Pooles and Stockmeyer algorithm available  via the
 
4061
`permutation' class  (*note permutation class::).
 
4062
 
 
4063
         Algorithm 582, collected Algorithms from ACM.      Algorithm
 
4064
     appeared in ACM-Trans. Math. Software, vol.8, no. 2,     Jun.,
 
4065
     1982, p. 190.
 
4066
 When implementing the skyline data structure,  we can go back to the
 
4067
`csr' format, for the  pupose of pretty-printing:
 
4068
             cout << ps << color << logscale << csr<Float>(m);
 
4069
 
 
4070
Implementation
 
4071
--------------
 
4072
 
 
4073
     template<class T>
 
4074
     class ssk : smart_pointer<spooles_rep<T> > {
 
4075
     public:
 
4076
     // typedefs:
 
4077
 
 
4078
             typedef          T                          element_type;
 
4079
             typedef typename spooles_rep<T>::size_type  size_type;
 
4080
 
 
4081
     // allocators/deallocators:
 
4082
 
 
4083
             ssk ();
 
4084
             explicit ssk<T> (const csr<T>&);
 
4085
 
 
4086
     // accessors:
 
4087
 
 
4088
             size_type nrow () const;
 
4089
             size_type ncol () const;
 
4090
             size_type nnz  () const;
 
4091
 
 
4092
     // factorisation and solver:
 
4093
 
 
4094
             void solve(const vec<T>& b, vec<T>& x) const;
 
4095
             vec<T> solve(const vec<T>& b) const;
 
4096
             void factorize_ldlt();
 
4097
     protected:
 
4098
             const spooles_rep<T>& data() const {
 
4099
                     return smart_pointer<spooles_rep<T> >::data();
 
4100
             }
 
4101
             spooles_rep<T>& data() {
 
4102
                     return smart_pointer<spooles_rep<T> >::data();
 
4103
             }
 
4104
     };
 
4105
     template <class T>
 
4106
     ssk<T> ldlt (const csr<T>& m);
 
4107
 
 
4108
Implementation
 
4109
--------------
 
4110
 
 
4111
     template<class T>
 
4112
     class ssk : smart_pointer<umfpack_rep<T> > {
 
4113
     public:
 
4114
     // typedefs:
 
4115
 
 
4116
             typedef          T                          element_type;
 
4117
             typedef typename umfpack_rep<T>::size_type  size_type;
 
4118
 
 
4119
     // allocators/deallocators:
 
4120
 
 
4121
             ssk ();
 
4122
             explicit ssk<T> (const csr<T>&);
 
4123
 
 
4124
     // accessors:
 
4125
 
 
4126
             size_type nrow () const;
 
4127
             size_type ncol () const;
 
4128
             size_type nnz  () const;
 
4129
 
 
4130
     // factorisation and solver:
 
4131
 
 
4132
             void solve(const vec<T>& b, vec<T>& x) const;
 
4133
             vec<T> solve(const vec<T>& b) const;
 
4134
             void factorize_ldlt();
 
4135
             void factorize_lu();
 
4136
     protected:
 
4137
             const umfpack_rep<T>& data() const {
 
4138
                     return smart_pointer<umfpack_rep<T> >::data();
 
4139
             }
 
4140
             umfpack_rep<T>& data() {
 
4141
                     return smart_pointer<umfpack_rep<T> >::data();
 
4142
             }
 
4143
     };
 
4144
     template <class T>
 
4145
     ssk<T> ldlt (const csr<T>& m);
 
4146
 
 
4147
 
 
4148
File: rheolef.info,  Node: csr class,  Up: Classes
 
4149
 
 
4150
5.18 `csr' - compressed sparse row matrix format
 
4151
================================================
 
4152
 
 
4153
(Source file: `skit/lib/csr.h') 
 
4154
 
 
4155
Description
 
4156
-----------
 
4157
 
 
4158
The class implements a matrix in compressed sparse row format.   A
 
4159
declaration whithout any parametrers correspond to a matrix with null
 
4160
size:
 
4161
             csr<double> a;
 
4162
 Notes that the constructor can be invocated with an initializer:
 
4163
             csr<double> a = b;
 
4164
 
 
4165
Input and output, as usual  (*note iorheo class::):
 
4166
             cin  >> a;
 
4167
             cout << a;
 
4168
 
 
4169
Default is the Harwell-Boeing format.   Various others formated options
 
4170
are available:  matlab and postscript plots.
 
4171
 
 
4172
Affectation from a scalar
 
4173
             a = 3.14;
 
4174
 
 
4175
The matrix/vector multiply:
 
4176
             a*x
 
4177
 and the transposed matrix/ vector multiply:
 
4178
             a.trans_mult(x);
 
4179
 
 
4180
The binary operators are:
 
4181
             a*b, a+b, a-b, lambda*a, a*lambda, a/lambda
 
4182
 The unary operators are sign inversion and transposition:
 
4183
             -a, trans(a);
 
4184
  The combination with a diagonal matrix  is not yet completely
 
4185
available.   The interface would be something like:
 
4186
             basic_diag<double> d;
 
4187
             a+d, d+a, a-d, d-a
 
4188
             a*d, d*a,
 
4189
             a/d             // aij/djj
 
4190
             left_div(a,d)   // aij/dii
 
4191
  When applied to the matrix directly:  this feature is not yet
 
4192
completely available.   The interface would be something like:
 
4193
             a += d;         // a := a+d
 
4194
             a -= d;         // a := a-d
 
4195
             a *= d;         // a := a*d
 
4196
             a.left_mult(d); // a := d*a
 
4197
             a /= d;         // aij := aij/djj
 
4198
             a.left_div(d);  // aij := aij/dii
 
4199
  The combination with a constant-identity matrix:  this feature is not
 
4200
yet completely available.   The interface would be something like:
 
4201
             double k;
 
4202
             a + k*EYE, k*EYE + a, a - k*EYE, k*EYE - a,
 
4203
 
 
4204
             a += e;
 
4205
             a -= e;
 
4206
 Get the lower triangular part:
 
4207
             csr<double> l = tril(a);
 
4208
 Conversely, `triu' get the upper triangular part.
 
4209
 
 
4210
For optimizing the profile storage, I could be convenient to  use a
 
4211
renumbering algorithm  (see also *note ssk class:: and *note
 
4212
permutation class::).
 
4213
             permutation p = gibbs(a);
 
4214
             csr<double> b = perm(a, p, q); // B := P*A*trans(Q)
 
4215
 Horizontal matrix concatenation:
 
4216
             a = hcat(a11,a12);
 
4217
 Vertical matrix concatenation:
 
4218
             a = vcat(a11,a21);
 
4219
 Explicit conversion from an associative `asr e' matrix writes:
 
4220
             a = csr<double>(e);
 
4221
 from a dense `dns m' matrix writes:
 
4222
             a = csr<double>(m);
 
4223
 
 
4224
 
 
4225
Note
 
4226
----
 
4227
 
 
4228
The `csr' class is currently under reconstruction   for the distributed
 
4229
memory support by using a MPI-based   implementation.
 
4230
 
 
4231
 
 
4232
File: rheolef.info,  Node: diag class,  Up: Classes
 
4233
 
 
4234
5.19 `basic_diag' - diagonal matrix
 
4235
===================================
 
4236
 
 
4237
(Source file: `skit/lib/diag.h') 
 
4238
 
 
4239
Description
 
4240
-----------
 
4241
 
 
4242
The class implements a diagonal matrix.   A declaration whithout any
 
4243
parametrers correspond to a null size matrix:
 
4244
             basic_diag<Float> d;
 
4245
 The constructor can be invocated whith a size parameter:
 
4246
             basic_diag<Float> d(n);
 
4247
 or an initialiser, either a vector (*note vec class::):
 
4248
             basic_diag<Float> d = basic_diag(v);
 
4249
 or a csr matrix *note csr class:::
 
4250
             basic_diag<Float> d = basic_diag(a);
 
4251
 The conversion from `basic_diag' to  `vec' or `csr' is explicit.
 
4252
 
 
4253
When a diagonal matrix is constructed from a `csr' matrix,  the
 
4254
definition of the diagonal of matrix is _always_ a vector of size  NROW
 
4255
which contains the elements in rows 1 to NROW of  the matrix that are
 
4256
contained in the diagonal.   If the diagonal element falls outside the
 
4257
matrix,  i.e. NCOL < NROW then it is  defined as a zero entry.
 
4258
 
 
4259
Note
 
4260
----
 
4261
 
 
4262
Since the `basic_diag' class derives from the  `vec',  the `basic_diag'
 
4263
class  present also a STL-like interface.
 
4264
 
 
4265
Implementation
 
4266
--------------
 
4267
 
 
4268
     template<class T>
 
4269
     class basic_diag : public vec<T> {
 
4270
     public:
 
4271
 
 
4272
     // typedefs:
 
4273
 
 
4274
         typedef typename vec<T>::element_type element_type;
 
4275
         typedef typename vec<T>::size_type    size_type;
 
4276
         typedef typename vec<T>::iterator     iterator;
 
4277
 
 
4278
     // allocators/deallocators:
 
4279
 
 
4280
         explicit basic_diag (size_type sz = 0);
 
4281
         explicit basic_diag (const vec<T>& u);
 
4282
         explicit basic_diag (const csr<T>& a);
 
4283
 
 
4284
     // assignment:
 
4285
 
 
4286
         basic_diag<T> operator = (const T& lambda);
 
4287
 
 
4288
     // accessors:
 
4289
 
 
4290
         size_type nrow () const { return vec<T>::size(); }
 
4291
         size_type ncol () const { return vec<T>::size(); }
 
4292
 
 
4293
     // basic_diag as a preconditionner: solves D.x=b
 
4294
 
 
4295
         vec<T> solve (const vec<T>& b) const;
 
4296
         vec<T> trans_solve (const vec<T>& b) const;
 
4297
     };
 
4298
     template <class T>
 
4299
     basic_diag<T> dcat (const basic_diag<T>& a1, const basic_diag<T>& a2);
 
4300
 
 
4301
     template <class T>
 
4302
     basic_diag<T> operator / (const T& lambda, const basic_diag<T>& d);
 
4303
 
 
4304
     template <class T>
 
4305
     vec<T>
 
4306
     operator * (const basic_diag<T>& d, const vec<T>& x);
 
4307
 
 
4308
     template<class T>
 
4309
     vec<T> left_div (const vec<T>& x, const basic_diag<T>& d);
 
4310
 
 
4311
 
 
4312
File: rheolef.info,  Node: iorheo class,  Up: Classes
 
4313
 
 
4314
5.20 `iorheo' - input and output functions and manipulation
 
4315
===========================================================
 
4316
 
 
4317
(Source file: `util/lib/iorheo.h') 
 
4318
 
 
4319
Example
 
4320
-------
 
4321
 
 
4322
input geo in standard file format:
 
4323
             cin >> g;
 
4324
    output geo in standard file format:
 
4325
             cout << g;
 
4326
    output geo in gnuplot format:
 
4327
             cout << gnuplot << g;
 
4328
 
 
4329
Description
 
4330
-----------
 
4331
 
 
4332
output manipulators enable the selection of     some pretty graphic
 
4333
options, in an elegant fashion.
 
4334
 
 
4335
Boolean manipulators
 
4336
--------------------
 
4337
 
 
4338
The boolean manipulators set an internal optional flag.      Each
 
4339
option has its negative counterpart, as     `verbose' and `noverbose',
 
4340
by adding the     `no' prefix.
 
4341
             cout << noverbose << a;
 
4342
 
 
4343
`verbose'
 
4344
     trace some details, such as loading, storing or        unix
 
4345
     command operations on `cerr'.         Default is on.
 
4346
 
 
4347
`clean'
 
4348
     delete temporary files during graphic outputs.         Default is
 
4349
     on.
 
4350
 
 
4351
`execute'
 
4352
     run unix operations, such as `gnuplot' or        `plotmtv' or
 
4353
     `vtk'. Note that the corresponding        files are created.
 
4354
      Default is on.
 
4355
 
 
4356
`transpose'
 
4357
     perform transposition when loading/soring a `csr' matrix
 
4358
     from Harwell-Boeing file.         This feature is available, since
 
4359
     the file format store        matrix in transposed format.
 
4360
     Default is off.
 
4361
 
 
4362
`logscale'
 
4363
     when using matrix sparse postscript plot manipulator `ps'
 
4364
     and `color'. The color scale is related to a logarithmic
 
4365
     scale.
 
4366
 
 
4367
`fill'
 
4368
`grid'
 
4369
`shrink'
 
4370
`tube'
 
4371
`ball'
 
4372
`full'
 
4373
`stereo'
 
4374
`cut'
 
4375
`iso'
 
4376
`split'
 
4377
     when using the `vtk' or `mayavi' manipulators        for a mesh or
 
4378
     a field.
 
4379
 
 
4380
`volume'
 
4381
     volume rendering by using ray cast functions.  
 
4382
 
 
4383
`velocity'
 
4384
`deformation'
 
4385
     Vector-valued fields are rendered by using arrows (`velocity')
 
4386
        or deformed meshes (`deformation').         For `vtk' or
 
4387
     `plotmtv' rendering.
 
4388
 
 
4389
`elevation'
 
4390
     Scalar valued fields in two dimension are rendered by using
 
4391
     a tridimensionnal surface elevation.          For `vtk' or
 
4392
     `plotmtv' rendering.
 
4393
 
 
4394
 
 
4395
`fastfieldload'
 
4396
     try to reuse the supplied space. Default is on.
 
4397
 
 
4398
File format manipulators
 
4399
------------------------
 
4400
 
 
4401
The "format" manipulator group applies for streams.      Its value is
 
4402
an enumerated type, containing the     following possibilities:
 
4403
`rheo'
 
4404
     use the default textual input/output file format.          For
 
4405
     instance, this is         `.geo' for meshes,         `.field' for
 
4406
     discretized functions.          This default format is specified
 
4407
     in the corresponding         class documentation         (see also
 
4408
     *note geo class:: and *note field class::).          This is the
 
4409
     default.
 
4410
 
 
4411
`bamg'
 
4412
     uses `.bamg' Frederic Hecht's bidimensional anisotropic
 
4413
     mesh generator file format for geo input/output operation.
 
4414
 
 
4415
`tetgen'
 
4416
     uses `.node' `.ele' and `.face' Hang Si's tridimensional
 
4417
     mesh generator file format for geo input/output operation.
 
4418
 
 
4419
`mmg3d'
 
4420
     uses `.mmg3d' Cecile Dobrzynski's tridimensional anisotropic
 
4421
      mesh generator file format for geo input/output operation.
 
4422
 
 
4423
`gmsh'
 
4424
     uses `.msh'         gmsh Christophe Geuzaine and Jean-François
 
4425
     Remacle         mesh generator file format for geo input/output
 
4426
     operation.
 
4427
 
 
4428
`grummp'
 
4429
     uses `.m' (bidimensional) or `.v' (tridimensionnal)         Carl
 
4430
     Ollivier-Gooch 's mesh generator file format for geo input/output
 
4431
           operation.
 
4432
 
 
4433
`qmg'
 
4434
     uses `.qmg'         Stephen A. Vavasis's mesh generator file
 
4435
     format for geo input/output         operation.
 
4436
 
 
4437
`vtkdata'
 
4438
     uses `.vtk'         mesh file format for geo input/output
 
4439
     operations.          This file format is suitable for graphic
 
4440
     treatment.
 
4441
 
 
4442
`vtkpolydata'
 
4443
     uses `.vtk' polydata (specific for polygonal boundaries)
 
4444
     mesh file format for geo input/output operations.          This
 
4445
     file format is suitable for graphic treatment.
 
4446
 
 
4447
`cemagref'
 
4448
     uses `.cemagref' surface mesh (topography, with a `z' cote).
 
4449
       This file format is used at Cemagref (french research center for
 
4450
     mountains,         `http://www.cemagref.fr').
 
4451
 
 
4452
`dump'
 
4453
     output an extensive listing of the class data structure.
 
4454
     This option is used for debugging purpose.
 
4455
 
 
4456
`hb'
 
4457
     uses `.hb' Harwell-Boeing file format for sparse matrix
 
4458
     input/output         operation.          This is the default.
 
4459
 
 
4460
`matrix_market'
 
4461
     uses `.mm' Matrix-Market file format for sparse matrix input/output
 
4462
            operation.
 
4463
 
 
4464
`ml'
 
4465
`matlab'
 
4466
     uses `.m' Matlab file format for sparse matrix output
 
4467
     operation.
 
4468
 
 
4469
`sparse_matlab'
 
4470
     uses `.m' Matlab sparse file format for sparse matrix output
 
4471
      operation.
 
4472
 
 
4473
`ps'
 
4474
     uses `.ps' postscript for sparse matrix output         operation.
 
4475
 
 
4476
`vtk'
 
4477
     for mesh and field outputs.          Generate `.vtk' data file and
 
4478
     the         `.tcl' command script file         and run the `vtk'
 
4479
     command         on the `.tcl'.  
 
4480
 
 
4481
`mayavi'
 
4482
     for field outputs.          Generate `.vtk' data file and the
 
4483
       `.py' command script file         and run the `python' command
 
4484
     on the `.py'         associated to the `mayavi'/`vtk' library.
 
4485
 
 
4486
`geomview'
 
4487
     for boundary cad outputs.          Generate `.off' data file
 
4488
      and run the `geomview' command.
 
4489
 
 
4490
`gnuplot'
 
4491
     for mesh and field outputs.          Generate `.gdat' data file
 
4492
     and the         `.plot' command script file         and run the
 
4493
     `gnuplot' command         on the `.plot'.
 
4494
 
 
4495
`plotmtv'
 
4496
     for mesh and field outputs.          Generate `.mtv' data file
 
4497
        and run the `plotmtv' command.
 
4498
 
 
4499
`x3d'
 
4500
     for mesh output.          Generate `.x3d' data file         and
 
4501
     run the `x3d' command.          This tool has fast rotation
 
4502
     rendering.
 
4503
 
 
4504
`atom'
 
4505
     for mesh output.          Generate `.atom' data file         and
 
4506
     run the `PlotM' command.          Tridimensional mesh rendering is
 
4507
     performed         as a chemical molecule: nodes as balls and
 
4508
      edges as tubes.          The `PlotM' tool is developped
 
4509
     at Cornell University Laboratory of Atomic and Solid         State
 
4510
     Physics (LASSP) in a Joint Study with IBM, with support by
 
4511
     the Materials Science Center and Corning Glassworks.
 
4512
 
 
4513
Color manipulators
 
4514
------------------
 
4515
 
 
4516
The "color" manipulator group acts for     sparse matrix postscript
 
4517
output. Its value is an     enumerated type, containing three
 
4518
possibilities:
 
4519
             cout << color << a;
 
4520
             cout << gray  << b;
 
4521
             cout << black_and_white  << c;
 
4522
    The default is to generate a color postcript file.      Conversely,
 
4523
its act for field rendering, via `mayavi'.
 
4524
 
 
4525
Valuated manipulators
 
4526
---------------------
 
4527
 
 
4528
Some manipulators takes an agument that specifies a value.
 
4529
             cout << geomview << bezieradapt << subdivide(5) << my_cad_boundary;
 
4530
             cout << vtk << iso << isovalue(2.5) << my_mesh;
 
4531
             cout << velocity << plotmtv << vectorscale(0.1) << uh;
 
4532
    See also *note catchmark class:: for input-output of vector-valued
 
4533
fields.
 
4534
`isovalue FLOAT'
 
4535
`n_isovalue INT'
 
4536
`n_isovalue_negative INT'
 
4537
`vectorscale FLOAT'
 
4538
`subdivide FLOAT'
 
4539
 
 
4540
 
 
4541
File: rheolef.info,  Node: Vector class,  Up: Classes
 
4542
 
 
4543
5.21 `Vector' - STL `vector<T>' with reference counting
 
4544
=======================================================
 
4545
 
 
4546
(Source file: `util/lib/Vector.h') 
 
4547
 
 
4548
Description
 
4549
-----------
 
4550
 
 
4551
The class implement a reference counting wrapper for  the STL
 
4552
`vector<T>' container class, with shallow copies.   See also:
 
4553
 
 
4554
       The Standard Template Library, by Alexander Stephanov and Meng
 
4555
     Lee.
 
4556
 
 
4557
This class provides the full `vector<T>'  interface specification  an
 
4558
could be used instead of `vector<T>'.
 
4559
 
 
4560
Note
 
4561
----
 
4562
 
 
4563
The write accessors
 
4564
             T& operator[](size_type)
 
4565
 as in `v[i]'  may checks the reference count for each access.   For a
 
4566
loop, a better usage is:
 
4567
           Vector<T>::iterator i = v.begin();
 
4568
           Vector<T>::iterator last = v.end();
 
4569
           while (i != last) { ...}
 
4570
 and the reference count check step occurs only two time,  when
 
4571
accessing via `begin()' and `end()'.
 
4572
 
 
4573
Thus, in order to encourage users to do it, we declare private  theses
 
4574
member functions. A synonym of `operator[]' is `at'.
 
4575
 
 
4576
Implementation
 
4577
--------------
 
4578
 
 
4579
     template<class T>
 
4580
     class Vector : private smart_pointer<vector_rep<T> > {
 
4581
 
 
4582
     public:
 
4583
 
 
4584
     // typedefs:
 
4585
 
 
4586
         typedef iterator;
 
4587
         typedef const_iterator;
 
4588
         typedef pointer;
 
4589
         typedef reference;
 
4590
         typedef const_reference;
 
4591
         typedef size_type;
 
4592
         typedef difference_type;
 
4593
         typedef value_type;
 
4594
         typedef reverse_iterator;
 
4595
         typedef const_reverse_iterator;
 
4596
 
 
4597
     // allocation/deallocation:
 
4598
 
 
4599
         explicit Vector (size_type n = 0, const T& value = T ());
 
4600
         Vector (const_iterator first, const_iterator last);
 
4601
         void reserve (size_type n);
 
4602
         void swap (Vector<T>& x) ;
 
4603
 
 
4604
     // accessors:
 
4605
 
 
4606
         iterator                 begin ();
 
4607
         const_iterator           begin () const;
 
4608
         iterator                 end ();
 
4609
         const_iterator           end ()   const;
 
4610
         reverse_iterator         rbegin();
 
4611
         const_reverse_iterator   rbegin() const;
 
4612
         reverse_iterator         rend();
 
4613
         const_reverse_iterator   rend() const;
 
4614
         size_type size () const;
 
4615
         size_type max_size () const;
 
4616
         size_type capacity () const;
 
4617
         bool empty () const;
 
4618
         void resize (size_type sz, T v = T ()); // non-standard ?
 
4619
     private:
 
4620
         const_reference operator[] (size_type n) const;
 
4621
         reference operator[] (size_type n);
 
4622
     public:
 
4623
         const_reference at (size_type n) const; // non-standard ?
 
4624
         reference at (size_type n);
 
4625
         reference         front ();
 
4626
         const_reference   front () const;
 
4627
         reference         back ();
 
4628
         const_reference   back ()  const;
 
4629
 
 
4630
     // insert/erase:
 
4631
 
 
4632
         void push_back (const T& x);
 
4633
         iterator insert (iterator position, const T& x = T ());
 
4634
         void insert (iterator position, size_type n, const T& x);
 
4635
         void insert (iterator position, const_iterator first, const_iterator last);
 
4636
         void pop_back ();
 
4637
         void erase (iterator position);
 
4638
         void erase (iterator first, iterator last);
 
4639
     };
 
4640
 
 
4641
 
 
4642
File: rheolef.info,  Node: catchmark class,  Up: Classes
 
4643
 
 
4644
5.22 `catchmark' - iostream manipulator
 
4645
=======================================
 
4646
 
 
4647
(Source file: `util/lib/catchmark.h') 
 
4648
 
 
4649
Description
 
4650
-----------
 
4651
 
 
4652
The `catchmark' is used for building labels used     for input-output
 
4653
of vector-valued fields (see *note field class::):
 
4654
             cin  >> catchmark("f")   >> fh;
 
4655
             cout << catchmark("u")   << uh
 
4656
                  << catchmark("w")   << wh
 
4657
                  << catchmark("psi") << psih;
 
4658
    Assuming its value for output     is `"u"', the corresponding
 
4659
labels will be     `"#u0"', `"#u1"', `"#u2"', ...
 
4660
 
 
4661
Implementation
 
4662
--------------
 
4663
 
 
4664
     class catchmark {
 
4665
         public:
 
4666
             catchmark(const std::string& x);
 
4667
             friend std::istream& operator >> (std::istream& is, const catchmark& m);
 
4668
             friend std::ostream& operator << (std::ostream& os, const catchmark& m);
 
4669
         protected:
 
4670
             std::string _mark;
 
4671
     };
 
4672
 
 
4673
 
 
4674
File: rheolef.info,  Node: rheostream class,  Up: Classes
 
4675
 
 
4676
5.23 `irheostream', `orheostream' - large data streams
 
4677
======================================================
 
4678
 
 
4679
(Source file: `util/lib/rheostream.h') 
 
4680
 
 
4681
Abstract
 
4682
--------
 
4683
 
 
4684
This class provides a stream interface for large  data management.
 
4685
File decompresion is assumed using  `gzip' and a recursive seach in a
 
4686
directory list  is provided for input.
 
4687
          orheostream foo("NAME", "suffix");
 
4688
 is like
 
4689
          ofstream foo("NAME.suffix").
 
4690
 However, if NAME does not end with `.suffix', then  `.suffix' is
 
4691
added, and compression  is done with gzip, adding an additional `.gz'
 
4692
suffix.
 
4693
 
 
4694
Conversely,
 
4695
             irheostream foo("NAME","suffix");
 
4696
 is like
 
4697
             ifstream foo("NAME.suffix").
 
4698
 However, we look at a search path environment variable  `RHEOPATH' in
 
4699
order to find NAME while suffix is assumed.   Moreover, `gzip'
 
4700
compressed files, ending  with the `.gz' suffix is assumed, and
 
4701
decompression is done.
 
4702
 
 
4703
Finally, a set of useful functions are provided.
 
4704
 
 
4705
Description
 
4706
-----------
 
4707
 
 
4708
The following code:
 
4709
             irheostream is("results", "data");
 
4710
 will recursively look for a `results[.data[.gz]]' file in the
 
4711
directory mentionned by the `RHEOPATH' environment variable.
 
4712
 
 
4713
For instance, if you insert in our ".cshrc" something like:
 
4714
             setenv RHEOPATH ".:/home/dupont:/usr/local/math/demo"
 
4715
 the process will study the current directory `.', then, if  neither
 
4716
`square.data.gz' nor `square.data' exits, it scan  all subdirectory of
 
4717
the current directory. Then, if file  is not founded, it start
 
4718
recusively in `/home/dupond'  and then in `/usr/local/math/demo'.
 
4719
 
 
4720
File decompression is performed by using  the `gzip' command, and data
 
4721
are pipe-lined  directly in memory.
 
4722
 
 
4723
If the file start with `.' as `./square' or with a `/'  as
 
4724
`/home/oscar/square', no search occurs and `RHEOPATH'  environment
 
4725
variable is not used.
 
4726
 
 
4727
Also, if the environment variable `RHEOPATH' is not set, the  default
 
4728
value is the current directory `.'.
 
4729
 
 
4730
For output stream:
 
4731
             orheostream os("newresults", "data");
 
4732
 file compression is assumed, and "newresults.data.gz"  will be created.
 
4733
 
 
4734
File loading and storing are mentionned by a message,  either:
 
4735
             ! load "./results.data.gz"
 
4736
 or:
 
4737
             ! file "./newresults.data.gz" created.
 
4738
 on the `clog' stream.   By adding the following:
 
4739
             clog << noverbose;
 
4740
 you turn off these messages  (*note iorheo class::).
 
4741
 
 
4742
Implementation
 
4743
--------------
 
4744
 
 
4745
     class irheostream : public io::filtering_stream<io::input> {
 
4746
     public:
 
4747
         irheostream() : io::filtering_stream<io::input>() {}
 
4748
         irheostream(const std::string& name, const std::string& suffix = std::string());
 
4749
         virtual ~irheostream();
 
4750
         void open  (const std::string& name, const std::string& suffix = std::string());
 
4751
         void close();
 
4752
     protected:
 
4753
         std::ifstream _ifs;
 
4754
     };
 
4755
     class orheostream : public io::filtering_stream<io::output> {
 
4756
     public:
 
4757
         orheostream() : io::filtering_stream<io::output>() {}
 
4758
         orheostream(const std::string& name, const std::string& suffix = std::string());
 
4759
         virtual ~orheostream();
 
4760
         void open  (const std::string& name, const std::string& suffix = std::string());
 
4761
         void close();
 
4762
     protected:
 
4763
         std::ofstream _ofs;
 
4764
     };
 
4765
     std::string itos (std::string::size_type i);
 
4766
     std::string ftos (const Float& x);
 
4767
 
 
4768
     // catch first occurence of string in file
 
4769
     bool scatch (std::istream& in, const std::string& ch);
 
4770
 
 
4771
     // has_suffix("toto.suffix", "suffix") -> true
 
4772
     bool has_suffix (const std::string& name, const std::string& suffix);
 
4773
 
 
4774
     // "toto.suffix" --> "toto"
 
4775
     std::string delete_suffix (const std::string& name, const std::string& suffix);
 
4776
 
 
4777
     // "/usr/local/dir/toto.suffix" --> "toto.suffix"
 
4778
     std::string get_basename (const std::string& name);
 
4779
 
 
4780
     // "/usr/local/dir/toto.suffix" --> "/usr/local/dir"
 
4781
     std::string get_dirname (const std::string& name);
 
4782
 
 
4783
     // "toto" --> "/usr/local/math/data/toto.suffix"
 
4784
     std::string get_full_name_from_rheo_path (const std::string& rootname, const std::string& suffix);
 
4785
 
 
4786
     // "." + "../geodir" --> ".:../geodir"
 
4787
     void append_dir_to_rheo_path (const std::string& dir);
 
4788
 
 
4789
     // "../geodir" + "." --> "../geodir:."
 
4790
     void prepend_dir_to_rheo_path (const std::string& dir);
 
4791
 
 
4792
     bool file_exists (const std::string& filename);
 
4793
 
 
4794
     // string to float
 
4795
     bool is_float (const std::string&);
 
4796
     Float to_float (const std::string&);
 
4797
 
 
4798
 
 
4799
File: rheolef.info,  Node: Algorithms,  Up: Top
 
4800
 
 
4801
6 Algorithms
 
4802
************
 
4803
 
 
4804
* Menu:
 
4805
 
 
4806
* newton algorithm::
 
4807
* damped-newton algorithm::
 
4808
* riesz_representer algorithm::
 
4809
* mixed_solver algorithm::
 
4810
* pminres algorithm::
 
4811
* qmr algorithm::
 
4812
* pcg algorithm::
 
4813
* bicgstab algorithm::
 
4814
* puzawa algorithm::
 
4815
* gmres algorithm::
 
4816
 
 
4817
 
 
4818
File: rheolef.info,  Node: newton algorithm,  Up: Algorithms
 
4819
 
 
4820
6.1 `newton' - Newton nonlinear algorithm
 
4821
=========================================
 
4822
 
 
4823
(Source file: `nfem/lib/newton.h') 
 
4824
 
 
4825
Description
 
4826
-----------
 
4827
 
 
4828
Nonlinear Newton algorithm for the resolution of the following problem:
 
4829
            F(u) = 0
 
4830
  A simple call to the algorithm writes:
 
4831
         my_problem P;
 
4832
         field uh (Vh);
 
4833
         newton (P, uh, tol, max_iter);
 
4834
  The `my_problem' class may contains methods for the evaluation   of F
 
4835
(aka residue) and its derivative:
 
4836
         class my_problem {
 
4837
         public:
 
4838
           my_problem();
 
4839
           field residue (const field& uh) const;
 
4840
           void update_derivative (const field& uh) const;
 
4841
           field derivative_solve (const field& mrh) const;
 
4842
           Float norm (const field& uh) const;
 
4843
           Float dual_norm (const field& Muh) const;
 
4844
         };
 
4845
  See the example `p-laplacian.h' in the user's documentation   for
 
4846
more.
 
4847
 
 
4848
Implementation
 
4849
--------------
 
4850
 
 
4851
     template <class Problem, class Field>
 
4852
     int newton (Problem P, Field& uh, Float& tol, size_t& max_iter, std::ostream *p_cerr = 0) {
 
4853
         if (p_cerr) *p_cerr << "# Newton: n r" << std::endl;
 
4854
         for (size_t n = 0; true; n++) {
 
4855
           Field rh = P.residue(uh);
 
4856
           Float r = P.dual_norm(rh);
 
4857
           if (p_cerr) *p_cerr << n << " " << r << std::endl;
 
4858
           if (r <= tol) { tol = r; max_iter = n; return 0; }
 
4859
           if (n == max_iter) { tol = r; return 1; }
 
4860
           P.update_derivative (uh);
 
4861
           Field delta_uh = P.derivative_solve (-rh);
 
4862
           uh += delta_uh;
 
4863
         }
 
4864
     }
 
4865
 
 
4866
 
 
4867
File: rheolef.info,  Node: damped-newton algorithm,  Up: Algorithms
 
4868
 
 
4869
6.2 `damped_newton' - damped Newton nonlinear algorithm
 
4870
=======================================================
 
4871
 
 
4872
(Source file: `nfem/lib/damped-newton.h') 
 
4873
 
 
4874
Description
 
4875
-----------
 
4876
 
 
4877
Nonlinear damped Newton algorithm for the resolution of the following
 
4878
problem:
 
4879
            F(u) = 0
 
4880
  A simple call to the algorithm writes:
 
4881
         my_problem P;
 
4882
         field uh (Vh);
 
4883
         damped_newton (P, uh, tol, max_iter);
 
4884
  The `my_problem' class may contains methods for the evaluation   of F
 
4885
(aka residue) and its derivative:
 
4886
         class my_problem {
 
4887
         public:
 
4888
           my_problem();
 
4889
           field residue (const field& uh) const;
 
4890
           void update_derivative (const field& uh) const;
 
4891
           field derivative_trans_mult (const field& mrh) const;
 
4892
           field derivative_solve (const field& mrh) const;
 
4893
           Float norm (const field& uh) const;
 
4894
           Float dual_norm (const field& Muh) const;
 
4895
         };
 
4896
  See the example `p-laplacian.h' in the user's documentation   for
 
4897
more.
 
4898
 
 
4899
Implementation
 
4900
--------------
 
4901
 
 
4902
     template <class Problem, class Field, class Real, class Size>
 
4903
     int damped_newton (Problem P, Field& u, Real& tol, Size& max_iter, std::ostream* p_cerr=0) {
 
4904
       return damped_newton(P, newton_identity_preconditioner(), u, tol, max_iter, p_cerr);
 
4905
     }
 
4906
 
 
4907
 
 
4908
File: rheolef.info,  Node: riesz_representer algorithm,  Up: Algorithms
 
4909
 
 
4910
6.3 `riesz_representer' - integrate a function by using quadrature formulae
 
4911
===========================================================================
 
4912
 
 
4913
(Source file: `nfem/lib/riesz_representer.h') 
 
4914
 
 
4915
Description
 
4916
-----------
 
4917
 
 
4918
The function `riesz_representer' implements the  approximation of an
 
4919
integral by using quadrature formulae.   This is an expreimental
 
4920
implementation: please do not use  yet for practical usage.
 
4921
 
 
4922
Synopsys
 
4923
--------
 
4924
 
 
4925
template <class Function>  field riesz_representer (const space& Vh,
 
4926
const Function& f);
 
4927
 
 
4928
template <class Function>  field riesz_representer (const space& Vh,
 
4929
const Function& f,         quadrature_option_type qopt);
 
4930
 
 
4931
Example
 
4932
-------
 
4933
 
 
4934
The following code compute the Riesz representant, denoted  by `mfh' of
 
4935
f(x), and the integral of f over the domain omega:
 
4936
       Float f(const point& x);
 
4937
       ...
 
4938
       space Vh (omega_h, "P1");
 
4939
       field mfh = riesz_representer(Vh, f);
 
4940
       Float int_f = dot(mfh, field(Vh,1.0));
 
4941
 The Riesz representer is the `mfh' vector of values:
 
4942
             mfh(i) = integrate f(x) phi_i(x) dx
 
4943
 where phi_i is the i-th basis function in Vh  and the integral is
 
4944
evaluated by using a quadrature formulae.   By default the quadrature
 
4945
formule is the Gauss one with  the order equal to the polynomial order
 
4946
of Vh.   Alternative quadrature formulae and order is available  by
 
4947
passing an optional variable to riesz_representer.
 
4948
 
 
4949
Implementation
 
4950
--------------
 
4951
 
 
4952
     template <class Function>
 
4953
     field
 
4954
     riesz_representer (
 
4955
         const space& Vh,
 
4956
         const Function& f,
 
4957
         quadrature_option_type qopt
 
4958
            = quadrature_option_type(quadrature_option_type::max_family,0))
 
4959
 
 
4960
 
 
4961
File: rheolef.info,  Node: mixed_solver algorithm,  Up: Algorithms
 
4962
 
 
4963
6.4 `pcg_abtb', `pcg_abtbc', `pminres_abtb', `pminres_abtbc' - solvers for mixed linear problems
 
4964
================================================================================================
 
4965
 
 
4966
(Source file: `skit/lib/mixed_solver.h') 
 
4967
 
 
4968
Synopsis
 
4969
--------
 
4970
 
 
4971
         template <class Matrix, class Vector, class Solver, class Preconditioner, class Size, class Real>
 
4972
         int pcg_abtb (const Matrix& A, const Matrix& B, Vector& u, Vector& p,
 
4973
           const Vector& Mf, const Vector& Mg, const Preconditioner& S1,
 
4974
           const Solver& inner_solver_A, Size& max_iter, Real& tol,
 
4975
           std::ostream *p_cerr = 0, std::string label = "pcg_abtb");
 
4976
 
 
4977
         template <class Matrix, class Vector, class Solver, class Preconditioner, class Size, class Real>
 
4978
         int pcg_abtbc (const Matrix& A, const Matrix& B, const Matrix& C, Vector& u, Vector& p,
 
4979
           const Vector& Mf, const Vector& Mg, const Preconditioner& S1,
 
4980
           const Solver& inner_solver_A, Size& max_iter, Real& tol,
 
4981
           std::ostream *p_cerr = 0, std::string label = "pcg_abtbc");
 
4982
  The synopsis is the same with the pminres algorithm.
 
4983
 
 
4984
Examples
 
4985
--------
 
4986
 
 
4987
See the user's manual for practical examples for the nearly
 
4988
incompressible   elasticity, the Stokes and the Navier-Stokes problems.
 
4989
 
 
4990
Description
 
4991
-----------
 
4992
 
 
4993
Preconditioned conjugate gradient algorithm on the pressure p applied to
 
4994
 the stabilized stokes problem:
 
4995
            [ A  B^T ] [ u ]    [ Mf ]
 
4996
            [        ] [   ]  = [    ]
 
4997
            [ B  -C  ] [ p ]    [ Mg ]
 
4998
  where A is symmetric positive definite and C is symmetric positive
 
4999
and semi-definite.    Such mixed linear problems appears for instance
 
5000
with the discretization   of Stokes problems with stabilized P1-P1
 
5001
element, or with nearly   incompressible elasticity.    Formaly u =
 
5002
inv(A)*(Mf - B^T*p) and the reduced system writes for   all
 
5003
non-singular matrix S1:
 
5004
          inv(S1)*(B*inv(A)*B^T)*p = inv(S1)*(B*inv(A)*Mf - Mg)
 
5005
  Uzawa or conjugate gradient algorithms are considered on the
 
5006
reduced problem.    Here, S1 is some preconditioner for the Schur
 
5007
complement S=B*inv(A)*B^T.    Both direct or iterative solvers for S1*q
 
5008
= t are supported.    Application of inv(A) is performed via a call to
 
5009
a solver   for systems such as A*v = b.    This last system may be
 
5010
solved either by direct or iterative algorithms,   thus, a general
 
5011
matrix solver class is submitted to the algorithm.    For most
 
5012
applications, such as the Stokes problem,   the mass matrix for the p
 
5013
variable is a good S1 preconditioner   for the Schur complement.    The
 
5014
stoping criteria is expressed using the S1 matrix, i.e. in L2 norm
 
5015
when this choice is considered.    It is scaled by the L2 norm of the
 
5016
right-hand side of the reduced system,   also in S1 norm.
 
5017
 
 
5018
 
 
5019
File: rheolef.info,  Node: pminres algorithm,  Up: Algorithms
 
5020
 
 
5021
6.5 `pminres' - conjugate gradient algorithm.
 
5022
=============================================
 
5023
 
 
5024
(Source file: `skit/lib/pminres.h') 
 
5025
 
 
5026
Synopsis
 
5027
--------
 
5028
 
 
5029
         template <class Matrix, class Vector, class Preconditioner, class Real>
 
5030
         int pminres (const Matrix &A, Vector &x, const Vector &b, const Preconditioner &M,
 
5031
           int &max_iter, Real &tol, std::ostream *p_cerr=0);
 
5032
 
 
5033
Example
 
5034
-------
 
5035
 
 
5036
The simplest call to 'pminres' has the folling form:
 
5037
         size_t max_iter = 100;
 
5038
         double tol = 1e-7;
 
5039
         int status = pminres(a, x, b, EYE, max_iter, tol, &cerr);
 
5040
 
 
5041
Description
 
5042
-----------
 
5043
 
 
5044
`pminres' solves the symmetric positive definite linear   system Ax=b
 
5045
using the Conjugate Gradient method.
 
5046
 
 
5047
The return value indicates convergence within max_iter (input)
 
5048
iterations (0), or no convergence within max_iter iterations (1).
 
5049
Upon successful return, output arguments have the following values:
 
5050
`x'
 
5051
     approximate solution to Ax = b
 
5052
 
 
5053
`max_iter'
 
5054
     the number of iterations performed before the tolerance was reached
 
5055
 
 
5056
`tol'
 
5057
     the residual after the final iteration
 
5058
 
 
5059
Note
 
5060
----
 
5061
 
 
5062
`pminres' follows the algorithm described in   "Solution of sparse
 
5063
indefinite systems of linear equations", C. C. Paige   and M. A.
 
5064
Saunders, SIAM J. Numer. Anal., 12(4), 1975.    For more, see
 
5065
http://www.stanford.edu/group/SOL/software.html and also the   PhD
 
5066
"Iterative methods for singular linear equations and least-squares
 
5067
problems",   S.-C. T. Choi, Stanford University, 2006,
 
5068
http://www.stanford.edu/group/SOL/dissertations/sou-cheng-choi-thesis.pdf
 
5069
at page 60.    The present implementation style is inspired from `IML++
 
5070
1.2' iterative method library,   `http://math.nist.gov/iml++'.
 
5071
 
 
5072
Implementation
 
5073
--------------
 
5074
 
 
5075
     template <class Matrix, class Vector, class Preconditioner, class Real, class Size>
 
5076
     int pminres(const Matrix &A, Vector &x, const Vector &Mb, const Preconditioner &M,
 
5077
       Size &max_iter, Real &tol, std::ostream *p_cerr = 0, std::string label = "minres")
 
5078
     {
 
5079
       Vector b = M.solve(Mb);
 
5080
       Real norm_b = sqrt(fabs(dot(Mb,b)));
 
5081
       if (norm_b == Real(0.)) norm_b = 1;
 
5082
 
 
5083
       Vector Mr = Mb - A*x;
 
5084
       Vector z = M.solve(Mr);
 
5085
       Real beta2 = dot(Mr, z);
 
5086
       Real norm_r = sqrt(fabs(beta2));
 
5087
       if (p_cerr) (*p_cerr) << "[" << label << "] #iteration residue" << std::endl;
 
5088
       if (p_cerr) (*p_cerr) << "[" << label << "] 0 " << norm_r/norm_b << std::endl;
 
5089
       if (beta2 < 0 || norm_r <= tol*norm_b) {
 
5090
         tol = norm_r/norm_b;
 
5091
         max_iter = 0;
 
5092
         warning_macro ("beta2 = " << beta2 << " < 0: stop");
 
5093
         return 0;
 
5094
       }
 
5095
       Real beta = sqrt(beta2);
 
5096
       Real eta = beta;
 
5097
       Vector Mv = Mr/beta;
 
5098
       Vector  u =  z/beta;
 
5099
       Real c_old = 1.;
 
5100
       Real s_old = 0.;
 
5101
       Real c = 1.;
 
5102
       Real s = 0.;
 
5103
       Vector u_old  (x.size(), 0.);
 
5104
       Vector Mv_old (x.size(), 0.);
 
5105
       Vector w      (x.size(), 0.);
 
5106
       Vector w_old  (x.size(), 0.);
 
5107
       Vector w_old2 (x.size(), 0.);
 
5108
       for (Size n = 1; n <= max_iter; n++) {
 
5109
         // Lanczos
 
5110
         Mr = A*u;
 
5111
         z = M.solve(Mr);
 
5112
         Real alpha = dot(Mr, u);
 
5113
         Mr = Mr - alpha*Mv - beta*Mv_old;
 
5114
         z  =  z - alpha*u  - beta*u_old;
 
5115
         beta2 = dot(Mr, z);
 
5116
         if (beta2 < 0) {
 
5117
             warning_macro ("pminres: machine precision problem");
 
5118
             tol = norm_r/norm_b;
 
5119
             max_iter = n;
 
5120
             return 2;
 
5121
         }
 
5122
         Real beta_old = beta;
 
5123
         beta = sqrt(beta2);
 
5124
         // QR factorisation
 
5125
         Real c_old2 = c_old;
 
5126
         Real s_old2 = s_old;
 
5127
         c_old = c;
 
5128
         s_old = s;
 
5129
         Real rho0 = c_old*alpha - c_old2*s_old*beta_old;
 
5130
         Real rho2 = s_old*alpha + c_old2*c_old*beta_old;
 
5131
         Real rho1 = sqrt(sqr(rho0) + sqr(beta));
 
5132
         Real rho3 = s_old2 * beta_old;
 
5133
         // Givens rotation
 
5134
         c = rho0 / rho1;
 
5135
         s = beta / rho1;
 
5136
         // update
 
5137
         w_old2 = w_old;
 
5138
         w_old  = w;
 
5139
         w = (u - rho2*w_old - rho3*w_old2)/rho1;
 
5140
         x += c*eta*w;
 
5141
         eta = -s*eta;
 
5142
         Mv_old = Mv;
 
5143
          u_old = u;
 
5144
         Mv = Mr/beta;
 
5145
          u =  z/beta;
 
5146
         // check residue
 
5147
         norm_r *= s;
 
5148
         if (p_cerr) (*p_cerr) << "[" << label << "] " << n << " " << norm_r/norm_b << std::endl;
 
5149
         if (norm_r <= tol*norm_b) {
 
5150
           tol = norm_r/norm_b;
 
5151
           max_iter = n;
 
5152
           return 0;
 
5153
         }
 
5154
       }
 
5155
       tol = norm_r/norm_b;
 
5156
       return 1;
 
5157
     }
 
5158
 
 
5159
 
 
5160
File: rheolef.info,  Node: qmr algorithm,  Up: Algorithms
 
5161
 
 
5162
6.6 `qmr' - quasi-minimal residual algoritm
 
5163
===========================================
 
5164
 
 
5165
(Source file: `skit/lib/qmr.h') 
 
5166
 
 
5167
Synopsis
 
5168
--------
 
5169
 
 
5170
             template <class Matrix, class Vector, class Preconditioner1,
 
5171
                 class Preconditioner2, class Real>
 
5172
             int qmr (const Matrix &A, Vector &x, const Vector &b,
 
5173
                 const Preconditioner1 &M1, const Preconditioner2 &M2,
 
5174
                 int &max_iter, Real &tol);
 
5175
 
 
5176
Example
 
5177
-------
 
5178
 
 
5179
The simplest call to 'qmr' has the folling form:
 
5180
             int status = qmr(a, x, b, EYE, EYE, 100, 1e-7);
 
5181
 
 
5182
Description
 
5183
-----------
 
5184
 
 
5185
`qmr' solves the unsymmetric linear system Ax = b   using the the
 
5186
quasi-minimal residual method.
 
5187
 
 
5188
The return value indicates convergence within max_iter (input)
 
5189
iterations (0), or no convergence within max_iter iterations (1).
 
5190
Upon successful return, output arguments have the following values:
 
5191
`x'
 
5192
     approximate solution to Ax = b
 
5193
 
 
5194
`max_iter'
 
5195
     the number of iterations performed before the tolerance was reached
 
5196
 
 
5197
`tol'
 
5198
     the residual after the final iteration
 
5199
 
 
5200
A return value of 1 indicates that the method did not reach the
 
5201
specified convergence tolerance in the maximum numbefr of iterations.
 
5202
A return value of 2 indicates that a breackdown associated with `rho'
 
5203
occurred.    A return value of 3 indicates that a breackdown associated
 
5204
with `beta' occurred.    A return value of 4 indicates that a
 
5205
breackdown associated with `gamma' occurred.    A return value of 5
 
5206
indicates that a breackdown associated with `delta' occurred.    A
 
5207
return value of 6 indicates that a breackdown associated with `epsilon'
 
5208
occurred.    A return value of 7 indicates that a breackdown associated
 
5209
with `xi' occurred.
 
5210
 
 
5211
Note
 
5212
----
 
5213
 
 
5214
`qmr' is an iterative template routine.
 
5215
 
 
5216
`qmr' follows the algorithm described on p. 24 in
 
5217
 
 
5218
             Templates for the Solution of Linear Systems: Building
 
5219
     Blocks for Iterative Methods,         2nd Edition,         R.
 
5220
     Barrett, M. Berry, T. F. Chan, J. Demmel, J. Donato, J. Dongarra,
 
5221
     V. Eijkhout,         R. Pozo, C. Romine, H. Van der Vorst,
 
5222
     SIAM, 1994,         `ftp.netlib.org/templates/templates.ps'.
 
5223
 
 
5224
The present implementation is inspired from `IML++ 1.2' iterative
 
5225
method library,   `http://math.nist.gov/iml++'.
 
5226
 
 
5227
 
 
5228
File: rheolef.info,  Node: pcg algorithm,  Up: Algorithms
 
5229
 
 
5230
6.7 `pcg' - conjugate gradient algorithm.
 
5231
=========================================
 
5232
 
 
5233
(Source file: `skit/lib/pcg.h') 
 
5234
 
 
5235
Synopsis
 
5236
--------
 
5237
 
 
5238
         template <class Matrix, class Vector, class Preconditioner, class Real>
 
5239
         int pcg (const Matrix &A, Vector &x, const Vector &b,
 
5240
           const Preconditioner &M, int &max_iter, Real &tol, std::ostream *p_cerr=0);
 
5241
 
 
5242
Example
 
5243
-------
 
5244
 
 
5245
The simplest call to 'pcg' has the folling form:
 
5246
         size_t max_iter = 100;
 
5247
         double tol = 1e-7;
 
5248
         int status = pcg(a, x, b, EYE, max_iter, tol, &cerr);
 
5249
 
 
5250
Description
 
5251
-----------
 
5252
 
 
5253
`pcg' solves the symmetric positive definite linear   system Ax=b using
 
5254
the Conjugate Gradient method.
 
5255
 
 
5256
The return value indicates convergence within max_iter (input)
 
5257
iterations (0), or no convergence within max_iter iterations (1).
 
5258
Upon successful return, output arguments have the following values:
 
5259
`x'
 
5260
     approximate solution to Ax = b
 
5261
 
 
5262
`max_iter'
 
5263
     the number of iterations performed before the tolerance was reached
 
5264
 
 
5265
`tol'
 
5266
     the residual after the final iteration
 
5267
 
 
5268
Note
 
5269
----
 
5270
 
 
5271
`pcg' is an iterative template routine.
 
5272
 
 
5273
`pcg' follows the algorithm described on p. 15 in
 
5274
 
 
5275
             Templates for the Solution of Linear Systems: Building
 
5276
     Blocks for Iterative Methods,         2nd Edition,         R.
 
5277
     Barrett, M. Berry, T. F. Chan, J. Demmel, J. Donato, J. Dongarra,
 
5278
     V. Eijkhout,         R. Pozo, C. Romine, H. Van der Vorst,
 
5279
     SIAM, 1994,         `ftp.netlib.org/templates/templates.ps'.
 
5280
 
 
5281
The present implementation is inspired from   `IML++ 1.2' iterative
 
5282
method library,   `http://math.nist.gov/iml++'.
 
5283
 
 
5284
Implementation
 
5285
--------------
 
5286
 
 
5287
     template < class Matrix, class Vector, class Preconditioner, class Real, class Size>
 
5288
     int pcg(const Matrix &A, Vector &x, const Vector &Mb, const Preconditioner &M,
 
5289
             Size &max_iter, Real &tol, std::ostream *p_cerr = 0, std::string label = "cg")
 
5290
     {
 
5291
         Vector b = M.solve(Mb);
 
5292
         Real norm2_b = dot(Mb,b);
 
5293
         if (norm2_b == Real(0)) norm2_b = 1;
 
5294
         Vector Mr = Mb - A*x;
 
5295
         Real  norm2_r = 0;
 
5296
         if (p_cerr) (*p_cerr) << "[" << label << "] #iteration residue" << std::endl;
 
5297
         Vector p;
 
5298
         for (Size n = 0; n <= max_iter; n++) {
 
5299
             Vector r = M.solve(Mr);
 
5300
             Real prev_norm2_r = norm2_r;
 
5301
             norm2_r = dot(Mr, r);
 
5302
             if (p_cerr) (*p_cerr) << "[" << label << "] " << n << " " << ::sqrt(norm2_r/norm2_b) << std::endl;
 
5303
             if (norm2_r <= sqr(tol)*norm2_b) {
 
5304
               tol = ::sqrt(norm2_r/norm2_b);
 
5305
               max_iter = n;
 
5306
               return 0;
 
5307
             }
 
5308
             if (n == 0) {
 
5309
               p = r;
 
5310
             } else {
 
5311
               Real beta = norm2_r/prev_norm2_r;
 
5312
               p = r + beta*p;
 
5313
             }
 
5314
             Vector Mq = A*p;
 
5315
             Real alpha = norm2_r/dot(Mq, p);
 
5316
             x  += alpha*p;
 
5317
             Mr -= alpha*Mq;
 
5318
         }
 
5319
         tol = ::sqrt(norm2_r/norm2_b);
 
5320
         return 1;
 
5321
     }
 
5322
 
 
5323
 
 
5324
File: rheolef.info,  Node: bicgstab algorithm,  Up: Algorithms
 
5325
 
 
5326
6.8 `bicgstab' - bi-conjugate gradient stabilized method
 
5327
========================================================
 
5328
 
 
5329
(Source file: `skit/lib/bicgstab.h') 
 
5330
 
 
5331
Synopsis
 
5332
--------
 
5333
 
 
5334
         int bicgstab (const Matrix &A, Vector &x, const Vector &b,
 
5335
                        const Preconditioner &M, int &max_iter, Real &tol);
 
5336
 
 
5337
Example
 
5338
-------
 
5339
 
 
5340
The simplest call to 'bicgstab' has the folling form:
 
5341
         int status = bicgstab(a, x, b, EYE, 100, 1e-7);
 
5342
 
 
5343
Description
 
5344
-----------
 
5345
 
 
5346
`bicgstab' solves the unsymmetric linear system Ax = b  using the
 
5347
preconditioned bi-conjugate gradient stabilized method
 
5348
 
 
5349
The return value indicates convergence within max_iter (input)
 
5350
iterations (0), or no convergence within max_iter iterations (1).
 
5351
Upon successful return, output arguments have the following values:
 
5352
`x'
 
5353
     approximate solution to Ax = b
 
5354
 
 
5355
`max_iter'
 
5356
     the number of iterations performed before the tolerance was reached
 
5357
 
 
5358
`tol'
 
5359
     the residual after the final iteration
 
5360
 
 
5361
Note
 
5362
----
 
5363
 
 
5364
`bicgstab' is an iterative template routine.
 
5365
 
 
5366
`bicgstab' follows the algorithm described on p. 24 in
 
5367
 
 
5368
             Templates for the Solution of Linear Systems: Building
 
5369
     Blocks for Iterative Methods,         2nd Edition,         R.
 
5370
     Barrett, M. Berry, T. F. Chan, J. Demmel, J. Donato, J. Dongarra,
 
5371
     V. Eijkhout,         R. Pozo, C. Romine, H. Van der Vorst,
 
5372
     SIAM, 1994,         `ftp.netlib.org/templates/templates.ps'.
 
5373
 
 
5374
The present implementation is inspired from `IML++ 1.2' iterative
 
5375
method library,   `http://math.nist.gov/iml++'.
 
5376
 
 
5377
 
 
5378
File: rheolef.info,  Node: puzawa algorithm,  Up: Algorithms
 
5379
 
 
5380
6.9 `puzawa' - Uzawa algorithm.
 
5381
===============================
 
5382
 
 
5383
(Source file: `skit/lib/puzawa.h') 
 
5384
 
 
5385
Synopsis
 
5386
--------
 
5387
 
 
5388
         template <class Matrix, class Vector, class Preconditioner, class Real>
 
5389
         int puzawa (const Matrix &A, Vector &x, const Vector &b, const Preconditioner &M,
 
5390
           int &max_iter, Real &tol, const Real& rho, std::ostream *p_cerr=0);
 
5391
 
 
5392
Example
 
5393
-------
 
5394
 
 
5395
The simplest call to 'puzawa' has the folling form:
 
5396
         size_t max_iter = 100;
 
5397
         double tol = 1e-7;
 
5398
         int status = puzawa(A, x, b, EYE, max_iter, tol, 1.0, &cerr);
 
5399
 
 
5400
Description
 
5401
-----------
 
5402
 
 
5403
`puzawa' solves the linear   system A*x=b using the Uzawa method. The
 
5404
Uzawa method is a   descent method in the direction opposite to the
 
5405
gradient,   with a constant step length 'rho'. The convergence is
 
5406
assured   when the step length 'rho' is small enough.    If matrix A is
 
5407
symmetric positive definite, please uses 'pcg' that   computes
 
5408
automatically the optimal descdnt step length at   each iteration.
 
5409
 
 
5410
The return value indicates convergence within max_iter (input)
 
5411
iterations (0), or no convergence within max_iter iterations (1).
 
5412
Upon successful return, output arguments have the following values:
 
5413
`x'
 
5414
     approximate solution to Ax = b
 
5415
 
 
5416
`max_iter'
 
5417
     the number of iterations performed before the tolerance was reached
 
5418
 
 
5419
`tol'
 
5420
     the residual after the final iteration
 
5421
 
 
5422
Implementation
 
5423
--------------
 
5424
 
 
5425
     template < class Matrix, class Vector, class Preconditioner, class Real, class Size>
 
5426
     int puzawa(const Matrix &A, Vector &x, const Vector &Mb, const Preconditioner &M,
 
5427
         Size &max_iter, Real &tol, const Real& rho,
 
5428
         std::ostream *p_cerr, std::string label)
 
5429
     {
 
5430
         Vector b = M.solve(Mb);
 
5431
         Real norm2_b = dot(Mb,b);
 
5432
         Real norm2_r = norm2_b;
 
5433
         if (norm2_b == Real(0)) norm2_b = 1;
 
5434
         if (p_cerr) (*p_cerr) << "[" << label << "] #iteration residue" << std::endl;
 
5435
         for (Size n = 0; n <= max_iter; n++) {
 
5436
             Vector Mr = A*x - Mb;
 
5437
             Vector r = M.solve(Mr);
 
5438
             norm2_r = dot(Mr, r);
 
5439
             if (p_cerr) (*p_cerr) << "[" << label << "] " << n << " " << sqrt(norm2_r/norm2_b) << std::endl;
 
5440
             if (norm2_r <= sqr(tol)*norm2_b) {
 
5441
               tol = sqrt(norm2_r/norm2_b);
 
5442
               max_iter = n;
 
5443
               return 0;
 
5444
             }
 
5445
             x  -= rho*r;
 
5446
         }
 
5447
         tol = sqrt(norm2_r/norm2_b);
 
5448
         return 1;
 
5449
     }
 
5450
 
 
5451
 
 
5452
File: rheolef.info,  Node: gmres algorithm,  Up: Algorithms
 
5453
 
 
5454
6.10 `gmres' - generalized minimum residual method
 
5455
==================================================
 
5456
 
 
5457
(Source file: `skit/lib/gmres.h') 
 
5458
 
 
5459
Synopsis
 
5460
--------
 
5461
 
 
5462
             template <class Operator, class Vector, class Preconditioner,
 
5463
                 class Matrix, class Real, class Int>
 
5464
             int gmres (const Operator &A, Vector &x, const Vector &b,
 
5465
                 const Preconditioner &M, Matrix &H, Int m, Int &max_iter, Real &tol);
 
5466
 
 
5467
Example
 
5468
-------
 
5469
 
 
5470
The simplest call to `gmres' has the folling form:
 
5471
             int m = 6;
 
5472
             dns H(m+1,m+1);
 
5473
             int status = gmres(a, x, b, EYE, H, m, 100, 1e-7);
 
5474
 
 
5475
Description
 
5476
-----------
 
5477
 
 
5478
`gmres' solves the unsymmetric linear system Ax = b   using the
 
5479
generalized minimum residual method.
 
5480
 
 
5481
The return value indicates convergence within max_iter (input)
 
5482
iterations (0), or no convergence within max_iter iterations (1).
 
5483
Upon successful return, output arguments have the following values:
 
5484
`x'
 
5485
     approximate solution to Ax = b
 
5486
 
 
5487
`max_iter'
 
5488
     the number of iterations performed before the tolerance was reached
 
5489
 
 
5490
`tol'
 
5491
     the residual after the final iteration
 
5492
  In addition, M specifies a preconditioner, H specifies a matrix   to
 
5493
hold the coefficients of the upper Hessenberg matrix constructed   by
 
5494
the `gmres' iterations, `m' specifies the number of iterations   for
 
5495
each restart.
 
5496
 
 
5497
`gmres' requires two matrices as input, A and H.    The matrix A, which
 
5498
will typically be a sparse matrix) corresponds   to the matrix in the
 
5499
linear system Ax=b.    The matrix H, which will be typically a dense
 
5500
matrix, corresponds   to the upper Hessenberg matrix H that is
 
5501
constructed during the   `gmres' iterations. Within `gmres', H is used
 
5502
in a different way   than A, so its class must supply different
 
5503
functionality.    That is, A is only accessed though its matrix-vector
 
5504
and   transpose-matrix-vector multiplication functions.    On the other
 
5505
hand, `gmres' solves a dense upper triangular linear   system of
 
5506
equations on H. Therefore, the class   to which H belongs must provide
 
5507
H(i,j) operator for element acess.
 
5508
 
 
5509
Note
 
5510
----
 
5511
 
 
5512
It is important to remember that we use the convention that indices
 
5513
are 0-based. That is H(0,0) is the first component of the   matrix H.
 
5514
Also, the type of the matrix must be compatible with the   type of
 
5515
single vector entry. That is, operations such as   H(i,j)*x(j) must be
 
5516
able to be carried out.
 
5517
 
 
5518
`gmres' is an iterative template routine.
 
5519
 
 
5520
`gmres' follows the algorithm described on p. 20 in
 
5521
 
 
5522
             Templates for the Solution of Linear Systems: Building
 
5523
     Blocks for Iterative Methods,         2nd Edition,         R.
 
5524
     Barrett, M. Berry, T. F. Chan, J. Demmel, J. Donato, J. Dongarra,
 
5525
     V. Eijkhout,         R. Pozo, C. Romine, H. Van der Vorst,
 
5526
     SIAM, 1994,         `ftp.netlib.org/templates/templates.ps'.
 
5527
 
 
5528
The present implementation is inspired from `IML++ 1.2' iterative
 
5529
method library,   `http://math.nist.gov/iml++'.
 
5530
 
 
5531
Implementation
 
5532
--------------
 
5533
 
 
5534
     template < class Matrix, class Vector, class Int >
 
5535
     void
 
5536
     Update(Vector &x, Int k, Matrix &h, Vector &s, Vector v[])
 
5537
     {
 
5538
       Vector y(s);
 
5539
 
 
5540
       // Backsolve:
 
5541
       for (Int i = k; i >= 0; i--) {
 
5542
         y(i) /= h(i,i);
 
5543
         for (Int j = i - 1; j >= 0; j--)
 
5544
           y(j) -= h(j,i) * y(i);
 
5545
       }
 
5546
 
 
5547
       for (Int j = 0; j <= k; j++)
 
5548
         x += v[j] * y(j);
 
5549
     }
 
5550
 
 
5551
     #ifdef TO_CLEAN
 
5552
     template < class Real >
 
5553
     Real
 
5554
     abs(Real x)
 
5555
     {
 
5556
       return (x > Real(0) ? x : -x);
 
5557
     }
 
5558
     #endif // TO_CLEAN
 
5559
 
 
5560
 
 
5561
     template < class Operator, class Vector, class Preconditioner,
 
5562
                class Matrix, class Real, class Int >
 
5563
     int
 
5564
     gmres(const Operator &A, Vector &x, const Vector &b,
 
5565
           const Preconditioner &M, Matrix &H, const Int &m, Int &max_iter,
 
5566
           Real &tol)
 
5567
     {
 
5568
       Real resid;
 
5569
       Int i, j = 1, k;
 
5570
       Vector s(m+1), cs(m+1), sn(m+1), w;
 
5571
 
 
5572
       Real normb = norm(M.solve(b));
 
5573
       Vector r = M.solve(b - A * x);
 
5574
       Real beta = norm(r);
 
5575
 
 
5576
       if (normb == Real(0))
 
5577
         normb = 1;
 
5578
 
 
5579
       if ((resid = norm(r) / normb) <= tol) {
 
5580
         tol = resid;
 
5581
         max_iter = 0;
 
5582
         return 0;
 
5583
       }
 
5584
 
 
5585
       Vector *v = new Vector[m+1];
 
5586
 
 
5587
       while (j <= max_iter) {
 
5588
         v[0] = r * (1.0 / beta);    // ??? r / beta
 
5589
         s = 0.0;
 
5590
         s(0) = beta;
 
5591
 
 
5592
         for (i = 0; i < m && j <= max_iter; i++, j++) {
 
5593
           w = M.solve(A * v[i]);
 
5594
           for (k = 0; k <= i; k++) {
 
5595
             H(k, i) = dot(w, v[k]);
 
5596
             w -= H(k, i) * v[k];
 
5597
           }
 
5598
           H(i+1, i) = norm(w);
 
5599
           v[i+1] = w * (1.0 / H(i+1, i)); // ??? w / H(i+1, i)
 
5600
 
 
5601
           for (k = 0; k < i; k++)
 
5602
             ApplyPlaneRotation(H(k,i), H(k+1,i), cs(k), sn(k));
 
5603
 
 
5604
           GeneratePlaneRotation(H(i,i), H(i+1,i), cs(i), sn(i));
 
5605
           ApplyPlaneRotation(H(i,i), H(i+1,i), cs(i), sn(i));
 
5606
           ApplyPlaneRotation(s(i), s(i+1), cs(i), sn(i));
 
5607
 
 
5608
           if ((resid = abs(s(i+1)) / normb) < tol) {
 
5609
             Update(x, i, H, s, v);
 
5610
             tol = resid;
 
5611
             max_iter = j;
 
5612
             delete [] v;
 
5613
             return 0;
 
5614
           }
 
5615
         }
 
5616
         Update(x, m - 1, H, s, v);
 
5617
         r = M.solve(b - A * x);
 
5618
         beta = norm(r);
 
5619
         if ((resid = beta / normb) < tol) {
 
5620
           tol = resid;
 
5621
           max_iter = j;
 
5622
           delete [] v;
 
5623
           return 0;
 
5624
         }
 
5625
       }
 
5626
 
 
5627
       tol = resid;
 
5628
       delete [] v;
 
5629
       return 1;
 
5630
     }
 
5631
     template<class Real>
 
5632
     void GeneratePlaneRotation(Real &dx, Real &dy, Real &cs, Real &sn)
 
5633
     {
 
5634
       if (dy == Real(0)) {
 
5635
         cs = 1.0;
 
5636
         sn = 0.0;
 
5637
       } else if (abs(dy) > abs(dx)) {
 
5638
         Real temp = dx / dy;
 
5639
         sn = 1.0 / ::sqrt( 1.0 + temp*temp );
 
5640
         cs = temp * sn;
 
5641
       } else {
 
5642
         Real temp = dy / dx;
 
5643
         cs = 1.0 / ::sqrt( 1.0 + temp*temp );
 
5644
         sn = temp * cs;
 
5645
       }
 
5646
     }
 
5647
     template<class Real>
 
5648
     void ApplyPlaneRotation(Real &dx, Real &dy, Real &cs, Real &sn)
 
5649
     {
 
5650
       Real temp  =  cs * dx + sn * dy;
 
5651
       dy = -sn * dx + cs * dy;
 
5652
       dx = temp;
 
5653
     }
 
5654
 
 
5655
 
 
5656
File: rheolef.info,  Node: Forms,  Up: Top
 
5657
 
 
5658
7 Forms
 
5659
*******
 
5660
 
 
5661
* Menu:
 
5662
 
 
5663
* convect form::
 
5664
* d_dx form::
 
5665
* 2W form::
 
5666
* curl form::
 
5667
* 2D_D form::
 
5668
* d_ds form::
 
5669
* d2_ds2 form::
 
5670
* div form::
 
5671
* mass form::
 
5672
* grad form::
 
5673
* inv_mass form::
 
5674
* grad_grad form::
 
5675
* div_div form::
 
5676
* 2D form::
 
5677
 
 
5678
 
 
5679
File: rheolef.info,  Node: convect form,  Up: Forms
 
5680
 
 
5681
7.1 `convect' - discontinuous Galerkin
 
5682
======================================
 
5683
 
 
5684
(Source file: `nfem/form_element/convect.h') 
 
5685
 
 
5686
Synopsis
 
5687
--------
 
5688
 
 
5689
             form(const space& V, const space& V, "convect", uh);
 
5690
 
 
5691
Description
 
5692
-----------
 
5693
 
 
5694
Assembly the matrix associated to the     discontinuous Galerkin method
 
5695
on the finite element space V.
 
5696
                      /
 
5697
                      |
 
5698
             c(u,v) = |  a.grad(u) v dx + skips...
 
5699
                      |
 
5700
                      / Omega
 
5701
    for all u,v in V, where the vector field a is given.      The V
 
5702
space may `P1d'     finite element spaces for building the form.
 
5703
 
 
5704
 
 
5705
File: rheolef.info,  Node: d_dx form,  Up: Forms
 
5706
 
 
5707
7.2 `d_dx'I - derivatives
 
5708
=========================
 
5709
 
 
5710
(Source file: `nfem/form_element/d_dx0.h') 
 
5711
 
 
5712
Synopsis
 
5713
--------
 
5714
 
 
5715
             form (const space V, const space& M, "d_dx0");
 
5716
             form (const space V, const space& M, "d_dx1");
 
5717
             form (const space V, const space& M, "d_dx2");
 
5718
 
 
5719
Description
 
5720
-----------
 
5721
 
 
5722
Assembly the form associated to a   derivative operator from the `V'
 
5723
finite element space   to the `M' one:
 
5724
                      /
 
5725
                      |  d u
 
5726
           b_i(u,q) = |  ----  q  dx,  i = 0,1,2
 
5727
                      |  d xi
 
5728
                      / Omega
 
5729
  In the axisymetric `rz' case, the form is defined by
 
5730
                      /
 
5731
                      |  d u
 
5732
           b_0(u,q) = |  ---  q  r dr dz
 
5733
                      |  d r
 
5734
                      / Omega
 
5735
  If the V space is a `P1' (resp. `P2')   finite element space, the M
 
5736
space may be   a `P0' (resp. `P1d') one.
 
5737
 
 
5738
Example
 
5739
-------
 
5740
 
 
5741
The following piece of code build the Laplacian form   associated to
 
5742
the P1 approximation:
 
5743
             geo omega ("square");
 
5744
             space V (omega, "P1");
 
5745
             space M (omega, "P0");
 
5746
             form  b (V, M, "d_dx0");
 
5747
 
 
5748
Limitations
 
5749
-----------
 
5750
 
 
5751
Only edge, triangular and tetrahedal finite element meshes are yet
 
5752
supported.
 
5753
 
 
5754
 
 
5755
File: rheolef.info,  Node: 2W form,  Up: Forms
 
5756
 
 
5757
7.3 `2W' - vorticity tensor
 
5758
===========================
 
5759
 
 
5760
(Source file: `nfem/form_element/2W.h') 
 
5761
 
 
5762
Synopsis
 
5763
--------
 
5764
 
 
5765
             form (const space V, const space& T, "2W");
 
5766
 
 
5767
Description
 
5768
-----------
 
5769
 
 
5770
Assembly the form associated to the vorticity   tensor, i.e. the
 
5771
unsymmetric part of the gradient of a   vector field.    These
 
5772
derivative are usefull in fluid mechanic.
 
5773
                      /
 
5774
                      |
 
5775
           b(u,tau) = | 2 W(u) : tau dx,
 
5776
                      |
 
5777
                      / Omega
 
5778
  where
 
5779
          2 D(u) = grad u - (grad u)^T
 
5780
  If the V space is a vector-valued `P1' (resp. `P2')   finite element
 
5781
space, the T space may be   a tensor-valued `P0' (resp. `P1d') one.
 
5782
 
 
5783
Example
 
5784
-------
 
5785
 
 
5786
The following piece of code build the Laplacian form   associated to
 
5787
the P1 approximation:
 
5788
             geo omega ("square");
 
5789
             space V (omega, "P1", "vector");
 
5790
             space T (omega, "P0", "tensor");
 
5791
             form  b (V, T, "2W");
 
5792
 
 
5793
 
 
5794
File: rheolef.info,  Node: curl form,  Up: Forms
 
5795
 
 
5796
7.4 `curl' - curl operator
 
5797
==========================
 
5798
 
 
5799
(Source file: `nfem/form_element/curl.h') 
 
5800
 
 
5801
Synopsis
 
5802
--------
 
5803
 
 
5804
           form(const space V, const space& M, "curl");
 
5805
 
 
5806
Description
 
5807
-----------
 
5808
 
 
5809
Assembly the form associated to the curl operator on finite element
 
5810
space.      In three dimensions, both V and M are vector-valued:
 
5811
                    /
 
5812
                    |
 
5813
           b(u,q) = |  curl(u).q dx
 
5814
                    |
 
5815
                    / Omega
 
5816
    In two dimensions, only V is vector-valued.      The V space may be
 
5817
a either     `P2' finite element space,     while the M space may be
 
5818
`P1d'.      See also *note form class:: and *note space class::.
 
5819
 
 
5820
Example
 
5821
-------
 
5822
 
 
5823
The following piece of code build the divergence form     associated to
 
5824
the `P2' approximation for a three dimensional     geometry:
 
5825
             geo omega("cube");
 
5826
             space V(omega, "P2",  "vector");
 
5827
             space M(omega, "P1d", "vector");
 
5828
             form b(V, M, "curl");
 
5829
    while this code becomes in two dimension:
 
5830
             geo omega("square");
 
5831
             space V(omega, "P2",  "vector");
 
5832
             space M(omega, "P1d");
 
5833
             form b(V, M, "curl");
 
5834
 
 
5835
 
 
5836
File: rheolef.info,  Node: 2D_D form,  Up: Forms
 
5837
 
 
5838
7.5 `2D_D' - -div 2D operator
 
5839
=============================
 
5840
 
 
5841
(Source file: `nfem/form_element/2D_D.h') 
 
5842
 
 
5843
Synopsis
 
5844
--------
 
5845
 
 
5846
             form (const space V, const space& V, "2D_D");
 
5847
 
 
5848
Description
 
5849
-----------
 
5850
 
 
5851
  Assembly the form associated to the `div(2D(.))' components of the
 
5852
operator on the finite element space `V':
 
5853
                      /
 
5854
                      |
 
5855
             a(u,v) = |  2 Dij(ui) Dij(vj) dx
 
5856
                      |
 
5857
                      / Omega
 
5858
  where
 
5859
                     1 ( d ui   d uj )
 
5860
           Dij(u) =  - ( ---- + ---- )
 
5861
                     2 ( d xj   d xi )
 
5862
  This form is usefull when considering elasticity or Stokes   problems.
 
5863
 
 
5864
Example
 
5865
-------
 
5866
 
 
5867
Here is an example of the vector-valued form:
 
5868
             geo omega ("square");
 
5869
             space V (omega, "P2", "vector");
 
5870
             form  a (V, V, "2D_D");
 
5871
  Note that a factor two is here applied to the form.    This factor is
 
5872
commonly used in practice.
 
5873
 
 
5874
 
 
5875
File: rheolef.info,  Node: d_ds form,  Up: Forms
 
5876
 
 
5877
7.6 `d_ds' - Curvilinear derivative
 
5878
===================================
 
5879
 
 
5880
(Source file: `nfem/form_element/d_ds.h') 
 
5881
 
 
5882
Synopsis
 
5883
--------
 
5884
 
 
5885
             form(const space& V, const space& W, "d_ds");
 
5886
 
 
5887
Description
 
5888
-----------
 
5889
 
 
5890
Assembly the matrix associated to the following integral:
 
5891
                      /
 
5892
                      |
 
5893
             m(u,v) = | du/ds v ds
 
5894
                      |
 
5895
                      / Gamma
 
5896
 
 
5897
 
 
5898
File: rheolef.info,  Node: d2_ds2 form,  Up: Forms
 
5899
 
 
5900
7.7 `d2_ds2' - Curvilinear second derivative
 
5901
============================================
 
5902
 
 
5903
(Source file: `nfem/form_element/d2_ds2.h') 
 
5904
 
 
5905
Synopsis
 
5906
--------
 
5907
 
 
5908
             form(const space& V, const space& W, "d2_ds2");
 
5909
 
 
5910
Description
 
5911
-----------
 
5912
 
 
5913
Assembly the matrix associated to the following integral:
 
5914
                      /
 
5915
                      |
 
5916
             m(u,v) = | d^2u/ds^2 v ds
 
5917
                      |
 
5918
                      / Gamma
 
5919
 
 
5920
 
 
5921
File: rheolef.info,  Node: div form,  Up: Forms
 
5922
 
 
5923
7.8 `div' - divergence operator
 
5924
===============================
 
5925
 
 
5926
(Source file: `nfem/form_element/div.h') 
 
5927
 
 
5928
Synopsis
 
5929
--------
 
5930
 
 
5931
           form(const space V, const space& M, "div");
 
5932
 
 
5933
Description
 
5934
-----------
 
5935
 
 
5936
Assembly the form associated to the     divergence operator on a finite
 
5937
element space `V':
 
5938
                    /
 
5939
                    |
 
5940
           b(u,q) = |  div(u) q dx
 
5941
                    |
 
5942
                    / Omega
 
5943
    The V space may be a either     `P1' or `P2' finite element space,
 
5944
  while the M space may be `P0' or `P1d' respectively.      See also
 
5945
*note form class:: and *note space class::.
 
5946
 
 
5947
Example
 
5948
-------
 
5949
 
 
5950
The following piece of code build the divergence form     associated to
 
5951
the `P1' approximation:
 
5952
             geo omega("square");
 
5953
             space V(omega, "P1", "vector");
 
5954
             space M(omega, "P0");
 
5955
             form b(V, M, "div");
 
5956
 
 
5957
 
 
5958
File: rheolef.info,  Node: mass form,  Up: Forms
 
5959
 
 
5960
7.9 `mass' - L2 scalar product
 
5961
==============================
 
5962
 
 
5963
(Source file: `nfem/form_element/mass.h') 
 
5964
 
 
5965
Synopsis
 
5966
--------
 
5967
 
 
5968
             form(const space& V, const space& V, "mass");
 
5969
             form(const space& M, const space& V, "mass");
 
5970
             form (const space& V, const space& V, "mass", const domain& gamma);
 
5971
             form_diag(const space& V, "mass");
 
5972
 
 
5973
Description
 
5974
-----------
 
5975
 
 
5976
Assembly the matrix associated to the     L2 scalar product of the
 
5977
finite element space V.
 
5978
                      /
 
5979
                      |
 
5980
             m(u,v) = | u v dx
 
5981
                      |
 
5982
                      / Omega
 
5983
 
 
5984
The V space may be either a     `P0', `P1', `P2',     `bubble', `P1d'
 
5985
 and     `P1d'     finite     element spaces for building a form
 
5986
*note form class::.
 
5987
 
 
5988
The use of quadrature formulae is sometime usefull     for building
 
5989
diagonal matrix.      These approximate matrix are eay to invert.
 
5990
This procedure is available     for `P0' and `P1' approximations.
 
5991
 
 
5992
Notes that when dealing with discontinuous finite     element space,
 
5993
i.e.      `P0' and `P1d', the corresponding     mass matrix is block
 
5994
diagonal, and the     `inv_mass' form may be usefull.
 
5995
 
 
5996
When two different space M and V are supplied,     assembly the matrix
 
5997
associated to the     projection operator from one     finite element
 
5998
space M to space V.
 
5999
                      /
 
6000
                      |
 
6001
             m(q,v) = | q v dx
 
6002
                      |
 
6003
                      / Omega
 
6004
  for all q in M and v in V.
 
6005
 
 
6006
This form is usefull for instance to convert discontinuous gradient
 
6007
components to a continuous approximation.    The transpose operator may
 
6008
also be usefull to performs   the opposite operation.
 
6009
 
 
6010
The following $V$ and $M$ space approximation   combinations are
 
6011
supported for the `mass' form:     P0-P1,     P0-P1d,     P1d-P2,
 
6012
P1-P1d     and     P1-P2.
 
6013
 
 
6014
Example
 
6015
-------
 
6016
 
 
6017
The following piece of code build the mass matrix     associated to the
 
6018
P1 approximation:
 
6019
             geo g("square");
 
6020
             space V(g, "P1");
 
6021
             form m(V, V, "mass");
 
6022
    The use of lumped mass form write also:
 
6023
             form_diag md(V, "mass");
 
6024
  The following piece of code build the projection form:
 
6025
             geo g("square");
 
6026
             space V(g, "P1");
 
6027
             space M(g, "P0");
 
6028
             form m(M, V, "mass");
 
6029
 
 
6030
Scalar product on the boundary
 
6031
------------------------------
 
6032
 
 
6033
Assembly the matrix associated to the     L2 scalar product related to
 
6034
a boundary domain     of a mesh and a specified polynomial
 
6035
approximation.      These forms are usefull when defining
 
6036
non-homogeneous Neumann or     Robin boundary conditions.
 
6037
 
 
6038
Let W be a space of functions defined on Gamma, a subset of the
 
6039
boundary of the whole domain Omega.
 
6040
                      /
 
6041
                      |
 
6042
             m(u,v) = | u v dx
 
6043
                      |
 
6044
                      / Gamma
 
6045
    for all u, v in W.      Let V a space of functions defined on Omega
 
6046
   and gamma the trace operator from V into W.      For all u in W and
 
6047
v in V:
 
6048
                       /
 
6049
                       |
 
6050
             mb(u,v) = | u gamma(v) dx
 
6051
                       |
 
6052
                       / Gamma
 
6053
    For all u and v in V:
 
6054
                       /
 
6055
                       |
 
6056
             ab(u,v) = | gamma(u) gamma(v) dx
 
6057
                       |
 
6058
                       / Gamma
 
6059
 
 
6060
Example
 
6061
-------
 
6062
 
 
6063
The following piece of code build forms for the P1 approximation,
 
6064
assuming that the mesh contains a domain named `boundary':
 
6065
             geo omega ("square");
 
6066
             domain gamma = omega.boundary();
 
6067
             space V  (omega, "P1");
 
6068
             space W  (omega, gamma, "P1");
 
6069
             form  m  (W, W, "mass");
 
6070
             form  mb (W, V, "mass");
 
6071
             form  ab (V, V, "mass", gamma);
 
6072
 
 
6073
 
 
6074
File: rheolef.info,  Node: grad form,  Up: Forms
 
6075
 
 
6076
7.10 `grad' - gradient operator
 
6077
===============================
 
6078
 
 
6079
(Source file: `nfem/form_element/grad.h') 
 
6080
 
 
6081
Synopsis
 
6082
--------
 
6083
 
 
6084
           form(const space V, const space& M, "grad");
 
6085
 
 
6086
Description
 
6087
-----------
 
6088
 
 
6089
Assembly the form associated to the     gradient operator on a finite
 
6090
element space `V':
 
6091
                     /
 
6092
                     |
 
6093
           b(u, q) = | grad(u).q dx
 
6094
                     |
 
6095
                     / Omega
 
6096
    The V space may be a either     `P1'  or `P2'  finite element space,
 
6097
   while the M space may be `P0'  or `P1d'  respectively.      See also
 
6098
*note form class:: and *note space class::.
 
6099
 
 
6100
Example
 
6101
-------
 
6102
 
 
6103
The following piece of code build the divergence form     associated to
 
6104
the `P1' approximation:
 
6105
             geo omega("square");
 
6106
             space V(omega, "P1");
 
6107
             space M(omega, "P0", "vector");
 
6108
             form b(V, M, "grad");
 
6109
 
 
6110
 
 
6111
File: rheolef.info,  Node: inv_mass form,  Up: Forms
 
6112
 
 
6113
7.11 `inv_mass' - invert of L2 scalar product
 
6114
=============================================
 
6115
 
 
6116
(Source file: `nfem/form_element/inv_mass.h') 
 
6117
 
 
6118
Synopsis
 
6119
--------
 
6120
 
 
6121
             form(const space& V, const space& V, "inv_mass");
 
6122
 
 
6123
Description
 
6124
-----------
 
6125
 
 
6126
Assembly the invert of the matrix associated to the   L2 scalar product
 
6127
of the finite element space V:
 
6128
                      /
 
6129
                      |
 
6130
             m(u,v) = | u v dx
 
6131
                      |
 
6132
                      / Omega
 
6133
  The V space may be either a   `P0' or   `P1d'   discontinuous finite
 
6134
element spaces   *note form class::.
 
6135
 
 
6136
Example
 
6137
-------
 
6138
 
 
6139
The following piece of code build the invert of   the mass matrix
 
6140
associated to the `P1d'  approximation:
 
6141
             geo omega_h ("square");
 
6142
             space Vh (omega_h , "P1d");
 
6143
             form im (Vh, Vh, "inv_mass");
 
6144
 
 
6145
 
 
6146
File: rheolef.info,  Node: grad_grad form,  Up: Forms
 
6147
 
 
6148
7.12 `grad_grad' - -Laplacian operator
 
6149
======================================
 
6150
 
 
6151
(Source file: `nfem/form_element/grad_grad.h') 
 
6152
 
 
6153
Synopsis
 
6154
--------
 
6155
 
 
6156
           form(const space V, const space& V, "grad_grad");
 
6157
 
 
6158
Description
 
6159
-----------
 
6160
 
 
6161
Assembly the form associated to the     Laplacian operator on a finite
 
6162
element space `V':
 
6163
                    /
 
6164
                    |
 
6165
           a(u,v) = |  grad(u).grad(v) dx
 
6166
                    |
 
6167
                    / Omega
 
6168
    The V space may be a either     `P1' , `P2'  or `P1d'  finite
 
6169
element space.      See also *note form class:: and *note space class::.
 
6170
 
 
6171
Example
 
6172
-------
 
6173
 
 
6174
The following piece of code build the Laplacian form     associated to
 
6175
the `P1' approximation:
 
6176
             geo g("square");
 
6177
             space V(g, "P1");
 
6178
             form a(V, V, "grad_grad");
 
6179
 
 
6180
 
 
6181
File: rheolef.info,  Node: div_div form,  Up: Forms
 
6182
 
 
6183
7.13 `div_div' - -grad div operator
 
6184
===================================
 
6185
 
 
6186
(Source file: `nfem/form_element/div_div.h') 
 
6187
 
 
6188
Synopsis
 
6189
--------
 
6190
 
 
6191
             form (const space V, const space& V, "div_div");
 
6192
 
 
6193
Description
 
6194
-----------
 
6195
 
 
6196
Assembly the form associated to the `grad(div(.))'   operator on the
 
6197
finite element space `V':
 
6198
                      /
 
6199
                      |
 
6200
             a(u,v) = | div(u) div(v) dx
 
6201
                      |
 
6202
                      / Omega
 
6203
  This form is usefull when considering elasticity problem.
 
6204
 
 
6205
Example
 
6206
-------
 
6207
 
 
6208
Here is an example of the vector-valued form:
 
6209
             geo omega ("square");
 
6210
             space V (omega, "P2", "vector");
 
6211
             form  a (V, V, "div_div");
 
6212
 
 
6213
 
 
6214
File: rheolef.info,  Node: 2D form,  Up: Forms
 
6215
 
 
6216
7.14 `2D' - rate of deformation tensor
 
6217
======================================
 
6218
 
 
6219
(Source file: `nfem/form_element/2D.h') 
 
6220
 
 
6221
Synopsis
 
6222
--------
 
6223
 
 
6224
             form (const space V, const space& T, "2D");
 
6225
 
 
6226
Description
 
6227
-----------
 
6228
 
 
6229
Assembly the form associated to the rate of deformation   tensor, i.e.
 
6230
the symmetric part of the gradient of a   vector field.    These
 
6231
derivative are usefull in fluid mechanic and   elasticity.
 
6232
                      /
 
6233
                      |
 
6234
           b(u,tau) = | 2 D(u) : tau dx,
 
6235
                      |
 
6236
                      / Omega
 
6237
  where
 
6238
          2 D(u) = grad u + (grad u)^T
 
6239
 
 
6240
If the V space is a vector-valued `P1' (resp. `P2')   finite element
 
6241
space, the T space may be   a tensor-valued `P0' (resp. `P1d') one.
 
6242
 
 
6243
Example
 
6244
-------
 
6245
 
 
6246
The following piece of code build the Laplacian form   associated to
 
6247
the P1 approximation:
 
6248
             geo omega ("square");
 
6249
             space V (omega, "P1", "vector");
 
6250
             space T (omega, "P0", "tensor");
 
6251
             form  b (V, T, "2D");
 
6252
 
 
6253
 
 
6254
File: rheolef.info,  Node: Internals,  Up: Top
 
6255
 
 
6256
8 Internals
 
6257
***********
 
6258
 
 
6259
* Menu:
 
6260
 
 
6261
* geomap internal::
 
6262
* form_element internal::
 
6263
* iofem internal::
 
6264
* characteristic internal::
 
6265
* point internal::
 
6266
* basis internal::
 
6267
* reference_element internal::
 
6268
* quadrature internal::
 
6269
* quadrangle internal::
 
6270
* prism internal::
 
6271
* hexa internal::
 
6272
* triangle internal::
 
6273
* geo_element internal::
 
6274
* tetra internal::
 
6275
* edge internal::
 
6276
* numbering internal::
 
6277
* smart_pointer internal::
 
6278
* heap_allocator internal::
 
6279
* stack_allocator internal::
 
6280
* pretty_name internal::
 
6281
* acinclude internal::
 
6282
 
 
6283
 
 
6284
File: rheolef.info,  Node: geomap internal,  Up: Internals
 
6285
 
 
6286
8.1 `geomap' - discrete mesh advection by a field: gh(x)=fh(x-dt*uh
 
6287
===================================================================
 
6288
 
 
6289
(Source file: `nfem/lib/geomap.h') 
 
6290
 
 
6291
Synopsys
 
6292
--------
 
6293
 
 
6294
The class geomap is a fundamental class used for the correspondance
 
6295
between fields defined on different meshes or for advection problems.
 
6296
This class is used for the method of characteristic.
 
6297
 
 
6298
Example
 
6299
-------
 
6300
 
 
6301
The following code compute gh(x)=fh(x-dt*uh(x)):
 
6302
       field uh = interpolate (Vh, u);
 
6303
       field fh = interpolate (Fh, f);
 
6304
       geomap X (Fh, -dt*uh);
 
6305
       field gh = compose (fh, X);
 
6306
 For a complete example, see `convect.cc' in the  example directory.
 
6307
 
 
6308
Implementation
 
6309
--------------
 
6310
 
 
6311
     struct geomap_option_type {
 
6312
         size_t n_track_step; // loop while tracking: y = X_u(x)
 
6313
         geomap_option_type() : n_track_step(1) {}
 
6314
     };
 
6315
     class geomap : public Vector<meshpoint> {
 
6316
     public:
 
6317
             geomap () : advected(false), use_space(true) {}
 
6318
             //  Maps a quadrature-dependent lattice over Th_1 onto Th_2 triangulation.
 
6319
             geomap (const geo& Th_2, const geo& Th_1,
 
6320
                             std::string quadrature="default", size_t order=0, bool allow_approximate_edges=true);
 
6321
 
 
6322
             //  Maps a quadrature-dependent lattice over Th_1 onto Th_2 triangulation
 
6323
             //  thro' an offset vector field u to be defined on Th_1.
 
6324
             geomap (const geo& Th_2, const geo& Th_1, const field& advection_h_1,
 
6325
                             std::string quadrature="default", size_t order=0) ;
 
6326
 
 
6327
             //  TO BE REMOVED: backward compatibility
 
6328
             //  Maps space Vh_1 dof's onto the meshpoints of Th_2 triangulation
 
6329
             /*  geomap : ( Vh_1.dof's ) |--> ( Th_2 )
 
6330
              */
 
6331
             geomap (const geo& Th_2, const space& Vh_1,
 
6332
                              bool allow_approximate_edges=true );
 
6333
             //  Same but for P1d, using points inside the triangle to preserve discontinuity
 
6334
             geomap (const geo& Th_2, const space& Vh_1,
 
6335
                              Float barycentric_weight );
 
6336
 
 
6337
             //  TO BE REMOVED: backward compatibility
 
6338
             //  Maps space Vh_1 dof's onto the meshpoints of Th_2 triangulation
 
6339
             //  thro' an offset u to be defined on Vh_1 dof's.
 
6340
             /*  geomap : ( Vh_1.dof's ) |--> ( Th_2 )
 
6341
              */
 
6342
             geomap (const geo& Th_2, const space& Vh_1, const field& advection_h_1);
 
6343
 
 
6344
             //  Does the same, but assumes that Th_2 is the triangulation for Vh_1
 
6345
             geomap (const space& Vh_2, const field& advection_h_1, const geomap_option_type& opts = geomap_option_type());
 
6346
 
 
6347
             ~geomap () {};
 
6348
 
 
6349
     //accessors
 
6350
             //  TO BE REMOVED: backward compatibility
 
6351
             const space&
 
6352
             get_space () const
 
6353
                     { if (!use_space) error_macro("Lattice-based geomaps use no space");
 
6354
                       return _Vh_1;
 
6355
                     };
 
6356
 
 
6357
             const geo&
 
6358
             get_origin_triangulation () const
 
6359
                     { return _Th_1; };
 
6360
 
 
6361
             const geo&
 
6362
             get_target_triangulation () const
 
6363
                     { return _Th_2; };
 
6364
 
 
6365
             size_t
 
6366
             order () const
 
6367
                     {
 
6368
                     //  TO BE REMOVED: backward compatibility
 
6369
                     if (!use_space)
 
6370
                     return _order;
 
6371
                     }
 
6372
 
 
6373
             const std::string&
 
6374
             quadrature () const
 
6375
                     {
 
6376
                     //  TO BE REMOVED: backward compatibility
 
6377
                     if (!use_space)
 
6378
                     return _quadrature; }
 
6379
 
 
6380
             bool is_inside (size_t dof) const { return _is_inside [dof]; }
 
6381
             bool no_barycentric_weight() const { return _barycentric_weight == Float(0); }
 
6382
             Float barycentric_weight() const { return _barycentric_weight; }
 
6383
 
 
6384
     protected:
 
6385
             friend class fieldog;
 
6386
             //  use_space mode
 
6387
             void init (const field& advection);
 
6388
             //  non use_space mode
 
6389
             void init ();
 
6390
             meshpoint advect (const point& q, size_t iK_Th_1);
 
6391
             meshpoint robust_advect_1 (const point& x0, const point& va, bool& is_inside) const;
 
6392
             meshpoint robust_advect_N (const point& x0, const point& v0, const field& vh, size_t n, bool& is_inside) const;
 
6393
 
 
6394
 
 
6395
     // data:
 
6396
             geo _Th_1;
 
6397
             geo _Th_2;
 
6398
             field _advection;
 
6399
             bool advected;
 
6400
             std::string _quadrature;
 
6401
             size_t _order;
 
6402
             bool _allow_approximate_edges;
 
6403
 
 
6404
             // TO BE REMOVED:
 
6405
             bool use_space;
 
6406
             space _Vh_1;
 
6407
 
 
6408
             std::vector<point> quad_point;
 
6409
             std::vector<Float> quad_weight;
 
6410
 
 
6411
             // flag when a dof go outside of the domain
 
6412
             std::vector<bool> _is_inside;
 
6413
 
 
6414
             Float _barycentric_weight;
 
6415
             geomap_option_type _option;
 
6416
      };
 
6417
 
 
6418
     inline
 
6419
     geomap::geomap (const geo& Th_2, const space& Vh_1, const field& advection) :
 
6420
             _Th_1 (Vh_1.get_geo()), _Th_2 (Th_2), _advection(advection), advected(true),
 
6421
             _quadrature("default"), _order(0),
 
6422
             _allow_approximate_edges(true), use_space(true), _Vh_1(Vh_1),
 
6423
             _is_inside(), _barycentric_weight(0)
 
6424
                     { init (advection); };
 
6425
 
 
6426
     inline
 
6427
     geomap::geomap (const space& Vh_1, const field& advection, const geomap_option_type& opt) :
 
6428
             _Th_1 (Vh_1.get_geo()), _Th_2 (Vh_1.get_geo()), _advection(advection), advected(true),
 
6429
             _quadrature("default"), _order(0),
 
6430
             _allow_approximate_edges(true), use_space(true), _Vh_1(Vh_1),
 
6431
             _is_inside(), _barycentric_weight(0), _option(opt)
 
6432
                     { init (advection); };
 
6433
 
 
6434
     inline
 
6435
     geomap::geomap (
 
6436
         const geo& Th_2,
 
6437
         const geo& Th_1,
 
6438
         const field& advection,
 
6439
         std::string quadrature,
 
6440
         size_t order)
 
6441
       :
 
6442
         _Th_1 (Th_1),
 
6443
         _Th_2 (Th_2),
 
6444
         _advection(advection),
 
6445
         advected(true),
 
6446
         _quadrature(quadrature),
 
6447
         _order(order),
 
6448
         _allow_approximate_edges(true),
 
6449
         use_space(false),
 
6450
         _Vh_1(),
 
6451
         _is_inside(),
 
6452
         _barycentric_weight(0),
 
6453
         _option()
 
6454
     {
 
6455
         if (_advection.get_geo() !=_Th_1)
 
6456
             error_macro("The advection field should be defined on the original mesh Th_1="
 
6457
                 << Th_1.name() << " and not " << _advection.get_geo().name());
 
6458
         init();
 
6459
     }
 
6460
 
 
6461
     inline
 
6462
     geomap::geomap (
 
6463
         const geo& Th_2,
 
6464
         const geo& Th_1,
 
6465
         std::string quadrature,
 
6466
         size_t order,
 
6467
         bool allow_approximate_edges)
 
6468
       : _Th_1 (Th_1),
 
6469
         _Th_2 (Th_2),
 
6470
         _advection(),
 
6471
         advected(false),
 
6472
         _quadrature(quadrature),
 
6473
         _order(order),
 
6474
         _allow_approximate_edges(allow_approximate_edges),
 
6475
         use_space(false),
 
6476
         _Vh_1(),
 
6477
         _is_inside(),
 
6478
         _barycentric_weight(0),
 
6479
         _option()
 
6480
     {
 
6481
         init();
 
6482
     }
 
6483
 
 
6484
     //  Composition with a field
 
6485
     /*  f being a field of space V, X a geomap on this space, foX=compose(f,X) is their
 
6486
      *  composition.
 
6487
      */
 
6488
     field compose (const field& f, const geomap& g);
 
6489
     /*  send also a callback function when advection goes outside a domain
 
6490
      *  this is usefull when using upstream boundary conditions
 
6491
      */
 
6492
     field compose (const field& f, const geomap& g, Float (*f_outside)(const point&));
 
6493
     template <class Func>
 
6494
     field compose (const field& f, const geomap& g, Func f_outside);
 
6495
 
 
6496
Implementation
 
6497
--------------
 
6498
 
 
6499
     class fieldog: public field // and friend of geomap.
 
6500
      {
 
6501
     public:
 
6502
        // Constructor
 
6503
             fieldog (const field& _f, const geomap& _g) : f(_f), g(_g) {};
 
6504
 
 
6505
             // Accessors
 
6506
             Float
 
6507
             operator() (const point& x) const;
 
6508
 
 
6509
             Float
 
6510
             operator() (const meshpoint& x) const;
 
6511
 
 
6512
             Float
 
6513
             operator() (const point& x_hat, size_t e) const
 
6514
             { return operator() (meshpoint(x_hat,e)); };
 
6515
 
 
6516
             std::vector<Float>
 
6517
             quadrature_values (size_t iK) const;
 
6518
 
 
6519
             std::vector<Float>
 
6520
             quadrature_d_dxi_values (size_t i, size_t iK) const;
 
6521
 
 
6522
             const std::string&
 
6523
             quadrature() const
 
6524
             { return g._quadrature; };
 
6525
 
 
6526
             size_t
 
6527
             order() const
 
6528
             { return g._order; };
 
6529
 
 
6530
             const space&
 
6531
             get_space() const
 
6532
             { return f.get_space(); };
 
6533
 
 
6534
     protected:
 
6535
             field f;
 
6536
             geomap g;
 
6537
      };
 
6538
 
 
6539
 
 
6540
File: rheolef.info,  Node: form_element internal,  Up: Internals
 
6541
 
 
6542
8.2 `form_element' - bilinear form on a single element
 
6543
======================================================
 
6544
 
 
6545
(Source file: `nfem/lib/form_element.h') 
 
6546
 
 
6547
Synopsys
 
6548
--------
 
6549
 
 
6550
The `form_element' class defines functions that compute   a bilinear
 
6551
form defined between two polynomial basis on a single   geometrical
 
6552
element. This bilinear form is represented   by a matrix.
 
6553
 
 
6554
The bilinear form is designated by a string, e.g. "mass", "grad_grad",
 
6555
...    indicating the form. The form depends also of the geometrical
 
6556
element:   triangle, square, tetrahedron (*note geo_element internal::).
 
6557
 
 
6558
Implementation note
 
6559
-------------------
 
6560
 
 
6561
The `form_element' class   is managed by (*note smart_pointer
 
6562
internal::).    This class uses a pointer on a pure virtual class
 
6563
`form_element_rep'   while the effective code refers to the specific
 
6564
concrete derived classes:   mass, grad_grad, etc.
 
6565
 
 
6566
Implementation
 
6567
--------------
 
6568
 
 
6569
     class form_element : public smart_pointer<form_element_rep> {
 
6570
     public:
 
6571
 
 
6572
     // typedefs:
 
6573
 
 
6574
         typedef size_t size_type;
 
6575
 
 
6576
     // allocators:
 
6577
 
 
6578
         form_element (std::string name = "");
 
6579
 
 
6580
     // modifier:
 
6581
 
 
6582
         void initialize (const space& X, const space& Y) const;
 
6583
 
 
6584
         //  optional, for scalar-weighted forms:
 
6585
         void set_weight (const field& wh) const;
 
6586
 
 
6587
             //  for special forms for which coordinate-system specific weights (ie, cylindrical
 
6588
             //  coordinates weights) should not be used:
 
6589
             void set_use_coordinate_system_weight(bool use) const;
 
6590
 
 
6591
     // accessor:
 
6592
 
 
6593
         void operator() (const geo_element& K, ublas::matrix<Float>& m) const;
 
6594
         const field& get_weight() const;
 
6595
     };
 
6596
 
 
6597
 
 
6598
File: rheolef.info,  Node: iofem internal,  Up: Internals
 
6599
 
 
6600
8.3 `iofem' - input and output finite element manipulators
 
6601
==========================================================
 
6602
 
 
6603
(Source file: `nfem/lib/iofem.h') 
 
6604
 
 
6605
Description
 
6606
-----------
 
6607
 
 
6608
This class implements some specific finite element manipulators.
 
6609
For a general presentation of stream manipulators, reports     to class
 
6610
`iostream'.
 
6611
 
 
6612
Valuated manipulators
 
6613
---------------------
 
6614
 
 
6615
`origin'
 
6616
`normal'
 
6617
     set a cutting plane for visualizations and post-processing.
 
6618
                      cout << cut << origin(point(0.5, 0.5, 0.5)) << normal(point(1,1,0) << uh;
 
6619
     
 
6620
 
 
6621
`topography'
 
6622
     specifies the topography field when representing a bidimensionnal
 
6623
           field in tridimensionnal elevation.
 
6624
                      cout << topography(zh) << uh;
 
6625
            This manipulator takes an agument that specifies a scalar
 
6626
     field value        `zh' for the elevation, while `uh' is the
 
6627
     scalar field        to represent. Then, the z-elevation takes
 
6628
     zh(x,y)+uh(x,y).
 
6629
 
 
6630
 
 
6631
File: rheolef.info,  Node: characteristic internal,  Up: Internals
 
6632
 
 
6633
8.4 `characteristic' - discrete mesh advection by a field: gh(x)=fh(x-dt*uh
 
6634
===========================================================================
 
6635
 
 
6636
(Source file: `nfem/lib/characteristic.h') 
 
6637
 
 
6638
Synopsys
 
6639
--------
 
6640
 
 
6641
The class characteristic is a class implementing the  Lagrange-Galerkin
 
6642
method. It is the extension of the method  of characteristic in the
 
6643
finite element context.   This is an expreimental implementation:
 
6644
please use the "geomap"  one for practical usage.
 
6645
 
 
6646
Example
 
6647
-------
 
6648
 
 
6649
The following code compute the Riesz representant, denoted  by "mgh" of
 
6650
gh(x)=fh(x-dt*uh(x)).
 
6651
       geo omega_h;
 
6652
       field uh = ...;
 
6653
       field fh = ...;
 
6654
       characteristic X (omega_h, -dt*uh);
 
6655
       field mgh = riesz_representer(Vh, compose(fh, X));
 
6656
 The Riesz representer is the "mgh" vector of values:
 
6657
             mgh(i) = integrate fh(x-dt*uh(x)) phi_i(x) dx
 
6658
 where phi_i is the i-th basis function in Vh  and the integral is
 
6659
evaluated by using a quadrature formulae.   By default the quadrature
 
6660
formule is Gauss-Lobatto with  the order equal to the polynomial order
 
6661
of Vh.   This quadrature formulae guaranties inconditional stability
 
6662
at any polynomial order (order 1: trapeze, order 2: simpson).
 
6663
Extension will accept in the future alternative quadrature  formulae.
 
6664
 
 
6665
Implementation
 
6666
--------------
 
6667
 
 
6668
     class characteristic {
 
6669
     public:
 
6670
             characteristic(const geo& bg_omega, const field& ah);
 
6671
             const geo& get_background_geo() const;
 
6672
             const field& get_advection() const;
 
6673
     protected:
 
6674
             geo   _bg_omega;
 
6675
             field _ah;
 
6676
     };
 
6677
     class field_o_characteristic {
 
6678
     public:
 
6679
             field_o_characteristic(const field& fh, const characteristic& X);
 
6680
             friend field_o_characteristic compose(
 
6681
                     const field& fh, const characteristic& X);
 
6682
             Float operator() (const point& x) const;
 
6683
             point vector_evaluate (const point& x) const;
 
6684
             tensor tensor_evaluate (const point& x) const;
 
6685
             const field& get_field() const;
 
6686
             const geo& get_background_geo() const;
 
6687
             const field& get_advection() const;
 
6688
     protected:
 
6689
             field          _fh;
 
6690
             characteristic _X;
 
6691
             point advect (const point& x0) const;
 
6692
     };
 
6693
 
 
6694
 
 
6695
File: rheolef.info,  Node: point internal,  Up: Internals
 
6696
 
 
6697
8.5 `point' - Point reference element
 
6698
=====================================
 
6699
 
 
6700
(Source file: `nfem/basis/point.icc') 
 
6701
 
 
6702
Description
 
6703
-----------
 
6704
 
 
6705
The point reference element is defined for convenience.    It is a
 
6706
0-dimensional element   with measure equal to 1.
 
6707
 
 
6708
Implementation
 
6709
--------------
 
6710
 
 
6711
     const size_t dimension = 0;
 
6712
     const size_t measure = 1;
 
6713
 
 
6714
 
 
6715
File: rheolef.info,  Node: basis internal,  Up: Internals
 
6716
 
 
6717
8.6 `basis' - polynomial basis
 
6718
==============================
 
6719
 
 
6720
(Source file: `nfem/basis/basis.h') 
 
6721
 
 
6722
Synopsys
 
6723
--------
 
6724
 
 
6725
The `basis' class defines functions that evaluates a polynomial   basis
 
6726
and its derivatives on a point. The polynomial basis   is designated by
 
6727
a string, e.g. "P0", "P1", "P2", "bubble",...    indicating the basis.
 
6728
The basis depends also of the reference element:   triangle, square,
 
6729
tetrahedron (*note reference_element internal::).    For instance, on a
 
6730
square, the "P1"   string designates the common Q1 four-nodes basis on
 
6731
the reference square.
 
6732
 
 
6733
The nodes associated to the Lagrange polynomial basis   are also
 
6734
available by its associated accessor.
 
6735
 
 
6736
Implementation note
 
6737
-------------------
 
6738
 
 
6739
The `basis' class   is a *note smart_pointer internal::) class on a
 
6740
`basis_rep' class that is a pure virtual base class   for effective
 
6741
bases, e.g. basis_P1, basis_P1, etc.
 
6742
 
 
6743
Implementation
 
6744
--------------
 
6745
 
 
6746
     class basis : public smart_pointer<basis_rep> {
 
6747
     public:
 
6748
 
 
6749
     // typedefs:
 
6750
 
 
6751
         typedef size_t size_type;
 
6752
         typedef basis_rep::dof_family_type dof_family_type;
 
6753
 
 
6754
     // allocators:
 
6755
 
 
6756
         basis (std::string name = "");
 
6757
 
 
6758
     // accessors:
 
6759
 
 
6760
         std::string name() const;
 
6761
         size_type   degree() const;
 
6762
         size_type   size (reference_element hat_K, dof_family_type family=reference_element::dof_family_max) const;
 
6763
         dof_family_type family() const;
 
6764
 
 
6765
         dof_family_type dof_family(
 
6766
             reference_element hat_K,
 
6767
             size_type         i_dof_local) const;
 
6768
 
 
6769
         Float eval(
 
6770
             reference_element hat_K,
 
6771
             size_type         i_dof_local,
 
6772
             const point&      hat_x) const;
 
6773
 
 
6774
         point grad_eval(
 
6775
             reference_element hat_K,
 
6776
             size_type         i_dof_local,
 
6777
             const point&      hat_x) const;
 
6778
 
 
6779
         basic_point<point> hessian_eval(
 
6780
             reference_element hat_K,
 
6781
             size_type         i_dof_local,
 
6782
             const point&      hat_x) const;
 
6783
 
 
6784
         void eval(
 
6785
             reference_element    hat_K,
 
6786
             const point&         hat_x,
 
6787
             std::vector<Float>&  values) const;
 
6788
 
 
6789
         void grad_eval(
 
6790
             reference_element    hat_K,
 
6791
             const point&         hat_x,
 
6792
             std::vector<point>&  values) const;
 
6793
 
 
6794
         void hessian_eval(
 
6795
             reference_element    hat_K,
 
6796
             const point&         hat_x,
 
6797
             std::vector<basic_point<point> >&  values) const;
 
6798
 
 
6799
         void hat_node(
 
6800
             reference_element    hat_K,
 
6801
             std::vector<point>&  hat_node) const;
 
6802
 
 
6803
         void dump(std::ostream& out = std::cerr) const;
 
6804
     };
 
6805
 
 
6806
 
 
6807
File: rheolef.info,  Node: reference_element internal,  Up: Internals
 
6808
 
 
6809
8.7 `reference_element' - reference element
 
6810
===========================================
 
6811
 
 
6812
(Source file: `nfem/basis/reference_element.h') 
 
6813
 
 
6814
Synopsys
 
6815
--------
 
6816
 
 
6817
The `reference_element' class defines all supported types of
 
6818
geometrical elements in one, two and three dimensions. The set of
 
6819
supported elements are designate by a letter
 
6820
`p'
 
6821
     point (dimension 0)
 
6822
 
 
6823
`e'
 
6824
     edge (dimension 1)
 
6825
 
 
6826
`t'
 
6827
     triangle(dimension 2)
 
6828
 
 
6829
`q'
 
6830
     quadrangle(dimension 2)
 
6831
 
 
6832
`T'
 
6833
     tetrahedron(dimension 3)
 
6834
 
 
6835
`P'
 
6836
     prism(dimension 3)
 
6837
 
 
6838
`H'
 
6839
     hexaedron(dimension 3)
 
6840
 
 
6841
Implementation
 
6842
--------------
 
6843
 
 
6844
     class reference_element {
 
6845
     public:
 
6846
 
 
6847
 
 
6848
     // typedefs:
 
6849
 
 
6850
         typedef std::vector<int>::size_type size_type;
 
6851
 
 
6852
         // defines enum_type { p, t, q ..., H, ...};
 
6853
         // in an automatically generated file :
 
6854
 
 
6855
         typedef enum {
 
6856
             p = 0,
 
6857
             e = 1,
 
6858
             t = 2,
 
6859
             q = 3,
 
6860
             T = 4,
 
6861
             P = 5,
 
6862
             H = 6,
 
6863
             max_size = 7
 
6864
         } enum_type;
 
6865
 
 
6866
         typedef enum {
 
6867
             Lagrange = 0,
 
6868
             Hermite = 1,
 
6869
             dof_family_max =2
 
6870
         } dof_family_type;
 
6871
 
 
6872
     // constants:
 
6873
 
 
6874
         static const size_type not_set;
 
6875
         static const size_type max_n_subgeo      = 12;
 
6876
         static const size_type max_subgeo_vertex = 8;
 
6877
 
 
6878
     // allocators/deallocators:
 
6879
 
 
6880
         reference_element (enum_type x = max_size);
 
6881
 
 
6882
     // accessors:
 
6883
 
 
6884
         enum_type type() const;
 
6885
         char name() const;
 
6886
         size_type dimension() const;
 
6887
         friend Float measure (reference_element hat_K);
 
6888
         size_type size() const;
 
6889
         size_type n_edge() const;
 
6890
         size_type n_face() const;
 
6891
         size_type n_subgeo(size_type subgeo_dim) const;
 
6892
         size_type subgeo_size(size_type subgeo_dim, size_type i_subgeo) const;
 
6893
         size_type subgeo_local_vertex(size_type subgeo_dim, size_type i_subgeo, size_type i_subgeo_vertex) const;
 
6894
         size_type heap_size() const;
 
6895
         size_type heap_offset(size_type subgeo_dim) const;
 
6896
 
 
6897
         void set_type (enum_type x);
 
6898
         void set_type (size_type n_vertex, size_type dim);
 
6899
         void set_name (char name);
 
6900
 
 
6901
     // data:
 
6902
     protected:
 
6903
 
 
6904
         enum_type _x;
 
6905
 
 
6906
     // constants:
 
6907
 
 
6908
         // these constants are initialized in
 
6909
         //   "reference_element_declare.c"
 
6910
         // automatically generated.
 
6911
 
 
6912
         static const char _name                     [max_size];
 
6913
         static const size_type _dimension           [max_size];
 
6914
         static const size_type _n_subgeo            [max_size][4];
 
6915
         static const size_type _subgeo_size         [max_size*4*max_n_subgeo];
 
6916
         static const size_type _subgeo_local_vertex [max_size*4*max_n_subgeo*max_subgeo_vertex];
 
6917
         static const size_type _heap_size           [max_size];
 
6918
         static const size_type _heap_offset         [max_size][4];
 
6919
         friend std::istream& operator>>(std::istream&, class geo_element&);
 
6920
     };
 
6921
 
 
6922
 
 
6923
File: rheolef.info,  Node: quadrature internal,  Up: Internals
 
6924
 
 
6925
8.8 `quadrature' - quadrature formulae on the reference lement
 
6926
==============================================================
 
6927
 
 
6928
(Source file: `nfem/basis/quadrature.h') 
 
6929
 
 
6930
Synopsys
 
6931
--------
 
6932
 
 
6933
The `quadrature' class defines a container for a quadrature formulae on
 
6934
the reference element (*note reference_element internal::).  This
 
6935
container stores the nodes coordinates and the weights.
 
6936
 
 
6937
The constructor takes two arguments
 
6938
-----------------------------------
 
6939
 
 
6940
the reference element K and the order r of the quadrature formulae.
 
6941
The formulae is exact when computing the integral of a polynom p that
 
6942
degree is less or equal to order r.
 
6943
                       n
 
6944
         /            ___
 
6945
         | p(x) dx =  \    p(x_q) w_q
 
6946
         / K          /__
 
6947
                      q=1
 
6948
 
 
6949
Limitations
 
6950
-----------
 
6951
 
 
6952
The formulae is optimal when it uses a minimal number of nodes n.
 
6953
Optimal quadrature formula are hard-coded in this class.  Not all
 
6954
reference elements and orders are yet implemented. This class will be
 
6955
completed in the future.
 
6956
 
 
6957
Implementation
 
6958
--------------
 
6959
 
 
6960
     class quadrature {
 
6961
     public:
 
6962
 
 
6963
     // typedefs:
 
6964
 
 
6965
         typedef quadrature_on_geo::size_type size_type;
 
6966
         typedef quadrature_option_type::family_type family_type;
 
6967
         typedef std::vector<weighted_point>::const_iterator const_iterator;
 
6968
 
 
6969
     // allocators:
 
6970
 
 
6971
         quadrature (quadrature_option_type opt = quadrature_option_type());
 
6972
 
 
6973
     // modifiers:
 
6974
 
 
6975
         void set_order (size_type order);
 
6976
         void set_family (family_type ft);
 
6977
 
 
6978
     // accessors:
 
6979
 
 
6980
         size_type      get_order() const;
 
6981
         family_type    get_family() const;
 
6982
         std::string    get_family_name() const;
 
6983
         size_type      size  (reference_element hat_K) const;
 
6984
         const_iterator begin (reference_element hat_K) const;
 
6985
         const_iterator end   (reference_element hat_K) const;
 
6986
         friend std::ostream& operator<< (std::ostream&, const quadrature&);
 
6987
     protected:
 
6988
         quadrature_option_type     _options;
 
6989
         mutable quadrature_on_geo  _quad        [reference_element::max_size];
 
6990
         mutable std::vector<bool>  _initialized;
 
6991
         void _initialize (reference_element hat_K) const;
 
6992
     private:
 
6993
         quadrature (const quadrature&);
 
6994
         quadrature operator= (const quadrature&);
 
6995
     };
 
6996
 
 
6997
 
 
6998
File: rheolef.info,  Node: quadrangle internal,  Up: Internals
 
6999
 
 
7000
8.9 `quadrangle' - Quadrangular reference element
 
7001
=================================================
 
7002
 
 
7003
(Source file: `nfem/basis/quadrangle.icc') 
 
7004
 
 
7005
Description
 
7006
-----------
 
7007
 
 
7008
The quadrangular reference element is [0,1]^2.
 
7009
 
 
7010
Numbering
 
7011
---------
 
7012
 
 
7013
 
 
7014
           y
 
7015
 
 
7016
           3---------2
 
7017
           |         |
 
7018
           |         |
 
7019
           |         |
 
7020
           |         |
 
7021
           0---------1   x
 
7022
 
 
7023
Implementation
 
7024
--------------
 
7025
 
 
7026
     const size_t dimension = 2;
 
7027
     const Float  measure = 4;
 
7028
     const size_t n_vertex = 4;
 
7029
     const Float vertex [n_vertex][dimension] = {
 
7030
             { -1,-1 },
 
7031
             {  1,-1 },
 
7032
             {  1, 1 },
 
7033
             { -1, 1 } };
 
7034
     const size_t  n_edge = 4;
 
7035
     const size_t edge [n_edge][2] = {
 
7036
             { 0, 1 },
 
7037
             { 1, 2 },
 
7038
             { 2, 3 },
 
7039
             { 3, 0 } };
 
7040
 
 
7041
 
 
7042
File: rheolef.info,  Node: prism internal,  Up: Internals
 
7043
 
 
7044
8.10 `prism' - Prism reference element
 
7045
======================================
 
7046
 
 
7047
(Source file: `nfem/basis/prism.icc') 
 
7048
 
 
7049
Description
 
7050
-----------
 
7051
 
 
7052
The prism reference element is
 
7053
             K = { 0 < x < 1 and 0 < y < 1-x and -1 < z < 1 }
 
7054
 
 
7055
Numbering
 
7056
---------
 
7057
 
 
7058
The orientation is such that triedra (01, 02, 03) is direct and all
 
7059
faces, see from exterior, are in the direct sens.  References: P. L.
 
7060
Georges, "Generation automatique de maillages", page 24-, coll RMA, 16,
 
7061
Masson, 1994.
 
7062
                 z
 
7063
 
 
7064
                 3 ---- 5
 
7065
              '  | .    |
 
7066
           4 .  '|      |
 
7067
           |     |      |
 
7068
           |     |      |
 
7069
           |     0 . . .2     y
 
7070
           |  '    .
 
7071
           1 .  '
 
7072
 
 
7073
         x
 
7074
 
 
7075
Implementation
 
7076
--------------
 
7077
 
 
7078
     const size_t dimension = 3;
 
7079
     const Float  measure = 1;
 
7080
     const size_t n_vertex = 6;
 
7081
     const Float vertex [n_vertex][dimension] = {
 
7082
             { 0, 0,-1 },
 
7083
             { 1, 0,-1 },
 
7084
             { 0, 1,-1 },
 
7085
             { 0, 0, 1 },
 
7086
             { 1, 0, 1 },
 
7087
             { 0, 1, 1 } };
 
7088
     const size_t  n_face = 5;
 
7089
     const size_t face [n_face][4] = {
 
7090
             { 0, 2, 1, size_t(-1) },
 
7091
             { 0, 3, 5, 2 },
 
7092
             { 0, 1, 4, 3 },
 
7093
             { 3, 4, 5, size_t(-1) },
 
7094
             { 1, 2, 5, 4 } };
 
7095
     const size_t  n_edge = 9;
 
7096
     const size_t edge [n_edge][2] = {
 
7097
             { 0, 1 },
 
7098
             { 1, 2 },
 
7099
             { 2, 0 },
 
7100
             { 0, 3 },
 
7101
             { 1, 4 },
 
7102
             { 2, 5 },
 
7103
             { 3, 4 },
 
7104
             { 4, 5 },
 
7105
             { 5, 3 } };
 
7106
 
 
7107
 
 
7108
File: rheolef.info,  Node: hexa internal,  Up: Internals
 
7109
 
 
7110
8.11 `hexa' - Hexaedra reference element
 
7111
========================================
 
7112
 
 
7113
(Source file: `nfem/basis/hexa.icc') 
 
7114
 
 
7115
Description
 
7116
-----------
 
7117
 
 
7118
The hexa reference element is [-1,1]^3.
 
7119
 
 
7120
Numbering
 
7121
---------
 
7122
 
 
7123
The orientation is such that triedra (01, 03, 04) is direct and all
 
7124
faces, see from exterior, are in the direct sens.  References: P. L.
 
7125
Georges, "Generation automatique de maillages", page 24-, coll RMA, 16,
 
7126
Masson, 1994.
 
7127
                 z
 
7128
 
 
7129
                 4 - - -7
 
7130
            . '  .  . ' |
 
7131
           5 - - -6     |
 
7132
           |     .|     |
 
7133
           |     .|     |
 
7134
           |     .|     |
 
7135
           |     0|. . .3     y
 
7136
           | . '  | . '
 
7137
           1 - - -2
 
7138
 
 
7139
         x
 
7140
 
 
7141
Implementation
 
7142
--------------
 
7143
 
 
7144
     const size_t dimension = 3;
 
7145
     const Float  measure = 8;
 
7146
     const size_t n_vertex = 8;
 
7147
     const Float vertex [n_vertex][dimension] = {
 
7148
             {-1,-1,-1 },
 
7149
             { 1,-1,-1 },
 
7150
             { 1, 1,-1 },
 
7151
             {-1, 1,-1 },
 
7152
             {-1,-1, 1 },
 
7153
             { 1,-1, 1 },
 
7154
             { 1, 1, 1 },
 
7155
             {-1, 1, 1 } };
 
7156
     const size_t  n_face = 6;
 
7157
     const size_t face [n_face][4] = {
 
7158
             {0, 3, 2, 1 },
 
7159
             {0, 4, 7, 3 },
 
7160
             {0, 1, 5, 4 },
 
7161
             {4, 5, 6, 7 },
 
7162
             {1, 2, 6, 5 },
 
7163
             {2, 3, 7, 6 } };
 
7164
     const size_t  n_edge = 12;
 
7165
     const size_t edge [n_edge][2] = {
 
7166
             {0, 1 },
 
7167
             {1, 2 },
 
7168
             {2, 3 },
 
7169
             {3, 0 },
 
7170
             {0, 4 },
 
7171
             {1, 5 },
 
7172
             {2, 6 },
 
7173
             {3, 7 },
 
7174
             {4, 5 },
 
7175
             {5, 6 },
 
7176
             {6, 7 },
 
7177
             {7, 4 } };
 
7178
 
 
7179
 
 
7180
File: rheolef.info,  Node: triangle internal,  Up: Internals
 
7181
 
 
7182
8.12 `triangle' - Triangle reference element
 
7183
============================================
 
7184
 
 
7185
(Source file: `nfem/basis/triangle.icc') 
 
7186
 
 
7187
Description
 
7188
-----------
 
7189
 
 
7190
The triangle reference element is
 
7191
             K = { 0 < x < 1 and 0 < y < 1-x }
 
7192
 
 
7193
Numbering
 
7194
---------
 
7195
 
 
7196
 
 
7197
           y
 
7198
 
 
7199
           2
 
7200
           | +
 
7201
           |   +
 
7202
           |     +
 
7203
           |       +
 
7204
           0---------1   x
 
7205
 
 
7206
Implementation
 
7207
--------------
 
7208
 
 
7209
     const size_t dimension = 2;
 
7210
     const Float  measure = 0.5;
 
7211
     const size_t n_vertex = 3;
 
7212
     const Float vertex [n_vertex][dimension] = {
 
7213
             { 0, 0 },
 
7214
             { 1, 0 },
 
7215
             { 0, 1 } };
 
7216
     const size_t  n_edge = 3;
 
7217
     const size_t edge [n_edge][2] = {
 
7218
             { 0, 1 },
 
7219
             { 1, 2 },
 
7220
             { 2, 0 } };
 
7221
 
 
7222
 
 
7223
File: rheolef.info,  Node: geo_element internal,  Up: Internals
 
7224
 
 
7225
8.13 `geo_element' - element of a mesh
 
7226
======================================
 
7227
 
 
7228
(Source file: `nfem/basis/geo_element_v1.h') 
 
7229
 
 
7230
Description
 
7231
-----------
 
7232
 
 
7233
Defines geometrical elements and sides   as a set of vertice and edge
 
7234
indexes.    This element is obtained after a Piola transformation
 
7235
from a reference element (*note reference_element internal::).
 
7236
Indexes are related to arrays of edges and vertices.    These arrays
 
7237
are included in the description of the mesh.    Thus, this class is
 
7238
related of a given mesh instance   (*note geo class::).
 
7239
 
 
7240
Example
 
7241
-------
 
7242
 
 
7243
This is the test of geo_element:
 
7244
         geo_element K;
 
7245
         K.set_name('t') ;
 
7246
         cout << "n_vertices: " << K.size()      << endl
 
7247
              << "n_edges   : " << K.n_edges()   << endl
 
7248
              << "dimension : " << K.dimension() << endl << endl;
 
7249
         for(geo_element::size_type i = 0; i < K.size(); i++)
 
7250
             K[i] = i*10 ;
 
7251
         for(geo_element::size_type i = 0; i < K.n_edges(); i++)
 
7252
             K.set_edge(i, i*10+5) ;
 
7253
         cout << "vertices: local -> global" << endl;
 
7254
         for (geo_element::size_type vloc = 0; vloc < K.size(); vloc++)
 
7255
             cout << vloc << "-> " << K[vloc] << endl;
 
7256
         cout << endl
 
7257
              << "edges: local -> global" << endl;
 
7258
         for (geo_element::size_type eloc = 0; eloc < K.n_edges(); eloc++) {
 
7259
             geo_element::size_type vloc1 = subgeo_local_vertex(1, eloc, 0);
 
7260
             geo_element::size_type vloc2 = subgeo_local_vertex(1, eloc, 1);
 
7261
             cout << eloc << "-> " << K.edge(eloc) << endl
 
7262
                  << "local_vertex_from_edge(" << eloc
 
7263
                  << ") -> (" << vloc1 << ", " << vloc2 << ")" << endl;
 
7264
         }
 
7265
 
 
7266
Implementation
 
7267
--------------
 
7268
 
 
7269
     class geo_element : public reference_element {
 
7270
     public:
 
7271
 
 
7272
     // allocators/deallocators:
 
7273
 
 
7274
         geo_element(enum_type t = max_size);
 
7275
         geo_element(const geo_element&);
 
7276
         explicit geo_element (const class tiny_element&);
 
7277
         void copy (const geo_element&);
 
7278
         void copy (const class tiny_element&);
 
7279
         geo_element& operator = (const geo_element&);
 
7280
         ~geo_element();
 
7281
 
 
7282
     // accessors:
 
7283
 
 
7284
         size_type index() const;
 
7285
         size_type operator [] (size_type i) const;
 
7286
         size_type side(size_type i_side) const;
 
7287
         void build_side(size_type i_side, geo_element& S) const;
 
7288
 
 
7289
 
 
7290
         size_type edge (size_type i_edge) const;
 
7291
         size_type face (size_type i_face) const;
 
7292
 
 
7293
         size_type subgeo(const geo_element& S) const;
 
7294
         size_type subgeo (size_type subgeo_dim, size_type i_subgeo) const;
 
7295
         size_type subgeo_vertex (size_type subgeo_dim, size_type i_subgeo,
 
7296
                                size_type i_subgeo_vertex) const;
 
7297
         void build_subgeo(size_type subgeo_dim, size_type i_subgeo, geo_element& S) const;
 
7298
         size_type subgeo_local_index(const geo_element& S) const;
 
7299
 
 
7300
     // modifiers:
 
7301
 
 
7302
         void set_type (enum_type t);
 
7303
         void set_type (size_type sz, size_type dim);
 
7304
         void set_name (char      name);
 
7305
 
 
7306
         void set_index(size_type idx);
 
7307
         size_type& operator [] (size_type i);
 
7308
         void set_side (size_type i_side, size_type idx);
 
7309
 
 
7310
         void set_edge (size_type i_edge, size_type idx);
 
7311
         void set_face (size_type i_face, size_type idx);
 
7312
         void set_subgeo (size_type subgeo_dim, size_type i_subgeo,
 
7313
                                size_type idx);
 
7314
         void set_subgeo(const geo_element& S, size_type idx);
 
7315
 
 
7316
     // inputs/outputs:
 
7317
 
 
7318
         friend std::istream& operator >> (std::istream&, geo_element&);
 
7319
         friend std::ostream& operator << (std::ostream&, const geo_element&);
 
7320
         std::ostream& dump(std::ostream& s = std::cerr) const;
 
7321
         void check() const;
 
7322
 
 
7323
     // data:
 
7324
     protected:
 
7325
         size_type *_heap;
 
7326
 
 
7327
     // memory management:
 
7328
         void _heap_init();
 
7329
         void _heap_close();
 
7330
     };
 
7331
 
 
7332
 
 
7333
File: rheolef.info,  Node: tetra internal,  Up: Internals
 
7334
 
 
7335
8.14 `tetra' - Tetraedra reference element
 
7336
==========================================
 
7337
 
 
7338
(Source file: `nfem/basis/tetra.icc') 
 
7339
 
 
7340
Description
 
7341
-----------
 
7342
 
 
7343
The tetraedra reference element is
 
7344
             K = { 0 < x < 1 and 0 < y < 1-x and 0 < z < 1-x-y }
 
7345
 
 
7346
Numbering
 
7347
---------
 
7348
 
 
7349
The orientation is such that triedra (01, 02, 03) is direct, and all
 
7350
faces, see from exterior, are in the direct sens.  References: P. L.
 
7351
Georges, "Generation automatique de maillages", page 24-, coll RMA, 16,
 
7352
Masson, 1994.
 
7353
                 z
 
7354
 
 
7355
                 3
 
7356
                /| +
 
7357
               / |   +
 
7358
              /  |     +
 
7359
             /   0 . . .2     y
 
7360
            / '    .
 
7361
           1 .  '
 
7362
 
 
7363
         x
 
7364
 
 
7365
Implementation
 
7366
--------------
 
7367
 
 
7368
     const size_t dimension = 3;
 
7369
     const Float  measure = Float(1.)/Float(6.);
 
7370
     const size_t n_vertex = 4;
 
7371
     const Float vertex [n_vertex][dimension] = {
 
7372
             { 0, 0, 0 },
 
7373
             { 1, 0, 0 },
 
7374
             { 0, 1, 0 },
 
7375
             { 0, 0, 1 } };
 
7376
     const size_t  n_face = 4;
 
7377
     const size_t face [n_face][3] = {
 
7378
             { 0, 2, 1 },
 
7379
             { 0, 3, 2 },
 
7380
             { 0, 1, 3 },
 
7381
             { 1, 2, 3 } };
 
7382
     const size_t  n_edge = 6;
 
7383
     const size_t edge [n_edge][2] = {
 
7384
             { 0, 1 },
 
7385
             { 1, 2 },
 
7386
             { 2, 0 },
 
7387
             { 0, 3 },
 
7388
             { 1, 3 },
 
7389
             { 2, 3 } };
 
7390
 
 
7391
 
 
7392
File: rheolef.info,  Node: edge internal,  Up: Internals
 
7393
 
 
7394
8.15 `edge' - Edge reference element
 
7395
====================================
 
7396
 
 
7397
(Source file: `nfem/basis/edge.icc') 
 
7398
 
 
7399
Description
 
7400
-----------
 
7401
 
 
7402
The edge reference element is K = [0,1].
 
7403
           0---------1   x
 
7404
 
 
7405
Implementation
 
7406
--------------
 
7407
 
 
7408
     const size_t dimension = 1;
 
7409
     const size_t measure = 1;
 
7410
     const size_t n_vertex = 2;
 
7411
     const Float vertex [n_vertex][dimension] = {
 
7412
             { 0 },
 
7413
             { 1 } };
 
7414
 
 
7415
 
 
7416
File: rheolef.info,  Node: numbering internal,  Up: Internals
 
7417
 
 
7418
8.16 `numbering' - global degree of freedom numbering
 
7419
=====================================================
 
7420
 
 
7421
(Source file: `nfem/basis/numbering.h') 
 
7422
 
 
7423
Synopsys
 
7424
--------
 
7425
 
 
7426
The `numbering' class defines methods that furnish global   numbering
 
7427
of degrees of freedom. This numbering depends upon   the degrees of
 
7428
polynoms on elements and upon the continuity   requirement at
 
7429
inter-element boundary. For instance the   "P1" continuous finite
 
7430
element approximation has one degree   of freedom per vertice of the
 
7431
mesh, while its discontinuous   counterpart has dim(basis) times the
 
7432
number of elements of the   mesh, where dim(basis) is the size of the
 
7433
local finite element basis.
 
7434
 
 
7435
Implementation
 
7436
--------------
 
7437
 
 
7438
     class numbering : public smart_pointer<numbering_rep> {
 
7439
     public:
 
7440
 
 
7441
     // typedefs:
 
7442
         typedef numbering_rep                rep;
 
7443
         typedef smart_pointer<numbering_rep> base;
 
7444
         typedef size_t                       size_type;
 
7445
 
 
7446
     // allocators:
 
7447
 
 
7448
         numbering (std::string name = "");
 
7449
         numbering (numbering_rep* ptr);
 
7450
 
 
7451
         virtual ~numbering() {}
 
7452
 
 
7453
     // accessors:
 
7454
 
 
7455
         std::string name() const;
 
7456
         virtual
 
7457
         size_type ndof (
 
7458
                   size_type  mesh_map_dimension,
 
7459
             const size_type* mesh_n_geo,
 
7460
             const size_type* mesh_n_element) const;
 
7461
 
 
7462
         virtual
 
7463
         size_type idof (
 
7464
             const size_type*      mesh_n_geo,
 
7465
             const size_type*      mesh_n_element,
 
7466
             const geo_element&    K,
 
7467
             size_type             i_dof_local) const;
 
7468
 
 
7469
         virtual
 
7470
         void idof (
 
7471
             const size_type*        mesh_n_geo,
 
7472
             const size_type*        mesh_n_element,
 
7473
             const geo_element&      K,
 
7474
             std::vector<size_type>& i_dof) const;
 
7475
 
 
7476
         virtual bool is_continuous() const;
 
7477
         virtual bool is_discontinuous() const { return !is_continuous(); }
 
7478
 
 
7479
     // i/o:
 
7480
 
 
7481
         void dump(std::ostream& out = std::cerr) const;
 
7482
     };
 
7483
 
 
7484
 
 
7485
File: rheolef.info,  Node: smart_pointer internal,  Up: Internals
 
7486
 
 
7487
8.17 `occurence', `smart_pointer' - memory management
 
7488
=====================================================
 
7489
 
 
7490
(Source file: `util/lib/smart_pointer.h') 
 
7491
 
 
7492
Description
 
7493
-----------
 
7494
 
 
7495
Here is a convenient way to implement a true copy semantc,  by using
 
7496
shallow copies and reference counting, in order to  minimise memory
 
7497
copies.   This concept is generally related to the "smart pointer"
 
7498
method for managing memory.
 
7499
 
 
7500
The true semantic copy is defined as follows: if an object  `A' is
 
7501
assigned to  `B', such as `A = B', every further modification on `A' or
 
7502
`B'  does not modify the other.
 
7503
 
 
7504
Implementation
 
7505
--------------
 
7506
 
 
7507
     template <class T>
 
7508
     class smart_pointer {
 
7509
     public:
 
7510
 
 
7511
     // allocators:
 
7512
 
 
7513
             smart_pointer (T* p = 0);
 
7514
             smart_pointer (const smart_pointer&);
 
7515
             ~smart_pointer ();
 
7516
             smart_pointer& operator= (const smart_pointer&);
 
7517
 
 
7518
     // accessors:
 
7519
 
 
7520
             const T* pointer    () const;
 
7521
             const T& data       () const;
 
7522
             const T* operator-> () const;
 
7523
             const T& operator*  () const;
 
7524
 
 
7525
     // modifiers:
 
7526
 
 
7527
             T* pointer ();
 
7528
             T* operator-> ();
 
7529
             T& data ();
 
7530
             T& operator* ();
 
7531
 
 
7532
     // implementation:
 
7533
 
 
7534
     private:
 
7535
             struct counter {
 
7536
                     T*  _p;
 
7537
                     int _n;
 
7538
                     counter (T* p = 0);
 
7539
                     ~counter ();
 
7540
                     int operator++ ();
 
7541
                     int operator-- ();
 
7542
             };
 
7543
             counter *_count;
 
7544
     };
 
7545
 
 
7546
 
 
7547
File: rheolef.info,  Node: heap_allocator internal,  Up: Internals
 
7548
 
 
7549
8.18 heap_allocator - heap-based allocator
 
7550
==========================================
 
7551
 
 
7552
(Source file: `util/lib/heap_allocator.h')
 
7553
 
 
7554
Description
 
7555
-----------
 
7556
 
 
7557
Heap allocators are generally used when there is a lot of allocation
 
7558
and deallocation   of small objects.    For instance, this is often the
 
7559
case when dealing with `std::list' and `std::map'.
 
7560
 
 
7561
Heap-based allocator is conform to the STL specification of allocators.
 
7562
 It does not "free" the memory until the heap is destroyed.
 
7563
 
 
7564
This allocator handles an a priori unlimited area of memory: a sequence
 
7565
 of growing chunks are allocated.    For a limited memory handler in
 
7566
the same spirit, see "stack_allocator"(9).
 
7567
 
 
7568
Example
 
7569
-------
 
7570
 
 
7571
         typedef map <size_t, double, less<size_t>, heap_allocator<pair<size_t,double> > >  map_type;
 
7572
         map_type a;
 
7573
         a.insert (make_pair (0, 3.14));
 
7574
         a.insert (make_pair (1, 1.17));
 
7575
         for (map_type::iterator iter = a.begin(), last = a.end(); iter != last; iter++) {
 
7576
           cout << (*iter).first << " " << (*iter).second << endl;
 
7577
         }
 
7578
 
 
7579
Implementation
 
7580
--------------
 
7581
 
 
7582
     template <typename T>
 
7583
     class heap_allocator {
 
7584
     protected:
 
7585
         struct handler_type; // forward declaration:
 
7586
     public:
 
7587
 
 
7588
     // typedefs:
 
7589
 
 
7590
         typedef size_t    size_type;
 
7591
         typedef ptrdiff_t difference_type;
 
7592
         typedef T*        pointer;
 
7593
         typedef const T*  const_pointer;
 
7594
         typedef T&        reference;
 
7595
         typedef const T&  const_reference;
 
7596
         typedef T         value_type;
 
7597
 
 
7598
     // constructors:
 
7599
 
 
7600
         heap_allocator() throw()
 
7601
           : handler (new handler_type)
 
7602
         {
 
7603
         }
 
7604
         heap_allocator (const heap_allocator& ha) throw()
 
7605
           : handler (ha.handler)
 
7606
         {
 
7607
             ++handler->reference_count;
 
7608
         }
 
7609
         template <typename U>
 
7610
         heap_allocator (const heap_allocator<U>& ha) throw()
 
7611
           : handler ((typename heap_allocator<T>::handler_type*)(ha.handler))
 
7612
         {
 
7613
             ++handler->reference_count;
 
7614
         }
 
7615
         ~heap_allocator() throw()
 
7616
         {
 
7617
             check_macro (handler != NULL, "unexpected null mem_info");
 
7618
             if (--handler->reference_count == 0) delete handler;
 
7619
         }
 
7620
         // Rebind to allocators of other types
 
7621
         template <typename U>
 
7622
         struct rebind {
 
7623
             typedef heap_allocator<U> other;
 
7624
         };
 
7625
 
 
7626
     // assignement:
 
7627
 
 
7628
         heap_allocator& operator= (const heap_allocator& ha)
 
7629
         {
 
7630
             handler = ha.handler;
 
7631
             ++handler->reference_count;
 
7632
             return *this;
 
7633
         }
 
7634
 
 
7635
     // utility functions:
 
7636
 
 
7637
         pointer       address (reference r)       const { return &r; }
 
7638
         const_pointer address (const_reference c) const { return &c; }
 
7639
         size_type     max_size() const { return std::numeric_limits<size_t>::max() / sizeof(T); }
 
7640
 
 
7641
     // in-place construction/destruction
 
7642
 
 
7643
         void construct (pointer p, const_reference c)
 
7644
         {
 
7645
             // placement new operator:
 
7646
             new( reinterpret_cast<void*>(p) ) T(c);
 
7647
         }
 
7648
         void destroy (pointer p)
 
7649
         {
 
7650
             // call destructor directly:
 
7651
             (p)->~T();
 
7652
         }
 
7653
 
 
7654
     // allocate raw memory
 
7655
 
 
7656
         pointer allocate (size_type n, const void* = NULL)
 
7657
         {
 
7658
             return pointer (handler->raw_allocate (n*sizeof(T)));
 
7659
         }
 
7660
         void deallocate (pointer p, size_type n)
 
7661
         {
 
7662
             // No need to free heap memory
 
7663
         }
 
7664
         const handler_type* get_handler() const {
 
7665
             return handler;
 
7666
         }
 
7667
 
 
7668
     // data:
 
7669
 
 
7670
     protected:
 
7671
         handler_type* handler;
 
7672
         template <typename U> friend class heap_allocator;
 
7673
     };
 
7674
 
 
7675
 
 
7676
File: rheolef.info,  Node: stack_allocator internal,  Up: Internals
 
7677
 
 
7678
8.19 stack_allocator - stack-based allocator
 
7679
============================================
 
7680
 
 
7681
(Source file: `util/lib/stack_allocator.h')
 
7682
 
 
7683
Description
 
7684
-----------
 
7685
 
 
7686
Stack-based allocator, conform to the STL specification of allocators.
 
7687
 Designed to use stack-based data passed as a parameter to the
 
7688
allocator constructor.    Does not "free" the memory.    Assumes that
 
7689
if the allocator is copied, stack memory is cleared and new allocations
 
7690
begin   at the bottom of the stack again.
 
7691
 
 
7692
Also works with any memory buffer, including heap memory. If the caller
 
7693
 passes in heap memory, the caller is responsible for freeing the
 
7694
memory.
 
7695
 
 
7696
This allocator handles a limited area of memory: if this limit is
 
7697
reached,   a "std::bad_alloc" exception is emmited.    For a
 
7698
non-limited memory handler in the same spirit, see "heap_allocator"(9).
 
7699
 
 
7700
Example
 
7701
-------
 
7702
 
 
7703
         const size_t stack_size = 1024;
 
7704
         vector<unsigned char> stack (stack_size);
 
7705
         stack_allocator<double> stack_alloc (stack.begin().operator->(), stack.size());
 
7706
         typedef map <size_t, double, less<size_t>, stack_allocator<pair<size_t,double> > >  map_type;
 
7707
         map_type a (less<size_t>(), stack_alloc);
 
7708
         a.insert (make_pair (0, 3.14));
 
7709
         a.insert (make_pair (1, 1.17));
 
7710
         for (map_type::iterator iter = a.begin(), last = a.end(); iter != last; iter++) {
 
7711
           cout << (*iter).first << " " << (*iter).second << endl;
 
7712
         }
 
7713
 
 
7714
Implementation
 
7715
--------------
 
7716
 
 
7717
     template <typename T>
 
7718
     class stack_allocator {
 
7719
     protected:
 
7720
         struct handler_type; // forward declaration:
 
7721
     public:
 
7722
 
 
7723
     // typedefs:
 
7724
 
 
7725
         typedef size_t    size_type;
 
7726
         typedef ptrdiff_t difference_type;
 
7727
         typedef T*        pointer;
 
7728
         typedef const T*  const_pointer;
 
7729
         typedef T&        reference;
 
7730
         typedef const T&  const_reference;
 
7731
         typedef T         value_type;
 
7732
 
 
7733
     // constructors:
 
7734
 
 
7735
         stack_allocator() throw()
 
7736
           : handler (new handler_type)
 
7737
         {
 
7738
         }
 
7739
         stack_allocator (unsigned char* stack, size_t stack_size) throw()
 
7740
           : handler (new handler_type (stack, stack_size))
 
7741
         {
 
7742
             warning_macro ("stack_allocator cstor");
 
7743
         }
 
7744
         stack_allocator (const stack_allocator& sa) throw()
 
7745
           : handler (sa.handler)
 
7746
         {
 
7747
             ++handler->reference_count;
 
7748
         }
 
7749
         template <typename U>
 
7750
         stack_allocator (const stack_allocator<U>& sa) throw()
 
7751
           : handler ((typename stack_allocator<T>::handler_type*)(sa.handler))
 
7752
         {
 
7753
             ++handler->reference_count;
 
7754
         }
 
7755
         ~stack_allocator() throw()
 
7756
         {
 
7757
             warning_macro ("stack_allocator dstor");
 
7758
             check_macro (handler != NULL, "unexpected null mem_info");
 
7759
             if (--handler->reference_count == 0) delete handler;
 
7760
         }
 
7761
         // Rebind to allocators of other types
 
7762
         template <typename U>
 
7763
         struct rebind {
 
7764
             typedef stack_allocator<U> other;
 
7765
         };
 
7766
 
 
7767
     // assignement:
 
7768
 
 
7769
         stack_allocator& operator= (const stack_allocator& sa)
 
7770
         {
 
7771
             handler = sa.handler;
 
7772
             ++handler->reference_count;
 
7773
             return *this;
 
7774
         }
 
7775
 
 
7776
     // utility functions:
 
7777
 
 
7778
         pointer       address (reference r)       const { return &r; }
 
7779
         const_pointer address (const_reference c) const { return &c; }
 
7780
         size_type     max_size() const { return std::numeric_limits<size_t>::max() / sizeof(T); }
 
7781
 
 
7782
     // in-place construction/destruction
 
7783
 
 
7784
         void construct (pointer p, const_reference c)
 
7785
         {
 
7786
             // placement new operator:
 
7787
             new( reinterpret_cast<void*>(p) ) T(c);
 
7788
         }
 
7789
         void destroy (pointer p)
 
7790
         {
 
7791
             // call destructor directly:
 
7792
             (p)->~T();
 
7793
         }
 
7794
 
 
7795
     // allocate raw memory
 
7796
 
 
7797
         pointer allocate (size_type n, const void* = NULL)
 
7798
         {
 
7799
             warning_macro ("allocate "<<n<<" type " << typename_macro(T));
 
7800
             check_macro (handler->stack != NULL, "unexpected null stack");
 
7801
             void* p = handler->stack + handler->allocated_size;
 
7802
             handler->allocated_size += n*sizeof(T);
 
7803
 
 
7804
             if (handler->allocated_size + 1 > handler->max_size) {
 
7805
                 warning_macro ("stack is full: throwing...");
 
7806
                 throw std::bad_alloc();
 
7807
             }
 
7808
             return pointer (p);
 
7809
         }
 
7810
         void deallocate (pointer p, size_type n)
 
7811
         {
 
7812
             warning_macro ("deallocate "<<n<<" type "<<typename_macro(T));
 
7813
             // No need to free stack memory
 
7814
         }
 
7815
         const handler_type* get_handler() const {
 
7816
             return handler;
 
7817
         }
 
7818
 
 
7819
     // data:
 
7820
 
 
7821
     protected:
 
7822
         struct handler_type {
 
7823
             unsigned char* stack;
 
7824
             size_t         allocated_size;
 
7825
             size_t         max_size;
 
7826
             size_t         reference_count;
 
7827
 
 
7828
             handler_type()
 
7829
               : stack (NULL),
 
7830
                 allocated_size (0),
 
7831
                 max_size (0),
 
7832
                 reference_count (1)
 
7833
             {
 
7834
               warning_macro ("stack_allocator::mem_info cstor NULL");
 
7835
             }
 
7836
             handler_type (unsigned char* stack1, size_t size1)
 
7837
               : stack (stack1),
 
7838
                 allocated_size (0),
 
7839
                 max_size (size1),
 
7840
                 reference_count (1)
 
7841
             {
 
7842
               warning_macro ("stack_allocator::mem_info cstori: size="<<max_size);
 
7843
             }
 
7844
             ~handler_type()
 
7845
             {
 
7846
               warning_macro ("stack_allocator::mem_info dstor: size="<<max_size);
 
7847
             }
 
7848
         };
 
7849
         handler_type* handler;
 
7850
         template <typename U> friend class stack_allocator;
 
7851
     };
 
7852
     // Comparison
 
7853
     template <typename T1>
 
7854
     bool operator==( const stack_allocator<T1>& lhs, const stack_allocator<T1>& rhs) throw()
 
7855
     {
 
7856
         return lhs.get_handler() == rhs.get_handler();
 
7857
     }
 
7858
     template <typename T1>
 
7859
     bool operator!=( const stack_allocator<T1>& lhs, const stack_allocator<T1>& rhs) throw()
 
7860
     {
 
7861
         return lhs.get_handler() != rhs.get_handler();
 
7862
     }
 
7863
 
 
7864
 
 
7865
File: rheolef.info,  Node: pretty_name internal,  Up: Internals
 
7866
 
 
7867
8.20 `typename_macro', `pretty_typename_macro' - type demangler and pretty printer
 
7868
==================================================================================
 
7869
 
 
7870
(Source file: `util/lib/pretty_name.h')
 
7871
 
 
7872
Description
 
7873
-----------
 
7874
 
 
7875
These preprocessor macro-definitions are usefull when dealing with
 
7876
complex types   as generated by imbricted template technics: they print
 
7877
in clear a complex type at run-time.    `typeid_name_macro' obtains a
 
7878
human readable type in a `std::tring' form   by calling the system
 
7879
`typeid' function and then a demangler.    When this type is very long,
 
7880
`pretty_name_macro' prints also it in a multi-line   form with a pretty
 
7881
indentation.
 
7882
 
 
7883
Example
 
7884
-------
 
7885
 
 
7886
       typedef map <size_t, double, less<size_t>, heap_allocator<pair<size_t,double> > >  map_type;
 
7887
       cout << typeid_name_macro (map_type);
 
7888
 
 
7889
Implementation
 
7890
--------------
 
7891
 
 
7892
     extern std::string typeid_name (const char* name, bool do_indent);
 
7893
 
 
7894
     /// @brief get string from a type, with an optional pretty-printing for complex types
 
7895
     #define        typename_macro(T) typeid_name(typeid(T).name(), false)
 
7896
     #define pretty_typename_macro(T) typeid_name(typeid(T).name(), true)
 
7897
 
 
7898
     /// @brief get string type from a variable or expression
 
7899
     template <class T> std::string        typename_of (T x) { return        typename_macro(T); }
 
7900
     template <class T> std::string pretty_typename_of (T x) { return pretty_typename_macro(T); }
 
7901
 
 
7902
 
 
7903
File: rheolef.info,  Node: acinclude internal,  Up: Internals
 
7904
 
 
7905
8.21 `acinclude' - autoconf macros
 
7906
==================================
 
7907
 
 
7908
(Source file: `config/acinclude.m4') 
 
7909
 
 
7910
Description
 
7911
-----------
 
7912
 
 
7913
These macros test for particular system featutres that     rheolef
 
7914
uses. These tests print the messages telling     the user which feature
 
7915
they are looking for and what     they find. They cache their results
 
7916
for future     `configure' runs.      Some of these macros     "set"
 
7917
some shell variable,     "defines" some output variables for the
 
7918
`config.h' header,     or performs Makefile macros "subsitutions".
 
7919
See `autoconf' documentation for how to use such     variables.
 
7920
 
 
7921
Synopsis
 
7922
--------
 
7923
 
 
7924
Follows a list of particular check required for a   successfull
 
7925
installation.
 
7926
 
 
7927
`RHEO_CHECK_GINAC'
 
7928
 
 
7929
Check to see if GiNaC library exists.      If so, set the shell
 
7930
variable `rheo_have_ginac'     to "yes", defines HAVE_GINAC and
 
7931
substitues INCLUDES_GINAC and LADD_GINAC     for adding in CFLAGS and
 
7932
LDFLAGS, respectively,     If not, set the shell variable
 
7933
rheo_have_ginac to "no".
 
7934
 
 
7935
`RHEO_CHECK_CLN'
 
7936
 
 
7937
Check to see if library `-lcln' exists.      If so, set the shell
 
7938
variable `rheo_have_cln'     to "yes", defines HAVE_CLN and
 
7939
substitues INCLUDES_CLN and LADD_CLN     for adding in CFLAGS and
 
7940
LDFLAGS, respectively,     If not, set the shell variable no "no".
 
7941
Includes and libraries path are searched from a     given shell
 
7942
variable `rheo_dir_cln'.      This shell variable could be set for
 
7943
instance     by an appropriate `--with-cln'=VALUE_DIR_CLN option.
 
7944
The default value is `/usr/local/math'.
 
7945
 
 
7946
`RHEO_CHECK_SPOOLES_2_0'
 
7947
 
 
7948
Check to see if spooles library has old version 2.0     since
 
7949
`FrontMtx_factorInpMtx' profile has changed     in version 2.2.      If
 
7950
so, defines HAVE_SPOOLES_2_0.      This macro is called by
 
7951
RHEO_CHECK_SPOOLES.
 
7952
 
 
7953
`RHEO_CHECK_TAUCS'
 
7954
 
 
7955
Check to see if taucs library and headers exists.      If so, set the
 
7956
shell variable "rheo_have_taucs"     to "yes", defines HAVE_TAUCS and
 
7957
 substitues INCLUDES_TAUCS and LADD_TAUCS     for adding in CXXFLAGS
 
7958
and LDFLAGS, respectively,     If not, set the shell variable to "no".
 
7959
   Includes and libraries options are     given shell variable
 
7960
$rheo_ldadd_taucs and $rheo_incdir_taucs.      These shell variables
 
7961
could be set for instance     by appropriates
 
7962
"-with-taucs-ldadd="'rheo_ldadd_taucs' and
 
7963
"-with-taucs-includes="'rheo_incdir_taucs' options.
 
7964
 
 
7965
`RHEO_CHECK_BOOST'
 
7966
 
 
7967
Check to see if boost headers exists.      If so, set the shell
 
7968
variable "rheo_have_boost"     to "yes", defines HAVE_BOOST and
 
7969
substitues INCLUDES_BOOST for adding in CXXFLAGS,     and LDADD_BOOST
 
7970
for adding in LIBS.      If not, set the shell variable to "no".
 
7971
Includes options are     given in the shell variables
 
7972
$rheo_incdir_boost and $rheo_libdir_boost.      These shell variables
 
7973
could be set for instance     by appropriates
 
7974
"-with-boost-includes="'rheo_incdir_boost'     and
 
7975
"-with-boost-libdir="'rheo_libdir_boost' options.
 
7976
 
 
7977
`RHEO_CHECK_ZLIB'
 
7978
 
 
7979
Check to see if zlib library and headers exists.      If so, set the
 
7980
shell variable "rheo_have_zlib"     to "yes", defines HAVE_ZLIB and
 
7981
substitues INCLUDES_ZLIB and LADD_ZLIB     for adding in CXXFLAGS and
 
7982
LDFLAGS, respectively,     If not, set the shell variable to "no".
 
7983
Includes and libraries path are searched from     given shell variable
 
7984
$rheo_dir_zlib/lib and $rheo_incdir_zlib.      Default value for
 
7985
$rheo_incdir_zlib is $rheo_dir_zlib/include.      These shell variables
 
7986
could be set for instance     by appropriates "-with-zlib="'dir_zlib'
 
7987
and     "-with-zlib-includes="'incdir_zlib' options.
 
7988
 
 
7989
`RHEO_CHECK_SPOOLES'
 
7990
 
 
7991
Check to see if spooles library and headers exists.      If so, set the
 
7992
shell variable "rheo_have_spooles"     to "yes", defines HAVE_SPOOLES
 
7993
and     substitues INCLUDES_SPOOLES and LADD_SPOOLES     for adding in
 
7994
CXXFLAGS and LDFLAGS, respectively,     If not, set the shell variable
 
7995
to "no".      Includes and libraries path are searched from     given
 
7996
shell variable "rheo_libdir_spooles" and "rheo_incdir_spooles".
 
7997
These shell variables could be set for instance     by appropriates
 
7998
"-with-spooles="'libdir_spooles' and
 
7999
"-with-spooles-includes="'incdir_spooles' options.
 
8000
 
 
8001
`RHEO_CHECK_UMFPACK'
 
8002
 
 
8003
Check to see if umfpack library and headers exists.      If so, set the
 
8004
shell variable "rheo_have_umfpack"     to "yes", defines HAVE_UMFPACK
 
8005
and     substitues INCLUDES_UMFPACK and LADD_UMFPACK     for adding in
 
8006
CXXFLAGS and LDFLAGS, respectively,     If not, set the shell variable
 
8007
to "no".      Includes and libraries path are searched from     given
 
8008
shell variable "rheo_libdir_umfpack" and "rheo_incdir_umfpack".
 
8009
These shell variables could be set for instance     by appropriates
 
8010
"-with-umfpack="'libdir_umfpack' and
 
8011
"-with-umfpack-includes="'incdir_umfpack' options.
 
8012
 
 
8013
`RHEO_CHECK_MALLOC_DBG'
 
8014
 
 
8015
Check to see if malloc debug library -lmalloc_dbg     and corresponding
 
8016
header <malloc_dbg.h> exists.      If so, set the shell variable
 
8017
`rheo_have_malloc_dbg'     to "yes", defines HAVE_MALLOC_DBG,     add
 
8018
`-I'DIR_MALLOC_DBG`/include' to CFLAGS,     add
 
8019
DIR_MALLOC_DBG`/lib/libmalloc_dbg.a' to LDFLAGS.      Here,
 
8020
DIR_MALLOC_DBG is the directory such that     DIR_MALLOC_DBG`/bin'
 
8021
appears in PATH and     the command DIR_MALLOC_DBG`/bin/malloc_dbg'
 
8022
exists.      If not, set the variable to "no".           Set also
 
8023
LIBS_MALLOC_DBG to these flags.
 
8024
 
 
8025
`RHEO_CHECK_DMALLOC'
 
8026
 
 
8027
Check whether the dmalloc     package exists and set the corresponding
 
8028
  shell value "rheo_have_dmalloc" and     HAVE_DMALLOC (in Makefile.am
 
8029
and config.h) accordingly,     create LDADD_DMALLOC and LDADD_DMALLOCXX
 
8030
Makefile.am variables.
 
8031
 
 
8032
`RHEO_CHECK_NAMESPACE'
 
8033
 
 
8034
Check whether the namespace feature     is supported by the C++
 
8035
compiler.      value. So, try to compile     the following code:
 
8036
                namespace computers {
 
8037
                   struct keyboard { int getkey() const { return 0; } };
 
8038
                }
 
8039
                namespace music {
 
8040
                   struct keyboard { void playNote(int note); };
 
8041
                }
 
8042
                namespace music {
 
8043
                   void keyboard::playNote(int note) { }
 
8044
                }
 
8045
                using namespace computers;
 
8046
           int main() {
 
8047
              keyboard x;
 
8048
              int z = x.getkey();
 
8049
              music::keyboard y;
 
8050
              y.playNote(z);
 
8051
              return 0;
 
8052
           }
 
8053
    If it compile, set the corresponding     shell variable
 
8054
"rheo_have_namespace"     to "yes" and defines HAVE_NAMESPACE.      If
 
8055
not, set the variable no "no".
 
8056
 
 
8057
`RHEO_CHECK_STD_NAMESPACE'
 
8058
 
 
8059
Some compilers (e.g. GNU C++ 2.7.2) does not support     the full
 
8060
namespace feature. Nevertheless, they support     the "std:" namespace
 
8061
for the C++ library.      is supported by the C++ compiler. The
 
8062
following code     is submitted to the compiler:
 
8063
              #include<vector.h>
 
8064
              extern "C" void exit(int);
 
8065
              int main() {
 
8066
                  std::vector<int> x(3);
 
8067
                       return 0;
 
8068
              }
 
8069
    If it compile, set the corresponding     shell variable
 
8070
"rheo_have_std_namespace"     to "yes" and defines HAVE_STD_NAMESPACE.
 
8071
   If not, set the variable no "no".
 
8072
 
 
8073
`RHEO_PROG_GNU_MAKE'
 
8074
 
 
8075
Find command make and check whether make is GNU make.      If so, set
 
8076
the corresponding     shell variable "rheo_prog_gnu_make"     to "yes"
 
8077
and substitues no_print_directory_option     to "-no-print-directory".
 
8078
   If not, set the shell variable no "no".
 
8079
 
 
8080
`RHEO_CHECK_ISTREAM_RDBUF'
 
8081
 
 
8082
`RHEO_CHECK_IOS_BP'
 
8083
 
 
8084
Check to see if "iostream::rdbuf(void*)"     function exists, that set
 
8085
the "ios" buffer     of a stream. Despite this function is standard,
 
8086
numerous compilers does not furnish it.      a common implementation is
 
8087
to set directly     the buffer variable. For instance, the CRAY C++
 
8088
compiler implements this variable as "ios::bp".      These two
 
8089
functions set the shell variables     "rheo_have_istream_rdbuf" and
 
8090
"rheo_have_ios_bp"     and define HAVE_ISTREAM_RDBUF and HAVE_IOS_BP
 
8091
respectively.
 
8092
 
 
8093
`RHEO_CHECK_IOS_SETSTATE'
 
8094
 
 
8095
Check to see if "ios::setstate(long)"     function exists, that set the
 
8096
"ios" state variable     of a stream. Despite this function is standard,
 
8097
   numerous compilers does not furnish it.      a common implementation
 
8098
is to set directly     the buffer variable. For instance, the CRAY C++
 
8099
  compiler does not implements it.      This function set the shell
 
8100
variables     "rheo_have_ios_setstate"     and define HAVE_IOS_SETSTATE.
 
8101
 
 
8102
`RHEO_CHECK_FILEBUF_INT'
 
8103
 
 
8104
`RHEO_CHECK_FILEBUF_FILE'
 
8105
 
 
8106
`RHEO_CHECK_FILEBUF_FILE_MODE'
 
8107
 
 
8108
Check wheter "filebuf::filebuf(int fileno)",
 
8109
"filebuf::filebuf(FILE* fd)" exist,     or "filebuf::filebuf(FILE* fd,
 
8110
ios::openmode)" exist,     respectively.      If so, set the
 
8111
corresponding     shell variable "rheo_have_filebuf_int"     (resp.
 
8112
"rheo_have_filebuf_file")     to "yes" and defines HAVE_FILEBUF_INT,
 
8113
(resp. HAVE_FILEBUF_FILE).      If not, set the variable no "no".
 
8114
Notes that there is no standardisation     of this function in the
 
8115
"c++" library.      Nevertheless, this fonctionality is     usefull to
 
8116
open a pipe stream class,     as "pstream(3)".
 
8117
 
 
8118
`RHEO_CHECK_GETTIMEOFDAY'
 
8119
 
 
8120
Check whether the "gettimeofday(timeval*, timezone*)"     function
 
8121
exists and set the corresponding     shell value
 
8122
"rheo_have_gettimeofday" and     define HAVE_GETTIMEOFDAY accordingly.
 
8123
 
 
8124
`RHEO_CHECK_WIERDGETTIMEOFDAY'
 
8125
 
 
8126
This is for Solaris, where they decided     to change the CALLING
 
8127
SEQUENCE OF gettimeofday!      Check whether the
 
8128
"gettimeofday(timeval*)"     function exists and set the corresponding
 
8129
  shell value "rheo_have_wierdgettimeofday" and     define
 
8130
HAVE_WIERDGETTIMEOFDAY accordingly.
 
8131
 
 
8132
`RHEO_CHECK_BSDGETTIMEOFDAY'
 
8133
 
 
8134
For BSD systems,     check whether the "BSDgettimeofday(timeval*,
 
8135
timezone*)"     function exists and set the corresponding     shell
 
8136
value "rheo_have_bsdgettimeofday" and     define HAVE_BSDGETTIMEOFDAY
 
8137
accordingly.
 
8138
 
 
8139
`RHEO_CHECK_AMICCLK'
 
8140
 
 
8141
Check whether the clock "amicclk()"     function exists and set the
 
8142
corresponding     shell value "rheo_have_amicclk" and     define
 
8143
HAVE_AMICCLK accordingly.
 
8144
 
 
8145
`RHEO_CHECK_TEMPLATE_FULL_SPECIALIZATION'
 
8146
 
 
8147
Check whether the template specialization syntax "template<>"     is
 
8148
supported by the compiler     value. So, try to compile, run     and
 
8149
check the return value for the following code:
 
8150
           template<class T> struct toto {
 
8151
               int tutu() const { return 1; }
 
8152
           };
 
8153
           template<> struct toto<float> {
 
8154
               int tutu() const { return 0; }
 
8155
           };
 
8156
           main() {
 
8157
            toto<float> x;
 
8158
            return x.tutu();
 
8159
           }
 
8160
    If so, set the corresponding     shell variable
 
8161
"rheo_have_template_full_specialization"     to "yes" and defines
 
8162
HAVE_TEMPLATE_FULL_SPECIALIZATION.      If not, set the variable no
 
8163
"no".
 
8164
 
 
8165
`RHEO_CHECK_ISNAN_DOUBLE'
 
8166
 
 
8167
`RHEO_CHECK_ISINF_DOUBLE'
 
8168
 
 
8169
`RHEO_CHECK_FINITE_DOUBLE'
 
8170
 
 
8171
`RHEO_CHECK_INFINITY'
 
8172
 
 
8173
`RHEO_CHECK_ABS_DOUBLE'
 
8174
 
 
8175
`RHEO_CHECK_SQR_DOUBLE'
 
8176
 
 
8177
Check whether the funtions
 
8178
                 bool isnan(double);
 
8179
                 bool isinf(double);
 
8180
                 bool finite(double);
 
8181
                 double infinity();
 
8182
                 double abs();
 
8183
                 double sqr();
 
8184
    are supported by the compiler, respectively.      If so, set the
 
8185
corresponding     shell variable "rheo_have_xxx"     to "yes" and
 
8186
defines HAVE_XXX.      If not, set the variable no "no".
 
8187
 
 
8188
`RHEO_CHECK_FLEX'
 
8189
 
 
8190
Check to see if the "flex" command and the     corresponding header
 
8191
"FlexLexer.h" are available.      If so, set the shell variable
 
8192
"rheo_have_flex"     to "yes" and substitues FLEX to "flex"     and
 
8193
FLEXLEXER_H to the full path for FlexLexer.h     If not, set the shell
 
8194
variable no "no".
 
8195
 
 
8196
`RHEO_PROG_CC_KAI'
 
8197
 
 
8198
Check wheter we are using KAI C++ compiler.      If so, set the shell
 
8199
variable "ac_cv_prog_kcc"     to "yes".      If not, set the shell
 
8200
variable no "no".      The shell variable is also exported for
 
8201
sub-shells,     such as ltconfig from libtool.
 
8202
 
 
8203
`RHEO_PROG_CC_CRAY'
 
8204
 
 
8205
Check wheter we are using CRAY C++ compiler.      If so, set the shell
 
8206
variable "ac_cv_prog_cray_cc"     to "yes" and defines HAVE_CRAY_CXX.
 
8207
  If not, set the shell variable no "no".      The shell variable is
 
8208
also exported for sub-shells.
 
8209
 
 
8210
`RHEO_PROG_CC_DEC'
 
8211
 
 
8212
Check wheter we are using DEC C++ compiler.      If so, set the shell
 
8213
variable "ac_cv_prog_dec_cc"     to "yes".      If not, set the shell
 
8214
variable no "no".      The shell variable is also exported for
 
8215
sub-shells,     such as ltconfig from libtool.
 
8216
 
 
8217
`RHEO_RECOGNIZE_CXX'
 
8218
 
 
8219
Check wheter we are able to recognize the C++ compiler.      Tested
 
8220
compilers:
 
8221
              The KAI  C++ compiler that defines: __KCC     (KCC-3.2b)
 
8222
              The GNU  C++ compiler that defines: __GNUC__  (egcs-1.1.1)
 
8223
              The CRAY C++ compiler that defines: cray
 
8224
              The DEC  C++ compiler that defines: __DECCXX
 
8225
 
 
8226
If so, substitue RECOGNIZED_CXX to a specific     compiler's rule file,
 
8227
e.g, "${top_srcdir}/config/gnu_cxx.mk",     for a subsequent Makefile
 
8228
include.      If not, substitue to "/dev/null".      Substitutes also
 
8229
EXTRA_LDFLAGS.      Raw cc is the C compiler associated to the C++ one.
 
8230
By this way     C and C++ files are handled with a .c suffix. Special C
 
8231
files that requiere     the cc compiler, such as "alloca.c" use some
 
8232
specific makefile rule.
 
8233
 
 
8234
usage example:
 
8235
         AC_PROG_CC(gcc cc cl)
 
8236
         AC_PROG_CXX(c++ g++ cxx KCC CC CC cc++ xlC aCC)
 
8237
         RHEO_RECOGNIZE_CXX
 
8238
 
 
8239
`RHEO_OPTIMIZE_CXX'
 
8240
 
 
8241
Set some optimization flags associated to the recognized C++ compiler
 
8242
 and platform.
 
8243
 
 
8244
`RHEO_CHECK_LATEX_HYPEREF'     
 
8245
 
 
8246
Check whether the hyperref LaTeX     package exists and set the
 
8247
corresponding     shell value "rheo_have_latex_hyperref" and
 
8248
HAVE_LATEX_HYPEREF (for Makefiles) accordingly.
 
8249
 
 
8250
`RHEO_CHECK_MPI'
 
8251
 
 
8252
Check for the "mpirun" command, the     corresponding header "mpi.h"
 
8253
and library "-lmpi" are available.      If so, set the shell variable
 
8254
"rheo_have_mpi"     to "yes", defines HAVE_MPI and substitues MPIRUN to
 
8255
"mpirun" and     RUN to "mpirun -np 2",     INCLUDES_MPI and LDADD_MPI.
 
8256
   If not, set the shell variable no "no".
 
8257
 
 
8258
`RHEO_CHECK_PARMETIS'
 
8259
 
 
8260
Check for the "parmetis" and "metis" libraries.      Defines
 
8261
HAVE_PARMETIS and substitues     INCLUDES_MPI and LDADD_MPI.
 
8262
Requires the MPI library.
 
8263
 
 
8264
`RHEO_CHECK_SCOTCH'
 
8265
 
 
8266
Check for the "scotch" distributed mesh partitionner libraries.
 
8267
Defines HAVE_SCOTCH and substitues     INCLUDES_SCOTCH and LDADD_SCOTCH.
 
8268
        Requires the MPI library.
 
8269
 
 
8270
`RHEO_CHECK_BLAS'
 
8271
 
 
8272
Check for the "blas" basic linear algebra subroutines library.
 
8273
Defines HAVE_BLAS and substitues LDADD_BLAS and INCLUDES_BLAS.
 
8274
 
 
8275
`RHEO_CHECK_PASTIX'
 
8276
 
 
8277
Check for the "pastix" distributed direct solver libraries.
 
8278
Defines HAVE_PASTIX and substitues     INCLUDES_PASTIX and LDADD_PASTIX.
 
8279
        Requires the MPI and SCOTCH libraries.
 
8280
 
 
8281
 
 
8282
File: rheolef.info,  Node: FAQ for developers,  Up: Top
 
8283
 
 
8284
9 FAQ for developers
 
8285
********************
 
8286
 
 
8287
This list of Frequently Asked Questions intended for Rheolef developers
 
8288
and maintainers.  I'm looking for new questions (_with_ answers, better
 
8289
answers, or both.  Please, send suggestions to
 
8290
<Pierre.Saramito@imag.fr>.
 
8291
 
 
8292
9.1 How to regenerate the `configure' script
 
8293
============================================
 
8294
 
 
8295
The configure script and makefiles are automatically produced from file
 
8296
`configure.ac' and `Makefile.am' by using the autoconf and automake
 
8297
commands. Enter:
 
8298
 
 
8299
        bootstrap
 
8300
 
 
8301
9.1.1 In which order does the things build ?
 
8302
--------------------------------------------
 
8303
 
 
8304
Let us look at with details the configure files flow:
 
8305
 
 
8306
     [acinclude.m4] -----> aclocal* -----------> [aclocal.m4]
 
8307
 
 
8308
     [configure.ac] -+
 
8309
     ----------------+---> autoconf* ----------> configure
 
8310
     [aclocal.m4] ---+
 
8311
 
 
8312
     [Makefile.am] ------> automake* ----------> Makefile.in
 
8313
 
 
8314
     [config.h.in] -+                        +-> config.h
 
8315
                    |                        |
 
8316
     Makefile.in ---+----> configure* -------+-> Makefile
 
8317
                    |                        |
 
8318
     [config.mk.in] +                        +-> config.mk
 
8319
 
 
8320
9.1.2 What means these commands ?
 
8321
---------------------------------
 
8322
 
 
8323
Let us review the list of commands:
 
8324
 
 
8325
`aclocal'
 
8326
        take `acinclude.m4' and build `aclocal.m4'.             The
 
8327
     arguments specifies that these files are located           in the
 
8328
     `config/' directory.
 
8329
 
 
8330
`automake'
 
8331
        translate every `Makefile.am' and then build a `Makefile.in'.
 
8332
 
 
8333
`autoconf'
 
8334
         translate `configure.ac' in            `configure' which is an
 
8335
     executable shell script.           The arguments specifies that
 
8336
     `aclocal.m4' is located in the     `config/' dirctory.
 
8337
     All this files are machine independent.
 
8338
 
 
8339
`configure'
 
8340
        the automatically generated script,     scan the machine and
 
8341
     translate `config.h.in', `config.mk.in'            and every
 
8342
     `Makefile.in'      into `config.h', `config.mk' and every
 
8343
     `Makefile', respectively.          At this step, all produced
 
8344
     files are machine dependent.
 
8345
 
 
8346
 
 
8347
9.2 How to save my version ?
 
8348
============================
 
8349
 
 
8350
First, check that our distribution is valid
 
8351
             make distcheck
 
8352
 
 
8353
First, check that your modifications are not in conflict with others.
 
8354
Go to the top source directory and enter:
 
8355
 
 
8356
        make status
 
8357
 
 
8358
9.2.1 Easy: no conflicts with another developer
 
8359
-----------------------------------------------
 
8360
 
 
8361
A listing of labeled files appears:
 
8362
 
 
8363
        Modified                skit/lib/blas1_tst.c
 
8364
        Update                  skit/lib/blas2_tst.c
 
8365
 
 
8366
Its mean that you have modified `blas1_tst.c'.  Another concurrent
 
8367
developer has modified `blas2_tst.c', and your local file version is
 
8368
not up-to-date.  There is no conflict, labeled by a `*Merge*' label.
 
8369
 
 
8370
First, update your local version:
 
8371
 
 
8372
        make update
 
8373
 
 
8374
Before to store your version of the Rheolef distribution, check the
 
8375
consistency by running rnon-regression tests:
 
8376
 
 
8377
        make distcheck
 
8378
 
 
8379
When all tests are ok:
 
8380
 
 
8381
        make save
 
8382
 
 
8383
and enter a change log comment terminated by the `ctrl-D' key.
 
8384
 
 
8385
Check now that your version status is the most up-to-date Rheolef
 
8386
distribution:
 
8387
 
 
8388
        make status
 
8389
 
 
8390
9.2.2 I have conflicts with another developer
 
8391
---------------------------------------------
 
8392
 
 
8393
The listing issued by `make status' looks like:
 
8394
 
 
8395
        Modified                skit/lib/blas1_tst.c
 
8396
        Update                  skit/lib/blas2_tst.c
 
8397
        *Merge*                 skit/lib/blas3_tst.c
 
8398
 
 
8399
Its mean that you and another developer have modified at least one
 
8400
common line in `blas3_tst.c'.  Moreover, the developer has already
 
8401
saved his version in a previous Rheolef distribution.  You have now to
 
8402
merge these modifications.  Thus, enter:
 
8403
        cd skit/lib
 
8404
        mv blas3_tst.c blas3_tst.c.new
 
8405
        cvs checkout blas3_tst.c
 
8406
        sdiff blas3_tst.c blas3_tst.c.new | more
 
8407
and then edit `blas3_tst.c' to integrate the modifications of
 
8408
`blas3_tst.c.new', generated by another developer. When it is done, go
 
8409
to the top directory and enter,
 
8410
        make status
 
8411
It prints new:
 
8412
        Modified                skit/lib/blas1_tst.c
 
8413
        Update                  skit/lib/blas2_tst.c
 
8414
        Modified                skit/lib/blas3_tst.c
 
8415
The situation becomes mature:
 
8416
        make update
 
8417
It will update the `blas2_tst.c'.  Finally,
 
8418
        make save
 
8419
that will save modified `blas1_tst.c' and `blas3_tst.c'.
 
8420
 
 
8421
9.2.3 I have deleted a source file...
 
8422
-------------------------------------
 
8423
 
 
8424
I have entered:
 
8425
 
 
8426
        rm Makefile.am
 
8427
 
 
8428
...aie !
 
8429
 
 
8430
How to restaure the file, now ?
 
8431
 
 
8432
Enter:
 
8433
 
 
8434
        cvs checkout Makefile.am
 
8435
 
 
8436
You restaure the last available version of the missing file in the most
 
8437
up-to-date Rheolef distribution.
 
8438
 
 
8439
 
 
8440
File: rheolef.info,  Node: Copying,  Up: Top
 
8441
 
 
8442
Annexe A GNU General Public License
 
8443
***********************************
 
8444
 
 
8445
                         Version 2, June 1991
 
8446
 
 
8447
     Copyright (C) 1989, 1991 Free Software Foundation, Inc.
 
8448
     675 Mass Ave, Cambridge, MA 02139, USA
 
8449
 
 
8450
     Everyone is permitted to copy and distribute verbatim copies
 
8451
     of this license document, but changing it is not allowed.
 
8452
 
 
8453
Preamble
 
8454
========
 
8455
 
 
8456
The licenses for most software are designed to take away your freedom
 
8457
to share and change it.  By contrast, the GNU General Public License is
 
8458
intended to guarantee your freedom to share and change free
 
8459
software--to make sure the software is free for all its users.  This
 
8460
General Public License applies to most of the Free Software
 
8461
Foundation's software and to any other program whose authors commit to
 
8462
using it.  (Some other Free Software Foundation software is covered by
 
8463
the GNU Library General Public License instead.)  You can apply it to
 
8464
your programs, too.
 
8465
 
 
8466
When we speak of free software, we are referring to freedom, not price.
 
8467
Our General Public Licenses are designed to make sure that you have the
 
8468
freedom to distribute copies of free software (and charge for this
 
8469
service if you wish), that you receive source code or can get it if you
 
8470
want it, that you can change the software or use pieces of it in new
 
8471
free programs; and that you know you can do these things.
 
8472
 
 
8473
To protect your rights, we need to make restrictions that forbid anyone
 
8474
to deny you these rights or to ask you to surrender the rights.  These
 
8475
restrictions translate to certain responsibilities for you if you
 
8476
distribute copies of the software, or if you modify it.
 
8477
 
 
8478
For example, if you distribute copies of such a program, whether gratis
 
8479
or for a fee, you must give the recipients all the rights that you
 
8480
have.  You must make sure that they, too, receive or can get the source
 
8481
code.  And you must show them these terms so they know their rights.
 
8482
 
 
8483
We protect your rights with two steps: (1) copyright the software, and
 
8484
(2) offer you this license which gives you legal permission to copy,
 
8485
distribute and/or modify the software.
 
8486
 
 
8487
Also, for each author's protection and ours, we want to make certain
 
8488
that everyone understands that there is no warranty for this free
 
8489
software.  If the software is modified by someone else and passed on, we
 
8490
want its recipients to know that what they have is not the original, so
 
8491
that any problems introduced by others will not reflect on the original
 
8492
authors' reputations.
 
8493
 
 
8494
Finally, any free program is threatened constantly by software patents.
 
8495
We wish to avoid the danger that redistributors of a free program will
 
8496
individually obtain patent licenses, in effect making the program
 
8497
proprietary.  To prevent this, we have made it clear that any patent
 
8498
must be licensed for everyone's free use or not licensed at all.
 
8499
 
 
8500
The precise terms and conditions for copying, distribution and
 
8501
modification follow.
 
8502
 
 
8503
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
8504
  0. This License applies to any program or other work which contains a
 
8505
     notice placed by the copyright holder saying it may be distributed
 
8506
     under the terms of this General Public License.  The "Program",
 
8507
     below, refers to any such program or work, and a "work based on
 
8508
     the Program" means either the Program or any derivative work under
 
8509
     copyright law: that is to say, a work containing the Program or a
 
8510
     portion of it, either verbatim or with modifications and/or
 
8511
     translated into another language.  (Hereinafter, translation is
 
8512
     included without limitation in the term "modification".)  Each
 
8513
     licensee is addressed as "you".
 
8514
 
 
8515
     Activities other than copying, distribution and modification are
 
8516
     not covered by this License; they are outside its scope.  The act
 
8517
     of running the Program is not restricted, and the output from the
 
8518
     Program is covered only if its contents constitute a work based on
 
8519
     the Program (independent of having been made by running the
 
8520
     Program).  Whether that is true depends on what the Program does.
 
8521
 
 
8522
  1. You may copy and distribute verbatim copies of the Program's
 
8523
     source code as you receive it, in any medium, provided that you
 
8524
     conspicuously and appropriately publish on each copy an appropriate
 
8525
     copyright notice and disclaimer of warranty; keep intact all the
 
8526
     notices that refer to this License and to the absence of any
 
8527
     warranty; and give any other recipients of the Program a copy of
 
8528
     this License along with the Program.
 
8529
 
 
8530
     You may charge a fee for the physical act of transferring a copy,
 
8531
     and you may at your option offer warranty protection in exchange
 
8532
     for a fee.
 
8533
 
 
8534
  2. You may modify your copy or copies of the Program or any portion
 
8535
     of it, thus forming a work based on the Program, and copy and
 
8536
     distribute such modifications or work under the terms of Section 1
 
8537
     above, provided that you also meet all of these conditions:
 
8538
 
 
8539
       a. You must cause the modified files to carry prominent notices
 
8540
          stating that you changed the files and the date of any change.
 
8541
 
 
8542
       b. You must cause any work that you distribute or publish, that
 
8543
          in whole or in part contains or is derived from the Program
 
8544
          or any part thereof, to be licensed as a whole at no charge
 
8545
          to all third parties under the terms of this License.
 
8546
 
 
8547
       c. If the modified program normally reads commands interactively
 
8548
          when run, you must cause it, when started running for such
 
8549
          interactive use in the most ordinary way, to print or display
 
8550
          an announcement including an appropriate copyright notice and
 
8551
          a notice that there is no warranty (or else, saying that you
 
8552
          provide a warranty) and that users may redistribute the
 
8553
          program under these conditions, and telling the user how to
 
8554
          view a copy of this License.  (Exception: if the Program
 
8555
          itself is interactive but does not normally print such an
 
8556
          announcement, your work based on the Program is not required
 
8557
          to print an announcement.)
 
8558
 
 
8559
     These requirements apply to the modified work as a whole.  If
 
8560
     identifiable sections of that work are not derived from the
 
8561
     Program, and can be reasonably considered independent and separate
 
8562
     works in themselves, then this License, and its terms, do not
 
8563
     apply to those sections when you distribute them as separate
 
8564
     works.  But when you distribute the same sections as part of a
 
8565
     whole which is a work based on the Program, the distribution of
 
8566
     the whole must be on the terms of this License, whose permissions
 
8567
     for other licensees extend to the entire whole, and thus to each
 
8568
     and every part regardless of who wrote it.
 
8569
 
 
8570
     Thus, it is not the intent of this section to claim rights or
 
8571
     contest your rights to work written entirely by you; rather, the
 
8572
     intent is to exercise the right to control the distribution of
 
8573
     derivative or collective works based on the Program.
 
8574
 
 
8575
     In addition, mere aggregation of another work not based on the
 
8576
     Program with the Program (or with a work based on the Program) on
 
8577
     a volume of a storage or distribution medium does not bring the
 
8578
     other work under the scope of this License.
 
8579
 
 
8580
  3. You may copy and distribute the Program (or a work based on it,
 
8581
     under Section 2) in object code or executable form under the terms
 
8582
     of Sections 1 and 2 above provided that you also do one of the
 
8583
     following:
 
8584
 
 
8585
       a. Accompany it with the complete corresponding machine-readable
 
8586
          source code, which must be distributed under the terms of
 
8587
          Sections 1 and 2 above on a medium customarily used for
 
8588
          software interchange; or,
 
8589
 
 
8590
       b. Accompany it with a written offer, valid for at least three
 
8591
          years, to give any third party, for a charge no more than your
 
8592
          cost of physically performing source distribution, a complete
 
8593
          machine-readable copy of the corresponding source code, to be
 
8594
          distributed under the terms of Sections 1 and 2 above on a
 
8595
          medium customarily used for software interchange; or,
 
8596
 
 
8597
       c. Accompany it with the information you received as to the offer
 
8598
          to distribute corresponding source code.  (This alternative is
 
8599
          allowed only for noncommercial distribution and only if you
 
8600
          received the program in object code or executable form with
 
8601
          such an offer, in accord with Subsection b above.)
 
8602
 
 
8603
     The source code for a work means the preferred form of the work for
 
8604
     making modifications to it.  For an executable work, complete
 
8605
     source code means all the source code for all modules it contains,
 
8606
     plus any associated interface definition files, plus the scripts
 
8607
     used to control compilation and installation of the executable.
 
8608
     However, as a special exception, the source code distributed need
 
8609
     not include anything that is normally distributed (in either
 
8610
     source or binary form) with the major components (compiler,
 
8611
     kernel, and so on) of the operating system on which the executable
 
8612
     runs, unless that component itself accompanies the executable.
 
8613
 
 
8614
     If distribution of executable or object code is made by offering
 
8615
     access to copy from a designated place, then offering equivalent
 
8616
     access to copy the source code from the same place counts as
 
8617
     distribution of the source code, even though third parties are not
 
8618
     compelled to copy the source along with the object code.
 
8619
 
 
8620
  4. You may not copy, modify, sublicense, or distribute the Program
 
8621
     except as expressly provided under this License.  Any attempt
 
8622
     otherwise to copy, modify, sublicense or distribute the Program is
 
8623
     void, and will automatically terminate your rights under this
 
8624
     License.  However, parties who have received copies, or rights,
 
8625
     from you under this License will not have their licenses
 
8626
     terminated so long as such parties remain in full compliance.
 
8627
 
 
8628
  5. You are not required to accept this License, since you have not
 
8629
     signed it.  However, nothing else grants you permission to modify
 
8630
     or distribute the Program or its derivative works.  These actions
 
8631
     are prohibited by law if you do not accept this License.
 
8632
     Therefore, by modifying or distributing the Program (or any work
 
8633
     based on the Program), you indicate your acceptance of this
 
8634
     License to do so, and all its terms and conditions for copying,
 
8635
     distributing or modifying the Program or works based on it.
 
8636
 
 
8637
  6. Each time you redistribute the Program (or any work based on the
 
8638
     Program), the recipient automatically receives a license from the
 
8639
     original licensor to copy, distribute or modify the Program
 
8640
     subject to these terms and conditions.  You may not impose any
 
8641
     further restrictions on the recipients' exercise of the rights
 
8642
     granted herein.  You are not responsible for enforcing compliance
 
8643
     by third parties to this License.
 
8644
 
 
8645
  7. If, as a consequence of a court judgment or allegation of patent
 
8646
     infringement or for any other reason (not limited to patent
 
8647
     issues), conditions are imposed on you (whether by court order,
 
8648
     agreement or otherwise) that contradict the conditions of this
 
8649
     License, they do not excuse you from the conditions of this
 
8650
     License.  If you cannot distribute so as to satisfy simultaneously
 
8651
     your obligations under this License and any other pertinent
 
8652
     obligations, then as a consequence you may not distribute the
 
8653
     Program at all.  For example, if a patent license would not permit
 
8654
     royalty-free redistribution of the Program by all those who
 
8655
     receive copies directly or indirectly through you, then the only
 
8656
     way you could satisfy both it and this License would be to refrain
 
8657
     entirely from distribution of the Program.
 
8658
 
 
8659
     If any portion of this section is held invalid or unenforceable
 
8660
     under any particular circumstance, the balance of the section is
 
8661
     intended to apply and the section as a whole is intended to apply
 
8662
     in other circumstances.
 
8663
 
 
8664
     It is not the purpose of this section to induce you to infringe any
 
8665
     patents or other property right claims or to contest validity of
 
8666
     any such claims; this section has the sole purpose of protecting
 
8667
     the integrity of the free software distribution system, which is
 
8668
     implemented by public license practices.  Many people have made
 
8669
     generous contributions to the wide range of software distributed
 
8670
     through that system in reliance on consistent application of that
 
8671
     system; it is up to the author/donor to decide if he or she is
 
8672
     willing to distribute software through any other system and a
 
8673
     licensee cannot impose that choice.
 
8674
 
 
8675
     This section is intended to make thoroughly clear what is believed
 
8676
     to be a consequence of the rest of this License.
 
8677
 
 
8678
  8. If the distribution and/or use of the Program is restricted in
 
8679
     certain countries either by patents or by copyrighted interfaces,
 
8680
     the original copyright holder who places the Program under this
 
8681
     License may add an explicit geographical distribution limitation
 
8682
     excluding those countries, so that distribution is permitted only
 
8683
     in or among countries not thus excluded.  In such case, this
 
8684
     License incorporates the limitation as if written in the body of
 
8685
     this License.
 
8686
 
 
8687
  9. The Free Software Foundation may publish revised and/or new
 
8688
     versions of the General Public License from time to time.  Such
 
8689
     new versions will be similar in spirit to the present version, but
 
8690
     may differ in detail to address new problems or concerns.
 
8691
 
 
8692
     Each version is given a distinguishing version number.  If the
 
8693
     Program specifies a version number of this License which applies
 
8694
     to it and "any later version", you have the option of following
 
8695
     the terms and conditions either of that version or of any later
 
8696
     version published by the Free Software Foundation.  If the Program
 
8697
     does not specify a version number of this License, you may choose
 
8698
     any version ever published by the Free Software Foundation.
 
8699
 
 
8700
 10. If you wish to incorporate parts of the Program into other free
 
8701
     programs whose distribution conditions are different, write to the
 
8702
     author to ask for permission.  For software which is copyrighted
 
8703
     by the Free Software Foundation, write to the Free Software
 
8704
     Foundation; we sometimes make exceptions for this.  Our decision
 
8705
     will be guided by the two goals of preserving the free status of
 
8706
     all derivatives of our free software and of promoting the sharing
 
8707
     and reuse of software generally.
 
8708
 
 
8709
                                NO WARRANTY
 
8710
 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
 
8711
     WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
 
8712
     LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
 
8713
     HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
 
8714
     WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
 
8715
     NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 
8716
     FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
 
8717
     QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
 
8718
     PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
 
8719
     SERVICING, REPAIR OR CORRECTION.
 
8720
 
 
8721
 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
 
8722
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
 
8723
     MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
 
8724
     LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
 
8725
     INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
 
8726
     INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
 
8727
     DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
 
8728
     OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
 
8729
     OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
 
8730
     ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 
8731
 
 
8732
                      END OF TERMS AND CONDITIONS
 
8733
How to Apply These Terms to Your New Programs
 
8734
=============================================
 
8735
 
 
8736
If you develop a new program, and you want it to be of the greatest
 
8737
possible use to the public, the best way to achieve this is to make it
 
8738
free software which everyone can redistribute and change under these
 
8739
terms.
 
8740
 
 
8741
To do so, attach the following notices to the program.  It is safest to
 
8742
attach them to the start of each source file to most effectively convey
 
8743
the exclusion of warranty; and each file should have at least the
 
8744
"copyright" line and a pointer to where the full notice is found.
 
8745
 
 
8746
     ONE LINE TO GIVE THE PROGRAM'S NAME AND AN IDEA OF WHAT IT DOES.
 
8747
     Copyright (C) 19YY  NAME OF AUTHOR
 
8748
 
 
8749
     This program is free software; you can redistribute it and/or
 
8750
     modify it under the terms of the GNU General Public License
 
8751
     as published by the Free Software Foundation; either version 2
 
8752
     of the License, or (at your option) any later version.
 
8753
 
 
8754
     This program is distributed in the hope that it will be useful,
 
8755
     but WITHOUT ANY WARRANTY; without even the implied warranty of
 
8756
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
8757
     GNU General Public License for more details.
 
8758
 
 
8759
     You should have received a copy of the GNU General Public License
 
8760
     along with this program; if not, write to the Free Software
 
8761
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
8762
 
 
8763
Also add information on how to contact you by electronic and paper mail.
 
8764
 
 
8765
If the program is interactive, make it output a short notice like this
 
8766
when it starts in an interactive mode:
 
8767
 
 
8768
     Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
 
8769
     Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
 
8770
     type `show w'.  This is free software, and you are welcome
 
8771
     to redistribute it under certain conditions; type `show c'
 
8772
     for details.
 
8773
 
 
8774
The hypothetical commands `show w' and `show c' should show the
 
8775
appropriate parts of the General Public License.  Of course, the
 
8776
commands you use may be called something other than `show w' and `show
 
8777
c'; they could even be mouse-clicks or menu items--whatever suits your
 
8778
program.
 
8779
 
 
8780
You should also get your employer (if you work as a programmer) or your
 
8781
school, if any, to sign a "copyright disclaimer" for the program, if
 
8782
necessary.  Here is a sample; alter the names:
 
8783
 
 
8784
     Yoyodyne, Inc., hereby disclaims all copyright
 
8785
     interest in the program `Gnomovision'
 
8786
     (which makes passes at compilers) written
 
8787
     by James Hacker.
 
8788
 
 
8789
     SIGNATURE OF TY COON, 1 April 1989
 
8790
     Ty Coon, President of Vice
 
8791
 
 
8792
This General Public License does not permit incorporating your program
 
8793
into proprietary programs.  If your program is a subroutine library,
 
8794
you may consider it more useful to permit linking proprietary
 
8795
applications with the library.  If this is what you want to do, use the
 
8796
GNU Library General Public License instead of this License.
 
8797
 
 
8798
 
 
8799
File: rheolef.info,  Node: Concept Index,  Up: Top
 
8800
 
 
8801
Concept Index
 
8802
*************
 
8803
 
 
8804
[index]
 
8805
* Menu:
 
8806
 
 
8807
* advection <1>:                         characteristic internal.
 
8808
                                                              (line   6)
 
8809
* advection:                             geomap internal.     (line   6)
 
8810
* anaglyph 3D stereo rendering <1>:      field command.       (line 135)
 
8811
* anaglyph 3D stereo rendering:          mfield command.      (line 135)
 
8812
* animation <1>:                         form class.          (line 102)
 
8813
* animation:                             branch command.      (line   8)
 
8814
* axisymetric geometry:                  geo class.           (line  51)
 
8815
* Bezier patches:                        cad class.           (line   6)
 
8816
* bilinear form:                         form_element internal.
 
8817
                                                              (line   6)
 
8818
* blocked degree of freedom:             space class.         (line  47)
 
8819
* boundary conditions <1>:               mass form.           (line   6)
 
8820
* boundary conditions <2>:               d2_ds2 form.         (line   6)
 
8821
* boundary conditions:                   d_ds form.           (line   6)
 
8822
* boundary geometry:                     cad class.           (line   6)
 
8823
* bugs:                                  Problems.            (line   6)
 
8824
* cad file format conversion:            cad command.         (line  64)
 
8825
* CAD, Computer Aid Design:              cad command.         (line   6)
 
8826
* cemagref topographic mesh <1>:         iorheo class.        (line 136)
 
8827
* cemagref topographic mesh <2>:         cemagref2field command.
 
8828
                                                              (line   6)
 
8829
* cemagref topographic mesh <3>:         field command.       (line  53)
 
8830
* cemagref topographic mesh:             geo command.         (line 171)
 
8831
* chevron data structure:                ssk class.           (line   6)
 
8832
* Choleski factorization <1>:            ssk class.           (line   6)
 
8833
* Choleski factorization:                permutation class.   (line   6)
 
8834
* configure:                             rheolef-config command.
 
8835
                                                              (line   6)
 
8836
* conjugate gradien algorithm:           mixed_solver algorithm.
 
8837
                                                              (line   6)
 
8838
* conjugate gradient algorithm <1>:      pcg algorithm.       (line   6)
 
8839
* conjugate gradient algorithm:          pminres algorithm.   (line   6)
 
8840
* continuation methods <1>:              form class.          (line 102)
 
8841
* continuation methods:                  branch command.      (line   8)
 
8842
* curl operator:                         curl form.           (line   6)
 
8843
* debugging <1>:                         acinclude internal.  (line 125)
 
8844
* debugging:                             Installing.          (line 293)
 
8845
* deformation:                           iorheo class.        (line  70)
 
8846
* degree of freedom:                     space class.         (line  18)
 
8847
* derivative:                            d_dx form.           (line   6)
 
8848
* diagonal matrix:                       diag class.          (line   6)
 
8849
* direct solver:                         ssk class.           (line   6)
 
8850
* discontinuous approximation:           inv_mass form.       (line   6)
 
8851
* distributed memory:                    csr class.           (line   6)
 
8852
* div(D(.)) operator:                    2D_D form.           (line   6)
 
8853
* divergence <1>:                        div_div form.        (line   6)
 
8854
* divergence:                            div form.            (line   6)
 
8855
* divergence of tensor:                  2D_D form.           (line   6)
 
8856
* edge:                                  edge internal.       (line   6)
 
8857
* elasticity problem <1>:                div_div form.        (line   6)
 
8858
* elasticity problem:                    2D_D form.           (line   6)
 
8859
* elevation <1>:                         iorheo class.        (line  78)
 
8860
* elevation <2>:                         branch command.      (line  79)
 
8861
* elevation:                             field command.       (line 191)
 
8862
* environment sanity check writes:       rheolef-config command.
 
8863
                                                              (line  36)
 
8864
* factorization of sparse matrix:        Installing.          (line  77)
 
8865
* FAQ:                                   FAQ for developers.  (line   6)
 
8866
* finite element method:                 mixed_solver algorithm.
 
8867
                                                              (line   6)
 
8868
* generalized minimum residual method:   gmres algorithm.     (line   6)
 
8869
* geometrical element <1>:               geo_element internal.
 
8870
                                                              (line   6)
 
8871
* geometrical element:                   form_element internal.
 
8872
                                                              (line   6)
 
8873
* Gibbs renumbering <1>:                 ssk class.           (line   6)
 
8874
* Gibbs renumbering:                     permutation class.   (line   6)
 
8875
* grad(div(.)) operator:                 div_div form.        (line   6)
 
8876
* gradient:                              grad form.           (line   6)
 
8877
* hexaedra:                              hexa internal.       (line   6)
 
8878
* incompresible elasticity:              mixed_solver algorithm.
 
8879
                                                              (line   6)
 
8880
* inheritance diagrams for classes:      Installing.          (line 419)
 
8881
* installing <1>:                        rheolef-config command.
 
8882
                                                              (line   6)
 
8883
* installing:                            Installing.          (line   6)
 
8884
* iterative solver <1>:                  gmres algorithm.     (line   6)
 
8885
* iterative solver <2>:                  puzawa algorithm.    (line   6)
 
8886
* iterative solver <3>:                  bicgstab algorithm.  (line   6)
 
8887
* iterative solver <4>:                  pcg algorithm.       (line   6)
 
8888
* iterative solver <5>:                  qmr algorithm.       (line   6)
 
8889
* iterative solver:                      pminres algorithm.   (line   6)
 
8890
* Laplacian:                             grad_grad form.      (line   6)
 
8891
* lumped mass form:                      mass form.           (line   6)
 
8892
* Makefile:                              rheolef-config command.
 
8893
                                                              (line   6)
 
8894
* mass matrix inversion:                 inv_mass form.       (line   6)
 
8895
* mesh <1>:                              characteristic internal.
 
8896
                                                              (line   6)
 
8897
* mesh <2>:                              geomap internal.     (line   6)
 
8898
* mesh <3>:                              geo class.           (line   6)
 
8899
* mesh <4>:                              msh2geo command.     (line   6)
 
8900
* mesh <5>:                              qmg2geo command.     (line   6)
 
8901
* mesh <6>:                              cemagref2field command.
 
8902
                                                              (line   6)
 
8903
* mesh <7>:                              mesh2geo command.    (line   6)
 
8904
* mesh <8>:                              bamg2geo command.    (line   6)
 
8905
* mesh <9>:                              tetgen2geo command.  (line   6)
 
8906
* mesh <10>:                             grummp2geo command.  (line   6)
 
8907
* mesh:                                  mkgeo_grid command.  (line   6)
 
8908
* mesh boundary:                         domain class.        (line   6)
 
8909
* mesh file format conversion:           geo command.         (line 196)
 
8910
* mesh graphic representation:           geo command.         (line   6)
 
8911
* method of characteristic <1>:          characteristic internal.
 
8912
                                                              (line   6)
 
8913
* method of characteristic:              geomap internal.     (line   6)
 
8914
* mixed linear problem:                  mixed_solver algorithm.
 
8915
                                                              (line   6)
 
8916
* multifrontal factorization:            ssk class.           (line   6)
 
8917
* multifrontal linear solver:            Installing.          (line  77)
 
8918
* Neumann boundary conditions:           mass form.           (line   6)
 
8919
* Newton method <1>:                     damped-newton algorithm.
 
8920
                                                              (line   6)
 
8921
* Newton method:                         newton algorithm.    (line   6)
 
8922
* nonlinear problem <1>:                 damped-newton algorithm.
 
8923
                                                              (line   6)
 
8924
* nonlinear problem:                     newton algorithm.    (line   6)
 
8925
* normal:                                iofem internal.      (line  18)
 
8926
* numbering, global degree of freedom:   numbering internal.  (line   6)
 
8927
* origin:                                iofem internal.      (line  18)
 
8928
* out-of-core sparse linear solver:      Installing.          (line  77)
 
8929
* plotting <1>:                          field command.       (line   6)
 
8930
* plotting:                              geo command.         (line   6)
 
8931
* plotting data:                         field command.       (line   6)
 
8932
* plotting mesh:                         geo command.         (line   6)
 
8933
* point:                                 point internal.      (line   6)
 
8934
* polynomial basis <1>:                  numbering internal.  (line   6)
 
8935
* polynomial basis:                      basis internal.      (line   6)
 
8936
* portability limitation:                Installing.          (line 216)
 
8937
* porting the code:                      acinclude internal.  (line   6)
 
8938
* preconditioner <1>:                    puzawa algorithm.    (line   6)
 
8939
* preconditioner <2>:                    pcg algorithm.       (line   6)
 
8940
* preconditioner:                        pminres algorithm.   (line   6)
 
8941
* prism:                                 prism internal.      (line   6)
 
8942
* problems:                              Problems.            (line   6)
 
8943
* projection <1>:                        branch command.      (line  74)
 
8944
* projection:                            field command.       (line 155)
 
8945
* quadrangle:                            quadrangle internal. (line   6)
 
8946
* quadrature formulae <1>:               quadrature internal. (line   6)
 
8947
* quadrature formulae <2>:               characteristic internal.
 
8948
                                                              (line   6)
 
8949
* quadrature formulae:                   riesz_representer algorithm.
 
8950
                                                              (line   6)
 
8951
* quasi-minimal residual algorithm:      qmr algorithm.       (line   6)
 
8952
* rate of deformation tensor <1>:        2D form.             (line   6)
 
8953
* rate of deformation tensor <2>:        div_div form.        (line   6)
 
8954
* rate of deformation tensor:            2D_D form.           (line   6)
 
8955
* reference counting:                    smart_pointer internal.
 
8956
                                                              (line   6)
 
8957
* reference element <1>:                 edge internal.       (line   6)
 
8958
* reference element <2>:                 tetra internal.      (line   6)
 
8959
* reference element <3>:                 triangle internal.   (line   6)
 
8960
* reference element <4>:                 hexa internal.       (line   6)
 
8961
* reference element <5>:                 prism internal.      (line   6)
 
8962
* reference element <6>:                 quadrangle internal. (line   6)
 
8963
* reference element <7>:                 reference_element internal.
 
8964
                                                              (line   6)
 
8965
* reference element <8>:                 basis internal.      (line   6)
 
8966
* reference element:                     point internal.      (line   6)
 
8967
* regions in geometry:                   geo command.         (line 228)
 
8968
* RHEOPATH environment variable <1>:     rheostream class.    (line   6)
 
8969
* RHEOPATH environment variable <2>:     geo class.           (line   6)
 
8970
* RHEOPATH environment variable <3>:     cad class.           (line   6)
 
8971
* RHEOPATH environment variable <4>:     cad command.         (line  51)
 
8972
* RHEOPATH environment variable <5>:     branch command.      (line   8)
 
8973
* RHEOPATH environment variable <6>:     field command.       (line   6)
 
8974
* RHEOPATH environment variable <7>:     geo command.         (line  37)
 
8975
* RHEOPATH environment variable:         mfield command.      (line   6)
 
8976
* riesz representer:                     riesz_representer algorithm.
 
8977
                                                              (line   6)
 
8978
* Robin boundary conditions:             mass form.           (line   6)
 
8979
* scalar product:                        mass form.           (line   6)
 
8980
* shallow copy:                          smart_pointer internal.
 
8981
                                                              (line   6)
 
8982
* skyline data structure <1>:            ssk class.           (line   6)
 
8983
* skyline data structure:                permutation class.   (line   6)
 
8984
* smart pointer:                         smart_pointer internal.
 
8985
                                                              (line   6)
 
8986
* sparse matrix <1>:                     csr class.           (line   6)
 
8987
* sparse matrix <2>:                     ic0 class.           (line   6)
 
8988
* sparse matrix:                         Installing.          (line  77)
 
8989
* stabilized conjugate gradient:         bicgstab algorithm.  (line   6)
 
8990
* stabilized mixed finite element method: mixed_solver algorithm.
 
8991
                                                              (line   6)
 
8992
* standard template library (STL):       Installing.          (line 176)
 
8993
* stereo 3D rendering:                   geo command.         (line 101)
 
8994
* Stokes problem <1>:                    2D_D form.           (line   6)
 
8995
* Stokes problem:                        mixed_solver algorithm.
 
8996
                                                              (line   6)
 
8997
* stream function:                       field command.       (line 177)
 
8998
* tensor <1>:                            2D form.             (line   6)
 
8999
* tensor <2>:                            2W form.             (line   6)
 
9000
* tensor:                                tensor class.        (line   6)
 
9001
* tetraedra:                             tetra internal.      (line   6)
 
9002
* time-dependent problems <1>:           form class.          (line 102)
 
9003
* time-dependent problems:               branch command.      (line   8)
 
9004
* topography <1>:                        iofem internal.      (line  22)
 
9005
* topography <2>:                        iorheo class.        (line 136)
 
9006
* topography:                            branch command.      (line  70)
 
9007
* trace operator:                        trace class.         (line   6)
 
9008
* triangle:                              triangle internal.   (line   6)
 
9009
* unknow degree of freedom:              space class.         (line  47)
 
9010
* Uzawa algorithm:                       puzawa algorithm.    (line   6)
 
9011
* velocity:                              iorheo class.        (line  70)
 
9012
* version management:                    FAQ for developers.  (line 143)
 
9013
* vorticity:                             field command.       (line 177)
 
9014
* vorticity tensor:                      2W form.             (line   6)
 
9015
 
 
9016
 
 
9017
File: rheolef.info,  Node: Program Index,  Up: Top
 
9018
 
 
9019
Program Index
 
9020
*************
 
9021
 
 
9022
[index]
 
9023
* Menu:
 
9024
 
 
9025
* bamg2geo <1>:                          cemagref2field command.
 
9026
                                                              (line   6)
 
9027
* bamg2geo:                              bamg2geo command.    (line   6)
 
9028
* branch:                                branch command.      (line   8)
 
9029
* cad:                                   cad command.         (line   6)
 
9030
* configure:                             Installing.          (line   6)
 
9031
* dmalloc <1>:                           acinclude internal.  (line 125)
 
9032
* dmalloc:                               Installing.          (line 293)
 
9033
* field <1>:                             branch command.      (line 116)
 
9034
* field <2>:                             cemagref2field command.
 
9035
                                                              (line   6)
 
9036
* field:                                 field command.       (line   6)
 
9037
* geo <1>:                               msh2geo command.     (line   6)
 
9038
* geo <2>:                               qmg2geo command.     (line   6)
 
9039
* geo <3>:                               cemagref2field command.
 
9040
                                                              (line   6)
 
9041
* geo <4>:                               mesh2geo command.    (line   6)
 
9042
* geo <5>:                               bamg2geo command.    (line   6)
 
9043
* geo <6>:                               geo command.         (line   6)
 
9044
* geo <7>:                               tetgen2geo command.  (line   6)
 
9045
* geo <8>:                               grummp2geo command.  (line   6)
 
9046
* geo:                                   mkgeo_grid command.  (line   6)
 
9047
* grummp2geo:                            grummp2geo command.  (line   6)
 
9048
* gzip:                                  cemagref2field command.
 
9049
                                                              (line   6)
 
9050
* latex:                                 acinclude internal.  (line 342)
 
9051
* mesh2geo:                              mesh2geo command.    (line   6)
 
9052
* mfield <1>:                            iorheo class.        (line 217)
 
9053
* mfield <2>:                            branch command.      (line 116)
 
9054
* mfield:                                mfield command.      (line   6)
 
9055
* mkgeo_grid:                            mkgeo_grid command.  (line   6)
 
9056
* msh2geo:                               msh2geo command.     (line   6)
 
9057
* qmg2geo:                               qmg2geo command.     (line   6)
 
9058
* rheolef-config <1>:                    rheolef-config command.
 
9059
                                                              (line   6)
 
9060
* rheolef-config:                        Installing.          (line  64)
 
9061
* tetgen2geo:                            tetgen2geo command.  (line   6)
 
9062
 
 
9063
 
 
9064
File: rheolef.info,  Node: Class Index,  Up: Top
 
9065
 
 
9066
Class Index
 
9067
***********
 
9068
 
 
9069
[index]
 
9070
* Menu:
 
9071
 
 
9072
* array:                                 vec class.           (line   6)
 
9073
* asr:                                   csr class.           (line   6)
 
9074
* basic_diag <1>:                        diag class.          (line   6)
 
9075
* basic_diag:                            csr class.           (line   6)
 
9076
* basis <1>:                             basis internal.      (line   6)
 
9077
* basis:                                 form_element internal.
 
9078
                                                              (line   6)
 
9079
* cad <1>:                               cad class.           (line   6)
 
9080
* cad:                                   cad command.         (line   6)
 
9081
* catchmark <1>:                         catchmark class.     (line   6)
 
9082
* catchmark:                             iorheo class.        (line 221)
 
9083
* csr <1>:                               iorheo class.        (line   6)
 
9084
* csr <2>:                               csr class.           (line   6)
 
9085
* csr <3>:                               ssk class.           (line   6)
 
9086
* csr:                                   permutation class.   (line   6)
 
9087
* dns:                                   csr class.           (line   6)
 
9088
* domain <1>:                            mass form.           (line   6)
 
9089
* domain <2>:                            d2_ds2 form.         (line   6)
 
9090
* domain <3>:                            d_ds form.           (line   6)
 
9091
* domain:                                domain class.        (line   6)
 
9092
* eye:                                   csr class.           (line   6)
 
9093
* field <1>:                             riesz_representer algorithm.
 
9094
                                                              (line   6)
 
9095
* field <2>:                             catchmark class.     (line   6)
 
9096
* field <3>:                             iorheo class.        (line   6)
 
9097
* field <4>:                             tensor class.        (line   6)
 
9098
* field <5>:                             form class.          (line 102)
 
9099
* field <6>:                             trace class.         (line   6)
 
9100
* field:                                 space class.         (line  18)
 
9101
* Float <1>:                             vec class.           (line   6)
 
9102
* Float <2>:                             field command.       (line   6)
 
9103
* Float:                                 Installing.          (line 278)
 
9104
* form <1>:                              2D form.             (line   6)
 
9105
* form <2>:                              div_div form.        (line   6)
 
9106
* form <3>:                              inv_mass form.       (line   6)
 
9107
* form <4>:                              2D_D form.           (line   6)
 
9108
* form <5>:                              2W form.             (line   6)
 
9109
* form <6>:                              d_dx form.           (line   6)
 
9110
* form <7>:                              trace class.         (line   6)
 
9111
* form:                                  space class.         (line  18)
 
9112
* geo <1>:                               geo_element internal.
 
9113
                                                              (line   6)
 
9114
* geo <2>:                               characteristic internal.
 
9115
                                                              (line   6)
 
9116
* geo <3>:                               geomap internal.     (line   6)
 
9117
* geo <4>:                               iorheo class.        (line   6)
 
9118
* geo <5>:                               point class.         (line   6)
 
9119
* geo <6>:                               space class.         (line  18)
 
9120
* geo <7>:                               geo class.           (line   6)
 
9121
* geo:                                   geo command.         (line   6)
 
9122
* geo_element <1>:                       geo_element internal.
 
9123
                                                              (line   6)
 
9124
* geo_element:                           form_element internal.
 
9125
                                                              (line   6)
 
9126
* geomap <1>:                            characteristic internal.
 
9127
                                                              (line   6)
 
9128
* geomap:                                geomap internal.     (line   6)
 
9129
* iofem:                                 iofem internal.      (line   6)
 
9130
* iorheo <1>:                            rheostream class.    (line   6)
 
9131
* iorheo <2>:                            iorheo class.        (line   6)
 
9132
* iorheo:                                csr class.           (line   6)
 
9133
* irheostream:                           rheostream class.    (line   6)
 
9134
* numbering <1>:                         numbering internal.  (line   6)
 
9135
* numbering:                             form_element internal.
 
9136
                                                              (line   6)
 
9137
* occurence:                             smart_pointer internal.
 
9138
                                                              (line   6)
 
9139
* orheostream:                           rheostream class.    (line   6)
 
9140
* permutation <1>:                       ssk class.           (line   6)
 
9141
* permutation:                           permutation class.   (line   6)
 
9142
* point <1>:                             point class.         (line   6)
 
9143
* point:                                 tensor class.        (line   6)
 
9144
* quadrature:                            quadrature internal. (line   6)
 
9145
* reference element:                     geo_element internal.
 
9146
                                                              (line   6)
 
9147
* reference_element <1>:                 geo_element internal.
 
9148
                                                              (line   6)
 
9149
* reference_element <2>:                 quadrature internal. (line   6)
 
9150
* reference_element <3>:                 reference_element internal.
 
9151
                                                              (line   6)
 
9152
* reference_element:                     basis internal.      (line   6)
 
9153
* rheostream:                            geo command.         (line   6)
 
9154
* smart_pointer:                         smart_pointer internal.
 
9155
                                                              (line   6)
 
9156
* space <1>:                             characteristic internal.
 
9157
                                                              (line   6)
 
9158
* space <2>:                             geomap internal.     (line   6)
 
9159
* space <3>:                             2D form.             (line   6)
 
9160
* space <4>:                             div_div form.        (line   6)
 
9161
* space <5>:                             mass form.           (line   6)
 
9162
* space <6>:                             d2_ds2 form.         (line   6)
 
9163
* space <7>:                             d_ds form.           (line   6)
 
9164
* space <8>:                             2D_D form.           (line   6)
 
9165
* space <9>:                             2W form.             (line   6)
 
9166
* space <10>:                            d_dx form.           (line   6)
 
9167
* space <11>:                            convect form.        (line   6)
 
9168
* space <12>:                            riesz_representer algorithm.
 
9169
                                                              (line   6)
 
9170
* space <13>:                            trace class.         (line   6)
 
9171
* space:                                 space class.         (line   6)
 
9172
* ssk <1>:                               csr class.           (line   6)
 
9173
* ssk <2>:                               ssk class.           (line   6)
 
9174
* ssk:                                   permutation class.   (line   6)
 
9175
* ssr:                                   ic0 class.           (line   6)
 
9176
* string:                                smart_pointer internal.
 
9177
                                                              (line   6)
 
9178
* tensor:                                tensor class.        (line   6)
 
9179
* trace:                                 trace class.         (line   6)
 
9180
* vec <1>:                               diag class.          (line   6)
 
9181
* vec <2>:                               csr class.           (line   6)
 
9182
* vec <3>:                               ssk class.           (line   6)
 
9183
* vec <4>:                               vec class.           (line   6)
 
9184
* vec:                                   ic0 class.           (line   6)
 
9185
* Vector:                                Vector class.        (line   6)
 
9186
 
 
9187
 
 
9188
File: rheolef.info,  Node: Bilinear Form Index,  Up: Top
 
9189
 
 
9190
Form Index
 
9191
**********
 
9192
 
 
9193
[index]
 
9194
* Menu:
 
9195
 
 
9196
* 2D:                                    2D form.               (line 6)
 
9197
* 2D_D:                                  2D_D form.             (line 6)
 
9198
* 2W:                                    2W form.               (line 6)
 
9199
* convect:                               convect form.          (line 6)
 
9200
* curl:                                  curl form.             (line 6)
 
9201
* d2_ds2:                                d2_ds2 form.           (line 6)
 
9202
* d_ds:                                  d_ds form.             (line 6)
 
9203
* d_dx0:                                 d_dx form.             (line 6)
 
9204
* d_dx1:                                 d_dx form.             (line 6)
 
9205
* d_dx2:                                 d_dx form.             (line 6)
 
9206
* div:                                   div form.              (line 6)
 
9207
* div_div:                               div_div form.          (line 6)
 
9208
* grad:                                  grad form.             (line 6)
 
9209
* grad_grad:                             grad_grad form.        (line 6)
 
9210
* inv_mass <1>:                          inv_mass form.         (line 6)
 
9211
* inv_mass:                              mass form.             (line 6)
 
9212
* mass:                                  mass form.             (line 6)
 
9213
 
 
9214
 
 
9215
File: rheolef.info,  Node: Approximation Index,  Up: Top
 
9216
 
 
9217
Approximation Index
 
9218
*******************
 
9219
 
 
9220
[index]
 
9221
* Menu:
 
9222
 
 
9223
* bubble <1>:                            mass form.            (line  6)
 
9224
* bubble:                                space class.          (line 27)
 
9225
* H3:                                    d2_ds2 form.          (line  6)
 
9226
* P0 <1>:                                2D form.              (line  6)
 
9227
* P0 <2>:                                inv_mass form.        (line  6)
 
9228
* P0 <3>:                                grad form.            (line  6)
 
9229
* P0 <4>:                                mass form.            (line  6)
 
9230
* P0 <5>:                                div form.             (line  6)
 
9231
* P0 <6>:                                d_ds form.            (line  6)
 
9232
* P0 <7>:                                curl form.            (line  6)
 
9233
* P0 <8>:                                2W form.              (line  6)
 
9234
* P0 <9>:                                d_dx form.            (line  6)
 
9235
* P0 <10>:                               space class.          (line 27)
 
9236
* P0:                                    branch command.       (line 74)
 
9237
* P1 <1>:                                2D form.              (line  6)
 
9238
* P1 <2>:                                div_div form.         (line  6)
 
9239
* P1 <3>:                                grad_grad form.       (line  6)
 
9240
* P1 <4>:                                grad form.            (line  6)
 
9241
* P1 <5>:                                mass form.            (line  6)
 
9242
* P1 <6>:                                div form.             (line  6)
 
9243
* P1 <7>:                                d_ds form.            (line  6)
 
9244
* P1 <8>:                                2D_D form.            (line  6)
 
9245
* P1 <9>:                                curl form.            (line  6)
 
9246
* P1 <10>:                               2W form.              (line  6)
 
9247
* P1 <11>:                               d_dx form.            (line  6)
 
9248
* P1 <12>:                               space class.          (line 27)
 
9249
* P1:                                    branch command.       (line 74)
 
9250
* P1d <1>:                               2D form.              (line  6)
 
9251
* P1d <2>:                               grad_grad form.       (line  6)
 
9252
* P1d <3>:                               inv_mass form.        (line  6)
 
9253
* P1d <4>:                               grad form.            (line  6)
 
9254
* P1d <5>:                               mass form.            (line  6)
 
9255
* P1d <6>:                               div form.             (line  6)
 
9256
* P1d <7>:                               d_ds form.            (line  6)
 
9257
* P1d <8>:                               curl form.            (line  6)
 
9258
* P1d <9>:                               2W form.              (line  6)
 
9259
* P1d <10>:                              d_dx form.            (line  6)
 
9260
* P1d <11>:                              convect form.         (line  6)
 
9261
* P1d:                                   space class.          (line 27)
 
9262
* P2 <1>:                                2D form.              (line  6)
 
9263
* P2 <2>:                                div_div form.         (line  6)
 
9264
* P2 <3>:                                grad_grad form.       (line  6)
 
9265
* P2 <4>:                                grad form.            (line  6)
 
9266
* P2 <5>:                                mass form.            (line  6)
 
9267
* P2 <6>:                                div form.             (line  6)
 
9268
* P2 <7>:                                d_ds form.            (line  6)
 
9269
* P2 <8>:                                2D_D form.            (line  6)
 
9270
* P2 <9>:                                curl form.            (line  6)
 
9271
* P2 <10>:                               2W form.              (line  6)
 
9272
* P2 <11>:                               d_dx form.            (line  6)
 
9273
* P2:                                    space class.          (line 27)
 
9274
 
 
9275
 
 
9276
File: rheolef.info,  Node: Function Index,  Up: Top
 
9277
 
 
9278
Function Index
 
9279
**************
 
9280
 
 
9281
[index]
 
9282
* Menu:
 
9283
 
 
9284
* append_dir_to_rheo_path:               rheostream class.     (line  6)
 
9285
* bicgstab:                              bicgstab algorithm.   (line  6)
 
9286
* catchmark iostream manipulator:        mfield command.       (line 30)
 
9287
* damped\_newton:                        damped-newton algorithm.
 
9288
                                                               (line  6)
 
9289
* delete_suffix:                         rheostream class.     (line  6)
 
9290
* fastfieldload:                         iorheo class.         (line 84)
 
9291
* file_exists:                           rheostream class.     (line  6)
 
9292
* ftos:                                  rheostream class.     (line  6)
 
9293
* get_basename:                          rheostream class.     (line  6)
 
9294
* get_dirname:                           rheostream class.     (line  6)
 
9295
* get_full_name_from_rheo_path:          rheostream class.     (line  6)
 
9296
* has_suffix:                            rheostream class.     (line  6)
 
9297
* itos:                                  rheostream class.     (line  6)
 
9298
* newton:                                newton algorithm.     (line  6)
 
9299
* normal:                                iofem internal.       (line 18)
 
9300
* origin:                                iofem internal.       (line 18)
 
9301
* pcg <1>:                               pcg algorithm.        (line  6)
 
9302
* pcg:                                   mixed_solver algorithm.
 
9303
                                                               (line  6)
 
9304
* pcg\_abtb:                             mixed_solver algorithm.
 
9305
                                                               (line  6)
 
9306
* pcg\_abtbc:                            mixed_solver algorithm.
 
9307
                                                               (line  6)
 
9308
* pminres <1>:                           pminres algorithm.    (line  6)
 
9309
* pminres:                               mixed_solver algorithm.
 
9310
                                                               (line  6)
 
9311
* pminres\_abtb:                         mixed_solver algorithm.
 
9312
                                                               (line  6)
 
9313
* pminres\_abtbc:                        mixed_solver algorithm.
 
9314
                                                               (line  6)
 
9315
* prepend_dir_to_rheo_path:              rheostream class.     (line  6)
 
9316
* puzawa:                                puzawa algorithm.     (line  6)
 
9317
* qmr <1>:                               gmres algorithm.      (line  6)
 
9318
* qmr:                                   qmr algorithm.        (line  6)
 
9319
* riesz_representer <1>:                 characteristic internal.
 
9320
                                                               (line  6)
 
9321
* riesz_representer:                     riesz_representer algorithm.
 
9322
                                                               (line  6)
 
9323
* scatch:                                rheostream class.     (line  6)
 
9324
* topography:                            iofem internal.       (line 22)
 
9325
 
 
9326
 
 
9327
File: rheolef.info,  Node: File Format Index,  Up: Top
 
9328
 
 
9329
File Format Index
 
9330
*****************
 
9331
 
 
9332
[index]
 
9333
* Menu:
 
9334
 
 
9335
* .1, .3,... unix manual pages:          Installing.          (line  18)
 
9336
* .atom PlotM mesh:                      iorheo class.        (line   6)
 
9337
* .bamg bamg mesh <1>:                   iorheo class.        (line  90)
 
9338
* .bamg bamg mesh <2>:                   bamg2geo command.    (line   6)
 
9339
* .bamg bamg mesh:                       geo command.         (line 199)
 
9340
* .bb bamg field:                        field command.       (line  65)
 
9341
* .bb mmg3d field:                       field command.       (line  68)
 
9342
* .branch family of fields:              branch command.      (line   8)
 
9343
* .cad:                                  cad class.           (line   6)
 
9344
* .cemagref cemagref topographic mesh <1>: iorheo class.      (line 136)
 
9345
* .cemagref cemagref topographic mesh <2>: cemagref2field command.
 
9346
                                                              (line   6)
 
9347
* .cemagref cemagref topographic mesh <3>: field command.     (line  53)
 
9348
* .cemagref cemagref topographic mesh:   geo command.         (line 171)
 
9349
* .dmn domain names <1>:                 msh2geo command.     (line   6)
 
9350
* .dmn domain names <2>:                 qmg2geo command.     (line   6)
 
9351
* .dmn domain names <3>:                 mesh2geo command.    (line   6)
 
9352
* .dmn domain names <4>:                 bamg2geo command.    (line   6)
 
9353
* .dmn domain names <5>:                 geo command.         (line 261)
 
9354
* .dmn domain names <6>:                 tetgen2geo command.  (line   6)
 
9355
* .dmn domain names:                     grummp2geo command.  (line   6)
 
9356
* .dvi device independent (latex):       Installing.          (line 389)
 
9357
* .ele tetgen mesh elements <1>:         iorheo class.        (line  90)
 
9358
* .ele tetgen mesh elements <2>:         geo command.         (line 213)
 
9359
* .ele tetgen mesh elements:             tetgen2geo command.  (line   6)
 
9360
* .face tetgen mesh boundary faces <1>:  iorheo class.        (line  90)
 
9361
* .face tetgen mesh boundary faces:      geo command.         (line 213)
 
9362
* .face tetgen mesh faces:               tetgen2geo command.  (line   6)
 
9363
* .field field <1>:                      iorheo class.        (line   6)
 
9364
* .field field <2>:                      space class.         (line  18)
 
9365
* .field field <3>:                      branch command.      (line 116)
 
9366
* .field field <4>:                      cemagref2field command.
 
9367
                                                              (line   6)
 
9368
* .field field <5>:                      field command.       (line   6)
 
9369
* .field field:                          mfield command.      (line   6)
 
9370
* .fig Fig, xfig:                        geo command.         (line   6)
 
9371
* .g grummp mesh <1>:                    geo command.         (line 228)
 
9372
* .g grummp mesh:                        grummp2geo command.  (line   6)
 
9373
* .gdat gnuplot data:                    iorheo class.        (line   6)
 
9374
* .geo mesh <1>:                         iorheo class.        (line   6)
 
9375
* .geo mesh <2>:                         geo class.           (line   6)
 
9376
* .geo mesh <3>:                         msh2geo command.     (line   6)
 
9377
* .geo mesh <4>:                         qmg2geo command.     (line   6)
 
9378
* .geo mesh <5>:                         cemagref2field command.
 
9379
                                                              (line   6)
 
9380
* .geo mesh <6>:                         mesh2geo command.    (line   6)
 
9381
* .geo mesh <7>:                         bamg2geo command.    (line   6)
 
9382
* .geo mesh <8>:                         tetgen2geo command.  (line   6)
 
9383
* .geo mesh <9>:                         grummp2geo command.  (line   6)
 
9384
* .geo mesh:                             mkgeo_grid command.  (line   6)
 
9385
* .gz gzip <1>:                          rheostream class.    (line   6)
 
9386
* .gz gzip:                              geo class.           (line   6)
 
9387
* .hb Harwell-Boeing matrix <1>:         iorheo class.        (line   6)
 
9388
* .hb Harwell-Boeing matrix:             csr class.           (line   6)
 
9389
* .html hyper-text markup language:      Installing.          (line 389)
 
9390
* .info GNU info:                        Installing.          (line  18)
 
9391
* .m grummp bidimensionnal mesh:         iorheo class.        (line  90)
 
9392
* .m matlab matrix <1>:                  iorheo class.        (line  90)
 
9393
* .m matlab matrix:                      csr class.           (line   6)
 
9394
* .mesh mmg3d mesh <1>:                  iorheo class.        (line  90)
 
9395
* .mesh mmg3d mesh:                      mesh2geo command.    (line   6)
 
9396
* .mfield multi-field:                   mfield command.      (line   6)
 
9397
* .mm Matrix-Market matrix:              iorheo class.        (line   6)
 
9398
* .mmg3d mmg3d mesh:                     geo command.         (line 221)
 
9399
* .msh gmsh mesh <1>:                    iorheo class.        (line  90)
 
9400
* .msh gmsh mesh <2>:                    msh2geo command.     (line   6)
 
9401
* .msh gmsh mesh:                        geo command.         (line 206)
 
9402
* .mshdat gmsh field:                    field command.       (line  71)
 
9403
* .mtv plotmtv:                          iorheo class.        (line   6)
 
9404
* .node tetgen mesh nodes <1>:           iorheo class.        (line  90)
 
9405
* .node tetgen mesh nodes <2>:           geo command.         (line 213)
 
9406
* .node tetgen mesh nodes:               tetgen2geo command.  (line   6)
 
9407
* .off geomview data:                    iorheo class.        (line   6)
 
9408
* .pdf acrobat:                          Installing.          (line 389)
 
9409
* .plot gnuplot script:                  iorheo class.        (line   6)
 
9410
* .ps postscript <1>:                    iorheo class.        (line  90)
 
9411
* .ps postscript <2>:                    csr class.           (line   6)
 
9412
* .ps postscript <3>:                    geo command.         (line   6)
 
9413
* .ps postscript:                        Installing.          (line  18)
 
9414
* .py python script file (for mayavi visualization tool): iorheo class.
 
9415
                                                              (line 168)
 
9416
* .qmg qmg mesh <1>:                     qmg2geo command.     (line   6)
 
9417
* .qmg qmg mesh:                         geo command.         (line 253)
 
9418
* .qmgcad bamg mesh:                     cad command.         (line  64)
 
9419
* .space space:                          space class.         (line  58)
 
9420
* .tcl tool command language:            iorheo class.        (line   6)
 
9421
* .template grummp mesh file format specification: geo command.
 
9422
                                                              (line 228)
 
9423
* .tex latex:                            geo command.         (line   6)
 
9424
* .txt simple ascii text:                Installing.          (line 389)
 
9425
* .v grummp tridimensionnal mesh:        iorheo class.        (line  90)
 
9426
* .vtk visualization toolkit:            iorheo class.        (line   6)
 
9427
* .x3d x3d mesh:                         iorheo class.        (line   6)
 
9428
* acinclude.m4:                          FAQ for developers.  (line  14)
 
9429
* configure.ac:                          FAQ for developers.  (line  14)
 
9430
* Makefile.am:                           FAQ for developers.  (line  14)
 
9431
 
 
9432
 
 
9433
File: rheolef.info,  Node: Related Tool Index,  Up: Top
 
9434
 
 
9435
Related Tool Index
 
9436
******************
 
9437
 
 
9438
[index]
 
9439
* Menu:
 
9440
 
 
9441
* aclocal:                               FAQ for developers.  (line  14)
 
9442
* aix ibm, operating system:             Installing.          (line 194)
 
9443
* atlas, alternativ for blas (basic linear algebra subroutines): Installing.
 
9444
                                                              (line 152)
 
9445
* autoconf <1>:                          FAQ for developers.  (line  14)
 
9446
* autoconf <2>:                          acinclude internal.  (line   6)
 
9447
* autoconf:                              Installing.          (line 482)
 
9448
* automake <1>:                          FAQ for developers.  (line  14)
 
9449
* automake:                              Installing.          (line 482)
 
9450
* bamg <1>:                              iorheo class.        (line  90)
 
9451
* bamg <2>:                              bamg2geo command.    (line   6)
 
9452
* bamg <3>:                              geo command.         (line 155)
 
9453
* bamg:                                  Installing.          (line 242)
 
9454
* bash:                                  Installing.          (line  46)
 
9455
* bison:                                 Installing.          (line 482)
 
9456
* blas, basic linear algebra subroutines: Installing.         (line 152)
 
9457
* boost, generic dense/sparse matrix library: Installing.     (line 288)
 
9458
* cln, arbitrary precision float library: Installing.         (line 265)
 
9459
* compacq c++ compiler:                  Installing.          (line 176)
 
9460
* compacq, operating system:             Installing.          (line 183)
 
9461
* cray c++ compiler:                     Installing.          (line 192)
 
9462
* cray unicos, operating system:         Installing.          (line 194)
 
9463
* csh:                                   Installing.          (line  46)
 
9464
* cvs:                                   FAQ for developers.  (line 143)
 
9465
* debian:                                Installing.          (line 284)
 
9466
* dmalloc, debug library:                Installing.          (line 434)
 
9467
* dmalloc, debug runtime library <1>:    acinclude internal.  (line 125)
 
9468
* dmalloc, debug runtime library:        Installing.          (line 293)
 
9469
* dot:                                   Installing.          (line 419)
 
9470
* doubledouble, quadruple precision library: Installing.      (line 278)
 
9471
* doxygen:                               Installing.          (line 419)
 
9472
* dvips:                                 Installing.          (line 389)
 
9473
* fig2dev:                               Installing.          (line 389)
 
9474
* flex:                                  Installing.          (line 482)
 
9475
* geomview <1>:                          iorheo class.        (line   6)
 
9476
* geomview <2>:                          cad command.         (line  76)
 
9477
* geomview:                              Installing.          (line 242)
 
9478
* ghostview:                             Installing.          (line  18)
 
9479
* gmsh <1>:                              msh2geo command.     (line   6)
 
9480
* gmsh:                                  geo command.         (line 159)
 
9481
* gnu c++ compiler:                      Installing.          (line 176)
 
9482
* gnuplot <1>:                           iorheo class.        (line   6)
 
9483
* gnuplot <2>:                           cad command.         (line  84)
 
9484
* gnuplot <3>:                           branch command.      (line  54)
 
9485
* gnuplot <4>:                           field command.       (line   6)
 
9486
* gnuplot <5>:                           geo command.         (line   6)
 
9487
* gnuplot:                               Installing.          (line 242)
 
9488
* gperf:                                 Installing.          (line 482)
 
9489
* grummp <1>:                            grummp2geo command.  (line   6)
 
9490
* grummp:                                Installing.          (line 242)
 
9491
* gzip <1>:                              rheostream class.    (line   6)
 
9492
* gzip:                                  geo class.           (line   6)
 
9493
* hpux, operating system <1>:            rheolef-config command.
 
9494
                                                              (line  28)
 
9495
* hpux, operating system:                Installing.          (line  64)
 
9496
* info:                                  Installing.          (line  18)
 
9497
* irix, operating system:                Installing.          (line 194)
 
9498
* kai c++ compiler:                      Installing.          (line 192)
 
9499
* lapack, linear algebra package:        Installing.          (line 152)
 
9500
* latex:                                 Installing.          (line 389)
 
9501
* latex2html:                            Installing.          (line 389)
 
9502
* libtool:                               Installing.          (line 482)
 
9503
* linux, operating system:               Installing.          (line 183)
 
9504
* lynx:                                  Installing.          (line 389)
 
9505
* m4:                                    Installing.          (line 482)
 
9506
* mac os x, operating system:            Installing.          (line 183)
 
9507
* make:                                  FAQ for developers.  (line 143)
 
9508
* Makefile:                              Installing.          (line   6)
 
9509
* makeinfo:                              Installing.          (line 389)
 
9510
* man:                                   Installing.          (line  18)
 
9511
* mayavi <1>:                            iorheo class.        (line 168)
 
9512
* mayavi <2>:                            field command.       (line   6)
 
9513
* mayavi <3>:                            geo command.         (line   6)
 
9514
* mayavi:                                mfield command.      (line 114)
 
9515
* message passing interface (MPI) library: csr class.         (line   6)
 
9516
* metis, computing fill-in ordering of sparse matrix: Installing.
 
9517
                                                              (line 152)
 
9518
* mmg3d <1>:                             iorheo class.        (line  90)
 
9519
* mmg3d <2>:                             mesh2geo command.    (line   6)
 
9520
* mmg3d:                                 geo command.         (line 167)
 
9521
* mozilla:                               Installing.          (line 419)
 
9522
* octave:                                Installing.          (line 482)
 
9523
* paraview:                              branch command.      (line  54)
 
9524
* parmetis, distributed mesh partitionner: Installing.        (line 318)
 
9525
* pastix, distributed direct solver:     Installing.          (line 333)
 
9526
* PlotM <1>:                             iorheo class.        (line   6)
 
9527
* PlotM:                                 geo command.         (line   6)
 
9528
* plotmtv <1>:                           iorheo class.        (line   6)
 
9529
* plotmtv <2>:                           branch command.      (line  54)
 
9530
* plotmtv <3>:                           field command.       (line   6)
 
9531
* plotmtv <4>:                           geo command.         (line   6)
 
9532
* plotmtv <5>:                           mfield command.      (line 114)
 
9533
* plotmtv:                               Installing.          (line 242)
 
9534
* qmg <1>:                               cad command.         (line  64)
 
9535
* qmg <2>:                               qmg2geo command.     (line   6)
 
9536
* qmg <3>:                               geo command.         (line 253)
 
9537
* qmg:                                   Installing.          (line 242)
 
9538
* scotch, distributed mesh partitionner: Installing.          (line 310)
 
9539
* sh:                                    Installing.          (line  46)
 
9540
* spooles, multifrontal solver library <1>: ssk class.        (line   6)
 
9541
* spooles, multifrontal solver library:  Installing.          (line  77)
 
9542
* sun solaris, operating system:         Installing.          (line 183)
 
9543
* taucs, out-of-core sparse solver library <1>: ssk class.    (line   6)
 
9544
* taucs, out-of-core sparse solver library: Installing.       (line  77)
 
9545
* tegen:                                 geo command.         (line 163)
 
9546
* tetgen <1>:                            iorheo class.        (line  90)
 
9547
* tetgen <2>:                            geo command.         (line 213)
 
9548
* tetgen:                                tetgen2geo command.  (line   6)
 
9549
* tetra, grummp mesh generator:          geo command.         (line 228)
 
9550
* tex:                                   Installing.          (line 389)
 
9551
* texi2html:                             Installing.          (line 389)
 
9552
* texinfo:                               Installing.          (line 389)
 
9553
* tri, grummp mesh generator:            geo command.         (line 228)
 
9554
* umfpack, multifrontal solver library:  ssk class.           (line   6)
 
9555
* umfpack, sequential multifrontal solver library: Installing.
 
9556
                                                              (line 343)
 
9557
* vtk <1>:                               iorheo class.        (line   6)
 
9558
* vtk <2>:                               branch command.      (line  54)
 
9559
* vtk <3>:                               field command.       (line   6)
 
9560
* vtk <4>:                               geo command.         (line   6)
 
9561
* vtk <5>:                               mfield command.      (line 114)
 
9562
* vtk:                                   Installing.          (line 242)
 
9563
* x3d <1>:                               iorheo class.        (line  90)
 
9564
* x3d <2>:                               geo command.         (line   6)
 
9565
* x3d:                                   Installing.          (line 242)
 
9566
* xdvi:                                  Installing.          (line 389)
 
9567
* xfig:                                  geo command.         (line   6)
 
9568
* xpdf:                                  Installing.          (line 389)
 
9569
 
 
9570
 
 
9571
 
 
9572
Tag Table:
 
9573
Node: Top784
 
9574
Node: Abstract1662
 
9575
Node: Installing2848
 
9576
Node: Problems21894
 
9577
Node: Commands22339
 
9578
Node: mkgeo_grid command22732
 
9579
Node: mfield command25472
 
9580
Node: grummp2geo command30284
 
9581
Node: tetgen2geo command30827
 
9582
Node: geo command31818
 
9583
Node: bamg2geo command44726
 
9584
Node: mesh2geo command46860
 
9585
Node: field command47820
 
9586
Node: cemagref2field command55741
 
9587
Node: qmg2geo command56573
 
9588
Node: space command57181
 
9589
Node: msh2geo command58028
 
9590
Node: branch command58566
 
9591
Node: cad command62745
 
9592
Node: rheolef-config command66235
 
9593
Node: Classes68823
 
9594
Node: cad class69295
 
9595
Node: geo class70986
 
9596
Node: form_diag_manip class83125
 
9597
Node: space class84768
 
9598
Node: form_diag class95678
 
9599
Node: form_manip class97485
 
9600
Node: field class98851
 
9601
Node: trace class100568
 
9602
Node: domain class101870
 
9603
Node: form class103892
 
9604
Node: branch class107434
 
9605
Node: tensor class109735
 
9606
Node: point class114302
 
9607
Node: ic0 class120657
 
9608
Node: permutation class121790
 
9609
Node: vec class122869
 
9610
Node: ssk class125390
 
9611
Node: csr class129095
 
9612
Node: diag class131883
 
9613
Node: iorheo class134288
 
9614
Node: Vector class141480
 
9615
Node: catchmark class144646
 
9616
Node: rheostream class145620
 
9617
Node: Algorithms150168
 
9618
Node: newton algorithm150486
 
9619
Node: damped-newton algorithm152113
 
9620
Node: riesz_representer algorithm153494
 
9621
Node: mixed_solver algorithm155230
 
9622
Node: pminres algorithm158055
 
9623
Node: qmr algorithm162624
 
9624
Node: pcg algorithm164954
 
9625
Node: bicgstab algorithm168032
 
9626
Node: puzawa algorithm169631
 
9627
Node: gmres algorithm172155
 
9628
Node: Forms178343
 
9629
Node: convect form178624
 
9630
Node: d_dx form179306
 
9631
Node: 2W form180629
 
9632
Node: curl form181651
 
9633
Node: 2D_D form182880
 
9634
Node: d_ds form183880
 
9635
Node: d2_ds2 form184349
 
9636
Node: div form184846
 
9637
Node: mass form185772
 
9638
Node: grad form189589
 
9639
Node: inv_mass form190527
 
9640
Node: grad_grad form191422
 
9641
Node: div_div form192293
 
9642
Node: 2D form193059
 
9643
Node: Internals194127
 
9644
Node: geomap internal194698
 
9645
Node: form_element internal203496
 
9646
Node: iofem internal205232
 
9647
Node: characteristic internal206263
 
9648
Node: point internal208630
 
9649
Node: basis internal209046
 
9650
Node: reference_element internal211789
 
9651
Node: quadrature internal214846
 
9652
Node: quadrangle internal217221
 
9653
Node: prism internal218125
 
9654
Node: hexa internal219752
 
9655
Node: triangle internal221474
 
9656
Node: geo_element internal222320
 
9657
Node: tetra internal226309
 
9658
Node: edge internal227748
 
9659
Node: numbering internal228236
 
9660
Node: smart_pointer internal230313
 
9661
Node: heap_allocator internal231932
 
9662
Node: stack_allocator internal235736
 
9663
Node: pretty_name internal242027
 
9664
Node: acinclude internal243528
 
9665
Node: FAQ for developers258289
 
9666
Node: Copying263013
 
9667
Node: Concept Index282082
 
9668
Node: Program Index297172
 
9669
Node: Class Index299938
 
9670
Node: Bilinear Form Index308237
 
9671
Node: Approximation Index309583
 
9672
Node: Function Index313429
 
9673
Node: File Format Index316465
 
9674
Node: Related Tool Index323558
 
9675
 
 
9676
End Tag Table