[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Gmsh is written in C++, the scripting language is parsed using Lex and Yacc (actually, Flex and Bison), and the GUI relies on OpenGL for the 3D graphics and FLTK (http://www.fltk.org) for the widget set. Gmsh's build system is based on autoconf. Practical notes on how to compile Gmsh's source code are included in the distribution. See B. Frequently asked questions, for more information.
10.1 Main code structure 10.2 Coding style 10.3 Option handling
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Gmsh's code is structured in several libraries, roughly separated between the three main core modules (Geo, Mesh, Post) and associated utility libraries (Common, Numeric) on one hand, and graphics (Graphics) and interface (Fltk, Box) libraries on the other.
The geometry and mesh modules are based on an object-oriented model class (Geo/GModel.h), built upon abstract geometrical entity classes (Geo/GVertex.h, Geo/Gedge.h, Geo/GFace.h and Geo/GRegion.h).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you plan to contribute code to the Gmsh project, here are some easy rules to make the code easy to read/debug/maintain:
-Wall
to
FLAGS
in the `variables' file);
Msg()
function to print information, errors, ...;
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To add a new option in Gmsh:
Context_T
class
(`Common/Context.h') if it's a classical option, or in the
PViewOptions
class (`Post/PViewOptions.h') if it's a
post-processing view-dependent option;
opt_XXX
) and a
default value for this option;
opt_XXX
in `Common/Options.cpp' (and
add the prototype in `Common/Options.h');
opt_XXX
to the OK callback for the corresponding
option panel (in `Fltk/Callbacks.cpp').
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |