netgen-mesher 6.2.2505.post48.dev0__cp313-cp313-win_amd64.whl → 6.2.2506.post48.dev0__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. netgen/__init__.pyi +3 -3
  2. netgen/cmake/NetgenConfig.cmake +9 -8
  3. netgen/config/__init__.pyi +7 -7
  4. netgen/config/config.py +6 -6
  5. netgen/config/config.pyi +7 -7
  6. netgen/include/core/archive.hpp +18 -3
  7. netgen/include/core/array.hpp +20 -4
  8. netgen/include/core/autodiff.hpp +9 -11
  9. netgen/include/core/autodiffdiff.hpp +0 -2
  10. netgen/include/core/bitarray.hpp +1 -1
  11. netgen/include/core/flags.hpp +1 -1
  12. netgen/include/core/hashtable.hpp +1 -1
  13. netgen/include/core/memtracer.hpp +7 -7
  14. netgen/include/core/ngcore.hpp +5 -0
  15. netgen/include/core/ngcore_api.hpp +11 -0
  16. netgen/include/core/register_archive.hpp +8 -0
  17. netgen/include/core/simd_arm64.hpp +100 -5
  18. netgen/include/core/simd_generic.hpp +187 -6
  19. netgen/include/core/simd_math.hpp +3 -2
  20. netgen/include/core/statushandler.hpp +37 -0
  21. netgen/include/core/table.hpp +2 -2
  22. netgen/include/core/taskmanager.hpp +34 -1
  23. netgen/include/include/netgen_version.hpp +3 -3
  24. netgen/include/meshing/basegeom.hpp +1 -4
  25. netgen/include/meshing/global.hpp +0 -17
  26. netgen/include/meshing/hpref_tet.hpp +41 -0
  27. netgen/include/meshing/hprefinement.hpp +2 -0
  28. netgen/include/meshing/meshtype.hpp +1 -0
  29. netgen/include/meshing/msghandler.hpp +9 -6
  30. netgen/include/meshing/topology.hpp +2 -2
  31. netgen/include/nginterface.h +3 -2
  32. netgen/include/occ/occ_utils.hpp +26 -0
  33. netgen/include/occ/occgeom.hpp +8 -0
  34. netgen/include/pybind11/attr.h +40 -8
  35. netgen/include/pybind11/buffer_info.h +14 -14
  36. netgen/include/pybind11/cast.h +553 -29
  37. netgen/include/pybind11/chrono.h +4 -1
  38. netgen/include/pybind11/conduit/README.txt +15 -0
  39. netgen/include/pybind11/conduit/pybind11_conduit_v1.h +116 -0
  40. netgen/include/pybind11/conduit/pybind11_platform_abi_id.h +87 -0
  41. netgen/include/pybind11/conduit/wrap_include_python_h.h +72 -0
  42. netgen/include/pybind11/critical_section.h +56 -0
  43. netgen/include/pybind11/detail/class.h +172 -97
  44. netgen/include/pybind11/detail/common.h +270 -189
  45. netgen/include/pybind11/detail/cpp_conduit.h +75 -0
  46. netgen/include/pybind11/detail/descr.h +55 -0
  47. netgen/include/pybind11/detail/dynamic_raw_ptr_cast_if_possible.h +39 -0
  48. netgen/include/pybind11/detail/exception_translation.h +71 -0
  49. netgen/include/pybind11/detail/function_record_pyobject.h +191 -0
  50. netgen/include/pybind11/detail/init.h +113 -9
  51. netgen/include/pybind11/detail/internals.h +479 -344
  52. netgen/include/pybind11/detail/native_enum_data.h +209 -0
  53. netgen/include/pybind11/detail/pybind11_namespace_macros.h +82 -0
  54. netgen/include/pybind11/detail/struct_smart_holder.h +378 -0
  55. netgen/include/pybind11/detail/type_caster_base.h +506 -133
  56. netgen/include/pybind11/detail/using_smart_holder.h +22 -0
  57. netgen/include/pybind11/detail/value_and_holder.h +90 -0
  58. netgen/include/pybind11/eigen/matrix.h +19 -10
  59. netgen/include/pybind11/eigen/tensor.h +15 -11
  60. netgen/include/pybind11/embed.h +50 -46
  61. netgen/include/pybind11/eval.h +11 -6
  62. netgen/include/pybind11/functional.h +58 -49
  63. netgen/include/pybind11/gil.h +34 -82
  64. netgen/include/pybind11/gil_safe_call_once.h +12 -1
  65. netgen/include/pybind11/gil_simple.h +37 -0
  66. netgen/include/pybind11/native_enum.h +67 -0
  67. netgen/include/pybind11/numpy.h +272 -93
  68. netgen/include/pybind11/pybind11.h +947 -265
  69. netgen/include/pybind11/pytypes.h +127 -21
  70. netgen/include/pybind11/stl/filesystem.h +23 -25
  71. netgen/include/pybind11/stl.h +277 -59
  72. netgen/include/pybind11/stl_bind.h +42 -7
  73. netgen/include/pybind11/subinterpreter.h +299 -0
  74. netgen/include/pybind11/trampoline_self_life_support.h +65 -0
  75. netgen/include/pybind11/typing.h +177 -4
  76. netgen/include/pybind11/warnings.h +75 -0
  77. netgen/lib/libnggui.lib +0 -0
  78. netgen/lib/ngcore.lib +0 -0
  79. netgen/lib/nglib.lib +0 -0
  80. netgen/libnggui.dll +0 -0
  81. netgen/libngguipy.pyd +0 -0
  82. netgen/libngpy/_NgOCC.pyi +220 -141
  83. netgen/libngpy/_csg.pyi +26 -26
  84. netgen/libngpy/_geom2d.pyi +34 -25
  85. netgen/libngpy/_meshing.pyi +262 -111
  86. netgen/libngpy/_stl.pyi +3 -4
  87. netgen/libngpy.pyd +0 -0
  88. netgen/ngcore.dll +0 -0
  89. netgen/nglib.dll +0 -0
  90. netgen/read_gmsh.py +41 -0
  91. netgen/togl.dll +0 -0
  92. netgen/version.py +1 -1
  93. netgen/webgui.py +38 -2
  94. {netgen_mesher-6.2.2505.post48.dev0.dist-info → netgen_mesher-6.2.2506.post48.dev0.dist-info}/METADATA +2 -1
  95. {netgen_mesher-6.2.2505.post48.dev0.dist-info → netgen_mesher-6.2.2506.post48.dev0.dist-info}/RECORD +144 -124
  96. pyngcore/pyngcore.cp313-win_amd64.pyd +0 -0
  97. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/boundarycondition.geo +0 -0
  98. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/boxcyl.geo +0 -0
  99. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/circle_on_cube.geo +0 -0
  100. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/cone.geo +0 -0
  101. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/cube.geo +0 -0
  102. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/cubeandring.geo +0 -0
  103. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/cubeandspheres.geo +0 -0
  104. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/cubemcyl.geo +0 -0
  105. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/cubemsphere.geo +0 -0
  106. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/cylinder.geo +0 -0
  107. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/cylsphere.geo +0 -0
  108. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/doc/ng4.pdf +0 -0
  109. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/ellipsoid.geo +0 -0
  110. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/ellipticcyl.geo +0 -0
  111. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/extrusion.geo +0 -0
  112. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/fichera.geo +0 -0
  113. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/frame.step +0 -0
  114. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/hinge.stl +0 -0
  115. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/lshape3d.geo +0 -0
  116. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/manyholes.geo +0 -0
  117. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/manyholes2.geo +0 -0
  118. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/matrix.geo +0 -0
  119. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/ortho.geo +0 -0
  120. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/part1.stl +0 -0
  121. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/period.geo +0 -0
  122. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/py_tutorials/exportNeutral.py +0 -0
  123. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/py_tutorials/mesh.py +0 -0
  124. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/py_tutorials/shaft.geo +0 -0
  125. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/revolution.geo +0 -0
  126. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/screw.step +0 -0
  127. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/sculpture.geo +0 -0
  128. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/shaft.geo +0 -0
  129. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/shell.geo +0 -0
  130. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/sphere.geo +0 -0
  131. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/sphereincube.geo +0 -0
  132. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/square.in2d +0 -0
  133. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/squarecircle.in2d +0 -0
  134. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/squarehole.in2d +0 -0
  135. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/torus.geo +0 -0
  136. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/trafo.geo +0 -0
  137. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/twobricks.geo +0 -0
  138. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/twocubes.geo +0 -0
  139. {netgen_mesher-6.2.2505.post48.dev0.data → netgen_mesher-6.2.2506.post48.dev0.data}/data/share/netgen/twocyl.geo +0 -0
  140. {netgen_mesher-6.2.2505.post48.dev0.dist-info → netgen_mesher-6.2.2506.post48.dev0.dist-info}/AUTHORS +0 -0
  141. {netgen_mesher-6.2.2505.post48.dev0.dist-info → netgen_mesher-6.2.2506.post48.dev0.dist-info}/LICENSE +0 -0
  142. {netgen_mesher-6.2.2505.post48.dev0.dist-info → netgen_mesher-6.2.2506.post48.dev0.dist-info}/WHEEL +0 -0
  143. {netgen_mesher-6.2.2505.post48.dev0.dist-info → netgen_mesher-6.2.2506.post48.dev0.dist-info}/entry_points.txt +0 -0
  144. {netgen_mesher-6.2.2505.post48.dev0.dist-info → netgen_mesher-6.2.2506.post48.dev0.dist-info}/top_level.txt +0 -0
