This repository has been archived by the owner on Jul 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainpage.dox
94 lines (76 loc) · 3.84 KB
/
mainpage.dox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*!
* \file
*
* \brief Main page of Doxygen documentation
*
* \author Written by Antoine Le Hyaric
* \author Laboratoire Jacques-Louis Lions
* \author Université Pierre et Marie Curie-Paris6, UMR 7598, Paris, F-75005 France
* \author http://www.ljll.math.upmc.fr/lehyaric
*
* \copyright This file is part of Freefem++
*
* \copyright Freefem++ is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* \copyright Freefem++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* \copyright You should have received a copy of the GNU Lesser General Public
* License along with Freefem++; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* headeralh brief="Main page of Doxygen documentation" dox default=0 freefem upmc written
*/
/*! \mainpage Technical Documentation
\section broadview Broad View
A FreeFem++ script is first translated into a tree of expressions of type CListOfInst (the language grammar is defined
in \ref language) and then evaluated by calling CListOfInst::eval(). Any resulting graphical data is converted into a
stream of bytes by the PlotStream class before being sent to the ffglut program (see ffglut.cpp) via a pipe.
\section details Detailed Program Start Sequence
- The C++ main() function is part of platform-dependent treatments. It calls mymain() (in lg.ypp) from:
- Unix: src/Graphics/sansrgraph.cpp
- Windows: src/Graphics/Pcrgraph.cpp
- MacOS: src/Graphics/macrgraf.cpp
- in lg.ypp:
- mymain() calls mainff(), which calls Compile(), which calls the standard yyparse() function.
- yyparse() scans the EDP script thanks to the lexer #mylex and generates objects of type YYSTYPE according to the
grammar described in lg.ypp.
- When the "start" symbol is successfully scanned, yylval (of type YYSTYPE) contains the whole tree of expressions
as an object of type CListOfInst. CListOfInst::eval() is called (with one #Stack argument built by #newStack()) to
run the script.
\section language FreeFem++-specific Language Elements
- <b>Types</b> <!-- [[file:src/lglib/lg.ypp::type_of_dcl]] -->
- a lexical element of reference #yytokentype #TYPE defined by calling mylex::Add(Key,aType)
- a TypeArray() if followed by square brackets
- a TypeTemplate() if followed by lower/greater signs
- <b>Finite Element Space Types</b> <!-- [[file:src/lglib/lg.ypp::ID_space]] -->
- NewFEvariable()
- NewFEarray()
- <b>Variables</b> <!-- [[file:src/lglib/lg.ypp::declaration]] -->
- Block::NewVar<#LocalVariable>() <!-- see [[file:src/lglib/lg.ypp::list_of_dcls]] -->
- Block::NewVar<#LocalVariableFES>() for \b fespaces <!-- [[file:src/lglib/lg.ypp::fespace_def]] -->
- \b Instructions <!-- [[file:src/lglib/lg.ypp::instruction]] -->
- \b load : load()
- \b border :
- E_Border <!-- [[file:src/lglib/lg.ypp::BORDER_ID]] -->
- local variable and boundaries <!-- [[file:src/lglib/lg.ypp::border_expr]] -->
- instruction <!-- [[file:src/lglib/lg.ypp::instruction]] -->
- \b varf : #t_form defined in init_lgfem() <!-- [[file:src/fflib/lgfem.cpp::varf]] -->
- \b problem : Problem
- \b solve : Solve
- \b API : ffapi.hpp <!-- [[file:src/fflib/ffapi.hpp]] -->
<em>(this page is written in mainpage.dox and can be viewed on the internet at
http://www.ljll.math.upmc.fr/lehyaric/freefem/html)</em>
*/
/*!
* Local Variables:
* mode:c
* ispell-local-dictionary:"british"
* coding:utf-8
* End:
*/