ngsolve 6.2.2506.post216.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.
Files changed (306) hide show
  1. ngsolve-6.2.2506.post216.dev0.data/data/bin/ngs_nvcc +22 -0
  2. ngsolve-6.2.2506.post216.dev0.data/data/bin/ngs_nvlink +17 -0
  3. ngsolve-6.2.2506.post216.dev0.data/data/bin/ngscxx +15 -0
  4. ngsolve-6.2.2506.post216.dev0.data/data/bin/ngsld +11 -0
  5. ngsolve-6.2.2506.post216.dev0.data/data/bin/ngsolve.tcl +648 -0
  6. ngsolve-6.2.2506.post216.dev0.data/data/bin/ngspy +2 -0
  7. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/analytic_integrals.hpp +10 -0
  8. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/arnoldi.hpp +55 -0
  9. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bandmatrix.hpp +334 -0
  10. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/basematrix.hpp +963 -0
  11. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/basevector.hpp +1268 -0
  12. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bdbequations.hpp +2807 -0
  13. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bdbintegrator.hpp +1660 -0
  14. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bem_diffops.hpp +475 -0
  15. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bessel.hpp +1064 -0
  16. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bilinearform.hpp +966 -0
  17. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bla.hpp +29 -0
  18. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/blockalloc.hpp +95 -0
  19. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/blockjacobi.hpp +328 -0
  20. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/bspline.hpp +116 -0
  21. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/calcinverse.hpp +141 -0
  22. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cg.hpp +368 -0
  23. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/chebyshev.hpp +44 -0
  24. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cholesky.hpp +720 -0
  25. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/clapack.h +7254 -0
  26. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/code_generation.hpp +296 -0
  27. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/coefficient.hpp +2033 -0
  28. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/coefficient_impl.hpp +19 -0
  29. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/coefficient_stdmath.hpp +167 -0
  30. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/commutingAMG.hpp +106 -0
  31. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/comp.hpp +79 -0
  32. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/compatibility.hpp +41 -0
  33. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/complex_wrapper.hpp +101 -0
  34. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/compressedfespace.hpp +110 -0
  35. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/contact.hpp +239 -0
  36. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cuda_core.hpp +216 -0
  37. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cuda_linalg.hpp +185 -0
  38. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cuda_ngbla.hpp +317 -0
  39. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cuda_ngstd.hpp +414 -0
  40. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/cuda_profiler.hpp +240 -0
  41. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/diagonalmatrix.hpp +160 -0
  42. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/differentialoperator.hpp +276 -0
  43. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/diffop.hpp +1286 -0
  44. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/diffop_impl.hpp +328 -0
  45. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/diffopwithfactor.hpp +123 -0
  46. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/discontinuous.hpp +84 -0
  47. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/dump.hpp +949 -0
  48. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ectypes.hpp +121 -0
  49. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/eigen.hpp +60 -0
  50. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/eigensystem.hpp +18 -0
  51. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/elasticity_equations.hpp +595 -0
  52. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/elementbyelement.hpp +201 -0
  53. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/elementtopology.hpp +1760 -0
  54. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/elementtransformation.hpp +339 -0
  55. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/evalfunc.hpp +405 -0
  56. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/expr.hpp +1693 -0
  57. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/facetfe.hpp +175 -0
  58. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/facetfespace.hpp +180 -0
  59. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/facethofe.hpp +111 -0
  60. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/facetsurffespace.hpp +112 -0
  61. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/fe_interfaces.hpp +32 -0
  62. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/fem.hpp +87 -0
  63. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/fesconvert.hpp +14 -0
  64. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/fespace.hpp +1454 -0
  65. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/finiteelement.hpp +286 -0
  66. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/globalinterfacespace.hpp +77 -0
  67. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/globalspace.hpp +115 -0
  68. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/gridfunction.hpp +525 -0
  69. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1amg.hpp +124 -0
  70. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1hofe.hpp +188 -0
  71. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1hofe_impl.hpp +1262 -0
  72. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1hofefo.hpp +148 -0
  73. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1hofefo_impl.hpp +185 -0
  74. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1hofespace.hpp +167 -0
  75. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1lofe.hpp +1240 -0
  76. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/h1lumping.hpp +41 -0
  77. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurl_equations.hpp +1381 -0
  78. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlcurlfe.hpp +2241 -0
  79. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlcurlfespace.hpp +78 -0
  80. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlfe.hpp +259 -0
  81. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlfe_utils.hpp +107 -0
  82. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlhdiv_dshape.hpp +857 -0
  83. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlhdivfes.hpp +308 -0
  84. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlhofe.hpp +175 -0
  85. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlhofe_impl.hpp +1871 -0
  86. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurlhofespace.hpp +193 -0
  87. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hcurllofe.hpp +1146 -0
  88. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdiv_equations.hpp +880 -0
  89. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivdivfe.hpp +2923 -0
  90. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivdivsurfacespace.hpp +76 -0
  91. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivfe.hpp +206 -0
  92. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivfe_utils.hpp +717 -0
  93. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivfes.hpp +75 -0
  94. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivhofe.hpp +447 -0
  95. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivhofe_impl.hpp +1107 -0
  96. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivhofefo.hpp +229 -0
  97. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivhofespace.hpp +177 -0
  98. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivhosurfacefespace.hpp +106 -0
  99. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hdivlofe.hpp +773 -0
  100. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hidden.hpp +74 -0
  101. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/householder.hpp +181 -0
  102. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hypre_ams_precond.hpp +123 -0
  103. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/hypre_precond.hpp +73 -0
  104. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/integrator.hpp +2012 -0
  105. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/integratorcf.hpp +253 -0
  106. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/interpolate.hpp +49 -0
  107. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/intrule.hpp +2542 -0
  108. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/intrules_SauterSchwab.hpp +25 -0
  109. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/irspace.hpp +49 -0
  110. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/jacobi.hpp +153 -0
  111. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/kernels.hpp +724 -0
  112. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/l2hofe.hpp +194 -0
  113. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/l2hofe_impl.hpp +564 -0
  114. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/l2hofefo.hpp +542 -0
  115. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/l2hofespace.hpp +344 -0
  116. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/la.hpp +38 -0
  117. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/linalg_kernels.hpp +70 -0
  118. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/linearform.hpp +266 -0
  119. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/matrix.hpp +2145 -0
  120. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/memusage.hpp +41 -0
  121. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/meshaccess.hpp +1359 -0
  122. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/mgpre.hpp +204 -0
  123. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/mp_coefficient.hpp +145 -0
  124. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/mptools.hpp +2281 -0
  125. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/multigrid.hpp +42 -0
  126. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/multivector.hpp +447 -0
  127. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/mumpsinverse.hpp +187 -0
  128. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/mycomplex.hpp +361 -0
  129. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ng_lapack.hpp +1661 -0
  130. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngblas.hpp +1232 -0
  131. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngs_defines.hpp +30 -0
  132. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngs_stdcpp_include.hpp +106 -0
  133. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngs_utils.hpp +121 -0
  134. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngsobject.hpp +1019 -0
  135. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngsstream.hpp +113 -0
  136. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/ngstd.hpp +72 -0
  137. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/nodalhofe.hpp +96 -0
  138. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/nodalhofe_impl.hpp +141 -0
  139. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/normalfacetfe.hpp +223 -0
  140. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/normalfacetfespace.hpp +98 -0
  141. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/normalfacetsurfacefespace.hpp +84 -0
  142. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/order.hpp +251 -0
  143. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/parallel_matrices.hpp +222 -0
  144. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/paralleldofs.hpp +340 -0
  145. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/parallelngs.hpp +23 -0
  146. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/parallelvector.hpp +269 -0
  147. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/pardisoinverse.hpp +200 -0
  148. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/periodic.hpp +129 -0
  149. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/plateaufespace.hpp +25 -0
  150. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/pml.hpp +275 -0
  151. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/pmltrafo.hpp +631 -0
  152. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/postproc.hpp +142 -0
  153. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/potentialtools.hpp +22 -0
  154. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/precomp.hpp +60 -0
  155. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/preconditioner.hpp +602 -0
  156. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/prolongation.hpp +380 -0
  157. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/python_comp.hpp +107 -0
  158. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/python_fem.hpp +89 -0
  159. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/python_linalg.hpp +58 -0
  160. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/python_ngstd.hpp +386 -0
  161. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/recursive_pol.hpp +4896 -0
  162. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/recursive_pol_tet.hpp +395 -0
  163. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/recursive_pol_trig.hpp +492 -0
  164. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/reorderedfespace.hpp +81 -0
  165. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sample_sort.hpp +105 -0
  166. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/scalarfe.hpp +335 -0
  167. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/shapefunction_utils.hpp +113 -0
  168. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/simd_complex.hpp +329 -0
  169. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/smoother.hpp +253 -0
  170. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/solve.hpp +89 -0
  171. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sparsecholesky.hpp +317 -0
  172. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sparsefactorization_interface.hpp +159 -0
  173. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sparsematrix.hpp +1052 -0
  174. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sparsematrix_dyn.hpp +90 -0
  175. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/sparsematrix_impl.hpp +1055 -0
  176. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/special_matrix.hpp +463 -0
  177. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/specialelement.hpp +125 -0
  178. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/statushandler.hpp +33 -0
  179. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/stringops.hpp +12 -0
  180. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/superluinverse.hpp +136 -0
  181. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/symbolicintegrator.hpp +850 -0
  182. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/symmetricmatrix.hpp +144 -0
  183. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tangentialfacetfe.hpp +224 -0
  184. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tangentialfacetfespace.hpp +91 -0
  185. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tensor.hpp +522 -0
  186. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tensorcoefficient.hpp +446 -0
  187. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tensorproductintegrator.hpp +113 -0
  188. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/thcurlfe.hpp +128 -0
  189. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/thcurlfe_impl.hpp +380 -0
  190. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/thdivfe.hpp +80 -0
  191. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/thdivfe_impl.hpp +492 -0
  192. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tpdiffop.hpp +461 -0
  193. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tpfes.hpp +133 -0
  194. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tpintrule.hpp +224 -0
  195. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/triangular.hpp +465 -0
  196. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tscalarfe.hpp +245 -0
  197. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/tscalarfe_impl.hpp +1029 -0
  198. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/umfpackinverse.hpp +148 -0
  199. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/unifiedvector.hpp +103 -0
  200. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/vector.hpp +1452 -0
  201. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/voxelcoefficientfunction.hpp +41 -0
  202. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/vtkoutput.hpp +198 -0
  203. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/vvector.hpp +208 -0
  204. ngsolve-6.2.2506.post216.dev0.data/data/include/netgen/webgui.hpp +92 -0
  205. ngsolve-6.2.2506.post216.dev0.data/data/lib/cmake/ngsolve/NGSolveConfig.cmake +102 -0
  206. ngsolve-6.2.2506.post216.dev0.data/data/lib/cmake/ngsolve/ngsolve-targets-release.cmake +89 -0
  207. ngsolve-6.2.2506.post216.dev0.data/data/lib/cmake/ngsolve/ngsolve-targets.cmake +180 -0
  208. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngbla.so +0 -0
  209. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngcomp.so +0 -0
  210. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngfem.so +0 -0
  211. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngla.so +0 -0
  212. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngsbem.so +0 -0
  213. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngscudalib.so +0 -0
  214. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngsolve.so +0 -0
  215. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/netgen_mesher.libs/libngstd.so +0 -0
  216. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/TensorProductTools.py +210 -0
  217. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/__console.py +94 -0
  218. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/__expr.py +181 -0
  219. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/__init__.py +148 -0
  220. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/_scikit_build_core_dependencies.py +30 -0
  221. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/bvp.py +78 -0
  222. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/config/__init__.py +1 -0
  223. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/config/__main__.py +4 -0
  224. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/config/config.py +60 -0
  225. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/__init__.py +0 -0
  226. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_1d_1d.py +80 -0
  227. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_1d_2d.py +73 -0
  228. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_2d_1d.py +72 -0
  229. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/TensorProduct/tp_dg_2d_2d.py +66 -0
  230. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/__init__.py +0 -0
  231. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/__init__.py +0 -0
  232. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/hhj.py +44 -0
  233. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/hybrid_dg.py +53 -0
  234. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/mixed.py +30 -0
  235. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/nonlin.py +29 -0
  236. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/pickling.py +26 -0
  237. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/pml.py +31 -0
  238. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/taskmanager.py +20 -0
  239. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/tdnns.py +47 -0
  240. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDG-skeleton.py +45 -0
  241. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDG.py +38 -0
  242. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDGlap.py +42 -0
  243. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/howto/timeDGwave.py +61 -0
  244. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/__init__.py +0 -0
  245. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/adaptive.py +123 -0
  246. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/cmagnet.py +59 -0
  247. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/elasticity.py +76 -0
  248. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/navierstokes.py +74 -0
  249. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/poisson.ipynb +170 -0
  250. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/intro/poisson.py +41 -0
  251. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/__init__.py +0 -0
  252. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_cmagnet.py +87 -0
  253. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_navierstokes.py +117 -0
  254. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_poisson.py +89 -0
  255. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/demos/mpi/mpi_timeDG.py +82 -0
  256. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/directsolvers.py +14 -0
  257. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/eigenvalues.py +364 -0
  258. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/internal.py +89 -0
  259. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/krylovspace.py +1182 -0
  260. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/meshes.py +748 -0
  261. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngs2petsc.py +310 -0
  262. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngscuda.so +0 -0
  263. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngscxx.py +42 -0
  264. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/ngslib.so +0 -0
  265. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/nonlinearsolvers.py +203 -0
  266. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/preconditioners.py +11 -0
  267. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/solve_implementation.py +168 -0
  268. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/solvers/__init__.py +7 -0
  269. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/solvers/cudss.py +112 -0
  270. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/timestepping.py +185 -0
  271. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/timing.py +108 -0
  272. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/utils.py +167 -0
  273. ngsolve-6.2.2506.post216.dev0.data/data/lib/python3.14/site-packages/ngsolve/webgui.py +671 -0
  274. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/beam.geo +17 -0
  275. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/beam.vol +240 -0
  276. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/chip.in2d +41 -0
  277. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/chip.vol +614 -0
  278. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/coil.geo +12 -0
  279. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/coil.vol +2560 -0
  280. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/coilshield.geo +24 -0
  281. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/coilshield.vol +3179 -0
  282. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/cube.geo +19 -0
  283. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/cube.vol +1832 -0
  284. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d10_DGdoubleglazing.pde +50 -0
  285. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d11_chip_nitsche.pde +40 -0
  286. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d1_square.pde +43 -0
  287. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d2_chip.pde +35 -0
  288. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d3_helmholtz.pde +22 -0
  289. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d4_cube.pde +46 -0
  290. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d5_beam.pde +74 -0
  291. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d6_shaft.pde +73 -0
  292. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d7_coil.pde +50 -0
  293. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d8_coilshield.pde +49 -0
  294. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/d9_hybridDG.pde +72 -0
  295. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/doubleglazing.in2d +27 -0
  296. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/doubleglazing.vol +737 -0
  297. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  298. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/shaft.geo +73 -0
  299. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/shaft.vol +4291 -0
  300. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/square.in2d +17 -0
  301. ngsolve-6.2.2506.post216.dev0.data/data/share/ngsolve/square.vol +149 -0
  302. ngsolve-6.2.2506.post216.dev0.dist-info/METADATA +14 -0
  303. ngsolve-6.2.2506.post216.dev0.dist-info/RECORD +306 -0
  304. ngsolve-6.2.2506.post216.dev0.dist-info/WHEEL +5 -0
  305. ngsolve-6.2.2506.post216.dev0.dist-info/licenses/LICENSE +504 -0
  306. ngsolve-6.2.2506.post216.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,446 @@
