Commit Graph

3298 Commits

Author SHA1 Message Date
Christopher Lackner
d9247d094b netgen trafo.mat returns Mat<3,3> and takes Mat<3,3> 2024-08-26 11:49:35 +02:00
Christopher Lackner
945bf2b3a3 raise length_error not netgen::Exception on wrong tuple size 2024-08-26 11:14:29 +02:00
Christopher Lackner
d72801d19a fix IdentifyPeriodic points in mesh in 2d mesh 2024-08-26 11:13:56 +02:00
Joachim Schoeberl
325175c88f comment deprecated function 2024-07-20 10:53:59 +02:00
Joachim Schoeberl
53b08efc6a remove commented code 2024-07-20 10:38:01 +02:00
Joachim Schoeberl
cb8c7850ba fix (false) warnings 2024-07-20 10:25:45 +02:00
Joachim Schoeberl
487942bc22 ThrowRangeException with [[noreturn]] 2024-07-19 22:30:34 +02:00
Joachim Schoeberl
3c9f98b38d save index bypasses range-check 2024-07-19 12:33:56 +02:00
Joachim Schoeberl
8f762bc33d std::move in register_archive 2024-07-18 18:57:06 +02:00
Matthias Hochsteger
62d2e4fba5 Copy ctor for IVec 2024-07-18 15:07:41 +02:00
Joachim Schoeberl
4fd89120b8 sqr is constexpr 2024-07-18 09:44:45 +02:00
Joachim Schoeberl
ad99e5fdea Exception::Throw 2024-07-17 18:01:59 +02:00
Joachim Schoeberl
ba472f7a11 Exception::Throw 2024-07-17 17:58:38 +02:00
Joachim Schoeberl
357ff7badf exception with stringview 2024-07-17 12:01:59 +02:00
Joachim Schoeberl
b6b20be30b IVec with HTArray 2024-07-16 19:20:07 +02:00
Joachim Schoeberl
e075d32f14 fix unused warning 2024-07-16 16:50:28 +02:00
Joachim Schoeberl
bac10cf1fb go back to C-array (since tests fail) 2024-07-16 16:11:20 +02:00
Joachim Schoeberl
7968ae4588 use std::array in IVec (for 0-size handling) 2024-07-16 13:48:17 +02:00
Joachim Schoeberl
54d59cff1e fix warnings 2024-07-16 13:03:49 +02:00
Joachim Schoeberl
20e0b3efa5 replace const string& by string_view in Flags and SymbolTable 2024-07-16 12:44:04 +02:00
Joachim Schoeberl
63986a4e5f throw range exception via function call -> reduces code size 2024-07-16 10:18:16 +02:00
Joachim Schoeberl
304ce7364a mpi-send of 0D-elements 2024-07-14 20:38:36 +02:00
Joachim Schoeberl
f1e06f0a6d pickling 0D-elements 2024-07-12 18:21:46 +02:00
Matthias Hochsteger
da743467fb Fix reading face_colors and face_transparencies for faces without attached geometry surface 2024-07-10 10:36:03 +02:00
Matthias Hochsteger
78832cb7c5 Fix building with mpi wrapper but without python support 2024-07-08 11:48:27 +02:00
Matthias Hochsteger
d987051f2b Fix building without Python 2024-07-04 17:26:47 +02:00
Matthias Hochsteger
000a312dc2 Use same color for shifted faces in boundary layer generation 2024-07-04 15:00:50 +02:00
Christopher Lackner
3974191ffa correctly check for degenerated edges 2024-06-27 21:00:52 +02:00
Matthias Hochsteger
a2d9455627 Fix compiling with cuda and active mem-tracer 2024-06-27 11:29:26 +02:00
Lackner, Christopher
32f291c66e Merge branch 'binary_brep' into 'master'
allow reading of binary brep files

See merge request ngsolve/netgen!654
2024-06-24 18:28:10 +02:00
Joachim Schoeberl
f9d7d3a4fd store newest vertex from bisection 2024-06-24 15:30:08 +02:00
Christopher Lackner
3709ea8f94 allow reading of binary brep files 2024-06-21 15:16:47 +02:00
Matthias Hochsteger
af5e003790 Fix GIL issue (see previous commit for details) 2024-06-21 11:51:12 +02:00
Matthias Hochsteger
163135981e Fix GIL issues in GenerateMesh() functions
Functions with a python typed argument (kwargs in this case) cannot use
  py::call_guard<py::gil_scoped_release>()
because it means, the GIL is not held when the function returns (and
cleans up arguments/temporary variables).

Thus, remove the global call guard and create a local variable
  py::gil_scoped_release gil_release;
after arguments are processed and before meshing starts.

