Mesh generator
Go to file
Monty Montgomery de7ffc5906 Eliminate a "C++ initialization order fiasco" for geometryregister
Current initialization of the global geometryregister suffers from a
classic 'initialization order fiasco'.  Depending on the order the
compilation units are loaded/linked, the initialization of the global
geometryregisterarray is not guaranteed to happen (and indeed often
does not happen) before it is used.  This leads to entries being
appended before it's initialized (usually 'suceeding, but potentially
causing memory corruption if the segment at that point isn't zeroed),
initialization then happening halfway through (wiping the initial
entries) and then the last entries being the only ones that show up.

The net effect is either a crash at startup, or several geometry types
seeming to be missing.  Eg, step files will oad, but STL files are
just ignored.  The bug is actively observed on, eg, Linux.

This patch implements a simple 'initialize at first access' convention
for the array, eliminating the ordering problem.

I've not reviewed the rest of the source for other potential examples
of the fiasco pattern; this fixes only the geometryregister, since
that was actively biting.
2022-05-22 11:29:10 -04:00
cmake rework build system, separate gui and non-gui code 2022-05-05 14:39:31 +02:00
doc Fix various typos 2022-03-25 18:22:05 -04:00
external_dependencies build with VS2019 on Windows, update pybind11 to v2.9.1 2022-05-03 09:21:19 +02:00
libsrc Eliminate a "C++ initialization order fiasco" for geometryregister 2022-05-22 11:29:10 -04:00
ng Eliminate a "C++ initialization order fiasco" for geometryregister 2022-05-22 11:29:10 -04:00
nglib rework build system, separate gui and non-gui code 2022-05-05 14:39:31 +02:00
py_tutorials Fix various typos 2022-03-25 18:22:05 -04:00
python Don't load gui libraries when importing netgen 2022-05-06 10:59:59 +02:00
rules rework build system, separate gui and non-gui code 2022-05-05 14:39:31 +02:00
tests rework build system, separate gui and non-gui code 2022-05-05 14:39:31 +02:00
tutorials Fix various typos 2022-03-25 18:22:05 -04:00
windows fix license name in resource file 2020-11-24 12:11:43 +01:00
.gitlab-ci.yml build with VS2019 on Windows, update pybind11 to v2.9.1 2022-05-03 09:21:19 +02:00
.gitmodules Use own fork of pybind11 to apply patches 2018-09-06 13:10:22 +02:00
AUTHORS undo lib dependencies 2012-06-11 20:19:06 +00:00
ChangeLog autotools 2009-01-12 23:40:13 +00:00
CLA.pdf add contributors license agreement and contributing guidelines 2020-12-04 14:36:35 +01:00
CMakeLists.txt fix tcl/tk build flags 2022-05-05 18:08:29 +02:00
CONTRIBUTING.md change script -> failing example 2020-12-04 14:41:56 +01:00
depcomp autotools 2009-01-12 23:40:13 +00:00
INSTALL autotools 2009-01-12 23:40:13 +00:00
LICENSE mesh rendering fixes 2009-01-24 23:28:47 +00:00
mkinstalldirs autotools 2009-01-12 23:40:13 +00:00
netgen.icns icon 2015-12-21 20:22:17 +01:00
NEWS autotools 2009-01-12 23:40:13 +00:00
README.md Add new file 2016-07-11 10:31:48 +02:00
setup.py use major.minor.patch.postXX.dev version scheme for nightly python releases 2022-04-01 12:07:12 +02:00
TODO autotools 2009-01-12 23:40:13 +00:00

Netgen mesh generator

NETGEN is an automatic 3d tetrahedral mesh generator. It accepts input from constructive solid geometry (CSG) or boundary representation (BRep) from STL file format. The connection to a geometry kernel allows the handling of IGES and STEP files. NETGEN contains modules for mesh optimization and hierarchical mesh refinement. Netgen 6.x supports scripting via a Python interface. Netgen is open source based on the LGPL license. It is available for Unix/Linux, Windows, and OSX.