1
+ #ifndef FILE_TENSORCOEFFICIENT_HPP
2
+ #define FILE_TENSORCOEFFICIENT_HPP
3
+
4
+ /*********************************************************************/
5
+ /* File: tensorcoefficient.hpp */
6
+ /* Author: Matthias Rambausek */
7
+ /* Date: 01. Apr. 2022 */
8
+ /*********************************************************************/
9
+
10
+ // #include "fem.hpp"
11
+
12
+ #include "coefficient.hpp"
13
+ #include "symbolicintegrator.hpp"
14
+
15
+ namespace ngfem {
16
+
17
+ namespace tensor_internal {
18
+ using namespace ngcore;
19
+ using namespace ngstd;
20
+ using namespace ngbla;
21
+
22
+ class NGS_DLL_HEADER OutOfIndices : public Exception
23
+ { public: using Exception::Exception; };
24
+
25
+ struct Index {
26
+ char symbol;
27
+ size_t pos;
28
+ size_t dim;
29
+ };
30
+
31
+ bool operator==(const Index &a, const Index &b) {
32
+ return a.symbol == b.symbol && a.pos == b.pos && a.dim == b.dim;
33
+ }
34
+
35
+ bool operator!=(const Index &a, const Index &b) { return !(a == b); }
36
+
37
+ class MultiIndex {
38
+ Array <Index> indices{};
39
+ Array <size_t> strides{};
40
+ size_t total_dim = 1;
41
+
42
+ public:
43
+ size_t Append(Index idx) {
44
+ for (int i = strides.Size() - 1; i >= 0; --i)
45
+ strides[i] *= idx.dim;
46
+ strides.Append(1);
47
+ total_dim *= idx.dim;
48
+ indices.Append(idx);
49
+ return total_dim;
50
+ }
51
+
52
+ const Index &operator[](size_t i) const { return indices[i]; }
53
+
54
+ void RelabelIndex(size_t i, char symbol) { indices[i].symbol = symbol; }
55
+
56
+ void ReplaceIndex(size_t i, Index idx) { indices[i] = idx; }
57
+
58
+ void RepositionIndex(size_t i, size_t pos) { indices[i].pos = pos; }
59
+
60
+ void MoveIndex(size_t i, int diff) {
61
+ if (indices[i].pos + diff < 0)
62
+ throw NG_EXCEPTION("index position must not be smaller than 0");
63
+ indices[i].pos += diff;
64
+ }
65
+
66
+ const Array <size_t> &Strides() const { return strides; }
67
+
68
+ size_t Size() const { return indices.Size(); };
69
+
70
+ size_t TotalDim() const { return total_dim; }
71
+
72
+ void DoArchive(Archive &ar) {
73
+ size_t isize;
74
+ string tmp_symbol{};
75
+ if(ar.Output()) {
76
+ isize = indices.Size();
77
+ ar & isize;
78
+ for (auto idx : indices) {
79
+ tmp_symbol = string{idx.symbol};
80
+ ar & tmp_symbol & idx.pos & idx.dim;
81
+ }
82
+ }
83
+ else {
84
+ ar & isize;
85
+ indices.SetSize(isize);
86
+ size_t tmp_pos;
87
+ size_t tmp_idx;
88
+ for (auto i : Range(isize)) {
89
+ ar & tmp_symbol & tmp_pos & tmp_idx;
90
+ indices[i] = Index{tmp_symbol.at(0), tmp_pos, tmp_idx};
91
+ }
92
+ }
93
+ ar & strides & total_dim;
94
+ }
95
+ };
96
+
97
+ bool operator==(const MultiIndex &a, const MultiIndex &b) {
98
+ if (a.Size() != b.Size())
99
+ return false;
100
+
101
+ for (size_t i: Range(a.Size()))
102
+ if (a[i] != b[i])
103
+ return false;
104
+ return true;
105
+ }
106
+
107
+ bool operator!=(const MultiIndex &a, const MultiIndex &b) { return !(a == b); }
108
+
109
+ auto begin(const MultiIndex &mi) { return &(mi[0]); }
110
+
111
+ auto end(const MultiIndex &mi) { return &(mi[0]) + mi.Size(); }
112
+
113
+ size_t join(const FlatArray <size_t> full_indices, const MultiIndex &multi_idx);
114
+
115
+ Array <size_t> split(size_t full_index, const MultiIndex &multi_idx);
116
+
117
+ Array <MultiIndex> compute_multi_indices(const string &index_signature,
118
+ const Array <shared_ptr<CoefficientFunction>> &cfs);
119
+
120
+ template<class ForwardIt>
121
+ bool is_even_iota_permutation(ForwardIt first, ForwardIt last, size_t base = 0) {
122
+ auto base_it = find(first, last, base);
123
+ if (base_it == last)
124
+ return false;
125
+ base = base_it - first;
126
+ for (; base_it != last; ++base_it)
127
+ if ((base_it - first) - base != *base_it)
128
+ return false;
129
+ auto offset = (last - first) - base;
130
+ for (base_it = first; base_it != first + base; ++base_it)
131
+ if ((base_it - first) + offset != *base_it)
132
+ return false;
133
+ return true;
134
+ }
135
+
136
+ template<class ForwardIt>
137
+ bool is_odd_iota_permutation(ForwardIt first, ForwardIt last, size_t base = 0) {
138
+ auto base_it = find(first, last, base);
139
+ if (base_it == last)
140
+ return false;
141
+ base = base_it - first;
142
+ for (base_it = first; base_it != first + base + 1; ++base_it)
143
+ if (base + (first - base_it) != *base_it)
144
+ return false;
145
+ for (; base_it != last; ++base_it)
146
+ if ((last - base_it) + base != *base_it)
147
+ return false;
148
+ return true;
149
+ }
150
+
151
+ string new_index_symbols(string existing, size_t nnew = 1);
152
+
153
+ optional<string> substitute_id_index(
154
+ string signature, pair<char, char> id_indices, size_t id_pos,
155
+ const FlatArray<bool> marked_for_removal, bool recurse = false);
156
+
157
+ vector<string> split_signature(string input);
158
+
159
+ string form_index_signature(const vector<string>& parts);
160
+
161
+ string expand_ellipses(const string& signature, const Array<shared_ptr<CoefficientFunction>>& cfs);
162
+
163
+ Vector<bool> nonzero_pattern(shared_ptr <CoefficientFunction> cf);
164
+
165
+ pair<string, Array<shared_ptr<CoefficientFunction>>>
166
+ flatten_einsum(const string& signature,
167
+ const Array<shared_ptr<CoefficientFunction>>& cfs,
168
+ const map<string, bool> &options);
169
+
170
+ shared_ptr<CoefficientFunction>
171
+ optimize_legacy(const string& signature,
172
+ const Array<shared_ptr<CoefficientFunction>>& cfs,
173
+ const map<string, bool> &options);
174
+
175
+ shared_ptr<CoefficientFunction>
176
+ optimize_transpose(const string& signature,
177
+ const Array<shared_ptr<CoefficientFunction>>& cfs,
178
+ const map<string, bool> &aoptions);
179
+
180
+ shared_ptr<CoefficientFunction>
181
+ optimize_path(const string &signature,
182
+ const Array<shared_ptr<CoefficientFunction>>& input_cfs,
183
+ const map<string, bool> &aoptions);
184
+
185
+ pair<string, Array<shared_ptr<CoefficientFunction>>>
186
+ expand_higher_order_identities(string signature,
187
+ const Array<shared_ptr<CoefficientFunction>>& cfs,
188
+ [[maybe_unused]] const map<string, bool> &options);
189
+
190
+ pair<string, Array<shared_ptr<CoefficientFunction>>>
191
+ optimize_identities(string, const Array<shared_ptr<CoefficientFunction>>& cfs,
192
+ const map<string, bool> &options);
193
+
194
+
195
+ // class LeviCivitaCoefficientFunction
196
+ // : public T_CoefficientFunction<LeviCivitaCoefficientFunction> {
197
+ // using BASE = T_CoefficientFunction<LeviCivitaCoefficientFunction>;
198
+
199
+ // int dim = 0;
200
+ // MultiIndex mi{};
201
+
202
+ // public:
203
+ // LeviCivitaCoefficientFunction() = default;
204
+
205
+ // LeviCivitaCoefficientFunction(int adim);
206
+
207
+ // virtual void TraverseTree(const function<void(CoefficientFunction &)> &func) override {
208
+ // func(*this);
209
+ // }
210
+
211
+ // virtual string GetDescription() const override { return string("Levi-Civita Symbol"); }
212
+
213
+ // virtual void DoArchive(Archive &ar) override;
214
+
215
+ // virtual void GenerateCode(Code &code, FlatArray<int> inputs, int index) const override {
216
+ // GenerateCode(code, inputs, index, false);
217
+ // }
218
+
219
+ // virtual void GenerateCode(Code &code, FlatArray<int> inputs, int index,
220
+ // bool skip_zeroes = true) const;
221
+
222
+ // virtual void NonZeroPattern(const class ProxyUserData &ud,
223
+ // FlatVector<AutoDiffDiff<1,NonZero>> values) const override;
224
+
225
+ // virtual void NonZeroPattern(const class ProxyUserData &ud,
226
+ // FlatArray<FlatVector<AutoDiffDiff<1,NonZero>>> input,
227
+ // FlatVector<AutoDiffDiff<1,NonZero>> values) const override;
228
+
229
+ // using BASE::Evaluate;
230
+ // using typename BASE::T_DJC;
231
+
232
+ // virtual double Evaluate(const BaseMappedIntegrationPoint &ip) const override;
233
+
234
+ // template<typename MIR, typename T, ORDERING ORD>
235
+ // void T_Evaluate(const MIR &ir, BareSliceMatrix<T, ORD> values) const
236
+ // {
237
+ // auto val = T(0.0);
238
+ // values.AddSize(Dimension(), ir.Size()) = val;
239
+ // auto ir_size = ir.Size();
240
+ // for (size_t I: Range(Dimension())) {
241
+ // const auto I_array = split(I, mi);
242
+ // cout << "check I: " << I_array << endl;
243
+ // if (is_even_iota_permutation(I_array.begin(), I_array.end()))
244
+ // val = 1.0;
245
+ // else if (is_odd_iota_permutation(I_array.begin(), I_array.end()))
246
+ // val = -1.0;
247
+ // else
248
+ // continue;
249
+ // for (auto q: Range(ir_size))
250
+ // values(I, q) = val;
251
+ // }
252
+ // }
253
+
254
+ // template<typename MIR, typename T, ORDERING ORD>
255
+ // void T_Evaluate(const MIR &ir, FlatArray<BareSliceMatrix<T, ORD>> input,
256
+ // BareSliceMatrix<T, ORD> values) const
257
+ // {
258
+ // T_Evaluate(ir, values);
259
+ // }
260
+
261
+
262
+ // shared_ptr<CoefficientFunction> Diff(const CoefficientFunction *var,
263
+ // shared_ptr<CoefficientFunction> dir) const override;
264
+
265
+ // shared_ptr<CoefficientFunction> DiffJacobi(const CoefficientFunction *var, T_DJC & cache) const override;
266
+ // };
267
+
268
+ class EinsumCoefficientFunction
269
+ : public T_CoefficientFunction<EinsumCoefficientFunction>
270
+ {
271
+ using BASE = T_CoefficientFunction<EinsumCoefficientFunction>;
272
+ using typename BASE::T_DJC;
273
+
274
+ static constexpr bool sparse_evaluation_default = true;
275
+
276
+ bool is_zero{false};
277
+ size_t max_mem{0};
278
+ map<string, bool> options{};
279
+
280
+ Array<Vector<bool>> nz_inputs{};
281
+ Vector<bool> nz_result{};
282
+ Vector<bool> nz_all{};
283
+ Matrix<int> index_maps{};
284
+ Matrix<int> sparse_index_maps{};
285
+
286
+ shared_ptr<CoefficientFunction> node{};
287
+
288
+ string index_signature{};
289
+ Array<shared_ptr<CoefficientFunction>> cfs{};
290
+
291
+ string original_index_signature{};
292
+ Array<shared_ptr<CoefficientFunction>> original_inputs{};
293
+
294
+ string expanded_index_signature{};
295
+ Array<shared_ptr<CoefficientFunction>> expanded_inputs{};
296
+
297
+ public:
298
+ EinsumCoefficientFunction() = default;
299
+
300
+ EinsumCoefficientFunction(const string &aindex_signature,
301
+ const Array<shared_ptr<CoefficientFunction>> &acfs,
302
+ const map<string, bool> &aoptions);
303
+
304
+ private:
305
+ Matrix<int> build_index_maps(const Array<MultiIndex>& index_sets, const optional<Vector<bool>>& nz_pattern);
306
+
307
+ public:
308
+
309
+ virtual void DoArchive(Archive &ar) override;
310
+
311
+ virtual shared_ptr<EinsumCoefficientFunction> Optimize(const map<string, bool> &aoptions) const;
312
+
313
+ const string &IndexSignature() const { return index_signature; }
314
+
315
+ const string &ExpandedIndexSignature() const {return expanded_index_signature;}
316
+
317
+ const string &OriginalIndexSignature() const {return original_index_signature;}
318
+
319
+ virtual Array<shared_ptr<CoefficientFunction>>
320
+ InputCoefficientFunctions() const override
321
+ {
322
+ if (node)
323
+ return node->InputCoefficientFunctions();
324
+ return Array<shared_ptr<CoefficientFunction>>{cfs};
325
+ }
326
+
327
+ Array<shared_ptr<CoefficientFunction>>
328
+ ExpandedInputCoefficientFunctions() const
329
+ {
330
+ return Array<shared_ptr<CoefficientFunction>>{expanded_inputs};
331
+ }
332
+
333
+ Array<shared_ptr<CoefficientFunction>>
334
+ OriginalInputCoefficientFunctions() const
335
+ {
336
+ return Array<shared_ptr<CoefficientFunction>>{original_inputs};
337
+ }
338
+
339
+ shared_ptr<CoefficientFunction> OptimizedNode() const
340
+ {
341
+ return node;
342
+ }
343
+
344
+ virtual void TraverseTree(const function<void(CoefficientFunction &)> &func) override
345
+ {
346
+ const auto incfs = InputCoefficientFunctions();
347
+ for_each(incfs.begin(), incfs.end(), [&](const auto &cf) { cf->TraverseTree(func); });
348
+ func(*this);
349
+ }
350
+
351
+ virtual string GetDescription() const override;
352
+
353
+ virtual void GenerateCode(Code &code, FlatArray<int> inputs, int index) const override {
354
+ GenerateCode(code, inputs, index, false);
355
+ }
356
+
357
+ virtual void GenerateCode(Code &code, FlatArray<int> inputs, int index,
358
+ bool skip_zeroes = true) const;
359
+
360
+ virtual void NonZeroPattern(const class ProxyUserData &ud,
361
+ FlatVector<AutoDiffDiff<1,NonZero>> values) const override;
362
+
363
+ virtual void NonZeroPattern(const class ProxyUserData &ud,
364
+ FlatArray<FlatVector<AutoDiffDiff<1,NonZero>>> input,
365
+ FlatVector<AutoDiffDiff<1,NonZero>> values) const override;
366
+
367
+ using BASE::Evaluate;
368
+
369
+ virtual double Evaluate(const BaseMappedIntegrationPoint &ip) const override {
370
+ if (Dimension() == 1)
371
+ return BASE::Evaluate(ip);
372
+ throw Exception("TensorProductCF scalar evaluate called for non-scalar result");
373
+ }
374
+
375
+ template<typename MIR, typename T, ORDERING ORD>
376
+ void T_Evaluate(const MIR &ir, BareSliceMatrix<T, ORD> values) const
377
+ {
378
+ if (node) {
379
+ node->Evaluate(ir, values);
380
+ return;
381
+ }
382
+
383
+ ArrayMem<T, 1000> mem(max_mem * ir.Size());
384
+ T *mem_pos = mem.Data();
385
+ Array<FlatMatrix<T, ORD>> tmp_arrays(cfs.Size());
386
+ for (size_t i: Range(cfs)) {
387
+ tmp_arrays[i].AssignMemory(cfs[i]->Dimension(), ir.Size(), mem_pos);
388
+ mem_pos += tmp_arrays[i].Height() * tmp_arrays[i].Width();
389
+ cfs[i]->Evaluate(ir, tmp_arrays[i]);
390
+ }
391
+
392
+ values.AddSize(Dimension(), ir.Size()) = T(0.0);
393
+ const auto cres = cfs.Size();
394
+
395
+ const auto& I_maps = sparse_index_maps.Height() > 0 ? sparse_index_maps : index_maps;
396
+ for (size_t I: Range(I_maps.Height())) {
397
+ const auto& I_map = I_maps.Row(I);
398
+ for (int q: Range(ir)) {
399
+ T tmp(1.0);
400
+ for (size_t i: Range(tmp_arrays))
401
+ tmp *= tmp_arrays[i](I_map(i), q);
402
+ values(I_map(cres), q) += tmp;
403
+ }
404
+ }
405
+ }
406
+
407
+ template<typename MIR, typename T, ORDERING ORD>
408
+ void T_Evaluate(const MIR &ir, FlatArray<BareSliceMatrix<T, ORD>> input,
409
+ BareSliceMatrix<T, ORD> values) const
410
+ {
411
+ if (node) {
412
+ node->Evaluate(ir, input, values);
413
+ return;
414
+ }
415
+
416
+ values.AddSize(Dimension(), ir.Size()) = T(0.0);
417
+ const auto cres = cfs.Size();
418
+
419
+ const auto& I_maps = sparse_index_maps.Height() > 0 ? sparse_index_maps : index_maps;
420
+ for (size_t I: Range(I_maps.Height()))
421
+ {
422
+ const auto& I_map = I_maps.Row(I);
423
+ for (int q: Range(ir)) {
424
+ T tmp(1.0);
425
+ for (size_t i: Range(input))
426
+ tmp *= input[i](I_map(i), q);
427
+ values(I_map(cres), q) += tmp;
428
+ }
429
+ }
430
+ }
431
+
432
+ virtual shared_ptr<CoefficientFunction> Diff(
433
+ const CoefficientFunction *var,
434
+ shared_ptr<CoefficientFunction> dir) const override;
435
+
436
+ virtual shared_ptr<CoefficientFunction> DiffJacobi(
437
+ const CoefficientFunction *var, T_DJC & cache) const override;
438
+
439
+ virtual bool IsZeroCF() const override { return is_zero; }
440
+ };
441
+ }
442
+
443
+ } // namespace ngfem
444
+
445
+
446
+ #endif //FILE_TENSORCOEFFICIENT_HPP
@@ -0,0 +1,113 @@
1
+ #ifndef FILE_TENSORPRODUCTINTEGRATOR
2
+ #define FILE_TENSORPRODUCTINTEGRATOR
3
+
4
+ /*********************************************************************/
5
+ /* File: tensorproductintegrator.hpp */
6
+ /* Author: Gerhard Kitzler */
7
+ /* Date: January 2017 */
8
+ /*********************************************************************/
9
+
10
+
11
+ #include "symbolicintegrator.hpp"
12
+
13
+ namespace ngfem
14
+ {
15
+ class TensorProductBilinearFormIntegrator : public SymbolicBilinearFormIntegrator
16
+ {
17
+ public:
18
+ TensorProductBilinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb,
19
+ bool aelement_boundary) : SymbolicBilinearFormIntegrator(acf, avb, aelement_boundary ? BND : VOL)
20
+ { ; }
21
+ virtual string Name () const { return string ("Symbolic BFI"); }
22
+
23
+ void ApplyXElementMatrix(const FiniteElement & fel,
24
+ const ElementTransformation & trafo,
25
+ const FlatMatrix<double> elx,
26
+ void * precomputed,
27
+ BaseMappedIntegrationRule * mirx,
28
+ LocalHeap & lh) const;
29
+
30
+ void ApplyXElementMatrixTrans(const FiniteElement & fel,
31
+ const ElementTransformation & trafo,
32
+ FlatMatrix<double> ely,
33
+ void * yapplytrans,
34
+ BaseMappedIntegrationRule * mirx,
35
+ LocalHeap & lh) const;
36
+
37
+ void ApplyYElementMatrix(const FiniteElement & fel,
38
+ const ElementTransformation & trafo,
39
+ IntRange dnumsy,
40
+ void * xevaluations,
41
+ BaseMappedIntegrationRule * mirx,
42
+ LocalHeap & lh) const;
43
+ };
44
+
45
+ class TensorProductFacetBilinearFormIntegrator : public SymbolicFacetBilinearFormIntegrator
46
+ {
47
+ public:
48
+ TensorProductFacetBilinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb, bool aelement_boundary) : SymbolicFacetBilinearFormIntegrator(acf, avb, aelement_boundary)
49
+ { ; }
50
+
51
+ virtual void
52
+ ApplyFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
53
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
54
+ const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
55
+ FlatVector<double> elx, FlatVector<double> ely,
56
+ LocalHeap & lh) const;
57
+
58
+ void ApplyXFacetMatrix(const FiniteElement & felx1,
59
+ const ElementTransformation & trafox1,
60
+ const FiniteElement & felx2,
61
+ const ElementTransformation & trafox2,
62
+ const FlatMatrix<double> elx,
63
+ void * precomputed,
64
+ BaseMappedIntegrationRule * mirx1,
65
+ BaseMappedIntegrationRule * mirx2,
66
+ LocalHeap & lh) const;
67
+
68
+ void ApplyYElementMatrix(const FiniteElement & fel,
69
+ const ElementTransformation & trafo,
70
+ IntRange dnumsy,
71
+ void * xevaluations,
72
+ BaseMappedIntegrationRule * mirx,
73
+ LocalHeap & lh) const;
74
+
75
+ void ApplyXFacetMatrixTrans(const FiniteElement & felx1,
76
+ const ElementTransformation & trafox1,
77
+ const FiniteElement & felx2,
78
+ const ElementTransformation & trafox2,
79
+ FlatMatrix<double> ely,
80
+ void * yapplytrans,
81
+ BaseMappedIntegrationRule * mirx1,
82
+ BaseMappedIntegrationRule * mirx2,
83
+ LocalHeap & lh) const;
84
+
85
+ void ApplyYFacetMatrix(const FiniteElement & fely1,
86
+ const ElementTransformation & trafoy1,
87
+ const FiniteElement & fely2,
88
+ const ElementTransformation & trafoy2,
89
+ const FlatMatrix<double> elx,
90
+ void * yheap,
91
+ BaseMappedIntegrationRule * miry1,
92
+ BaseMappedIntegrationRule * miry2,
93
+ LocalHeap & lh) const;
94
+
95
+ void ApplyXElementMatrix(const FiniteElement & fel,
96
+ const ElementTransformation & trafo,
97
+ IntRange dnumsx,
98
+ void * yevaluations,
99
+ BaseMappedIntegrationRule * miry,
100
+ LocalHeap & lh) const;
101
+
102
+ void ApplyYFacetMatrixTrans(const FiniteElement & fely1,
103
+ const ElementTransformation & trafoy1,
104
+ const FiniteElement & fely2,
105
+ const ElementTransformation & trafoy2,
106
+ FlatMatrix<double> ely,
107
+ void * xapplytrans,
108
+ BaseMappedIntegrationRule * miry1,
109
+ BaseMappedIntegrationRule * miry2,
110
+ LocalHeap & lh) const;
111
+ };
112
+ }
113
+ #endif
@@ -0,0 +1,128 @@
1
+ #ifndef FILE_THCURLFE
2
+ #define FILE_THCURLFE
3
+
4
+ /*********************************************************************/
5
+ /* File: thcurlfe.hpp */
6
+ /* Author: Joachim Schoeberl */
7
+ /* Date: 5. Sep. 2013 */
8
+ /*********************************************************************/
9
+
10
+
11
+
12
+ #include "hcurlfe.hpp"
13
+
14
+ namespace ngfem
15
+ {
16
+
17
+
18
+
19
+ /**
20
+ HCurlHighOrderFE of shape ET.
21
+ provides access functions, shape functions are provided by CalcShape template
22
+ */
23
+ template <ELEMENT_TYPE ET, typename SHAPES,
24
+ typename BASE = HCurlFiniteElement<ET_trait<ET>::DIM>>
25
+ class T_HCurlHighOrderFiniteElement : public BASE
26
+ {
27
+ protected:
28
+ enum { DIM = ET_trait<ET>::DIM };
29
+
30
+ using BASE::DIM_CURL;
31
+ using BASE::ndof;
32
+ using BASE::order;
33
+
34
+ public:
35
+
36
+ NGS_DLL_HEADER T_HCurlHighOrderFiniteElement () { ; }
37
+ HD virtual ELEMENT_TYPE ElementType() const override { return ET; }
38
+
39
+ template<typename Tx, typename TFA>
40
+ INLINE void T_CalcShape (TIP<DIM,Tx> tip, TFA & shape) const
41
+ {
42
+ static_cast<const SHAPES*> (this) -> T_CalcShape (tip, shape);
43
+ }
44
+
45
+
46
+ virtual void CalcShape (const IntegrationPoint & ip,
47
+ BareSliceMatrix<> shape) const override;
48
+
49
+ virtual void CalcCurlShape (const IntegrationPoint & ip,
50
+ BareSliceMatrix<> curlshape) const override;
51
+ #ifndef FASTCOMPILE
52
+
53
+ virtual void CalcMappedShape (const BaseMappedIntegrationPoint & mip,
54
+ BareSliceMatrix<> shape) const override;
55
+
56
+ virtual void CalcMappedShape (const BaseMappedIntegrationRule & bmir, BareSliceMatrix<> shapes) const override;
57
+
58
+ virtual void CalcMappedShape (const SIMD<BaseMappedIntegrationPoint> & bmip,
59
+ BareSliceMatrix<SIMD<double>> shape) const override;
60
+
61
+ virtual void CalcMappedShape (const SIMD_BaseMappedIntegrationRule & mir,
62
+ BareSliceMatrix<SIMD<double>> shapes) const override;
63
+
64
+ virtual void CalcMappedCurlShape (const BaseMappedIntegrationPoint & mip,
65
+ BareSliceMatrix<> curlshape) const override;
66
+
67
+ virtual void CalcMappedCurlShape (const BaseMappedIntegrationRule & mir,
68
+ BareSliceMatrix<> curlshape) const override;
69
+
70
+ virtual void CalcMappedCurlShape (const SIMD_BaseMappedIntegrationRule & mir,
71
+ BareSliceMatrix<SIMD<double>> curlshapes) const override;
72
+
73
+ virtual Vec <DIM_CURL_(DIM)>
74
+ EvaluateCurlShape (const IntegrationPoint & ip,
75
+ BareSliceVector<double> x,
76
+ LocalHeap & lh) const override;
77
+
78
+ NGS_DLL_HEADER virtual void
79
+ EvaluateCurl (const IntegrationRule & ir, BareSliceVector<> coefs, BareSliceMatrix<> curl) const override;
80
+
81
+ using BASE::Evaluate;
82
+ NGS_DLL_HEADER virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir, BareSliceVector<> coefs, BareSliceMatrix<SIMD<double>> values) const override;
83
+
84
+ NGS_DLL_HEADER virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir, BareSliceVector<Complex> coefs, BareSliceMatrix<SIMD<Complex>> values) const override;
85
+ NGS_DLL_HEADER virtual void EvaluateCurl (const SIMD_BaseMappedIntegrationRule & ir, BareSliceVector<> coefs, BareSliceMatrix<SIMD<double>> values) const override;
86
+ NGS_DLL_HEADER virtual void EvaluateCurl (const SIMD_BaseMappedIntegrationRule & ir, BareSliceVector<Complex> coefs, BareSliceMatrix<SIMD<Complex>> values) const; // actually not in base-class !!!!
87
+
88
+ NGS_DLL_HEADER virtual void AddTrans (const SIMD_BaseMappedIntegrationRule & ir, BareSliceMatrix<SIMD<double>> values,
89
+ BareSliceVector<> coefs) const override;
90
+ NGS_DLL_HEADER virtual void AddTrans (const SIMD_BaseMappedIntegrationRule & ir, BareSliceMatrix<SIMD<Complex>> values,
91
+ BareSliceVector<Complex> coefs) const override;
92
+ NGS_DLL_HEADER virtual void AddCurlTrans (const SIMD_BaseMappedIntegrationRule & ir, BareSliceMatrix<SIMD<double>> values,
93
+ BareSliceVector<> coefs) const override;
94
+ NGS_DLL_HEADER virtual void AddCurlTrans (const SIMD_BaseMappedIntegrationRule & ir, BareSliceMatrix<SIMD<Complex>> values,
95
+ BareSliceVector<Complex> coefs) const override;
96
+ #endif
97
+
98
+ };
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+ /**
107
+ Base-element for template polymorphism.
108
+ Barton and Nackman Trick
109
+ */
110
+
111
+ template <class FEL, ELEMENT_TYPE ET, int NDOF, int ORDER>
112
+ class T_HCurlFiniteElementFO
113
+ : public T_HCurlHighOrderFiniteElement<ET, FEL>
114
+ {
115
+ public:
116
+
117
+ T_HCurlFiniteElementFO ()
118
+ {
119
+ this -> ndof = NDOF;
120
+ this -> order = ORDER;
121
+ }
122
+ };
123
+
124
+ }
125
+
126
+
127
+
128
+ #endif