This local variable is destroyed before the function returns
(acquiring the GIL again).
2024-06-21 11:36:37 +02:00
Matthias Hochsteger
c2f42f2f16 Backward compatibility for occ geometry loading (from mesh file) 2024-06-20 18:05:43 +02:00
Christopher Lackner
eff5e946f7 fix export of submesh faces 2024-06-20 11:12:01 +02:00
Joachim Schoeberl
cc3f27e514 comment occ.Mirror 2024-06-11 08:06:25 +02:00
Matthias Hochsteger
f5c9b87ee7 Fix build issue with gcc on AVX512 2024-06-10 10:48:33 +02:00
Matthias Hochsteger
eb98f59bc0 Add ng_mpi_native.hpp 2024-06-06 15:46:19 +02:00
Christopher Lackner
236f14553c fix project on edge in MapSurfacemesh if no trafo is given 2024-06-03 17:19:41 +02:00
Matthias Hochsteger
571cbbe4df Optional identification_name argument in Face::Offset to apply CLOSE_SURFACE identifications 2024-06-03 12:37:26 +02:00
Joachim Schoeberl
6d1c87f214 Offset - face with propagate properties 2024-06-02 15:56:10 +02:00
Joachim Schoeberl
f938b64397 Offset-wire 2024-06-02 10:50:22 +02:00
Joachim Schoeberl
82472c7905 undo std::ignore 2024-05-31 18:42:17 +02:00
Joachim Schoeberl
9a2dd3b63e avoid warnings 2024-05-31 18:19:57 +02:00
Christopher Lackner
3bb804eeaf add dict constructor of flags for implicit convertion back 2024-05-31 13:23:53 +02:00
Christopher Lackner
3029b5422a allow nested flags from nested python dictionaries 2024-05-31 12:55:59 +02:00
Matthias Hochsteger
0e0ea2d5f8 Wrap more MPI functions 2024-05-31 10:17:01 +02:00
Matthias Hochsteger
fefea90133 Fix pyodide build 2024-05-29 20:32:32 +02:00
Matthias Hochsteger
f70200e5aa Don't include MPI cxx symbols properly 2024-05-28 13:55:27 +02:00
Matthias Hochsteger
1e7624c7f5 Get rid of mpi4py compile-time dependency, disable MPI wrapper by default 2024-05-28 11:43:15 +02:00
Lisandro Dalcin
246dfd734d
mpi4py: Support limited API and ABI compatibility 2024-05-27 14:26:21 +03:00
Christopher Lackner
e404ce737b export localh set/get from mesh 2024-05-24 08:30:24 +02:00
Matthias Hochsteger
eaa797d7f6 Wrap MPI_Comm_c2f 2024-05-23 10:37:42 +02:00
Matthias Hochsteger
1dc353d3c5 Remove output while generating fieldlines 2024-05-21 16:10:13 +02:00
Matthias Hochsteger
2072f70f7f Fix building without MPI 2024-05-16 11:03:44 +02:00
Matthias Hochsteger
05c01ee884 Fix segfault when using more than 32 colors in colormap 2024-05-16 10:49:11 +02:00
Matthias Hochsteger
184a6ba4c5 Fix MPI code in paje trace 2024-05-16 09:35:58 +02:00
Matthias Hochsteger
f2ea9cde4c Fix MPI code in paje trace 2024-05-16 09:18:07 +02:00
Matthias Hochsteger
a018931437 Utility function to check if MPI was loaded 2024-05-14 22:17:42 +02:00
Matthias Hochsteger
a80ae826c6 Remove MyMPI helper class 2024-05-14 22:02:08 +02:00
Matthias Hochsteger
5e6f2ee045 Fix mesh generation from GUI when building with MPI 2024-05-14 21:56:50 +02:00
Christopher Lackner
12aaaf1e6c do not EdgeSwap with quads 2024-05-14 13:57:01 +02:00
Matthias Hochsteger
19731869d3 Utility header to convert to native mpi handles 2024-05-13 18:10:56 +02:00
Hochsteger, Matthias
335b926f8b Runtime MPI wrapper 2024-05-13 13:43:53 +02:00
Schöberl, Joachim
08eec4460c Merge branch 'uzerbinati/curved' into 'master'
Added ``curved'' field for Datalayout of Element and Elements2D

See merge request ngsolve/netgen!649
2024-05-06 18:31:46 +02:00
Joachim Schoeberl
19fcfc7f44 SetLevel returns old level 2024-05-05 21:41:05 +02:00
Joachim Schoeberl
bb2989e1c5 add 'items' to Flags, for same behavior as dict 2024-05-05 21:40:47 +02:00
Umberto Zerbinati
cdb5b74f53 Added ``curved'' field for Datalayout of Element and Elements2D
Signed-off-by: Umberto Zerbinati <zerbinati@maths.ox.ac.uk>
2024-05-02 12:28:06 +01:00
Joachim Schoeberl
331e47830e fix warning by throwing 2024-04-27 15:13:17 +02:00
Christopher Lackner
f808a2bb64 Propagate maxh to children only in occgeom constructor
Allows resetting maxh to larger values again:

