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
aa00749f97
fix some deprecated
2022-04-29 13:05:38 +02:00
Joachim Schoeberl
1afcb30102
less copying
2022-04-21 17:16:26 +02: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
Christopher Lackner
e0f3ce9cf0
fix loading of short mesh file names
2021-06-22 11:57:30 +02:00
Joachim Schoeberl
b51df253fd
pickle mesh-load also via ngsolve.Mesh('filename.vol.bin')
2021-06-17 07:58:25 +02:00
Matthias Hochsteger
99e001fc4c
TABLE -> Table
2021-05-11 18:21:40 +02:00
Matthias Hochsteger
c8406d3b10
replace NgArray and TABLE with Array and Table
2021-05-10 16:30:40 +02:00
Joachim Schöberl
895280a244
littel parallel polishing
2020-08-21 16:29:33 +02:00
Matthias Hochsteger
2f88502729
Remove Segment::bcname, fix Mesh::operator=
...
Remap the 'string* bcname' members in the FaceDescriptor objects in
Mesh::operator= to the new mesh
2020-07-23 16:24:59 +02:00
Joachim Schöberl
20abe6ec37
make number of vertices per level available
2019-07-29 17:46:09 +02:00
Matthias Hochsteger
c5acbacadb
Rename ArrayMem to NgArrayMem
2019-07-09 18:00:12 +02:00
Matthias Hochsteger
2d46d21a52
Rename FlatArray to NgFlatArray
2019-07-09 10:40:35 +02:00
Matthias Hochsteger
cb87362f64
Rename Array to NgArray
2019-07-09 10:39:16 +02:00
Lukas
9d01c080f9
Set global geoemtry
2019-03-01 11:33:53 +01:00
Lukas
4637854c9b
When loading a netgen-mesh, take geometry-info from mesh-file over global geometry.
2019-02-25 16:28:31 +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
Joachim Schöberl
2c5fdfbfec
mpiwrapper
2019-02-11 22:24:01 +01:00
Lukas
0f4ca1c7a7
Fewer ifdefs for MPI. More consistent use of mpi_interface instead of direct MPI calls.
2019-01-30 12:09:40 +01:00
Lukas
c7fb6c7e4a
Add a global communicator. The mesh now has a communicator.
2019-01-29 16:10:02 +01:00
Lukas
0a541ca3de
Resetting Geometry breaks pde-files
2018-08-09 14:11:44 +02:00
Lukas
bd8a53665a
Reset geometry when loading mesh with MPI active.
2018-08-02 10:19:53 +02:00
Matthias Hochsteger
63ee20cb29
Set global Mesh pointer
2018-06-13 14:01:56 +02:00
Lukas
68a552c7d6
Fixed indentions, etc.
2018-06-12 13:13:42 +02:00
Lukas
ebc6506f3e
Forced linking of 2d-library to interface-library (this should solve the problem with SplineGeometryRegister if building without GUI)
2018-06-12 13:10:41 +02:00
Lukas
7e062372d4
Fixed it now?
2018-06-12 11:28:51 +02:00
Lukas
89c7626a01
Fixed it now?
2018-06-12 11:18:13 +02:00
Lukas
30928eaaa8
Fixed it
2018-06-12 11:11:36 +02:00
Lukas
20c62589d2
Geometry information is now also Distributed when loading a mesh via NG_LoadMesh (was already fixed for python-meshes)
2018-06-12 11:06:50 +02:00
Joachim Schöberl
66ef426c79
Curve mesh functionality over Ngx_Mesh
2018-05-01 21:20:54 +02:00
Matthias Hochsteger
c48084fd1c
Fix build error on GCC 4.8
...
by avoiding the copy constructor of std::ifstream
2018-01-25 11:29:24 +01:00
Matthias Hochsteger
d4a2d4c87b
Check if mesh file exists before loading
...
Also derive NgException from std::exception to print the error message
in Python / on the command line.
2017-08-24 13:59:16 +02:00
Joachim Schöberl
70da438d6d
on mesh loading, set dummy-geometry if no geometry in mesh-file
2017-04-18 15:06:40 +02:00
Christopher Lackner
a4fe0c1c41
first push
2016-10-04 19:30:57 +02: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
Joachim Schöberl
d801222dbf
1d fixes
2016-03-23 19:51:09 +01:00
Joachim Schöberl
bee6c6bf90
consistent vertex->elements (1D/2D/3D) tables
2016-03-22 07:28:11 +01:00
Joachim Schöberl
b3591f829a
python - element has material name
2016-02-26 20:30:40 +01:00
Joachim Schöberl
56ed93963d
detach parallel meshing-thread
2016-02-23 23:40:46 +01: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
Matthias Hochsteger
8ac965d707
everything in one big dll on Windows
2015-10-19 10:08:30 +02:00
Joachim Schoeberl
8c6cf8ded4
mesh has geometry-ptr
2015-08-26 13:56:06 +02:00
Joachim Schoeberl
085cd6c774
TclTodo from parallel thread
2015-06-26 16:30:27 +02:00
Joachim Schoeberl
82435b59c4
store is_curved in 2D elements
2015-04-27 11:18:22 +02:00
Joachim Schoeberl
ad29fbecff
visual.hpp not needed here
2015-01-26 14:17:59 +00:00