@@ -12,6 +12,7 @@
12
12
 
13
13
  #include "detail/common.h"
14
14
  #include "cast.h"
15
+ #include "trampoline_self_life_support.h"
15
16
 
16
17
  #include <functional>
17
18
 
@@ -81,6 +82,10 @@ struct dynamic_attr {};
81
82
  /// Annotation which enables the buffer protocol for a type
82
83
  struct buffer_protocol {};
83
84
 
85
+ /// Annotation which enables releasing the GIL before calling the C++ destructor of wrapped
86
+ /// instances (pybind/pybind11#1446).
87
+ struct release_gil_before_calling_cpp_dtor {};
88
+
84
89
  /// Annotation which requests that a special metaclass is created for a type
85
90
  struct metaclass {
86
91
  handle value;
@@ -188,6 +193,7 @@ struct argument_record {
188
193
 
189
194
  /// Internal data structure which holds metadata about a bound function (signature, overloads,
190
195
  /// etc.)
196
+ #define PYBIND11_DETAIL_FUNCTION_RECORD_ABI_ID "v1" // PLEASE UPDATE if the struct is changed.
191
197
  struct function_record {
192
198
  function_record()
193
199
  : is_constructor(false), is_new_style_constructor(false), is_stateless(false),
@@ -267,12 +273,18 @@ struct function_record {
267
273
  /// Pointer to next overload
268
274
  function_record *next = nullptr;
269
275
  };
276
+ // The main purpose of this macro is to make it easy to pin-point the critically related code
277
+ // sections.
278
+ #define PYBIND11_ENSURE_PRECONDITION_FOR_FUNCTIONAL_H_PERFORMANCE_OPTIMIZATIONS(...) \
279
+ static_assert( \
280
+ __VA_ARGS__, \
281
+ "Violation of precondition for pybind11/functional.h performance optimizations!")
270
282
 
271
283
  /// Special data structure which (temporarily) holds metadata about a bound class
272
284
  struct type_record {
273
285
  PYBIND11_NOINLINE type_record()
274
286
  : multiple_inheritance(false), dynamic_attr(false), buffer_protocol(false),
275
- default_holder(true), module_local(false), is_final(false) {}
287
+ module_local(false), is_final(false), release_gil_before_calling_cpp_dtor(false) {}
276
288
 
277
289
  /// Handle to the parent scope
278
290
  handle scope;
@@ -301,6 +313,12 @@ struct type_record {
301
313
  /// Function pointer to class_<..>::dealloc
302
314
  void (*dealloc)(detail::value_and_holder &) = nullptr;
303
315
 
316
+ /// Function pointer for casting alias class (aka trampoline) pointer to
317
+ /// trampoline_self_life_support pointer. Sidesteps cross-DSO RTTI issues
318
+ /// on platforms like macOS (see PR #5728 for details).
319
+ get_trampoline_self_life_support_fn get_trampoline_self_life_support
320
+ = [](void *) -> trampoline_self_life_support * { return nullptr; };
321
+
304
322
  /// List of base classes of the newly created type
305
323
  list bases;
306
324
 
@@ -322,15 +340,17 @@ struct type_record {
322
340
  /// Does the class implement the buffer protocol?
323
341
  bool buffer_protocol : 1;
324
342
 
325
- /// Is the default (unique_ptr) holder type used?
326
- bool default_holder : 1;
327
-
328
343
  /// Is the class definition local to the module shared object?
329
344
  bool module_local : 1;
330
345
 
331
346
  /// Is the class inheritable from python classes?
332
347
  bool is_final : 1;
333
348
 
349
+ /// Solves pybind/pybind11#1446
350
+ bool release_gil_before_calling_cpp_dtor : 1;
351
+
352
+ holder_enum_t holder_enum_v = holder_enum_t::undefined;
353
+
334
354
  PYBIND11_NOINLINE void add_base(const std::type_info &base, void *(*caster)(void *) ) {
335
355
  auto *base_info = detail::get_type_info(base, false);
336
356
  if (!base_info) {
@@ -340,18 +360,22 @@ struct type_record {
340
360
  + "\" referenced unknown base type \"" + tname + "\"");
341
361
  }
342
362
 
343
- if (default_holder != base_info->default_holder) {
363
+ // SMART_HOLDER_BAKEIN_FOLLOW_ON: Refine holder compatibility checks.
364
+ bool this_has_unique_ptr_holder = (holder_enum_v == holder_enum_t::std_unique_ptr);
365
+ bool base_has_unique_ptr_holder
366
+ = (base_info->holder_enum_v == holder_enum_t::std_unique_ptr);
367
+ if (this_has_unique_ptr_holder != base_has_unique_ptr_holder) {
344
368
  std::string tname(base.name());
345
369
  detail::clean_type_id(tname);
346
370
  pybind11_fail("generic_type: type \"" + std::string(name) + "\" "
347
- + (default_holder ? "does not have" : "has")
371
+ + (this_has_unique_ptr_holder ? "does not have" : "has")
348
372
  + " a non-default holder type while its base \"" + tname + "\" "
349
- + (base_info->default_holder ? "does not" : "does"));
373
+ + (base_has_unique_ptr_holder ? "does not" : "does"));
350
374
  }
351
375
 
352
376
  bases.append((PyObject *) base_info->type);
353
377
 
354
- #if PY_VERSION_HEX < 0x030B0000
378
+ #ifdef PYBIND11_BACKWARD_COMPATIBILITY_TP_DICTOFFSET
355
379
  dynamic_attr |= base_info->type->tp_dictoffset != 0;
356
380
  #else
357
381
  dynamic_attr |= (base_info->type->tp_flags & Py_TPFLAGS_MANAGED_DICT) != 0;
@@ -603,6 +627,14 @@ struct process_attribute<module_local> : process_attribute_default<module_local>
603
627
  static void init(const module_local &l, type_record *r) { r->module_local = l.value; }
604
628
  };
605
629
 
630
+ template <>
631
+ struct process_attribute<release_gil_before_calling_cpp_dtor>
632
+ : process_attribute_default<release_gil_before_calling_cpp_dtor> {
633
+ static void init(const release_gil_before_calling_cpp_dtor &, type_record *r) {
634
+ r->release_gil_before_calling_cpp_dtor = true;
635
+ }
636
+ };
637
+
606
638
  /// Process a 'prepend' attribute, putting this at the beginning of the overload chain
607
639
  template <>
608
640
  struct process_attribute<prepend> : process_attribute_default<prepend> {
@@ -102,22 +102,22 @@ struct buffer_info {
102
102
  template <typename T>
103
103
  buffer_info(const T *ptr, ssize_t size, bool readonly = true)
104
104
  : buffer_info(
105
- const_cast<T *>(ptr), sizeof(T), format_descriptor<T>::format(), size, readonly) {}
105
+ const_cast<T *>(ptr), sizeof(T), format_descriptor<T>::format(), size, readonly) {}
106
106
 
107
107
  explicit buffer_info(Py_buffer *view, bool ownview = true)
108
108
  : buffer_info(
109
- view->buf,
110
- view->itemsize,
111
- view->format,
112
- view->ndim,
113
- {view->shape, view->shape + view->ndim},
114
- /* Though buffer::request() requests PyBUF_STRIDES, ctypes objects
115
- * ignore this flag and return a view with NULL strides.
116
- * When strides are NULL, build them manually. */
117
- view->strides
118
- ? std::vector<ssize_t>(view->strides, view->strides + view->ndim)
119
- : detail::c_strides({view->shape, view->shape + view->ndim}, view->itemsize),
120
- (view->readonly != 0)) {
109
+ view->buf,
110
+ view->itemsize,
111
+ view->format,
112
+ view->ndim,
113
+ {view->shape, view->shape + view->ndim},
114
+ /* Though buffer::request() requests PyBUF_STRIDES, ctypes objects
115
+ * ignore this flag and return a view with NULL strides.
116
+ * When strides are NULL, build them manually. */
117
+ view->strides
118
+ ? std::vector<ssize_t>(view->strides, view->strides + view->ndim)
119
+ : detail::c_strides({view->shape, view->shape + view->ndim}, view->itemsize),
120
+ (view->readonly != 0)) {
121
121
  // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer)
122
122
  this->m_view = view;
123
123
  // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer)
@@ -176,7 +176,7 @@ private:
176
176
  detail::any_container<ssize_t> &&strides_in,
177
177
  bool readonly)
178
178
  : buffer_info(
179
- ptr, itemsize, format, ndim, std::move(shape_in), std::move(strides_in), readonly) {}
179
+ ptr, itemsize, format, ndim, std::move(shape_in), std::move(strides_in), readonly) {}
180
180
 
181
181
  Py_buffer *m_view = nullptr;
182
182
  bool ownview = false;