Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
f65aab18
Commit
f65aab18
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
more work on docs
parent
044f261b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/texinfo/gmsh.texi
+46
-22
46 additions, 22 deletions
doc/texinfo/gmsh.texi
with
46 additions
and
22 deletions
doc/texinfo/gmsh.texi
+
46
−
22
View file @
f65aab18
...
...
@@ -4607,11 +4607,11 @@ svn commit
@node Source code structure, Coding style, Getting the source, Information for developers
@section Source code structure
Gmsh's code is structured in several
libra
ries, roughly separated
between the
three main
core modules
(
@file
{
Geo
}
, @file
{
Mesh
}
,
@file
{
Post
}
)
and associated utilit
y librar
ies
(
@file
{
Common
}
,
@file
{
Numeric
}
)
on
one hand, and graphics
(
@file
{
Graphics
}
)
and
interface
(
@file
{
Fltk
}
,
@file
{
Parser
}
)
libraries
on the other.
Gmsh's code is structured in several
subdirecto
ries, roughly separated
between the
four
core modules
(
@file
{
Geo
}
, @file
{
Mesh
}
,
@file
{
Solver
}
,
@file
{
Post
}
)
and associated utilities
(
@file
{
Common
}
,
@file
{
Numeric
}
)
on
one hand, and
the
graphics
(
@file
{
Graphics
}
)
and
interface
(
@file
{
Fltk
}
,
@file
{
Parser
}
)
code
on the other.
The geometry and mesh modules are based on an object
-
oriented model
class
(
@file
{
Geo
/
GModel.h
}
)
, built upon abstract geometrical entity
...
...
@@ -4636,14 +4636,43 @@ to make the code easy to read/debug/maintain:
@enumerate
@item
p
lease enable full warnings for your compiler
(
e.g.
, add
@code
{
-
Wall
}
to
@code
{
FLAGS
}
in the @file
{
variables
}
file
)
;
P
lease enable full warnings for your compiler
(
e.g. @code
{
-
Wall
}
with
@code
{
g
++
}
)
and don't commit until there is no warning left.
@item
always use the @code
{
Msg::
}
class to print information, errors, @dots
{}
;
Use memory checking tools to detect memory leaks and other nasty memory
problems. For example, you can use
@itemize @bullet
@item
Valgrind on Linux:
@example
valgrind
--
leak
-
check
=
yes
--
show
-
reachable
=
yes gmsh file.geo
-
3
@end example
@item
GMALLOC on Mac OS X:
@example
(
gdb
)
set env DYLD
_
INSERT
_
LIBRARIES
/
usr
/
lib
/
libgmalloc.dylib
@end example
@item
LIBNJAMD:
@example
export LD
_
PRELOAD
=
libnjamd.so
kill
-
USR
1
@end example
@item
Purify
@item
indent your files
(
2
spaces
)
Memprof
@item
convert all tabs to spaces.
@dots
{}
@end itemize
@item
always use the @code
{
Msg::
}
class to print information or errors
@item
indent your files
(
2
spaces
)
and convert all tabs to spaces
@item
follow the style used in the existing code when adding something new
(
spaces after commas, opening braces for functions on a separate line,
opening braces for loops and tests on the same line, etc.
)
@end enumerate
@c
-------------------------------------------------------------------------
...
...
@@ -4672,23 +4701,18 @@ add the prototype in @file{Common/Options.h});
optional: create the associated widget in @file
{
Fltk
/
optionWindow.cpp
}
;
@end enumerate
@c todo:
@c Tools to check memory leaks
@c
*
on mac: use GMALLOC
@c
(
gdb
)
set env DYLD
_
INSERT
_
LIBRARIES
/
usr
/
lib
/
libgmalloc.dylib
@c
*
LIBNJAMD
@c export LD
_
PRELOAD
=
libnjamd.so
@c kill
-
USR
1
@c
*
valgrind
--
leak
-
check
=
yes
--
show
-
reachable
=
yes gmsh file.geo
-
3
@c
*
purify
@c
*
memprof
@c
@c
-------------------------------------------------------------------------
@c Using Gmsh as a library
@c
-------------------------------------------------------------------------
@c @node Using Gmsh as a library, , Coding style, Information for developers
@c @section Using Gmsh as a library
@c Notes on thread
-
safety
@c All the operations in the Gmsh library are not thread safe.
@c For example, the MeshAdapt algorithm is, while the Delaunay
/
Frontal
@c are not.
@c
-------------------------------------------------------------------------
@c Compiling with OpenCASCADE
@c
-------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment