ngsolve 6.2.2506.post75.dev0__cp314-cp314-manylinux_2_28_x86_64.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.

Potentially problematic release.


This version of ngsolve might be problematic. Click here for more details.

Files changed (303) hide show
  1. ngsolve-6.2.2506.post75.dev0.data/data/bin/ngs_nvcc +14 -0
  2. ngsolve-6.2.2506.post75.dev0.data/data/bin/ngs_nvlink +14 -0
  3. ngsolve-6.2.2506.post75.dev0.data/data/bin/ngscxx +15 -0
  4. ngsolve-6.2.2506.post75.dev0.data/data/bin/ngsld +11 -0
  5. ngsolve-6.2.2506.post75.dev0.data/data/bin/ngsolve.tcl +648 -0
  6. ngsolve-6.2.2506.post75.dev0.data/data/bin/ngspy +2 -0
  7. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/analytic_integrals.hpp +10 -0
  8. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/arnoldi.hpp +55 -0
  9. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/bandmatrix.hpp +334 -0
  10. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/basematrix.hpp +957 -0
  11. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/basevector.hpp +1268 -0
  12. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/bdbequations.hpp +2805 -0
  13. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/bdbintegrator.hpp +1660 -0
  14. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/bem_diffops.hpp +475 -0
  15. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/bessel.hpp +1064 -0
  16. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/bilinearform.hpp +963 -0
  17. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/bla.hpp +29 -0
  18. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/blockalloc.hpp +95 -0
  19. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/blockjacobi.hpp +328 -0
  20. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/bspline.hpp +116 -0
  21. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/calcinverse.hpp +141 -0
  22. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/cg.hpp +368 -0
  23. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/chebyshev.hpp +44 -0
  24. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/cholesky.hpp +720 -0
  25. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/clapack.h +7254 -0
  26. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/code_generation.hpp +296 -0
  27. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/coefficient.hpp +2033 -0
  28. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/coefficient_impl.hpp +19 -0
  29. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/coefficient_stdmath.hpp +167 -0
  30. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/commutingAMG.hpp +106 -0
  31. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/comp.hpp +79 -0
  32. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/compatibility.hpp +41 -0
  33. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/complex_wrapper.hpp +73 -0
  34. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/compressedfespace.hpp +110 -0
  35. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/contact.hpp +235 -0
  36. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/cuda_linalg.hpp +175 -0
  37. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/cuda_ngbla.hpp +226 -0
  38. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/cuda_ngstd.hpp +527 -0
  39. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/cuda_profiler.hpp +240 -0
  40. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/diagonalmatrix.hpp +154 -0
  41. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/differentialoperator.hpp +276 -0
  42. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/diffop.hpp +1286 -0
  43. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/diffop_impl.hpp +328 -0
  44. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/diffopwithfactor.hpp +123 -0
  45. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/discontinuous.hpp +84 -0
  46. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/dump.hpp +949 -0
  47. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/ectypes.hpp +121 -0
  48. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/eigen.hpp +60 -0
  49. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/eigensystem.hpp +18 -0
  50. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/elasticity_equations.hpp +595 -0
  51. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/elementbyelement.hpp +195 -0
  52. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/elementtopology.hpp +1760 -0
  53. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/elementtransformation.hpp +339 -0
  54. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/evalfunc.hpp +405 -0
  55. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/expr.hpp +1686 -0
  56. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/facetfe.hpp +175 -0
  57. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/facetfespace.hpp +180 -0
  58. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/facethofe.hpp +111 -0
  59. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/facetsurffespace.hpp +112 -0
  60. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/fe_interfaces.hpp +32 -0
  61. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/fem.hpp +87 -0
  62. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/fesconvert.hpp +14 -0
  63. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/fespace.hpp +1449 -0
  64. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/finiteelement.hpp +286 -0
  65. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/globalinterfacespace.hpp +77 -0
  66. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/globalspace.hpp +115 -0
  67. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/gridfunction.hpp +525 -0
  68. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/h1amg.hpp +124 -0
  69. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/h1hofe.hpp +188 -0
  70. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/h1hofe_impl.hpp +1262 -0
  71. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/h1hofefo.hpp +148 -0
  72. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/h1hofefo_impl.hpp +185 -0
  73. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/h1hofespace.hpp +167 -0
  74. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/h1lofe.hpp +1240 -0
  75. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/h1lumping.hpp +41 -0
  76. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hcurl_equations.hpp +1381 -0
  77. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hcurlcurlfe.hpp +2241 -0
  78. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hcurlcurlfespace.hpp +78 -0
  79. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hcurlfe.hpp +259 -0
  80. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hcurlfe_utils.hpp +107 -0
  81. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hcurlhdiv_dshape.hpp +857 -0
  82. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hcurlhdivfes.hpp +308 -0
  83. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hcurlhofe.hpp +175 -0
  84. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hcurlhofe_impl.hpp +1871 -0
  85. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hcurlhofespace.hpp +193 -0
  86. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hcurllofe.hpp +1146 -0
  87. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdiv_equations.hpp +880 -0
  88. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdivdivfe.hpp +2923 -0
  89. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdivdivsurfacespace.hpp +76 -0
  90. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdivfe.hpp +206 -0
  91. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdivfe_utils.hpp +717 -0
  92. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdivfes.hpp +75 -0
  93. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdivhofe.hpp +447 -0
  94. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdivhofe_impl.hpp +1107 -0
  95. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdivhofefo.hpp +229 -0
  96. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdivhofespace.hpp +177 -0
  97. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdivhosurfacefespace.hpp +106 -0
  98. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hdivlofe.hpp +773 -0
  99. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hidden.hpp +74 -0
  100. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/householder.hpp +181 -0
  101. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hypre_ams_precond.hpp +123 -0
  102. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/hypre_precond.hpp +73 -0
  103. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/integrator.hpp +2012 -0
  104. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/integratorcf.hpp +253 -0
  105. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/interpolate.hpp +49 -0
  106. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/intrule.hpp +2542 -0
  107. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/intrules_SauterSchwab.hpp +25 -0
  108. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/irspace.hpp +49 -0
  109. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/jacobi.hpp +153 -0
  110. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/kernels.hpp +762 -0
  111. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/l2hofe.hpp +194 -0
  112. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/l2hofe_impl.hpp +564 -0
  113. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/l2hofefo.hpp +542 -0
  114. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/l2hofespace.hpp +344 -0
  115. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/la.hpp +38 -0
  116. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/linalg_kernels.hpp +102 -0
  117. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/linearform.hpp +266 -0
  118. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/matrix.hpp +2140 -0
  119. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/memusage.hpp +41 -0
  120. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/meshaccess.hpp +1359 -0
  121. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/mgpre.hpp +204 -0
  122. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/mp_coefficient.hpp +145 -0
  123. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/mptools.hpp +2281 -0
  124. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/multigrid.hpp +42 -0
  125. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/multivector.hpp +447 -0
  126. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/mumpsinverse.hpp +187 -0
  127. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/mycomplex.hpp +361 -0
  128. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/ng_lapack.hpp +1661 -0
  129. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/ngblas.hpp +1232 -0
  130. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/ngs_defines.hpp +30 -0
  131. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/ngs_stdcpp_include.hpp +106 -0
  132. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/ngs_utils.hpp +121 -0
  133. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/ngsobject.hpp +1019 -0
  134. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/ngsstream.hpp +113 -0
  135. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/ngstd.hpp +72 -0
  136. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/nodalhofe.hpp +96 -0
  137. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/nodalhofe_impl.hpp +141 -0
  138. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/normalfacetfe.hpp +223 -0
  139. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/normalfacetfespace.hpp +98 -0
  140. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/normalfacetsurfacefespace.hpp +84 -0
  141. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/order.hpp +251 -0
  142. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/parallel_matrices.hpp +222 -0
  143. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/paralleldofs.hpp +340 -0
  144. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/parallelngs.hpp +23 -0
  145. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/parallelvector.hpp +269 -0
  146. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/pardisoinverse.hpp +200 -0
  147. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/periodic.hpp +129 -0
  148. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/plateaufespace.hpp +25 -0
  149. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/pml.hpp +275 -0
  150. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/pmltrafo.hpp +631 -0
  151. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/postproc.hpp +142 -0
  152. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/potentialtools.hpp +22 -0
  153. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/precomp.hpp +60 -0
  154. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/preconditioner.hpp +602 -0
  155. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/prolongation.hpp +377 -0
  156. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/python_comp.hpp +107 -0
  157. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/python_fem.hpp +89 -0
  158. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/python_linalg.hpp +58 -0
  159. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/python_ngstd.hpp +386 -0
  160. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/recursive_pol.hpp +4896 -0
  161. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/recursive_pol_tet.hpp +395 -0
  162. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/recursive_pol_trig.hpp +492 -0
  163. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/reorderedfespace.hpp +81 -0
  164. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/sample_sort.hpp +105 -0
  165. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/scalarfe.hpp +335 -0
  166. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/shapefunction_utils.hpp +113 -0
  167. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/simd_complex.hpp +329 -0
  168. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/smoother.hpp +253 -0
  169. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/solve.hpp +89 -0
  170. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/sparsecholesky.hpp +313 -0
  171. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/sparsematrix.hpp +1038 -0
  172. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/sparsematrix_dyn.hpp +90 -0
  173. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/sparsematrix_impl.hpp +1013 -0
  174. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/special_matrix.hpp +463 -0
  175. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/specialelement.hpp +125 -0
  176. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/statushandler.hpp +33 -0
  177. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/stringops.hpp +12 -0
  178. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/superluinverse.hpp +136 -0
  179. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/symbolicintegrator.hpp +850 -0
  180. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/symmetricmatrix.hpp +144 -0
  181. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/tangentialfacetfe.hpp +224 -0
  182. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/tangentialfacetfespace.hpp +91 -0
  183. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/tensor.hpp +522 -0
  184. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/tensorcoefficient.hpp +446 -0
  185. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/tensorproductintegrator.hpp +113 -0
  186. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/thcurlfe.hpp +128 -0
  187. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/thcurlfe_impl.hpp +380 -0
  188. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/thdivfe.hpp +80 -0
  189. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/thdivfe_impl.hpp +492 -0
  190. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/tpdiffop.hpp +461 -0
  191. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/tpfes.hpp +133 -0
  192. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/tpintrule.hpp +224 -0
  193. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/triangular.hpp +465 -0
  194. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/tscalarfe.hpp +245 -0
  195. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/tscalarfe_impl.hpp +1029 -0
  196. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/umfpackinverse.hpp +148 -0
  197. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/unifiedvector.hpp +103 -0
  198. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/vector.hpp +1273 -0
  199. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/voxelcoefficientfunction.hpp +41 -0
  200. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/vtkoutput.hpp +198 -0
  201. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/vvector.hpp +208 -0
  202. ngsolve-6.2.2506.post75.dev0.data/data/include/netgen/webgui.hpp +92 -0
  203. ngsolve-6.2.2506.post75.dev0.data/data/lib/cmake/ngsolve/NGSolveConfig.cmake +102 -0
  204. ngsolve-6.2.2506.post75.dev0.data/data/lib/cmake/ngsolve/ngsolve-targets-release.cmake +89 -0
  205. ngsolve-6.2.2506.post75.dev0.data/data/lib/cmake/ngsolve/ngsolve-targets.cmake +173 -0
  206. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngbla.so +0 -0
  207. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngcomp.so +0 -0
  208. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngfem.so +0 -0
  209. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngla.so +0 -0
  210. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngsbem.so +0 -0
  211. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngscudalib.so +0 -0
  212. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngsolve.so +0 -0
  213. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngstd.so +0 -0
  214. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/TensorProductTools.py +210 -0
  215. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/__console.py +94 -0
  216. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/__expr.py +181 -0
  217. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/__init__.py +148 -0
  218. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/_scikit_build_core_dependencies.py +30 -0
  219. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/bvp.py +78 -0
  220. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/config/__init__.py +1 -0
  221. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/config/__main__.py +4 -0
  222. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/config/config.py +60 -0
  223. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/__init__.py +0 -0
  224. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_1d_1d.py +80 -0
  225. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_1d_2d.py +73 -0
  226. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_2d_1d.py +72 -0
  227. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_2d_2d.py +66 -0
  228. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/__init__.py +0 -0
  229. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/__init__.py +0 -0
  230. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/hhj.py +44 -0
  231. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/hybrid_dg.py +53 -0
  232. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/mixed.py +30 -0
  233. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/nonlin.py +29 -0
  234. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/pickling.py +26 -0
  235. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/pml.py +31 -0
  236. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/taskmanager.py +20 -0
  237. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/tdnns.py +47 -0
  238. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDG-skeleton.py +45 -0
  239. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDG.py +38 -0
  240. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDGlap.py +42 -0
  241. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDGwave.py +61 -0
  242. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/__init__.py +0 -0
  243. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/adaptive.py +123 -0
  244. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/cmagnet.py +59 -0
  245. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/elasticity.py +76 -0
  246. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/navierstokes.py +74 -0
  247. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/poisson.ipynb +170 -0
  248. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/poisson.py +41 -0
  249. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/__init__.py +0 -0
  250. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_cmagnet.py +87 -0
  251. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_navierstokes.py +117 -0
  252. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_poisson.py +89 -0
  253. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_timeDG.py +82 -0
  254. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/directsolvers.py +26 -0
  255. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/eigenvalues.py +364 -0
  256. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/internal.py +89 -0
  257. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/krylovspace.py +1013 -0
  258. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/meshes.py +748 -0
  259. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngs2petsc.py +310 -0
  260. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngscuda.so +0 -0
  261. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngscxx.py +42 -0
  262. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngslib.so +0 -0
  263. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/nonlinearsolvers.py +203 -0
  264. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/preconditioners.py +11 -0
  265. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/solve_implementation.py +168 -0
  266. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/solvers.py +7 -0
  267. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/timestepping.py +185 -0
  268. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/timing.py +108 -0
  269. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/utils.py +167 -0
  270. ngsolve-6.2.2506.post75.dev0.data/data/lib/python3.14/site-packages/ngsolve/webgui.py +670 -0
  271. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/beam.geo +17 -0
  272. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/beam.vol +240 -0
  273. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/chip.in2d +41 -0
  274. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/chip.vol +614 -0
  275. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/coil.geo +12 -0
  276. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/coil.vol +2560 -0
  277. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/coilshield.geo +24 -0
  278. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/coilshield.vol +3179 -0
  279. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/cube.geo +19 -0
  280. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/cube.vol +1832 -0
  281. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/d10_DGdoubleglazing.pde +50 -0
  282. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/d11_chip_nitsche.pde +40 -0
  283. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/d1_square.pde +43 -0
  284. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/d2_chip.pde +35 -0
  285. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/d3_helmholtz.pde +22 -0
  286. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/d4_cube.pde +46 -0
  287. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/d5_beam.pde +74 -0
  288. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/d6_shaft.pde +73 -0
  289. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/d7_coil.pde +50 -0
  290. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/d8_coilshield.pde +49 -0
  291. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/d9_hybridDG.pde +72 -0
  292. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/doubleglazing.in2d +27 -0
  293. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/doubleglazing.vol +737 -0
  294. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  295. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/shaft.geo +73 -0
  296. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/shaft.vol +4291 -0
  297. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/square.in2d +17 -0
  298. ngsolve-6.2.2506.post75.dev0.data/data/share/ngsolve/square.vol +149 -0
  299. ngsolve-6.2.2506.post75.dev0.dist-info/METADATA +14 -0
  300. ngsolve-6.2.2506.post75.dev0.dist-info/RECORD +303 -0
  301. ngsolve-6.2.2506.post75.dev0.dist-info/WHEEL +5 -0
  302. ngsolve-6.2.2506.post75.dev0.dist-info/licenses/LICENSE +504 -0
  303. ngsolve-6.2.2506.post75.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,748 @@
1
+ from netgen.meshing import *
2
+ from netgen.csg import *
3
+ import ngsolve
4
+
5
+ def Make1DMesh(n, mapping = None, periodic=False):
6
+ """
7
+ Generate an equidistant 1D mesh with N cells
8
+
9
+ Parameters
10
+ ----------
11
+ n : int
12
+ Number of cells.
13
+
14
+ mapping: lamda
15
+ Mapping to transform the generated points. If None, the identity mapping is used.
16
+
17
+ periodic: bool
18
+ If True, the endpoints are identified to generate a periodic mesh.
19
+
20
+ Returns
21
+ -------
22
+ (ngsolve.mesh)
23
+ Returns generated 1D NGSolve mesh
24
+
25
+ """
26
+ mesh = Mesh(dim=1)
27
+ pids = []
28
+ for i in range(n+1):
29
+ x = i/n
30
+ if mapping:
31
+ x = mapping(x)
32
+ pids.append (mesh.Add (MeshPoint(Pnt(x, 0, 0))))
33
+
34
+ idx_inner = mesh.AddRegion("dom", dim=1)
35
+ idx_left = mesh.AddRegion("left", dim=0)
36
+ idx_right = mesh.AddRegion("right", dim=0)
37
+
38
+ for i in range(n):
39
+ mesh.Add(Element1D([pids[i+1],pids[i]],index=idx_inner))
40
+ mesh.Add (Element0D( pids[0], index=idx_left))
41
+ mesh.Add (Element0D( pids[n], index=idx_right))
42
+ if periodic:
43
+ mesh.AddPointIdentification(pids[0],pids[n],1,2)
44
+ ngsmesh = ngsolve.Mesh(mesh)
45
+ return ngsmesh
46
+
47
+ def MakeStructured2DMesh(quads=True, nx=10, ny=10, secondorder=False, periodic_x=False, periodic_y=False, mapping = None, bbpts=None, bbnames=None, flip_triangles=False, boundarylayer=None, hppnts=None):
48
+ """
49
+ Generate a structured 2D mesh
50
+
51
+ Parameters
52
+ ----------
53
+ quads : bool
54
+ If True, a quadrilateral mesh is generated. If False, the quads are split to triangles.
55
+
56
+ nx : int
57
+ Number of cells in x-direction.
58
+
59
+ ny : int
60
+ Number of cells in y-direction.
61
+
62
+ secondorder : bool
63
+ If True, second order curved elements are used.
64
+
65
+ periodic_x: bool
66
+ If True, the left and right boundaries are identified to generate a periodic mesh in x-direction.
67
+
68
+ periodic_y: bool
69
+ If True, the top and bottom boundaries are identified to generate a periodic mesh in y-direction.
70
+
71
+ mapping: lamda
72
+ Mapping to transform the generated points. If None, the identity mapping is used.
73
+
74
+ bbpts : list
75
+ List of points which should be handled as BBND and are named with bbnames. The mesh (nx, ny and mapping) must be constructed in such a way that the bbpts coincide with generated points. Otherwise an Exception is thrown.
76
+
77
+ bbnames : list
78
+ List of bbnd names as strings. Size must coincide with size of bbpts. Otherwise an Exception is thrown.
79
+
80
+ flip_triangles : bool
81
+ If set to True together with quads=False the quads are cut the other way round
82
+
83
+ boundarylayer : dict
84
+ If not None it expects a dictionary of the form { "boundaryname" : [t1,...,tn] } where ti denote the thickness of layer i. The number of layers are included in nx/ny. After the layers are placed the remaining number of cells are used to divide the remaining grid uniformly.
85
+
86
+ hppnts : list
87
+ If not None it expects a list of the form [ (px1,py1, hpref1), (px2,py2, hpref2), ... ] where px,py are the point coordinates which have to be resolved in the mesh and hpref the refinement factor
88
+
89
+ Returns
90
+ -------
91
+ (ngsolve.mesh)
92
+ Returns generated 2D NGSolve mesh
93
+
94
+ """
95
+ mesh = Mesh()
96
+ mesh.dim=2
97
+
98
+ if (bbpts and bbnames) and len(bbpts) != len(bbnames):
99
+ raise Exception("Lenght of bbnames does not coincide with length of bbpts!")
100
+
101
+ found = []
102
+ indbbpts = []
103
+ if bbpts:
104
+ for i in range(len(bbpts)):
105
+ found.append(False)
106
+ indbbpts.append(None)
107
+ foundhp = [ False for i in hppnts] if hppnts else []
108
+
109
+
110
+ pids = []
111
+ if periodic_y:
112
+ minioni = []
113
+ masteri = []
114
+ if periodic_x:
115
+ minionj = []
116
+ masterj = []
117
+
118
+ numlayerleft = len(boundarylayer["left"]) if (boundarylayer and boundarylayer.get("left")) else 0
119
+ numlayerright = len(boundarylayer["right"]) if (boundarylayer and boundarylayer.get("right")) else 0
120
+ numlayertop = len(boundarylayer["top"]) if (boundarylayer and boundarylayer.get("top")) else 0
121
+ numlayerbot = len(boundarylayer["bottom"]) if (boundarylayer and boundarylayer.get("bottom")) else 0
122
+
123
+ thicknessleft = [0]
124
+ thicknessright = [0]
125
+ thicknesstop = [0]
126
+ thicknessbot = [0]
127
+ for i in range(numlayerleft):
128
+ thicknessleft.append(thicknessleft[-1]+boundarylayer["left"][i])
129
+ for i in range(numlayerright):
130
+ thicknessright.append(thicknessright[-1]+boundarylayer["right"][i])
131
+ for i in range(numlayertop):
132
+ thicknesstop.append(thicknesstop[-1]+boundarylayer["top"][i])
133
+ for i in range(numlayerbot):
134
+ thicknessbot.append(thicknessbot[-1]+boundarylayer["bottom"][i])
135
+
136
+
137
+ for i in range(ny+1):
138
+ for j in range(nx+1):
139
+ x = thicknessleft[j] if j < numlayerleft else ((thicknessleft[-1]+(j-numlayerleft)/(nx-numlayerleft-numlayerright)*(1-thicknessleft[-1]-thicknessright[-1])) if j < nx-numlayerright else 1-thicknessright[nx-j])
140
+ y = thicknessbot[i] if i < numlayerbot else ((thicknessbot[-1]+(i-numlayerbot)/(ny-numlayerbot-numlayertop)*(1-thicknessbot[-1]-thicknesstop[-1])) if i< ny-numlayertop else 1-thicknesstop[ny-i])
141
+ pids.append(mesh.Add (MeshPoint(Pnt(x,y,0))))
142
+ if periodic_y:
143
+ if i == 0:
144
+ minioni.append(pids[-1])
145
+ if i == ny:
146
+ masteri.append(pids[-1])
147
+ if periodic_x:
148
+ if j == 0:
149
+ minionj.append(pids[-1])
150
+ if j == nx:
151
+ masterj.append(pids[-1])
152
+ if periodic_y:
153
+ for i in range(len(minioni)):
154
+ mesh.AddPointIdentification(masteri[i],minioni[i],identnr=1,type=2)
155
+ if periodic_x:
156
+ for j in range(len(minionj)):
157
+ mesh.AddPointIdentification(masterj[j],minionj[j],identnr=2,type=2)
158
+
159
+ # mesh.Add(FaceDescriptor(surfnr=1,domin=1,bc=1))
160
+ idx_dom = mesh.AddRegion("dom", dim=2)
161
+ idx_bottom = mesh.AddRegion("bottom", dim=1)
162
+ idx_right = mesh.AddRegion("right", dim=1)
163
+ idx_top = mesh.AddRegion("top", dim=1)
164
+ idx_left = mesh.AddRegion("left", dim=1)
165
+
166
+ for i in range(ny):
167
+ for j in range(nx):
168
+ base = i * (nx+1) + j
169
+ if quads:
170
+ pnum = [base,base+1,base+nx+2,base+nx+1]
171
+ elpids = [pids[p] for p in pnum]
172
+ el = Element2D(idx_dom,elpids)
173
+ if not mapping:
174
+ el.curved=False
175
+ mesh.Add(el)
176
+ else:
177
+ if flip_triangles:
178
+ pnum1 = [base,base+1,base+nx+2]
179
+ pnum2 = [base,base+nx+2,base+nx+1]
180
+ else:
181
+ pnum1 = [base,base+1,base+nx+1]
182
+ pnum2 = [base+1,base+nx+2,base+nx+1]
183
+ elpids1 = [pids[p] for p in pnum1]
184
+ elpids2 = [pids[p] for p in pnum2]
185
+ mesh.Add(Element2D(idx_dom,elpids1))
186
+ mesh.Add(Element2D(idx_dom,elpids2))
187
+
188
+ for i in range(nx):
189
+ mesh.Add(Element1D([pids[i], pids[i+1]], index=idx_bottom))
190
+ for i in range(ny):
191
+ mesh.Add(Element1D([pids[i*(nx+1)+nx], pids[(i+1)*(nx+1)+nx]], index=idx_right))
192
+ for i in range(nx):
193
+ mesh.Add(Element1D([pids[ny*(nx+1)+i+1], pids[ny*(nx+1)+i]], index=idx_top))
194
+ for i in range(ny):
195
+ mesh.Add(Element1D([pids[(i+1)*(nx+1)], pids[i*(nx+1)]], index=idx_left))
196
+
197
+ # mesh.SetBCName(0, "bottom")
198
+ # mesh.SetBCName(1, "right")
199
+ # mesh.SetBCName(2, "top")
200
+ # mesh.SetBCName(3, "left")
201
+
202
+ mesh.Compress()
203
+
204
+ if secondorder:
205
+ mesh.SecondOrder()
206
+
207
+ if mapping:
208
+ for p in mesh.Points():
209
+ x,y,z = p.p
210
+ x,y = mapping(x,y)
211
+ p[0] = x
212
+ p[1] = y
213
+
214
+ for k in range(len(found)):
215
+ i = 0
216
+ for p in mesh.Points():
217
+ if abs(p.p[0]-bbpts[k][0])+abs(p.p[1]-bbpts[k][1]) < 1e-6:
218
+ indbbpts[k] = pids[i]
219
+ found[k] = True
220
+ i += 1
221
+ for k in range(len(found)):
222
+ if found[k] == False:
223
+ raise Exception("bbpnt[",k,"] not in structured mesh!")
224
+ for i in range(len(indbbpts)):
225
+ mesh.Add(Element0D(indbbpts[i], index=i+1))
226
+ mesh.SetCD2Name(i+1, bbnames[i])
227
+
228
+ for k in range(len(foundhp)):
229
+ i = 0
230
+ for p in mesh.Points():
231
+ if abs(p.p[0]-hppnts[k][0])+abs(p.p[1]-hppnts[k][1]) < 1e-6:
232
+ mesh.AddSingularity(pids[i],hppnts[k][-1])
233
+ foundhp[k] = True
234
+ i += 1
235
+ for k in range(len(foundhp)):
236
+ if foundhp[k] == False:
237
+ raise Exception("hppnts[",k,"] not in structured mesh!")
238
+
239
+
240
+ ngsmesh = ngsolve.Mesh(mesh)
241
+ return ngsmesh
242
+
243
+ def MakeQuadMesh(nx=10, ny=10, periodic_x=False, periodic_y=False, mapping = None):
244
+ """
245
+ Generate a structured quadrilateral 2D mesh
246
+
247
+ Parameters
248
+ ----------
249
+ nx : int
250
+ Number of cells in x-direction.
251
+
252
+ ny : int
253
+ Number of cells in y-direction.
254
+
255
+ periodic_x: bool
256
+ If True, the left and right boundaries are identified to generate a periodic mesh in x-direction.
257
+
258
+ periodic_y: bool
259
+ If True, the top and bottom boundaries are identified to generate a periodic mesh in y-direction.
260
+
261
+ mapping: lambda
262
+ Mapping to transform the generated points. If None, the identity mapping is used.
263
+
264
+
265
+ Returns
266
+ -------
267
+ (ngsolve.mesh)
268
+ Returns generated 2D NGSolve mesh
269
+
270
+ """
271
+ return MakeStructured2DMesh(quads=True, nx=nx, ny=ny, periodic_x=periodic_x, periodic_y=periodic_y, mapping=mapping)
272
+
273
+ def MakeStructured3DMesh(hexes=True, nx=10, ny=None, nz=None, secondorder=False, periodic_x=False, periodic_y=False, periodic_z=False, mapping = None, cuboid_mapping=False, prism=False):
274
+ """
275
+ Generate a structured quadrilateral 2D mesh
276
+
277
+ Parameters
278
+ ----------
279
+ hexes: bool
280
+ If True, a mesh consisting of hexahedra is generated.
281
+
282
+ nx : int
283
+ Number of cells in x-direction.
284
+
285
+ ny : int
286
+ Number of cells in y-direction.
287
+
288
+ nz : int
289
+ Number of cells in z-direction.
290
+
291
+ secondorder : bool
292
+ If True, second order curved elements are used.
293
+
294
+ periodic_x: bool
295
+ If True, the left and right boundaries are identified to generate a periodic mesh in x-direction.
296
+
297
+ periodic_y: bool
298
+ If True, the top and bottom boundaries are identified to generate a periodic mesh in y-direction.
299
+
300
+ periodic_z: bool
301
+ If True, the top and bottom boundaries are identified to generate a periodic mesh in z-direction.
302
+
303
+ mapping: lambda
304
+ Mapping to transform the generated points. If None, the identity mapping is used.
305
+
306
+ cuboid_mapping: bool
307
+ If True, a straight geometry is assumed.
308
+
309
+ prism : bool
310
+ If True, a mesh consisting of prism is generated. If hexes and prism is set to True, also a mesh consisting of prism is generated.
311
+
312
+
313
+ Returns
314
+ -------
315
+ (ngsolve.mesh)
316
+ Returns generated 3D NGSolve mesh
317
+
318
+ """
319
+ if nz == None:
320
+ if ny == None:
321
+ nz = nx
322
+ else:
323
+ raise Exception("MakeStructured3DMesh: No default value for nz if nx and ny are provided")
324
+ if ny == None:
325
+ ny = nx
326
+
327
+ netmesh = Mesh()
328
+ netmesh.dim = 3
329
+
330
+ if cuboid_mapping:
331
+ P1 = (0,0,0)
332
+ P2 = (1,1,1)
333
+ if mapping:
334
+ P1 = mapping(*P1)
335
+ P2 = mapping(*P2)
336
+ cube = OrthoBrick(Pnt(P1[0], P1[1], P1[2]), Pnt(P2[0], P2[1], P2[2])).bc(1)
337
+ geom = CSGeometry()
338
+ geom.Add(cube)
339
+ netmesh.SetGeometry(geom)
340
+
341
+ pids = []
342
+ if periodic_x:
343
+ minioni = []
344
+ masteri = []
345
+ if periodic_y:
346
+ minionj = []
347
+ masterj = []
348
+ if periodic_z:
349
+ minionk = []
350
+ masterk = []
351
+ for i in range(nx+1):
352
+ for j in range(ny+1):
353
+ for k in range(nz+1):
354
+ # x,y,z = mapping(i / nx, j / ny, k / nz)
355
+ x,y,z = i / nx, j / ny, k / nz
356
+ # if mapping:
357
+ # x,y,z = mapping(x,y,z)
358
+ pids.append(netmesh.Add(MeshPoint(Pnt( x,y,z ))))
359
+ if periodic_x:
360
+ if i == 0:
361
+ minioni.append(pids[-1])
362
+ if i == nx:
363
+ masteri.append(pids[-1])
364
+ if periodic_y:
365
+ if j == 0:
366
+ minionj.append(pids[-1])
367
+ if j == ny:
368
+ masterj.append(pids[-1])
369
+ if periodic_z:
370
+ if k == 0:
371
+ minionk.append(pids[-1])
372
+ if k == nz:
373
+ masterk.append(pids[-1])
374
+ if periodic_x:
375
+ for i in range(len(minioni)):
376
+ netmesh.AddPointIdentification(masteri[i],minioni[i],identnr=1,type=2)
377
+ if periodic_y:
378
+ for j in range(len(minionj)):
379
+ netmesh.AddPointIdentification(masterj[j],minionj[j],identnr=2,type=2)
380
+ if periodic_z:
381
+ for k in range(len(minionk)):
382
+ netmesh.AddPointIdentification(masterk[k],minionk[k],identnr=3,type=2)
383
+
384
+ for i in range(nx):
385
+ for j in range(ny):
386
+ for k in range(nz):
387
+ base = i * (ny+1)*(nz+1) + j*(nz+1) + k
388
+ baseup = base+(ny+1)*(nz+1)
389
+ pnum = [base, base+1, base+(nz+1)+1, base+(nz+1),
390
+ baseup, baseup+1, baseup+(nz+1)+1, baseup+(nz+1)]
391
+ if prism:
392
+ for qarr in [[0,3,4,1,2,5],[3,7,4,2,6,5]]:
393
+ elpids = [pids[p] for p in [pnum[q] for q in qarr]]
394
+ netmesh.Add(Element3D(1, elpids))
395
+ elif hexes:
396
+ elpids = [pids[p] for p in pnum]
397
+ el = Element3D(1, elpids)
398
+ if not mapping:
399
+ el.curved = False
400
+ netmesh.Add(el)
401
+ else:
402
+ # a poor mans kuhn triangulation of a cube
403
+ for qarr in [[0, 4, 5, 6],
404
+ [0, 6, 7, 4],
405
+ [0, 3, 7, 6],
406
+ [0, 1, 6, 5],
407
+ [0, 1, 2, 6],
408
+ [0, 3, 6, 2]]:
409
+ elpids = [pids[p] for p in [pnum[q] for q in qarr]]
410
+ netmesh.Add(Element3D(1, elpids))
411
+
412
+ def AddSurfEls(p1, dxi, nxi, deta, neta, facenr):
413
+ def add_seg(i, j, os):
414
+ base = p1 + i*dxi + j*deta
415
+ pnum = [base, base+os]
416
+ elpids = [pids[p] for p in pnum]
417
+ netmesh.Add(Element1D(elpids, index=facenr))
418
+ for i in range(nxi):
419
+ for j in [0,neta]:
420
+ add_seg(i,j,dxi)
421
+ for i in [0,nxi]:
422
+ for j in range(neta):
423
+ add_seg(i,j,deta)
424
+ for i in range(nxi):
425
+ for j in range(neta):
426
+ base = p1 + i*dxi+j*deta
427
+ pnum = [base, base+dxi, base+dxi+deta, base+deta]
428
+ if prism:
429
+ if facenr <= 4:
430
+ qarr = [1,2,3,0]
431
+ elpids = [pids[pnum[p]] for p in qarr]
432
+ netmesh.Add(Element2D(facenr, elpids))
433
+ else:
434
+ qarrs = [[3, 1, 2], [3, 0, 1]]
435
+ for qarr in qarrs:
436
+ elpids = [pids[p] for p in [pnum[q] for q in qarr]]
437
+ netmesh.Add(Element2D(facenr, elpids))
438
+ elif hexes:
439
+ elpids = [pids[p] for p in pnum]
440
+ netmesh.Add(Element2D(facenr, elpids))
441
+ else:
442
+ qarrs = [[0, 1, 2], [0, 2, 3]]
443
+ for qarr in qarrs:
444
+ elpids = [pids[p] for p in [pnum[q] for q in qarr]]
445
+ netmesh.Add(Element2D(facenr, elpids))
446
+
447
+ #order is important!
448
+ netmesh.Add(FaceDescriptor(surfnr=4, domin=1, bc=1))
449
+ netmesh.Add(FaceDescriptor(surfnr=2, domin=1, bc=2))
450
+ netmesh.Add(FaceDescriptor(surfnr=5, domin=1, bc=3))
451
+ netmesh.Add(FaceDescriptor(surfnr=3, domin=1, bc=4))
452
+ netmesh.Add(FaceDescriptor(surfnr=0, domin=1, bc=5))
453
+ netmesh.Add(FaceDescriptor(surfnr=1, domin=1, bc=6))
454
+
455
+ # y-z-plane, smallest x-coord: ("back")
456
+ AddSurfEls(0, 1, nz, nz+1, ny, facenr=1) # y-z-plane
457
+ # x-z-plane, smallest y-coord: ("left")
458
+ AddSurfEls(0, (ny+1)*(nz+1), nx, 1, nz,facenr=2)
459
+ # y-z-plane, largest x-coord: ("front")
460
+ AddSurfEls((nx+1)*(ny+1)*(nz+1)-1, -(nz+1), ny, -1, nz, facenr=3)
461
+ # x-z-plane, largest y-coord: ("right")
462
+ AddSurfEls((nx+1)*(ny+1)*(nz+1)-1, -1, nz, -(ny+1)*(nz+1), nx, facenr=4)
463
+ # x-y-plane, smallest z-coord: ("bottom")
464
+ AddSurfEls(0, nz+1, ny, (ny+1)*(nz+1), nx,facenr=5)
465
+ # x-y-plane, largest z-coord: ("top")
466
+ AddSurfEls((nx+1)*(ny+1)*(nz+1)-1, -(ny+1)*(nz+1), nx, -(nz+1), ny, facenr=6)
467
+
468
+ netmesh.SetBCName(0,"back")
469
+ netmesh.SetBCName(1,"left")
470
+ netmesh.SetBCName(2,"front")
471
+ netmesh.SetBCName(3,"right")
472
+ netmesh.SetBCName(4,"bottom")
473
+ netmesh.SetBCName(5,"top")
474
+
475
+ netmesh.Compress()
476
+
477
+ if secondorder:
478
+ netmesh.SecondOrder()
479
+
480
+ if mapping:
481
+ for p in netmesh.Points():
482
+ x,y,z = p.p
483
+ x,y,z = mapping(x,y,z)
484
+ p[0] = x
485
+ p[1] = y
486
+ p[2] = z
487
+
488
+ ngsmesh = ngsolve.Mesh(netmesh)
489
+ # ngsmesh.ngmesh.Save("tmp.vol.gz")
490
+ # ngsmesh = ngsolve.Mesh("tmp.vol.gz")
491
+ return ngsmesh
492
+
493
+ def MakeHexMesh(nx=10, ny=10, nz=10, secondorder=False, periodic_x=False, periodic_y=False, periodic_z=False, mapping = None, cuboid_mapping=False):
494
+ """
495
+ Generate a structured hexahedra 3D mesh
496
+
497
+ Parameters
498
+ ----------
499
+ nx : int
500
+ Number of cells in x-direction.
501
+
502
+ ny : int
503
+ Number of cells in y-direction.
504
+
505
+ nz : int
506
+ Number of cells in z-direction.
507
+
508
+ periodic_x: bool
509
+ If True, the left and right boundaries are identified to generate a periodic mesh in x-direction.
510
+
511
+ periodic_y: bool
512
+ If True, the top and bottom boundaries are identified to generate a periodic mesh in y-direction.
513
+
514
+ periodic_z: bool
515
+ If True, the top and bottom boundaries are identified to generate a periodic mesh in z-direction.
516
+
517
+ mapping: lambda
518
+ Mapping to transform the generated points. If None, the identity mapping is used.
519
+
520
+ cuboid_mapping: bool
521
+ If True, a straight geometry is assumed.
522
+
523
+
524
+ Returns
525
+ -------
526
+ (ngsolve.mesh)
527
+ Returns generated 3D NGSolve mesh consisting of only hexahedra
528
+
529
+ """
530
+ return MakeStructured3DMesh(hexes=True, nx=nx, ny=ny, nz=nz, secondorder=secondorder, periodic_x=periodic_x, periodic_y=periodic_y, periodic_z=periodic_z, mapping=mapping, cuboid_mapping=cuboid_mapping)
531
+
532
+ def MakePrismMesh(nx=10, ny=None, nz=None, secondorder=False, periodic_x=False, periodic_y=False, periodic_z=False, mapping = None, cuboid_mapping=False):
533
+ """
534
+ Generate a structured prism 3D mesh
535
+
536
+ Parameters
537
+ ----------
538
+ nx : int
539
+ Number of cells in x-direction.
540
+
541
+ ny : int
542
+ Number of cells in y-direction.
543
+
544
+ nz : int
545
+ Number of cells in z-direction.
546
+
547
+ periodic_x: bool
548
+ If True, the left and right boundaries are identified to generate a periodic mesh in x-direction.
549
+
550
+ periodic_y: bool
551
+ If True, the top and bottom boundaries are identified to generate a periodic mesh in y-direction.
552
+
553
+ periodic_z: bool
554
+ If True, the top and bottom boundaries are identified to generate a periodic mesh in z-direction.
555
+
556
+ mapping: lambda
557
+ Mapping to transform the generated points. If None, the identity mapping is used.
558
+
559
+ cuboid_mapping: bool
560
+ If True, a straight geometry is assumed.
561
+
562
+
563
+ Returns
564
+ -------
565
+ (ngsolve.mesh)
566
+ Returns generated 3D NGSolve mesh consisting of only prism
567
+
568
+ """
569
+ return MakeStructured3DMesh(hexes=False, nx=nx, ny=ny, nz=nz, secondorder=secondorder, periodic_x=periodic_x, periodic_y=periodic_y, periodic_z=periodic_z, mapping=mapping, cuboid_mapping=cuboid_mapping, prism=True)
570
+
571
+ from math import pi
572
+ from ngsolve import Draw, sin, cos
573
+ if __name__ == "__main__":
574
+
575
+ mesh = Make1DMesh(n=4)
576
+ print("simple 1D mesh -- no visualization -- ")
577
+
578
+ mesh = MakeQuadMesh(nx=4, ny=4)
579
+ Draw(mesh)
580
+ input("simple quad mesh -- press any key to continue -- ")
581
+
582
+ mesh = MakeStructured2DMesh(quads=False, nx=4, ny=4)
583
+ Draw(mesh)
584
+ input("simple trig mesh -- press any key to continue -- ")
585
+
586
+ mesh = MakeQuadMesh(nx=4, ny=4, periodic_x=True, periodic_y=False)
587
+ Draw(mesh)
588
+ input("x-periodic quad mesh -- press any key to continue -- ")
589
+
590
+ mesh = MakeStructured2DMesh(quads=False, nx=16, ny=4, periodic_x=False, periodic_y=True)
591
+ Draw(mesh)
592
+ input("y-periodic non-uniform trig mesh -- press any key to continue -- ")
593
+
594
+ mesh = MakeStructured2DMesh(quads=True, nx=32, ny=16,
595
+ mapping = lambda x,y : ((1.1+sin(pi*(y-0.5)))*sin(pi*x),
596
+ (1.1+sin(pi*(y-0.5)))*cos(pi*x)))
597
+ Draw(mesh)
598
+ input("structured quad half circle with a whole -- press any key to continue -- ")
599
+
600
+ mesh = MakeHexMesh(nx=8)
601
+ Draw(mesh)
602
+ input("simple cube mesh -- press any key to continue -- ")
603
+
604
+ mesh = MakeHexMesh(nx=8, periodic_x=True, periodic_y=True, periodic_z=True)
605
+ Draw(mesh)
606
+ input("periodic cube mesh -- press any key to continue -- ")
607
+
608
+ mesh = MakeStructured3DMesh(hexes=False, nx=3, ny=6, nz=10,
609
+ mapping = lambda x,y,z : (x,0.5*y*(y+x),exp(z)),
610
+ cuboid_mapping=False )
611
+ Draw(mesh)
612
+ input("mapped, anisotropic linear non-cuboid mesh -- press any key to continue -- ")
613
+
614
+ mesh = MakeStructured3DMesh(hexes=True, nx=8, ny=16, nz=8, periodic_x=True,
615
+ mapping = lambda x,y,z : (5*x*x*(0.5-x/3),10*y*y*(0.5-y/3),5*z*z*(0.5-z/3)),
616
+ cuboid_mapping=True )
617
+ Draw(mesh)
618
+ input("x-periodic, mapped, anisotropic non-linear cuboid mesh -- press any key to continue --")
619
+
620
+ mesh = MakeStructured3DMesh(hexes=False, nx=8, ny=8, nz=8, periodic_x=True,
621
+ cuboid_mapping=True )
622
+ mesh.Refine()
623
+ Draw(mesh)
624
+ input("structured tet mesh (periodic in x-dir.), refined -- finished.")
625
+
626
+
627
+
628
+
629
+
630
+ def MakeStructuredSurfaceMesh(quads=True, nx=10, ny=10, mapping = None, secondorder=False, bbbpts=None, bbbnames=None, flip_triangles=False):
631
+ """
632
+ Generate a structured 2D surface mesh in 3D
633
+
634
+ Parameters
635
+ ----------
636
+ quads : bool
637
+ If True, a quadrilateral mesh is generated. If False, the quads are split to triangles.
638
+
639
+ nx : int
640
+ Number of cells in x-direction.
641
+
642
+ ny : int
643
+ Number of cells in y-direction.
644
+
645
+ mapping : lamda
646
+ Mapping to transform the generated points. If None, the identity mapping is used.
647
+
648
+ secondorder : bool
649
+ If True, use quadratic elements, else linear elements are used.
650
+
651
+ bbbpts : list
652
+ List of points which should be handled as BBBND and are named with bbbnames. The mesh (nx, ny and mapping) must be constructed in such a way that the bbbpts coincide with generated points. Otherwise an Exception is thrown.
653
+
654
+ bbbnames : list
655
+ List of bbbnd names as strings. Size must coincide with size of bbbpts. Otherwise an Exception is thrown.
656
+
657
+ flip_triangles : bool
658
+ If set tot True together with quads=False the quads are cut the other way round
659
+
660
+ Returns
661
+ -------
662
+ (ngsolve.mesh)
663
+ Returns generated NGSolve mesh
664
+
665
+ """
666
+ mesh = Mesh(dim=3)
667
+
668
+ if (bbbpts and bbbnames) and len(bbbpts) != len(bbbnames):
669
+ raise Exception("Lenght of bbbnames does not coincide with length of bbbpts!")
670
+
671
+ found = []
672
+ indbbbpts = []
673
+ if bbbpts:
674
+ for i in range(len(bbbpts)):
675
+ found.append(False)
676
+ indbbbpts.append(None)
677
+
678
+ pids = []
679
+ for i in range(ny+1):
680
+ for j in range(nx+1):
681
+ x,y,z = j/nx, i/ny, 0
682
+ pids.append(mesh.Add (MeshPoint(Pnt(x,y,z))))
683
+
684
+ mesh.Add(FaceDescriptor(surfnr=1,domin=1,bc=1))
685
+
686
+ for i in range(ny):
687
+ for j in range(nx):
688
+ base = i * (nx+1) + j
689
+ if quads:
690
+ pnum = [base,base+1,base+nx+2,base+nx+1]
691
+ elpids = [pids[p] for p in pnum]
692
+ el = Element2D(1,elpids)
693
+ if not mapping:
694
+ el.curved=False
695
+ mesh.Add(el)
696
+ else:
697
+ if flip_triangles:
698
+ pnum1 = [base,base+1,base+nx+2]
699
+ pnum2 = [base,base+nx+2,base+nx+1]
700
+ else:
701
+ pnum1 = [base,base+1,base+nx+1]
702
+ pnum2 = [base+1,base+nx+2,base+nx+1]
703
+ elpids1 = [pids[p] for p in pnum1]
704
+ elpids2 = [pids[p] for p in pnum2]
705
+ mesh.Add(Element2D(1,elpids1))
706
+ mesh.Add(Element2D(1,elpids2))
707
+
708
+ for i in range(nx):
709
+ mesh.Add(Element1D([pids[i], pids[i+1]], index=1))
710
+ for i in range(ny):
711
+ mesh.Add(Element1D([pids[i*(nx+1)+nx], pids[(i+1)*(nx+1)+nx]], index=2))
712
+ for i in range(nx):
713
+ mesh.Add(Element1D([pids[ny*(nx+1)+i+1], pids[ny*(nx+1)+i]], index=3))
714
+ for i in range(ny):
715
+ mesh.Add(Element1D([pids[(i+1)*(nx+1)], pids[i*(nx+1)]], index=4))
716
+
717
+ mesh.SetCD2Name(1, "bottom")
718
+ mesh.SetCD2Name(2, "right")
719
+ mesh.SetCD2Name(3, "top")
720
+ mesh.SetCD2Name(4, "left")
721
+
722
+ if secondorder:
723
+ mesh.SecondOrder()
724
+
725
+ if mapping:
726
+ for p in mesh.Points():
727
+ x,y,z = p.p
728
+ x,y,z = mapping(x,y,z)
729
+ p[0],p[1],p[2] = x,y,z
730
+
731
+ for k in range(len(found)):
732
+ i = 0
733
+ for p in mesh.Points():
734
+ if abs(p.p[0]-bbbpts[k][0])+abs(p.p[1]-bbbpts[k][1])+abs(p.p[2]-bbbpts[k][2]) < 1e-6:
735
+ indbbbpts[k] = pids[i]
736
+ found[k] = True
737
+ i += 1
738
+ for k in range(len(found)):
739
+ if found[k] == False:
740
+ raise Exception("bbbpnt[",k,"] not in structured mesh!")
741
+
742
+ for i in range(len(indbbbpts)):
743
+ mesh.Add(Element0D(indbbbpts[i], index=i+1))
744
+ mesh.SetCD3Name(i+1, bbbnames[i])
745
+
746
+ mesh.Compress()
747
+ ngsmesh = ngsolve.Mesh(mesh)
748
+ return ngsmesh