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
Matthias Hochsteger
b694b4667a
rework build system, separate gui and non-gui code
...
move fieldlines code to meshing dir
move visualization function pointers to meshing directory
DLL_HEADER -> NGGUI_API in visualization lib
move soldata.hpp to meshing
update occ, no freetype necessary anymore
2022-05-05 14:39:31 +02:00
Joachim Schoeberl
db0339a143
no MPI command sending in netgen
2022-04-29 12:23:40 +02:00
mhochsteger@cerbsim.com
cf59f297a7
use std::filesystem::path
2022-02-23 11:56:00 +01:00
mhochsteger@cerbsim.com
17458889aa
Change interface of LoadFromMeshFile
...
Fetch the first (geometry identification) token only once (and not on each try to load a different type)
2021-11-10 18:37:24 +01:00
Matthias Hochsteger
dc57935468
include gzsteram.h only where needed
2021-10-21 10:25:40 +02:00
Joachim Schoeberl
8404fb8a40
fix namespace
2021-09-06 17:44:46 +02:00
Joachim Schoeberl
aa3f778d06
separat metis-partitioning call, pickling partition number of mesh elements
2021-06-08 13:48:27 +02:00
Christopher Lackner
58e6e5dc18
modernize and improve GenerateBoundaryLayer
2020-04-19 20:00:06 +02:00
Matthias Hochsteger
d6095e9364
Move global visual scene from ngpkg.cpp to mvdraw.cpp
...
... so it is available in Snapshot()
also rename the global variables:
vs -> visual_scene
vscross -> visual_scene_cross
2019-12-10 12:21:29 +01:00
Christopher Lackner
073e215bb6
add closeedge meshsize to base geometry (not used)
...
closedgefac moved to meshingparameters for this
2019-11-04 19:34:46 +01:00
Joachim Schöberl
e400c10f07
set tcl-variables only if values are changed
2019-10-22 22:54:27 +02:00
Christopher Lackner
bee097b153
start unify meshing with occ meshing
2019-10-07 15:17:03 +02:00
Matthias Hochsteger
04de18d0b4
Check badness quality in tests
2019-10-04 10:25:14 +00:00
Christopher Lackner
5eb2ab470e
only do optimization for occ surface mesh
2019-09-30 12:02:08 +02:00
Matthias Hochsteger
6a7030b81a
Activate multithreading when meshing from GUI
...
- Meshing options for parallelization and number of threads
- RegionTaskManager() to locally start the TaskManager
2019-09-27 11:54:33 +02:00
Christopher Lackner
cd78f0e440
draw stl meshing 2d local coordinates
2019-09-21 22:08:35 +02:00
Christopher Lackner
6b8867d76a
generate volume mesh on GenerateMesh button if no geometry but mesh exists
2019-09-20 12:37:40 +02:00
Matthias Hochsteger
f6f4976402
Import STL as Mesh
2019-09-20 11:32:20 +02:00
Christopher Lackner
ec40e605a3
fix Smooth Opt Volume buttons
2019-09-17 18:59:19 +02:00
Christopher Lackner
8b43ed2637
enable optimization of mesh from gui
...
A new mesh should only be created if full meshing is done and not only
some substeps like volume optimization.
2019-09-16 12:30:45 +02:00
Christopher Lackner
287256a626
fix loading of long filenames
2019-08-22 15:00:42 +02:00
Christopher Lackner
dc8d96aefa
move flags to ngcore
2019-08-06 14:16:13 +02:00
Joachim Schöberl
dace165496
setting command line args via Tcl
2019-08-04 18:59:01 +02:00
Joachim Schöberl
b1ea81b401
move mesh export formats from ngappinit to Tcl-script
2019-08-04 11:12:19 +02:00
Matthias Hochsteger
cb87362f64
Rename Array to NgArray
2019-07-09 10:39:16 +02:00
Joachim Schöberl
784fad9806
fix warning
2019-03-30 14:02:16 +01:00
Joachim Schöberl
0197a3cca1
fixes for parallel version running sequential
2019-03-16 06:30:47 +01:00
Joachim Schöberl
179c3bb02f
don't store partition in element (most times waste of mem)
2019-02-15 21:01:00 +01:00
Joachim Schöberl
734e96c87c
get rid of ng_comm
2019-02-12 22:11:55 +01:00
Christopher Lackner
f88cc77cfe
move SymbolTable to ngcore
2019-01-02 18:21:52 +01:00
Joachim Schöberl
9d0ffac0eb
extern pixelscale in togl
2018-05-23 21:32:17 +02:00
Joachim Schöberl
b4294caefa
EXTERN Togl_PixelScale
2018-05-23 21:20:23 +02:00
Joachim Schöberl
75dc76cc95
pixel-scale fixes for Mac-Retina resolution: dbl-click, snapshot
2018-05-23 21:14:49 +02:00
Matthias Hochsteger
c55ad18a73
Fix build/image export with USE_JPEG=ON
...
- fixes broken build with USE_JPEG
- cleanes up the screenshot code itself (there were problems with memory
alignment, now enforce alignment of 1 byte)
- proper error message if 'convert' is not working
- append '.ppm' to file for temporary filename instead of replacing last
three characters
2017-09-22 11:26:10 +02:00
Joachim Schöberl
7e83edabf1
order of d'tors for global variables: create VSSolution on demand, which is later
2017-08-28 18:19:20 +02:00
Joachim Schöberl
043e3403ba
use geometry from mesh on export user format
2017-07-24 22:26:18 +02:00
Joachim Schöberl
8377ab058d
switch off creation of hexes per default
2017-07-24 21:49:49 +02:00
Matthias Hochsteger
030ad1d732
Update screenshot code for Togl 2
2017-05-22 17:24:17 +02:00
Matthias Hochsteger
74cb50d5ce
Update for new FFMPEG version, extra header for implementation
2017-02-03 15:28:59 +01:00
Christopher Lackner
7e4892a9e7
firststep and laststep as meshingparameters to be exported to python
2016-12-05 13:50:21 +01:00
Matthias
953bd13cf4
Support for OpenGL buffer objects on Windows
2016-12-02 12:27:26 +01:00
Joachim Schöberl
60063f711f
export mesh from python
2016-07-10 18:07:36 +02:00
Joachim Schöberl
055031ce0d
store geometry with mesh, if available
2016-05-06 07:30:59 +02:00
Matthias
10d0f42ae6
init OCC on non-windows OSs
2016-04-04 10:45:23 +02:00
Matthias
8a3e29e624
get rid of pthread
2016-02-23 20:23:48 +01:00
Matthias Hochsteger
1b4f596446
get rid of OpenMP
2016-02-22 18:44:00 +01:00
Joachim Schöberl
c98a55ab11
merge ttk branch to master
2016-02-08 15:53:16 +01:00
Joachim Schöberl
a4a272d84c
remove test-output
2015-10-20 11:26:52 +02:00
Joachim Schöberl
e6157eecd8
nglib-python restructuring
2015-10-20 11:09:29 +02:00