```
from netgen.occ import *
from ngsolve import *

b1 = Box((-1,-1,-1), (1,1,1))

b1.faces.Max(X).maxh = 0.1
b1.faces.Max(X).maxh = 0.2

geo = OCCGeometry(b1)
mesh = Mesh(geo.GenerateMesh(maxh=0.5))
Draw(mesh)
```

Needed for example in meshing app. Before it was not possible to set
maxh to larger value again.
2024-04-26 09:55:53 +02:00
Joachim Schoeberl
eef79e64f2 added DLL_HEADER 2024-04-19 09:46:02 +02:00
Joachim Schoeberl
65006d3436 hp/macro-refinement hierarchy routed through Python 2024-04-18 11:58:50 +02:00
Joachim Schoeberl
8045611375 added missing dll-header 2024-04-13 08:32:16 +02:00
Joachim Schoeberl
ce8eca4099 include cassertk 2024-04-12 09:55:38 +02:00
Joachim Schoeberl
a393a315d0 makePyTuple from BaseArrayObject 2024-04-04 15:20:17 +02:00
Hochsteger, Matthias
6e2eae70ad Merge branch 'fix_blayer_meshopt' into 'master'
Fix blayer meshoptimization

See merge request ngsolve/netgen!647
2024-04-02 23:25:10 +02:00
Christopher Lackner
9b9ad1fd82 function to reset occ global shape properties 2024-04-02 22:46:55 +02:00
Matthias Hochsteger
78a3d24fde Do bad element Optimization only when requested 2024-04-02 21:59:27 +02:00
Matthias Hochsteger
ff505f1e41 Add range check in table 2024-04-02 21:58:58 +02:00
Matthias Hochsteger
db500f3cae Make /bigobj a public build flag again 2024-03-28 09:51:36 +01:00
Schöberl, Joachim
ea380ecb47 Merge branch 'explicit_edge_partition' into 'master'
[occ] allow giving explicit edge partition

See merge request ngsolve/netgen!645
2024-03-27 21:08:24 +01:00
Matthias Hochsteger
d8beec758e Fix Mesh::operator=
- assign pointelements
- sometimes region names were not copied correctly
- add some basic pytests for Mesh.Copy()
2024-03-27 21:03:45 +01:00
Christopher Lackner
bfcd77ff9c [occ] allow giving explicit edge partition 2024-03-27 14:55:29 +01:00
xiaodaxia
7c72410c84 no exporting compile options of ngcore 2024-03-27 11:32:17 +08:00
Matthias Hochsteger
7b54f95a27 Utility function to extract a subregion of the mesh 2024-03-25 18:02:33 +01:00
Matthias Hochsteger
29c6b8e06f Fix Mesh::operator=
bcnames are now stored in FaceDescriptor (as string members, no
pointers), so the name mapping must be applied to materials/bcnames
(depending on the mesh dimension).
2024-03-25 18:00:29 +01:00
Matthias Hochsteger
afb2f2f0ea Opencascade 7.8.0 compatibility 2024-03-25 10:19:25 +01:00
Matthias Hochsteger
e5513d9417 Print "Remove Illegal Elements" only when having illegal elements 2024-03-22 15:43:40 +01:00
Hochsteger, Matthias
b090bd1937 Propagate -fabi-version=xx when compiling with GCC 2024-03-20 18:30:17 +01:00
Christopher Lackner
11e8914dd8 face points need to have geominfo for face meshing (thx MrSmile) 2024-03-18 08:58:40 +01:00
Hochsteger, Matthias
d0ba2934df Consistent penalty for illegal tets 2024-03-11 21:10:56 +01:00
Joachim Schoeberl
43b707bcfb wrap inertia of occ-shape to Python 2024-03-07 12:39:56 +01:00
Hochsteger, Matthias
6b89d2cf62 Compatibility with Opencascade 7.8 2024-03-06 16:29:11 +01:00
Lackner, Christopher
a5c11df37e Merge branch 'remove_search_tree_in_face_mapping' into 'master'
Remove search tree in face mapping

See merge request ngsolve/netgen!640
2024-03-06 15:22:28 +01:00
Christopher Lackner
5f0276179f fix primary face computation in identification 2024-03-06 12:12:34 +01:00
Matthias Hochsteger
7e4f171b16 Remove search tree in face mapping 2024-03-06 11:20:20 +01:00
Christopher Lackner
bb7a3fe692 show properties in topology view in netgen gui 2024-03-05 14:38:25 +01:00
Christopher Lackner
1a213a1588 fix identifications write and load to step 2024-03-04 21:57:54 +01:00
Christopher Lackner
37df61b233 don't segfault on internal or external orientations in occ viewer 2024-03-04 19:49:40 +01:00