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,2012 @@
1
+ #ifndef FILE_INTEGRATOR
2
+ #define FILE_INTEGRATOR
3
+
4
+ /*********************************************************************/
5
+ /* File: integrator.hpp */
6
+ /* Author: Joachim Schoeberl */
7
+ /* Date: 25. Mar. 2000 */
8
+ /*********************************************************************/
9
+
10
+
11
+ // #include "elementtransformation.hpp"
12
+ #include "finiteelement.hpp"
13
+ #include "differentialoperator.hpp"
14
+
15
+ namespace ngfem
16
+ {
17
+
18
+ /*
19
+ bilinear-form and linear-form integrators
20
+ */
21
+
22
+
23
+ // enum FORM_TYPE { VOLUME_FORM, BOUNDARY_FORM, SKELETON_FORM, CURVE_FORM };
24
+
25
+
26
+ /**
27
+ Base class for linear-form and bilinear-form integrators.
28
+ Provides integration order, restriction to subdomains
29
+ */
30
+ class NGS_DLL_HEADER Integrator
31
+ {
32
+ protected:
33
+ /// define only on some sub-domains
34
+ BitArray definedon;
35
+
36
+ /// if >= 0, use this order of integration
37
+ int integration_order;
38
+
39
+ // lower bound for the integration order
40
+ int higher_integration_order;
41
+
42
+ /// if >= 0, use this order of integration for all terms
43
+ static int common_integration_order;
44
+
45
+ /// plane element and constant coefficients
46
+ bool const_coef;
47
+
48
+ ///
49
+ string name;
50
+
51
+ /// integration only along curve
52
+ bool is_curve_integrator = false;
53
+ Array < FlatVector < double > * > curve_ips;
54
+ Array < FlatVector < double > * > curve_ip_tangents;
55
+ Array <int> continuous_curveparts;
56
+
57
+ int cachecomp;
58
+ int bonus_intorder = 0;
59
+
60
+ /// define only on some sub-domains
61
+ shared_ptr<BitArray> definedon_element = nullptr;
62
+ std::array<unique_ptr<IntegrationRule>,25> userdefined_intrules;
63
+ std::array<unique_ptr<SIMD_IntegrationRule>,25> userdefined_simd_intrules;
64
+
65
+ mutable bool simd_evaluate = true;
66
+
67
+ shared_ptr<ngcomp::GridFunction> deformation; // ALE for this integrator
68
+
69
+ protected:
70
+ void DeleteCurveIPs ( void );
71
+
72
+ public:
73
+ /// constructor
74
+ Integrator() throw ();
75
+
76
+ /// destructor
77
+ virtual ~Integrator();
78
+
79
+ /// integrates on the boundary, or on the domain ?
80
+ //[[deprecated("Use VB() instead")]]
81
+ virtual bool BoundaryForm () const
82
+ { return VB() == BND; }
83
+
84
+ virtual VorB VB() const = 0;
85
+
86
+ class DGFormulation
87
+ {
88
+ public:
89
+ bool neighbor_testfunction = true; // trivially parallel if no neighbor testfunction
90
+ bool element_boundary = false; // loop over edges, or loop over element-boundaries
91
+ DGFormulation(bool nbtest=true, bool eb=false)
92
+ : neighbor_testfunction(nbtest), element_boundary(eb) { ; }
93
+ };
94
+ virtual DGFormulation GetDGFormulation() const { return DGFormulation(); }
95
+
96
+ /// integrates just on the skeleton, standard is NO
97
+ virtual bool SkeletonForm () const { return false; }
98
+
99
+ virtual bool VolumeForm () const
100
+ {
101
+ if ( VB() != VOL || SkeletonForm() || IntegrationAlongCurve()) return false;
102
+ return true;
103
+ }
104
+
105
+ /// Is Integrator defined on this sub-domain ?
106
+ bool DefinedOn (int mat) const;
107
+
108
+ /// defined only on some subdomains
109
+ void SetDefinedOn (const BitArray & adefinedon);
110
+
111
+ /// defined only on elements (elements/boundary elements/facets/..)
112
+ void SetDefinedOnElements (shared_ptr<BitArray> adefinedonelem)
113
+ {
114
+ definedon_element = adefinedonelem;
115
+ }
116
+
117
+ void SetIntegrationRule(ELEMENT_TYPE et, const IntegrationRule& ir)
118
+ {
119
+ userdefined_intrules[int(et)] = make_unique<IntegrationRule>(ir.Copy());
120
+ userdefined_simd_intrules[int(et)] = make_unique<SIMD_IntegrationRule>(*userdefined_intrules[int(et)]);
121
+ }
122
+
123
+ void SetIntegrationRule(const IntegrationRule& ir)
124
+ {
125
+ for(auto i : Range(25))
126
+ {
127
+ userdefined_intrules[i] = make_unique<IntegrationRule>(ir.Copy());
128
+ userdefined_simd_intrules[i] = make_unique<SIMD_IntegrationRule>(*userdefined_intrules[i]);
129
+ }
130
+ }
131
+
132
+ inline const IntegrationRule& GetIntegrationRule(ELEMENT_TYPE et, int order) const
133
+ {
134
+ return userdefined_intrules[et] ? *userdefined_intrules[et] : SelectIntegrationRule(et,order);
135
+ }
136
+ inline const SIMD_IntegrationRule& GetSIMDIntegrationRule(ELEMENT_TYPE et, int order) const
137
+ {
138
+ return userdefined_simd_intrules[et] ? *userdefined_simd_intrules[et] : SIMD_SelectIntegrationRule(et,order);
139
+ }
140
+
141
+ /// defined only on some elements/facets/boundary elements
142
+ shared_ptr<BitArray> GetDefinedOnElements () const { return definedon_element; }
143
+
144
+ /// Is Integrator defined on this element ?
145
+ bool DefinedOnElement (int elem) const
146
+ {
147
+ if (definedon_element != nullptr && !definedon_element->Test(elem))
148
+ return false;
149
+ else
150
+ return true;
151
+ }
152
+
153
+ /// defined only on some subdomains
154
+ const BitArray & GetDefinedOn () const { return definedon; }
155
+
156
+ /// defined only on some subdomains (0-based)
157
+ void SetDefinedOn (const Array<int> & regions);
158
+
159
+ bool DefinedOnSubdomainsOnly() const
160
+ { return definedon.Size() != 0; }
161
+
162
+
163
+
164
+ /// use exactly this integration order for all integrals
165
+ static void SetCommonIntegrationOrder (int cio)
166
+ {
167
+ common_integration_order = cio;
168
+ }
169
+
170
+ static int GetCommonIntegrationOrder ()
171
+ {
172
+ return common_integration_order;
173
+ }
174
+
175
+ /// set minimal integration order
176
+ void SetHigherIntegrationOrder (int io)
177
+ {
178
+ higher_integration_order = io;
179
+ }
180
+
181
+ /// set integration order
182
+ void SetIntegrationOrder (int io)
183
+ {
184
+ integration_order = io;
185
+ }
186
+
187
+ /// returns integration order
188
+ int GetIntegrationOrder (void) const
189
+ {
190
+ return integration_order;
191
+ }
192
+
193
+ void SetBonusIntegrationOrder (int bo) { bonus_intorder = bo; }
194
+ int GetBonusIntegrationOrder() const { return bonus_intorder; }
195
+
196
+ /// benefit from constant coefficient
197
+ void SetConstantCoefficient (bool acc = 1)
198
+ { const_coef = acc; }
199
+
200
+ /// dimension of element
201
+ virtual int DimElement () const { return -1; }
202
+
203
+ /// dimension of space
204
+ virtual int DimSpace () const { return -1; }
205
+
206
+ /// how many copies of the same element (e.g. elasticity)
207
+ virtual int GetDimension () const { return 1; }
208
+
209
+ ///
210
+ void SetName (const string & aname);
211
+ ///
212
+ virtual string Name () const;
213
+
214
+ /// does element match integrator ?
215
+ virtual void CheckElement (const FiniteElement & el) const { ; }
216
+
217
+
218
+
219
+ // special hacks by Markus
220
+ bool IntegrationAlongCurve (void) const
221
+ { return is_curve_integrator; }
222
+
223
+ void SetIntegrationAlongCurve ( const int npoints );
224
+
225
+ void UnSetIntegrationAlongCurve ( void );
226
+
227
+ virtual int NumCurvePoints() const
228
+ { return curve_ips.Size(); }
229
+
230
+ virtual FlatVector<double> CurvePoint(int i)
231
+ { return *(curve_ips[i]); }
232
+
233
+ virtual FlatVector<double> CurvePointTangent(int i)
234
+ { return *(curve_ip_tangents[i]); }
235
+
236
+ virtual int GetNumCurveParts() const;
237
+ virtual int GetStartOfCurve(int i) const;
238
+ virtual int GetEndOfCurve(int i) const;
239
+
240
+ virtual void AppendCurvePoint(const FlatVector<double> & point);
241
+ virtual void AppendCurvePoint(const FlatVector<double> & point, const FlatVector<double> & tangent);
242
+ virtual void SetCurveClearance();
243
+
244
+
245
+
246
+ virtual void SetCacheComp(const int comp)
247
+ { cachecomp = comp; }
248
+
249
+ virtual int CacheComp(void) const
250
+ { return cachecomp; }
251
+
252
+ virtual void SetFileName(const string & filename);
253
+
254
+ virtual void SetFlags (const Flags & flags) { ; }
255
+
256
+ bool SimdEvaluate () const { return simd_evaluate; }
257
+ void SetSimdEvaluate (bool b = true) { simd_evaluate = b; }
258
+
259
+ void SetDeformation (shared_ptr<ngcomp::GridFunction> adeform) { deformation = adeform; }
260
+ const shared_ptr<ngcomp::GridFunction> & GetDeformation() const { return deformation; }
261
+ };
262
+
263
+
264
+ ostream & operator << (ostream & ost, const Integrator & igt);
265
+
266
+ /**
267
+ A BilinearFormIntegrator computes the element matrices. Different
268
+ equations are provided by derived classes. An Integrator can be defined
269
+ in the domain or at the boundary.
270
+ */
271
+ class NGS_DLL_HEADER BilinearFormIntegrator : public Integrator
272
+ {
273
+ protected:
274
+ // evaluate something, e.g. energy, ...
275
+ SymbolTable<shared_ptr<DifferentialOperator>> evaluators;
276
+
277
+ public:
278
+ // typedef double TSCAL;
279
+ ///
280
+ BilinearFormIntegrator () throw () { ; }
281
+ ///
282
+ virtual ~BilinearFormIntegrator ();
283
+
284
+ /// generates symmetric matrix ?
285
+ virtual xbool IsSymmetric () const = 0;
286
+
287
+ /// components of flux
288
+ virtual int DimFlux () const { return -1; }
289
+
290
+ /**
291
+ Computes the element matrix.
292
+ */
293
+ virtual void
294
+ CalcElementMatrix (const FiniteElement & fel,
295
+ const ElementTransformation & eltrans,
296
+ FlatMatrix<double> elmat,
297
+ LocalHeap & lh) const = 0;
298
+
299
+ /**
300
+ Computes the element matrix.
301
+ Complex version
302
+ */
303
+ virtual void
304
+ CalcElementMatrix (const FiniteElement & fel,
305
+ const ElementTransformation & eltrans,
306
+ FlatMatrix<Complex> elmat,
307
+ LocalHeap & lh) const;
308
+
309
+ /**
310
+ Computes the element matrix.
311
+ Add the element to elmat
312
+ */
313
+ virtual void
314
+ CalcElementMatrixAdd (const FiniteElement & fel,
315
+ const ElementTransformation & eltrans,
316
+ FlatMatrix<double> elmat,
317
+ bool & symmetric_so_far,
318
+ LocalHeap & lh) const;
319
+
320
+ /**
321
+ Computes the element matrix.
322
+ Complex version
323
+ Add the element to elmat
324
+ */
325
+ virtual void
326
+ CalcElementMatrixAdd (const FiniteElement & fel,
327
+ const ElementTransformation & eltrans,
328
+ FlatMatrix<Complex> elmat,
329
+ bool & symmetric_so_far,
330
+ LocalHeap & lh) const;
331
+
332
+
333
+
334
+ virtual void
335
+ CalcElementMatrixIndependent (const FiniteElement & bfel_master,
336
+ const FiniteElement & bfel_master_element,
337
+ const FiniteElement & bfel_other,
338
+ const ElementTransformation & eltrans_master,
339
+ const ElementTransformation & eltrans_master_element,
340
+ const ElementTransformation & eltrans_other,
341
+ const IntegrationPoint & ip_master,
342
+ const IntegrationPoint & ip_master_element,
343
+ const IntegrationPoint & ip_other,
344
+ FlatMatrix<double> & elmat,
345
+ LocalHeap & lh) const
346
+ {;}
347
+ virtual void
348
+ ApplyElementMatrixIndependent (const FiniteElement & bfel_master,
349
+ const FiniteElement & bfel_master_element,
350
+ const FiniteElement & bfel_other,
351
+ const ElementTransformation & eltrans_master,
352
+ const ElementTransformation & eltrans_master_element,
353
+ const ElementTransformation & eltrans_other,
354
+ const IntegrationPoint & ip_master,
355
+ const IntegrationPoint & ip_master_element,
356
+ const IntegrationPoint & ip_other,
357
+ const FlatVector<double> & elx,
358
+ Vector<double> & result,
359
+ LocalHeap & lh) const
360
+ {;}
361
+ virtual void
362
+ CalcElementMatrixIndependent (const FiniteElement & bfel_master,
363
+ const FiniteElement & bfel_master_element,
364
+ const FiniteElement & bfel_other,
365
+ const ElementTransformation & eltrans_master,
366
+ const ElementTransformation & eltrans_master_element,
367
+ const ElementTransformation & eltrans_other,
368
+ const IntegrationPoint & ip_master,
369
+ const IntegrationPoint & ip_master_element,
370
+ const IntegrationPoint & ip_other,
371
+ FlatMatrix<Complex> & elmat,
372
+ LocalHeap & lh) const
373
+ {
374
+ FlatMatrix<double> rmat;
375
+ CalcElementMatrixIndependent(bfel_master,bfel_master_element,bfel_other,
376
+ eltrans_master, eltrans_master_element, eltrans_other,
377
+ ip_master, ip_master_element, ip_other,
378
+ rmat, lh);
379
+ elmat.AssignMemory(rmat.Height(), rmat.Width(), lh);
380
+ elmat = rmat;
381
+ }
382
+
383
+ virtual void
384
+ CalcElementMatrixIndependent (const FiniteElement & bfel_master,
385
+ const FiniteElement & bfel_other,
386
+ const ElementTransformation & eltrans_master,
387
+ const ElementTransformation & eltrans_other,
388
+ const IntegrationPoint & ip_master,
389
+ const IntegrationPoint & ip_other,
390
+ FlatMatrix<double> & elmat,
391
+ LocalHeap & lh) const
392
+ {;}
393
+ virtual void
394
+ CalcElementMatrixIndependent (const FiniteElement & bfel_master,
395
+ const FiniteElement & bfel_other,
396
+ const ElementTransformation & eltrans_master,
397
+ const ElementTransformation & eltrans_other,
398
+ const IntegrationPoint & ip_master,
399
+ const IntegrationPoint & ip_other,
400
+ FlatMatrix<Complex> & elmat,
401
+ LocalHeap & lh) const
402
+ {
403
+ FlatMatrix<double> rmat;
404
+ CalcElementMatrixIndependent(bfel_master,bfel_other,
405
+ eltrans_master, eltrans_other,
406
+ ip_master, ip_other,
407
+ rmat, lh);
408
+ elmat.AssignMemory(rmat.Height(), rmat.Width(), lh);
409
+ elmat = rmat;
410
+ }
411
+
412
+
413
+ virtual void
414
+ CalcElementMatrixDiag (const FiniteElement & fel,
415
+ const ElementTransformation & eltrans,
416
+ FlatVector<double> diag,
417
+ LocalHeap & lh) const;
418
+
419
+
420
+
421
+
422
+ virtual void
423
+ CalcLinearizedElementMatrix (const FiniteElement & fel,
424
+ const ElementTransformation & eltrans,
425
+ FlatVector<double> elveclin,
426
+ FlatMatrix<double> elmat,
427
+ LocalHeap & lh) const;
428
+
429
+ virtual void
430
+ CalcLinearizedElementMatrix (const FiniteElement & fel,
431
+ const ElementTransformation & eltrans,
432
+ FlatVector<Complex> elveclin,
433
+ FlatMatrix<Complex> elmat,
434
+ LocalHeap & lh) const;
435
+
436
+
437
+ virtual void *
438
+ PrecomputeData (const FiniteElement & fel,
439
+ const ElementTransformation & eltrans,
440
+ LocalHeap & lh) const { return 0; }
441
+
442
+
443
+ virtual void
444
+ ApplyElementMatrix (const FiniteElement & fel,
445
+ const ElementTransformation & eltrans,
446
+ const FlatVector<double> elx,
447
+ FlatVector<double> ely,
448
+ void * precomputed,
449
+ LocalHeap & lh) const;
450
+
451
+ virtual void
452
+ ApplyElementMatrix (const FiniteElement & fel,
453
+ const ElementTransformation & eltrans,
454
+ const FlatVector<Complex> elx,
455
+ FlatVector<Complex> ely,
456
+ void * precomputed,
457
+ LocalHeap & lh) const;
458
+
459
+ virtual void
460
+ ApplyElementMatrixTrans (const FiniteElement & fel,
461
+ const ElementTransformation & eltrans,
462
+ const FlatVector<double> elx,
463
+ FlatVector<double> ely,
464
+ void * precomputed,
465
+ LocalHeap & lh) const;
466
+
467
+ virtual void
468
+ ApplyElementMatrixTrans (const FiniteElement & fel,
469
+ const ElementTransformation & eltrans,
470
+ const FlatVector<Complex> elx,
471
+ FlatVector<Complex> ely,
472
+ void * precomputed,
473
+ LocalHeap & lh) const;
474
+
475
+
476
+
477
+
478
+ /*
479
+ template < int S, class T>
480
+ void ApplyElementMatrix (const FiniteElement & fel,
481
+ const ElementTransformation & eltrans,
482
+ const FlatVector< Vec<S,T> > & elx,
483
+ FlatVector< Vec<S,T> > & ely,
484
+ void * precomputed,
485
+ LocalHeap & lh) const
486
+ {
487
+ //cout << "call baseclass ApplyElementMatrix, type = " << typeid(*this).name() << endl;
488
+ FlatMatrix<T> mat;
489
+ CalcElementMatrix (fel, eltrans, mat, lh);
490
+ ely = mat * elx;
491
+ }
492
+ */
493
+
494
+
495
+ virtual void
496
+ ApplyLinearizedElementMatrix (const FiniteElement & fel,
497
+ const ElementTransformation & eltrans,
498
+ FlatVector<double> ellin,
499
+ FlatVector<double> elx,
500
+ FlatVector<double> ely,
501
+ LocalHeap & lh) const;
502
+
503
+ virtual void
504
+ ApplyLinearizedElementMatrix (const FiniteElement & fel,
505
+ const ElementTransformation & eltrans,
506
+ FlatVector<Complex> ellin,
507
+ FlatVector<Complex> elx,
508
+ FlatVector<Complex> ely,
509
+ LocalHeap & lh) const;
510
+
511
+
512
+
513
+ virtual double Energy (const FiniteElement & fel,
514
+ const ElementTransformation & eltrans,
515
+ FlatVector<double> elx,
516
+ LocalHeap & lh) const;
517
+
518
+ virtual double Energy (const FiniteElement & fel,
519
+ const ElementTransformation & eltrans,
520
+ FlatVector<Complex> elx,
521
+ LocalHeap & lh) const;
522
+
523
+
524
+
525
+
526
+ virtual void
527
+ CalcFlux (const FiniteElement & fel,
528
+ const BaseMappedIntegrationPoint & bmip,
529
+ BareSliceVector<double> elx,
530
+ FlatVector<double> flux,
531
+ bool applyd,
532
+ LocalHeap & lh) const;
533
+
534
+
535
+ virtual void
536
+ CalcFlux (const FiniteElement & fel,
537
+ const BaseMappedIntegrationPoint & bmip,
538
+ BareSliceVector<Complex> elx,
539
+ FlatVector<Complex> flux,
540
+ bool applyd,
541
+ LocalHeap & lh) const;
542
+
543
+
544
+ virtual void
545
+ CalcFlux (const FiniteElement & fel,
546
+ const BaseMappedIntegrationRule & mir,
547
+ BareSliceVector<double> elx,
548
+ BareSliceMatrix<double> flux,
549
+ bool applyd,
550
+ LocalHeap & lh) const;
551
+
552
+
553
+ virtual void
554
+ CalcFlux (const FiniteElement & fel,
555
+ const BaseMappedIntegrationRule & mir,
556
+ BareSliceVector<Complex> elx,
557
+ BareSliceMatrix<Complex> flux,
558
+ bool applyd,
559
+ LocalHeap & lh) const;
560
+
561
+
562
+ virtual void
563
+ CalcFlux (const FiniteElement & fel,
564
+ const FiniteElement & felflux,
565
+ const ElementTransformation & eltrans,
566
+ BareSliceVector<> elx,
567
+ FlatVector<> flux,
568
+ bool applyd,
569
+ LocalHeap & lh) const;
570
+
571
+
572
+ virtual void
573
+ CalcFluxMulti (const FiniteElement & fel,
574
+ const BaseMappedIntegrationPoint & bmip,
575
+ int m,
576
+ FlatVector<double> elx,
577
+ FlatVector<double> flux,
578
+ bool applyd,
579
+ LocalHeap & lh) const;
580
+
581
+
582
+ virtual void
583
+ CalcFluxMulti (const FiniteElement & fel,
584
+ const BaseMappedIntegrationPoint & bmip,
585
+ int m,
586
+ FlatVector<Complex> elx,
587
+ FlatVector<Complex> flux,
588
+ bool applyd,
589
+ LocalHeap & lh) const;
590
+
591
+
592
+ virtual void
593
+ ApplyBTrans (const FiniteElement & fel,
594
+ const BaseMappedIntegrationPoint & bmip,
595
+ FlatVector<double> elx,
596
+ FlatVector<double> ely,
597
+ LocalHeap & lh) const;
598
+
599
+ virtual void
600
+ ApplyBTrans (const FiniteElement & fel,
601
+ const BaseMappedIntegrationPoint & bmip,
602
+ FlatVector<Complex> elx,
603
+ FlatVector<Complex> ely,
604
+ LocalHeap & lh) const;
605
+
606
+
607
+ virtual void
608
+ ApplyBTrans (const FiniteElement & fel,
609
+ const BaseMappedIntegrationRule & mir,
610
+ FlatMatrix<double> elx,
611
+ FlatVector<double> ely,
612
+ LocalHeap & lh) const;
613
+
614
+ virtual void
615
+ ApplyBTrans (const FiniteElement & fel,
616
+ const BaseMappedIntegrationRule & mir,
617
+ FlatMatrix<Complex> elx,
618
+ FlatVector<Complex> ely,
619
+ LocalHeap & lh) const;
620
+
621
+
622
+ virtual void ApplyDMat (const FiniteElement & bfel,
623
+ const BaseMappedIntegrationPoint & bmip,
624
+ FlatVector<double> elx,
625
+ FlatVector<double> eldx,
626
+ LocalHeap & lh) const;
627
+
628
+ virtual void ApplyDMat (const FiniteElement & bfel,
629
+ const BaseMappedIntegrationPoint & bmip,
630
+ FlatVector<Complex> elx,
631
+ FlatVector<Complex> eldx,
632
+ LocalHeap & lh) const;
633
+
634
+ virtual void ApplyDMat (const FiniteElement & bfel,
635
+ const BaseMappedIntegrationRule & mir,
636
+ FlatMatrix<double> elx,
637
+ FlatMatrix<double> eldx,
638
+ LocalHeap & lh) const;
639
+
640
+ virtual void ApplyDMat (const FiniteElement & bfel,
641
+ const BaseMappedIntegrationRule & mir,
642
+ FlatMatrix<Complex> elx,
643
+ FlatMatrix<Complex> eldx,
644
+ LocalHeap & lh) const;
645
+
646
+ virtual void ApplyDMatInv (const FiniteElement & bfel,
647
+ const BaseMappedIntegrationPoint & bmip,
648
+ FlatVector<double> elx,
649
+ FlatVector<double> eldx,
650
+ LocalHeap & lh) const;
651
+
652
+ virtual void ApplyDMatInv (const FiniteElement & bfel,
653
+ const BaseMappedIntegrationPoint & bmip,
654
+ FlatVector<Complex> elx,
655
+ FlatVector<Complex> eldx,
656
+ LocalHeap & lh) const;
657
+
658
+ virtual void ApplyDMatInv (const FiniteElement & bfel,
659
+ const BaseMappedIntegrationRule & mir,
660
+ FlatMatrix<double> elx,
661
+ FlatMatrix<double> eldx,
662
+ LocalHeap & lh) const;
663
+
664
+ virtual void ApplyDMatInv (const FiniteElement & bfel,
665
+ const BaseMappedIntegrationRule & mir,
666
+ FlatMatrix<Complex> elx,
667
+ FlatMatrix<Complex> eldx,
668
+ LocalHeap & lh) const;
669
+
670
+
671
+ shared_ptr<DifferentialOperator> GetEvaluator(string name) const
672
+ {
673
+ return evaluators[name];
674
+ }
675
+
676
+ const auto & GetEvaluators() const { return evaluators; }
677
+ /*
678
+ virtual const IntegrationRule & GetIntegrationRule (const FiniteElement & fel,
679
+ const bool use_higher_integration_order = false) const;
680
+ */
681
+ bool geom_free = false;
682
+ };
683
+
684
+
685
+ /*
686
+ class FacetNeighbourElInfo{
687
+ public:
688
+ //finite Element of the neighbour element
689
+ const FiniteElement & volumefel;
690
+ //local Facet Number from volumeElements view
691
+ int LocalFacetNr;
692
+ //Transformation of the neighbouring element
693
+ const ElementTransformation & eltrans;
694
+ //Vertices of the Element
695
+ FlatArray<int> & ElVertices;
696
+ bool nonempty;
697
+ FacetNeighbourElInfo(const FiniteElement & vvolumefel, int lLocalFacetNr,
698
+ const ElementTransformation & eeltrans,
699
+ FlatArray<int> & eElVertices):volumefel(vvolumefel),
700
+ LocalFacetNr(lLocalFacetNr), eltrans(eeltrans),
701
+ ElVertices(eElVertices), nonempty(true)
702
+ {;}
703
+ FacetNeighbourElInfo():nonempty(false){;};
704
+ bool IsEmpty(){return !nonempty;}
705
+ };
706
+ */
707
+
708
+ class NGS_DLL_HEADER FacetBilinearFormIntegrator : public BilinearFormIntegrator
709
+ {
710
+ public:
711
+
712
+ FacetBilinearFormIntegrator() // const Array<shared_ptr<CoefficientFunction>> & coeffs)
713
+ : BilinearFormIntegrator() { ; }
714
+
715
+ ~FacetBilinearFormIntegrator() { ; }
716
+
717
+
718
+
719
+
720
+ virtual VorB VB () const
721
+ { return VOL; }
722
+
723
+ virtual bool SkeletonForm () const
724
+ { return 1; }
725
+
726
+ virtual void CalcElementMatrix (const FiniteElement & fel,
727
+ const ElementTransformation & eltrans,
728
+ FlatMatrix<double> elmat,
729
+ LocalHeap & lh) const {
730
+ throw Exception ("FacetBilinearFormIntegrator can not assemble volumetric element matrices!");
731
+ }
732
+
733
+
734
+ virtual void
735
+ CalcFacetMatrix (const FiniteElement & volumefel1, int LocalFacetNr1,
736
+ const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
737
+ const FiniteElement & volumefel2, int LocalFacetNr2,
738
+ const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
739
+ FlatMatrix<double> elmat,
740
+ LocalHeap & lh) const{
741
+ throw Exception ("FacetBilinearFormIntegrator::CalcFacetMatrix for inner facets not implemented!");
742
+ }
743
+
744
+ virtual void
745
+ CalcFacetMatrix (const FiniteElement & volumefel1, int LocalFacetNr1,
746
+ const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
747
+ const FiniteElement & volumefel2, int LocalFacetNr2,
748
+ const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
749
+ FlatMatrix<Complex> elmat,
750
+ LocalHeap & lh) const{
751
+ throw Exception ("FacetBilinearFormIntegrator::CalcFacetMatrix<Complex> for inner facets not implemented!");
752
+ }
753
+
754
+ virtual void
755
+ CalcLinearizedFacetMatrix (const FiniteElement & volumefel1, int LocalFacetNr1,
756
+ const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
757
+ const FiniteElement & volumefel2, int LocalFacetNr2,
758
+ const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
759
+ FlatVector<double> elvec,
760
+ FlatMatrix<double> elmat,
761
+ LocalHeap & lh) const{
762
+ CalcFacetMatrix (volumefel1, LocalFacetNr1, eltrans1, ElVertices1, volumefel2, LocalFacetNr2, eltrans2, ElVertices2, elmat, lh);
763
+ // throw Exception ("FacetBilinearFormIntegrator::CalcLinearizedFacetMatrix for inner facets not implemented!");
764
+ }
765
+
766
+ virtual void
767
+ CalcLinearizedFacetMatrix (const FiniteElement & volumefel1, int LocalFacetNr1,
768
+ const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
769
+ const FiniteElement & volumefel2, int LocalFacetNr2,
770
+ const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
771
+ FlatVector<Complex> elvec,
772
+ FlatMatrix<Complex> elmat,
773
+ LocalHeap & lh) const{
774
+ throw Exception ("FacetBilinearFormIntegrator::CalcLinearizedFacetMatrix<Complex> for inner facets not implemented!");
775
+ }
776
+
777
+
778
+ virtual void
779
+ ApplyFacetMatrix (const FiniteElement & volumefel1, int LocalFacetNr1,
780
+ const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
781
+ const FiniteElement & volumefel2, int LocalFacetNr2,
782
+ const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
783
+ FlatVector<double> elx, FlatVector<double> ely,
784
+ LocalHeap & lh) const;
785
+ virtual void
786
+ ApplyFacetMatrix (const FiniteElement & volumefel1, int LocalFacetNr1,
787
+ const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
788
+ const FiniteElement & volumefel2, int LocalFacetNr2,
789
+ const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
790
+ FlatVector<Complex> elx, FlatVector<Complex> ely,
791
+ LocalHeap & lh) const;
792
+
793
+
794
+ virtual void
795
+ CalcFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
796
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
797
+ const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
798
+ FlatMatrix<double> elmat,
799
+ LocalHeap & lh) const{
800
+ throw Exception ("FacetBilinearFormIntegrator::CalcFacetMatrix for boundary facets not implemented!");
801
+ }
802
+ virtual void
803
+ CalcFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
804
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
805
+ const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
806
+ FlatMatrix<Complex> elmat,
807
+ LocalHeap & lh) const{
808
+ throw Exception ("FacetBilinearFormIntegrator::CalcFacetMatrix<Complex> for boundary facets not implemented!");
809
+ }
810
+
811
+ virtual void
812
+ CalcLinearizedFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
813
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
814
+ const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
815
+ FlatVector<double> vec, FlatMatrix<double> elmat,
816
+ LocalHeap & lh) const
817
+ {
818
+ CalcFacetMatrix (volumefel, LocalFacetNr,
819
+ eltrans, ElVertices, seltrans, SElVertices, elmat, lh);
820
+ }
821
+
822
+ virtual void
823
+ CalcLinearizedFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
824
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
825
+ const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
826
+ FlatVector<Complex> vec, FlatMatrix<Complex> elmat,
827
+ LocalHeap & lh) const
828
+ {
829
+ throw Exception ("CalcLinearizedFacetMatrix<Complex> not available");
830
+ }
831
+
832
+
833
+ virtual void
834
+ ApplyFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
835
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
836
+ const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
837
+ FlatVector<double> elx, FlatVector<double> ely,
838
+ LocalHeap & lh) const;
839
+ virtual void
840
+ ApplyFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
841
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
842
+ const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
843
+ FlatVector<Complex> elx, FlatVector<Complex> ely,
844
+ LocalHeap & lh) const;
845
+
846
+
847
+ // calculate traces in integration points
848
+ virtual void
849
+ CalcTraceValues (const FiniteElement & volumefel, int LocalFacetNr,
850
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
851
+ FlatVector<double> & trace, FlatVector<double> elx, LocalHeap & lh) const
852
+ {
853
+ throw Exception ("FacetBilinearFormIntegrator::ApplyFacetMatrix for boundary facets not implemented!");
854
+ }
855
+
856
+ virtual void
857
+ CalcTraceValues (const FiniteElement & volumefel, int LocalFacetNr,
858
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
859
+ FlatVector<Complex> & trace, FlatVector<Complex> elx, LocalHeap & lh) const
860
+ {
861
+ throw Exception ("FacetBilinearFormIntegrator::ApplyFacetMatrix for boundary facets not implemented!");
862
+ }
863
+
864
+ virtual void
865
+ ApplyFromTraceValues (const FiniteElement & volumefel, int LocalFacetNr,
866
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
867
+ FlatVector<double> trace,
868
+ FlatVector<double> elx, FlatVector<double> ely,
869
+ LocalHeap & lh) const
870
+ {
871
+ throw Exception ("FacetBilinearFormIntegrator::ApplyFromTraceValues not implemented!");
872
+ }
873
+
874
+ virtual void
875
+ ApplyFromTraceValues (const FiniteElement & volumefel, int LocalFacetNr,
876
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
877
+ FlatVector<Complex> trace,
878
+ FlatVector<Complex> elx, FlatVector<Complex> ely,
879
+ LocalHeap & lh) const
880
+ {
881
+ throw Exception ("FacetBilinearFormIntegrator::ApplyFromTraceValues not implemented!");
882
+ }
883
+
884
+
885
+
886
+ };
887
+
888
+
889
+
890
+
891
+
892
+ class NGS_DLL_HEADER BlockBilinearFormIntegrator : public BilinearFormIntegrator
893
+ {
894
+ shared_ptr<BilinearFormIntegrator> bfi;
895
+ int dim;
896
+ int comp;
897
+ public:
898
+ BlockBilinearFormIntegrator (shared_ptr<BilinearFormIntegrator> abfi, int adim, int acomp);
899
+ BlockBilinearFormIntegrator (shared_ptr<BilinearFormIntegrator> abfi, int adim);
900
+ virtual ~BlockBilinearFormIntegrator ();
901
+
902
+ virtual VorB VB () const override
903
+ { return bfi->VB(); }
904
+ virtual xbool IsSymmetric () const override { return bfi->IsSymmetric(); }
905
+ virtual int DimFlux () const override
906
+ { return (comp == -1) ? dim * bfi->DimFlux() : bfi->DimFlux(); }
907
+ int GetDim() const { return dim; }
908
+ int GetComp() const { return comp; }
909
+
910
+ const BilinearFormIntegrator & Block () const { return *bfi; }
911
+ shared_ptr<BilinearFormIntegrator> BlockPtr () const { return bfi; }
912
+
913
+ virtual void
914
+ CalcElementMatrix (const FiniteElement & bfel,
915
+ const ElementTransformation & eltrans,
916
+ FlatMatrix<double> elmat,
917
+ LocalHeap & lh) const override;
918
+
919
+ virtual void
920
+ CalcElementMatrix (const FiniteElement & bfel,
921
+ const ElementTransformation & eltrans,
922
+ FlatMatrix<Complex> elmat,
923
+ LocalHeap & lh) const override;
924
+
925
+ virtual void
926
+ ApplyElementMatrix (const FiniteElement & bfel,
927
+ const ElementTransformation & eltrans,
928
+ const FlatVector<double> elx,
929
+ FlatVector<double> ely,
930
+ void * precomputed,
931
+ LocalHeap & lh) const override;
932
+
933
+ virtual void
934
+ ApplyElementMatrix (const FiniteElement & bfel,
935
+ const ElementTransformation & eltrans,
936
+ const FlatVector<Complex> elx,
937
+ FlatVector<Complex> ely,
938
+ void * precomputed,
939
+ LocalHeap & lh) const override;
940
+
941
+ virtual void
942
+ CalcLinearizedElementMatrix (const FiniteElement & bfel,
943
+ const ElementTransformation & eltrans,
944
+ FlatVector<double> elveclin,
945
+ FlatMatrix<double> elmat,
946
+ LocalHeap & lh) const override;
947
+ virtual void
948
+ CalcLinearizedElementMatrix (const FiniteElement & bfel,
949
+ const ElementTransformation & eltrans,
950
+ FlatVector<Complex> elveclin,
951
+ FlatMatrix<Complex> elmat,
952
+ LocalHeap & lh) const override;
953
+
954
+ /*
955
+ virtual void
956
+ CalcFlux (const FiniteElement & fel,
957
+ const ElementTransformation & eltrans,
958
+ const IntegrationPoint & ip,
959
+ FlatVector<double> elx,
960
+ FlatVector<double> flux,
961
+ bool applyd,
962
+ LocalHeap & lh) const;
963
+
964
+ virtual void
965
+ CalcFlux (const FiniteElement & fel,
966
+ const ElementTransformation & eltrans,
967
+ const IntegrationPoint & ip,
968
+ FlatVector<Complex> elx,
969
+ FlatVector<Complex> flux,
970
+ bool applyd,
971
+ LocalHeap & lh) const;
972
+ */
973
+
974
+
975
+ virtual void
976
+ CalcFlux (const FiniteElement & fel,
977
+ const BaseMappedIntegrationPoint & bmip,
978
+ BareSliceVector<double> elx,
979
+ FlatVector<double> flux,
980
+ bool applyd,
981
+ LocalHeap & lh) const override;
982
+
983
+ virtual void
984
+ CalcFlux (const FiniteElement & fel,
985
+ const BaseMappedIntegrationPoint & bmip,
986
+ BareSliceVector<Complex> elx,
987
+ FlatVector<Complex> flux,
988
+ bool applyd,
989
+ LocalHeap & lh) const override;
990
+
991
+ virtual void
992
+ CalcFlux (const FiniteElement & fel,
993
+ const BaseMappedIntegrationRule & mir,
994
+ BareSliceVector<double> elx,
995
+ BareSliceMatrix<double> flux,
996
+ bool applyd,
997
+ LocalHeap & lh) const override;
998
+
999
+
1000
+
1001
+ virtual void
1002
+ ApplyBTrans (const FiniteElement & bfel,
1003
+ const BaseMappedIntegrationPoint & bmip,
1004
+ FlatVector<double> elx,
1005
+ FlatVector<double> ely,
1006
+ LocalHeap & lh) const override;
1007
+
1008
+ virtual void
1009
+ ApplyBTrans (const FiniteElement & bfel,
1010
+ const BaseMappedIntegrationPoint & bmip,
1011
+ FlatVector<Complex> elx,
1012
+ FlatVector<Complex> ely,
1013
+ LocalHeap & lh) const override;
1014
+
1015
+ virtual void
1016
+ ApplyBTrans (const FiniteElement & fel,
1017
+ const BaseMappedIntegrationRule & mir,
1018
+ FlatMatrix<double> elx,
1019
+ FlatVector<double> ely,
1020
+ LocalHeap & lh) const override;
1021
+
1022
+ virtual double Energy (const FiniteElement & fel,
1023
+ const ElementTransformation & eltrans,
1024
+ FlatVector<double> elx,
1025
+ LocalHeap & lh) const override;
1026
+
1027
+ virtual string Name () const override;
1028
+ };
1029
+
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+
1036
+ class NGS_DLL_HEADER ComplexBilinearFormIntegrator : public BilinearFormIntegrator
1037
+ {
1038
+ shared_ptr<BilinearFormIntegrator> bfi;
1039
+ Complex factor;
1040
+ public:
1041
+ ComplexBilinearFormIntegrator (shared_ptr<BilinearFormIntegrator> abfi,
1042
+ Complex afactor);
1043
+
1044
+ virtual VorB VB () const override
1045
+ { return bfi->VB(); }
1046
+
1047
+ virtual int DimFlux () const override
1048
+ { return bfi->DimFlux(); }
1049
+ virtual int DimElement () const override
1050
+ { return bfi->DimElement(); }
1051
+ virtual int DimSpace () const override
1052
+ { return bfi->DimSpace(); }
1053
+ virtual xbool IsSymmetric () const override
1054
+ { return bfi->IsSymmetric(); }
1055
+
1056
+
1057
+ virtual void GetFactor(Complex & fac) const {fac = factor;}
1058
+ virtual void GetFactor(double & fac) const {fac = factor.real();}
1059
+
1060
+ virtual shared_ptr<BilinearFormIntegrator> GetBFI(void) const {return bfi;}
1061
+
1062
+ virtual void CheckElement (const FiniteElement & el) const override { bfi->CheckElement(el); }
1063
+
1064
+
1065
+ virtual void
1066
+ CalcElementMatrix (const FiniteElement & fel,
1067
+ const ElementTransformation & eltrans,
1068
+ FlatMatrix<double> elmat,
1069
+ LocalHeap & lh) const override;
1070
+
1071
+ virtual void
1072
+ CalcElementMatrix (const FiniteElement & fel,
1073
+ const ElementTransformation & eltrans,
1074
+ FlatMatrix<Complex> elmat,
1075
+ LocalHeap & lh) const override;
1076
+
1077
+ virtual void
1078
+ CalcElementMatrixIndependent (const FiniteElement & bfel_master,
1079
+ const FiniteElement & bfel_master_element,
1080
+ const FiniteElement & bfel_other,
1081
+ const ElementTransformation & eltrans_master,
1082
+ const ElementTransformation & eltrans_master_element,
1083
+ const ElementTransformation & eltrans_other,
1084
+ const IntegrationPoint & ip_master,
1085
+ const IntegrationPoint & ip_master_element,
1086
+ const IntegrationPoint & ip_other,
1087
+ FlatMatrix<double> & elmat,
1088
+ LocalHeap & lh) const override;
1089
+
1090
+ virtual void
1091
+ CalcElementMatrixIndependent (const FiniteElement & bfel_master,
1092
+ const FiniteElement & bfel_master_element,
1093
+ const FiniteElement & bfel_other,
1094
+ const ElementTransformation & eltrans_master,
1095
+ const ElementTransformation & eltrans_master_element,
1096
+ const ElementTransformation & eltrans_other,
1097
+ const IntegrationPoint & ip_master,
1098
+ const IntegrationPoint & ip_master_element,
1099
+ const IntegrationPoint & ip_other,
1100
+ FlatMatrix<Complex> & elmat,
1101
+ LocalHeap & lh) const override;
1102
+
1103
+ virtual void
1104
+ CalcElementMatrixIndependent (const FiniteElement & bfel_master,
1105
+ const FiniteElement & bfel_other,
1106
+ const ElementTransformation & eltrans_master,
1107
+ const ElementTransformation & eltrans_other,
1108
+ const IntegrationPoint & ip_master,
1109
+ const IntegrationPoint & ip_other,
1110
+ FlatMatrix<double> & elmat,
1111
+ LocalHeap & lh) const override;
1112
+
1113
+ virtual void
1114
+ CalcElementMatrixIndependent (const FiniteElement & bfel_master,
1115
+ const FiniteElement & bfel_other,
1116
+ const ElementTransformation & eltrans_master,
1117
+ const ElementTransformation & eltrans_other,
1118
+ const IntegrationPoint & ip_master,
1119
+ const IntegrationPoint & ip_other,
1120
+ FlatMatrix<Complex> & elmat,
1121
+ LocalHeap & lh) const override;
1122
+
1123
+
1124
+
1125
+ virtual void
1126
+ ApplyElementMatrix (const FiniteElement & fel,
1127
+ const ElementTransformation & eltrans,
1128
+ const FlatVector<Complex> elx,
1129
+ FlatVector<Complex> ely,
1130
+ void * precomputed,
1131
+ LocalHeap & lh) const override;
1132
+ /*
1133
+ virtual void
1134
+ CalcFlux (const FiniteElement & fel,
1135
+ const ElementTransformation & eltrans,
1136
+ const IntegrationPoint & ip,
1137
+ FlatVector<Complex> elx,
1138
+ FlatVector<Complex> flux,
1139
+ bool applyd,
1140
+ LocalHeap & lh) const;
1141
+ */
1142
+
1143
+ virtual void
1144
+ CalcFlux (const FiniteElement & fel,
1145
+ const BaseMappedIntegrationPoint & bmip,
1146
+ BareSliceVector<Complex> elx,
1147
+ FlatVector<Complex> flux,
1148
+ bool applyd,
1149
+ LocalHeap & lh) const override;
1150
+
1151
+ virtual string Name () const override;
1152
+
1153
+ /*
1154
+ virtual const IntegrationRule & GetIntegrationRule (const FiniteElement & fel,
1155
+ const bool use_higher_integration_order = false) const;
1156
+ */
1157
+ };
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+ class NGS_DLL_HEADER TransposeBilinearFormIntegrator : public BilinearFormIntegrator
1164
+ {
1165
+ shared_ptr<BilinearFormIntegrator> bfi;
1166
+ public:
1167
+ TransposeBilinearFormIntegrator (shared_ptr<BilinearFormIntegrator> abfi)
1168
+ : bfi(abfi) { ; }
1169
+ virtual ~TransposeBilinearFormIntegrator () { ; }
1170
+
1171
+ shared_ptr<BilinearFormIntegrator> GetBFI(void) const {return bfi;}
1172
+
1173
+ virtual VorB VB () const
1174
+ { return bfi->VB(); }
1175
+
1176
+ virtual int DimFlux () const
1177
+ { return bfi->DimFlux(); }
1178
+ virtual int DimElement () const
1179
+ { return bfi->DimElement(); }
1180
+ virtual int DimSpace () const
1181
+ { return bfi->DimSpace(); }
1182
+ virtual xbool IsSymmetric () const
1183
+ { return bfi->IsSymmetric(); }
1184
+
1185
+ virtual void CheckElement (const FiniteElement & el) const
1186
+ {
1187
+ return bfi->CheckElement (el);
1188
+ }
1189
+
1190
+ virtual void
1191
+ CalcElementMatrix (const FiniteElement & bfel,
1192
+ const ElementTransformation & eltrans,
1193
+ FlatMatrix<double> elmat,
1194
+ LocalHeap & lh) const;
1195
+ };
1196
+
1197
+
1198
+
1199
+ class NGS_DLL_HEADER BilinearFormIntegratorAnyDim : public BilinearFormIntegrator
1200
+ {
1201
+ shared_ptr<BilinearFormIntegrator> bfi[4]; // dim 0 ... dim 3
1202
+ shared_ptr<BilinearFormIntegrator> any_dim;
1203
+ public:
1204
+ BilinearFormIntegratorAnyDim (shared_ptr<BilinearFormIntegrator> abfi[4])
1205
+ {
1206
+ for (int i = 0; i < 4; i++)
1207
+ {
1208
+ bfi[i] = abfi[i];
1209
+ if (bfi[i]) any_dim = bfi[i];
1210
+ }
1211
+ }
1212
+
1213
+ shared_ptr<BilinearFormIntegrator> GetBFI(int dim) const
1214
+ {
1215
+ if (!bfi[dim])
1216
+ throw Exception (string("BFI for dimension") + ToString(dim)+"not available");
1217
+ bfi[dim]->SetDefinedOn(definedon);
1218
+ return bfi[dim];
1219
+ }
1220
+
1221
+ virtual VorB VB () const
1222
+ { return any_dim->VB(); }
1223
+
1224
+ virtual int DimFlux () const
1225
+ { throw Exception("BFI AnyDim - DimFlux not available"); }
1226
+ virtual int DimElement () const
1227
+ { throw Exception("BFI AnyDim - DimElement not available"); }
1228
+ virtual int DimSpace () const
1229
+ { throw Exception("BFI AnyDim - DimSpace not available"); }
1230
+ virtual xbool IsSymmetric () const
1231
+ { return any_dim->IsSymmetric(); }
1232
+
1233
+ virtual void CheckElement (const FiniteElement & el) const;
1234
+
1235
+ virtual void
1236
+ CalcElementMatrix (const FiniteElement & bfel,
1237
+ const ElementTransformation & eltrans,
1238
+ FlatMatrix<double> elmat,
1239
+ LocalHeap & lh) const;
1240
+ virtual void
1241
+ CalcElementMatrix (const FiniteElement & bfel,
1242
+ const ElementTransformation & eltrans,
1243
+ FlatMatrix<Complex> elmat,
1244
+ LocalHeap & lh) const;
1245
+ };
1246
+
1247
+
1248
+
1249
+
1250
+
1251
+ class NGS_DLL_HEADER CompoundBilinearFormIntegrator : public BilinearFormIntegrator
1252
+ {
1253
+ shared_ptr<BilinearFormIntegrator> bfi;
1254
+ int comp;
1255
+ public:
1256
+ CompoundBilinearFormIntegrator (shared_ptr<BilinearFormIntegrator> abfi, int acomp);
1257
+
1258
+ shared_ptr<BilinearFormIntegrator> GetBFI(void) const {return bfi;}
1259
+ int GetComponent() const {return comp;}
1260
+ virtual VorB VB () const override
1261
+ { return bfi->VB(); }
1262
+
1263
+ virtual int DimFlux () const override
1264
+ { return bfi->DimFlux(); }
1265
+ virtual int DimElement () const override
1266
+ { return bfi->DimElement(); }
1267
+ virtual int DimSpace () const override
1268
+ { return bfi->DimSpace(); }
1269
+ virtual xbool IsSymmetric () const override
1270
+ { return bfi->IsSymmetric(); }
1271
+ virtual bool SkeletonForm () const override
1272
+ { return bfi->SkeletonForm(); }
1273
+ virtual void CheckElement (const FiniteElement & el) const override
1274
+ {
1275
+ return bfi->CheckElement (dynamic_cast<const CompoundFiniteElement&>(el)[comp]);
1276
+ }
1277
+
1278
+ virtual void
1279
+ CalcElementMatrix (const FiniteElement & bfel,
1280
+ const ElementTransformation & eltrans,
1281
+ FlatMatrix<double> elmat,
1282
+ LocalHeap & lh) const override;
1283
+
1284
+ virtual void
1285
+ CalcElementMatrix (const FiniteElement & bfel,
1286
+ const ElementTransformation & eltrans,
1287
+ FlatMatrix<Complex> elmat,
1288
+ LocalHeap & lh) const override;
1289
+
1290
+
1291
+ virtual void
1292
+ CalcLinearizedElementMatrix (const FiniteElement & fel,
1293
+ const ElementTransformation & eltrans,
1294
+ FlatVector<double> elveclin,
1295
+ FlatMatrix<double> elmat,
1296
+ LocalHeap & lh) const override;
1297
+
1298
+ virtual void
1299
+ CalcLinearizedElementMatrix (const FiniteElement & fel,
1300
+ const ElementTransformation & eltrans,
1301
+ FlatVector<Complex> elveclin,
1302
+ FlatMatrix<Complex> elmat,
1303
+ LocalHeap & lh) const override;
1304
+
1305
+ virtual void
1306
+ ApplyElementMatrix (const FiniteElement & bfel,
1307
+ const ElementTransformation & eltrans,
1308
+ FlatVector<double> elx,
1309
+ FlatVector<double> ely,
1310
+ void * precomputed,
1311
+ LocalHeap & lh) const override;
1312
+
1313
+ virtual void
1314
+ ApplyElementMatrix (const FiniteElement & bfel,
1315
+ const ElementTransformation & eltrans,
1316
+ FlatVector<Complex> elx,
1317
+ FlatVector<Complex> ely,
1318
+ void * precomputed,
1319
+ LocalHeap & lh) const override;
1320
+
1321
+ virtual void
1322
+ ApplyLinearizedElementMatrix (const FiniteElement & bfel,
1323
+ const ElementTransformation & eltrans,
1324
+ FlatVector<double> ellin,
1325
+ FlatVector<double> elx,
1326
+ FlatVector<double> ely,
1327
+ LocalHeap & lh) const override;
1328
+
1329
+ virtual void
1330
+ ApplyLinearizedElementMatrix (const FiniteElement & bfel,
1331
+ const ElementTransformation & eltrans,
1332
+ FlatVector<Complex> ellin,
1333
+ FlatVector<Complex> elx,
1334
+ FlatVector<Complex> ely,
1335
+ LocalHeap & lh) const override;
1336
+
1337
+
1338
+ virtual void
1339
+ CalcFlux (const FiniteElement & fel,
1340
+ const BaseMappedIntegrationPoint & bmip,
1341
+ BareSliceVector<double> elx,
1342
+ FlatVector<double> flux,
1343
+ bool applyd,
1344
+ LocalHeap & lh) const override;
1345
+
1346
+
1347
+ virtual void
1348
+ CalcFlux (const FiniteElement & fel,
1349
+ const BaseMappedIntegrationPoint & bmip,
1350
+ BareSliceVector<Complex> elx,
1351
+ FlatVector<Complex> flux,
1352
+ bool applyd,
1353
+ LocalHeap & lh) const override;
1354
+
1355
+
1356
+ virtual void
1357
+ CalcFlux (const FiniteElement & fel,
1358
+ const BaseMappedIntegrationRule & mir,
1359
+ BareSliceVector<double> elx,
1360
+ BareSliceMatrix<double> flux,
1361
+ bool applyd,
1362
+ LocalHeap & lh) const override;
1363
+
1364
+
1365
+ virtual void
1366
+ CalcFlux (const FiniteElement & fel,
1367
+ const BaseMappedIntegrationRule & mir,
1368
+ BareSliceVector<Complex> elx,
1369
+ BareSliceMatrix<Complex> flux,
1370
+ bool applyd,
1371
+ LocalHeap & lh) const override;
1372
+
1373
+
1374
+ virtual void
1375
+ ApplyBTrans (const FiniteElement & fel,
1376
+ const BaseMappedIntegrationPoint & bmip,
1377
+ FlatVector<double> elx,
1378
+ FlatVector<double> ely,
1379
+ LocalHeap & lh) const override;
1380
+
1381
+ virtual void
1382
+ ApplyBTrans (const FiniteElement & fel,
1383
+ const BaseMappedIntegrationPoint & bmip,
1384
+ FlatVector<Complex> elx,
1385
+ FlatVector<Complex> ely,
1386
+ LocalHeap & lh) const override;
1387
+
1388
+ virtual string Name () const override;
1389
+ };
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+
1397
+
1398
+
1399
+ /**
1400
+ Integrator for element vector.
1401
+ */
1402
+ class NGS_DLL_HEADER LinearFormIntegrator : public Integrator
1403
+
1404
+ {
1405
+ public:
1406
+ ///
1407
+ LinearFormIntegrator () { ; }
1408
+ ///
1409
+ virtual ~LinearFormIntegrator () { ; }
1410
+
1411
+
1412
+ /**
1413
+ Computes the element vector.
1414
+ */
1415
+ virtual void
1416
+ CalcElementVector (const FiniteElement & fel,
1417
+ const ElementTransformation & eltrans,
1418
+ FlatVector<double> elvec,
1419
+ LocalHeap & lh) const;
1420
+
1421
+ virtual void
1422
+ CalcElementVector (const FiniteElement & fel,
1423
+ const ElementTransformation & eltrans,
1424
+ FlatVector<Complex> elvec,
1425
+ LocalHeap & lh) const;
1426
+
1427
+
1428
+ virtual void
1429
+ CalcElementVectorIndependent (const FiniteElement & gfel,
1430
+ const BaseMappedIntegrationPoint & s_mip,
1431
+ const BaseMappedIntegrationPoint & g_mip,
1432
+ FlatVector<double> & elvec,
1433
+ LocalHeap & lh,
1434
+ const bool curveint = false) const
1435
+ {
1436
+ cerr << "CalcElementVectorIndependent called for base-class!" << endl;
1437
+ exit(10);
1438
+ }
1439
+
1440
+ virtual void
1441
+ CalcElementVectorIndependent (const FiniteElement & gfel,
1442
+ const BaseMappedIntegrationPoint & s_mip,
1443
+ const BaseMappedIntegrationPoint & g_mip,
1444
+ FlatVector<Complex> & elvec,
1445
+ LocalHeap & lh,
1446
+ const bool curveint = false) const
1447
+ {
1448
+ FlatVector<double> rvec(elvec.Size(), lh);
1449
+ CalcElementVectorIndependent (gfel, s_mip, g_mip, rvec, lh,curveint);
1450
+ elvec = rvec;
1451
+ }
1452
+
1453
+
1454
+ };
1455
+
1456
+
1457
+
1458
+
1459
+
1460
+
1461
+
1462
+
1463
+
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+
1470
+ class NGS_DLL_HEADER FacetLinearFormIntegrator : public LinearFormIntegrator
1471
+ {
1472
+ public:
1473
+
1474
+ FacetLinearFormIntegrator( /* const Array<shared_ptr<CoefficientFunction>> & coeffs */)
1475
+ : LinearFormIntegrator() { ; }
1476
+
1477
+ ~FacetLinearFormIntegrator() { ; }
1478
+
1479
+ virtual VorB VB () const
1480
+ { return BND; }
1481
+
1482
+ virtual bool SkeletonForm () const
1483
+ { return 1; }
1484
+
1485
+ virtual void
1486
+ CalcElementVector (const FiniteElement & bfel,
1487
+ const ElementTransformation & eltrans,
1488
+ FlatVector<double> elvec,
1489
+ LocalHeap & lh) const{
1490
+ throw Exception ("FacetLinearFormIntegrator can not assemble volumetric element matrices!");
1491
+ }
1492
+
1493
+ virtual void
1494
+ CalcFacetVector (const FiniteElement & volumefel1, int LocalFacetNr1,
1495
+ const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
1496
+ const FiniteElement & volumefel2, int LocalFacetNr2,
1497
+ const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
1498
+ FlatVector<double> elvec,
1499
+ LocalHeap & lh) const{
1500
+ throw Exception ("FacetLinearFormIntegrator::CalcFacetVector for inner facets not implemented!");
1501
+ }
1502
+
1503
+ virtual void
1504
+ CalcFacetVector (const FiniteElement & volumefel1, int LocalFacetNr1,
1505
+ const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
1506
+ const FiniteElement & volumefel2, int LocalFacetNr2,
1507
+ const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
1508
+ FlatVector<Complex> elvec,
1509
+ LocalHeap & lh) const{
1510
+ throw Exception ("FacetLinearFormIntegrator::CalcFacetVector<Complex> for inner facets not implemented!");
1511
+ }
1512
+
1513
+ virtual void
1514
+ CalcFacetVector (const FiniteElement & volumefel, int LocalFacetNr,
1515
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
1516
+ const ElementTransformation & seltrans,
1517
+ FlatVector<double> elvec,
1518
+ LocalHeap & lh) const{
1519
+ throw Exception ("FacetLinearFormIntegrator::CalcFacetVector not implemented!");
1520
+ }
1521
+
1522
+ virtual void
1523
+ CalcFacetVector (const FiniteElement & volumefel, int LocalFacetNr,
1524
+ const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
1525
+ const ElementTransformation & seltrans,
1526
+ FlatVector<Complex> elvec,
1527
+ LocalHeap & lh) const {
1528
+ throw Exception ("FacetLinearFormIntegrator::CalcFacetVector<complex> not implemented!");
1529
+ }
1530
+
1531
+ };
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+ class NGS_DLL_HEADER BlockLinearFormIntegrator : public LinearFormIntegrator
1538
+ {
1539
+ shared_ptr<LinearFormIntegrator> lfi;
1540
+ int dim;
1541
+ int comp;
1542
+ public:
1543
+ BlockLinearFormIntegrator (shared_ptr<LinearFormIntegrator> alfi, int adim, int acomp);
1544
+
1545
+ virtual VorB VB () const
1546
+ { return lfi->VB(); }
1547
+
1548
+
1549
+ virtual void
1550
+ CalcElementVector (const FiniteElement & bfel,
1551
+ const ElementTransformation & eltrans,
1552
+ FlatVector<double> elvec,
1553
+ LocalHeap & lh) const;
1554
+ };
1555
+
1556
+
1557
+
1558
+
1559
+
1560
+ class NGS_DLL_HEADER ComplexLinearFormIntegrator : public LinearFormIntegrator
1561
+ {
1562
+ shared_ptr<LinearFormIntegrator> lfi;
1563
+ Complex factor;
1564
+ public:
1565
+ ComplexLinearFormIntegrator (shared_ptr<LinearFormIntegrator> alfi,
1566
+ Complex afactor);
1567
+ virtual ~ComplexLinearFormIntegrator();
1568
+
1569
+ virtual VorB VB () const override;
1570
+ virtual void CheckElement (const FiniteElement & el) const override;
1571
+
1572
+
1573
+ virtual void
1574
+ CalcElementVector (const FiniteElement & fel,
1575
+ const ElementTransformation & eltrans,
1576
+ FlatVector<double> elvec,
1577
+ LocalHeap & lh) const override;
1578
+
1579
+ virtual void
1580
+ CalcElementVector (const FiniteElement & fel,
1581
+ const ElementTransformation & eltrans,
1582
+ FlatVector<Complex> elvec,
1583
+ LocalHeap & lh) const override;
1584
+
1585
+ virtual void
1586
+ CalcElementVectorIndependent (const FiniteElement & gfel,
1587
+ const BaseMappedIntegrationPoint & s_mip,
1588
+ const BaseMappedIntegrationPoint & g_mip,
1589
+ FlatVector<double> & elvec,
1590
+ LocalHeap & lh,
1591
+ const bool curveint = false) const override;
1592
+
1593
+
1594
+ virtual void
1595
+ CalcElementVectorIndependent (const FiniteElement & gfel,
1596
+ const BaseMappedIntegrationPoint & s_mip,
1597
+ const BaseMappedIntegrationPoint & g_mip,
1598
+ FlatVector<Complex> & elvec,
1599
+ LocalHeap & lh,
1600
+ const bool curveint = false) const override;
1601
+
1602
+ virtual string Name () const override;
1603
+ };
1604
+
1605
+
1606
+
1607
+
1608
+ class NGS_DLL_HEADER CompoundLinearFormIntegrator : public LinearFormIntegrator
1609
+ {
1610
+ shared_ptr<LinearFormIntegrator> lfi;
1611
+ int comp;
1612
+ public:
1613
+ CompoundLinearFormIntegrator (shared_ptr<LinearFormIntegrator> alfi, int acomp)
1614
+ : lfi(alfi), comp(acomp)
1615
+ {
1616
+ is_curve_integrator = lfi->IntegrationAlongCurve();
1617
+ }
1618
+
1619
+ VorB VB () const override
1620
+ { return lfi->VB(); }
1621
+
1622
+ void
1623
+ CalcElementVector (const FiniteElement & bfel,
1624
+ const ElementTransformation & eltrans,
1625
+ FlatVector<double> elvec,
1626
+ LocalHeap & lh) const override;
1627
+
1628
+ void
1629
+ CalcElementVector (const FiniteElement & bfel,
1630
+ const ElementTransformation & eltrans,
1631
+ FlatVector<Complex> elvec,
1632
+ LocalHeap & lh) const override;
1633
+
1634
+ void
1635
+ CalcElementVectorIndependent (const FiniteElement & gfel,
1636
+ const BaseMappedIntegrationPoint & s_mip,
1637
+ const BaseMappedIntegrationPoint & g_mip,
1638
+ FlatVector<double> & elvec,
1639
+ LocalHeap & lh,
1640
+ const bool curveint = false) const override;
1641
+
1642
+ void
1643
+ CalcElementVectorIndependent (const FiniteElement & gfel,
1644
+ const BaseMappedIntegrationPoint & s_mip,
1645
+ const BaseMappedIntegrationPoint & g_mip,
1646
+ FlatVector<Complex> & elvec,
1647
+ LocalHeap & lh,
1648
+ const bool curveint = false) const override;
1649
+
1650
+ string Name () const override
1651
+ {
1652
+ return string ("CompoundIntegrator (") + lfi->Name() + ")";
1653
+ }
1654
+
1655
+ int NumCurvePoints() const override { return lfi->NumCurvePoints(); }
1656
+ FlatVector<double> CurvePoint(int i) override
1657
+ { return lfi->CurvePoint(i); }
1658
+ FlatVector<double> CurvePointTangent(int i) override
1659
+ { return lfi->CurvePointTangent(i); }
1660
+ int GetNumCurveParts() const override
1661
+ { return lfi->GetNumCurveParts(); }
1662
+ int GetStartOfCurve(int i) const override
1663
+ { return lfi->GetStartOfCurve(i); }
1664
+ int GetEndOfCurve(int i) const override
1665
+ { return lfi->GetEndOfCurve(i); }
1666
+
1667
+ void AppendCurvePoint(const FlatVector<double> & point) override
1668
+ { lfi->AppendCurvePoint(point); }
1669
+ void AppendCurvePoint(const FlatVector<double> & point,
1670
+ const FlatVector<double> & tangent) override
1671
+ { lfi->AppendCurvePoint(point, tangent); }
1672
+ void SetCurveClearance() override
1673
+ { lfi->SetCurveClearance(); }
1674
+ void SetCacheComp(const int comp) override
1675
+ { cachecomp = comp; }
1676
+ int CacheComp() const override
1677
+ { return lfi->CacheComp(); }
1678
+
1679
+ };
1680
+
1681
+
1682
+
1683
+
1684
+
1685
+ class NGS_DLL_HEADER LinearFormIntegratorAnyDim : public LinearFormIntegrator
1686
+ {
1687
+ shared_ptr<LinearFormIntegrator> lfi[4]; // dim 0 ... dim 3
1688
+ shared_ptr<LinearFormIntegrator> any_dim;
1689
+ public:
1690
+ LinearFormIntegratorAnyDim (shared_ptr<LinearFormIntegrator> alfi[4])
1691
+ {
1692
+ for (int i = 0; i < 4; i++)
1693
+ {
1694
+ lfi[i] = alfi[i];
1695
+ if (lfi[i]) any_dim = lfi[i];
1696
+ }
1697
+ }
1698
+
1699
+ shared_ptr<LinearFormIntegrator> GetLFI(int dim) const
1700
+ {
1701
+ if (!lfi[dim])
1702
+ throw Exception (string("LFI for dimension") + ToString(dim)+"not available");
1703
+ lfi[dim]->SetDefinedOn(definedon);
1704
+ return lfi[dim];
1705
+ }
1706
+
1707
+ virtual VorB VB () const
1708
+ { return any_dim->VB(); }
1709
+ virtual int DimElement () const
1710
+ { throw Exception("BFI AnyDim - DimElement not available"); }
1711
+ virtual int DimSpace () const
1712
+ { throw Exception("BFI AnyDim - DimSpace not available"); }
1713
+
1714
+ virtual void CheckElement (const FiniteElement & el) const;
1715
+
1716
+ virtual void
1717
+ CalcElementVector (const FiniteElement & bfel,
1718
+ const ElementTransformation & eltrans,
1719
+ FlatVector<double> elvec,
1720
+ LocalHeap & lh) const;
1721
+
1722
+ virtual void
1723
+ CalcElementVector (const FiniteElement & bfel,
1724
+ const ElementTransformation & eltrans,
1725
+ FlatVector<Complex> elvec,
1726
+ LocalHeap & lh) const;
1727
+ };
1728
+
1729
+
1730
+ class CalcFluxDifferentialOperator : public DifferentialOperator
1731
+ {
1732
+ shared_ptr<BilinearFormIntegrator> bfi;
1733
+ bool applyd;
1734
+ public:
1735
+ CalcFluxDifferentialOperator (shared_ptr<BilinearFormIntegrator> _bfi, bool _applyd)
1736
+ : DifferentialOperator(_bfi->DimFlux(), 1, _bfi->VB(), 0), bfi(_bfi)
1737
+ { ; }
1738
+
1739
+ virtual shared_ptr<DifferentialOperator> GetTrace() const override { return nullptr; }
1740
+
1741
+
1742
+ virtual void
1743
+ CalcMatrix (const FiniteElement & fel,
1744
+ const BaseMappedIntegrationPoint & mip,
1745
+ BareSliceMatrix<double,ColMajor> mat,
1746
+ LocalHeap & lh) const override
1747
+ {
1748
+ throw Exception ("CalcFluxDifferentialOperator::CalcMatrix not available");
1749
+ }
1750
+
1751
+ virtual void
1752
+ CalcMatrix (const FiniteElement & fel,
1753
+ const BaseMappedIntegrationPoint & bmip,
1754
+ BareSliceMatrix<Complex,ColMajor> mat,
1755
+ LocalHeap & lh) const override
1756
+ {
1757
+ throw Exception ("CalcFluxDifferentialOperator::CalcMatrix not available");
1758
+ }
1759
+
1760
+ virtual void
1761
+ CalcMatrix (const FiniteElement & fel,
1762
+ const BaseMappedIntegrationRule & mir,
1763
+ BareSliceMatrix<double,ColMajor> mat,
1764
+ LocalHeap & lh) const override
1765
+ {
1766
+ throw Exception ("CalcFluxDifferentialOperator::CalcMatrix not available");
1767
+ }
1768
+
1769
+ NGS_DLL_HEADER virtual void
1770
+ CalcMatrix (const FiniteElement & fel,
1771
+ const BaseMappedIntegrationRule & mir,
1772
+ BareSliceMatrix<Complex,ColMajor> mat,
1773
+ LocalHeap & lh) const override
1774
+ {
1775
+ throw Exception ("CalcFluxDifferentialOperator::CalcMatrix not available");
1776
+ }
1777
+
1778
+
1779
+ NGS_DLL_HEADER virtual void
1780
+ CalcMatrix (const FiniteElement & fel,
1781
+ const SIMD_BaseMappedIntegrationRule & mir,
1782
+ BareSliceMatrix<SIMD<double>> mat) const override
1783
+ {
1784
+ throw Exception ("CalcFluxDifferentialOperator::CalcMatrix not available");
1785
+ }
1786
+
1787
+ using DifferentialOperator::Apply;
1788
+ virtual void
1789
+ Apply (const FiniteElement & fel,
1790
+ const BaseMappedIntegrationPoint & mip,
1791
+ BareSliceVector<double> x,
1792
+ FlatVector<double> flux,
1793
+ LocalHeap & lh) const override
1794
+ {
1795
+ bfi->CalcFlux(fel, mip, x, flux, applyd, lh);
1796
+ }
1797
+
1798
+ NGS_DLL_HEADER virtual void
1799
+ Apply (const FiniteElement & fel,
1800
+ const BaseMappedIntegrationPoint & mip,
1801
+ BareSliceVector<Complex> x,
1802
+ FlatVector<Complex> flux,
1803
+ LocalHeap & lh) const override
1804
+ {
1805
+ bfi->CalcFlux(fel, mip, x, flux, applyd, lh);
1806
+ }
1807
+
1808
+ NGS_DLL_HEADER virtual void
1809
+ Apply (const FiniteElement & fel,
1810
+ const BaseMappedIntegrationRule & mir,
1811
+ BareSliceVector<double> x,
1812
+ BareSliceMatrix<double> flux,
1813
+ LocalHeap & lh) const override
1814
+ {
1815
+ bfi->CalcFlux(fel, mir, x, flux, applyd, lh);
1816
+ }
1817
+
1818
+ NGS_DLL_HEADER virtual void
1819
+ Apply (const FiniteElement & fel,
1820
+ const BaseMappedIntegrationRule & mir,
1821
+ BareSliceVector<Complex> x,
1822
+ BareSliceMatrix<Complex> flux,
1823
+ LocalHeap & lh) const override
1824
+ {
1825
+ bfi->CalcFlux(fel, mir, x, flux, applyd, lh);
1826
+ }
1827
+
1828
+
1829
+ NGS_DLL_HEADER virtual void
1830
+ Apply (const FiniteElement & fel,
1831
+ const SIMD_BaseMappedIntegrationRule & mir,
1832
+ BareSliceVector<double> x,
1833
+ BareSliceMatrix<SIMD<double>> flux) const override
1834
+ {
1835
+ // bfi->CalcFlux(fel, mir, x, flux, applyd);
1836
+ throw ExceptionNOSIMD (string("CalcFluxDiffop: simd is not supported"));
1837
+ }
1838
+
1839
+ NGS_DLL_HEADER virtual void
1840
+ Apply (const FiniteElement & fel,
1841
+ const SIMD_BaseMappedIntegrationRule & mir,
1842
+ BareSliceVector<Complex> x,
1843
+ BareSliceMatrix<SIMD<Complex>> flux) const override
1844
+ {
1845
+ // bfi->CalcFlux(fel, mir, x, flux, applyd);
1846
+ throw ExceptionNOSIMD (string("CalcFluxDiffop: simd is not supported"));
1847
+ }
1848
+
1849
+ };
1850
+
1851
+
1852
+ /// container for all integrators
1853
+ class NGS_DLL_HEADER Integrators
1854
+ {
1855
+ public:
1856
+
1857
+ /// description of integrator
1858
+ template<typename T>
1859
+ class IntegratorInfo
1860
+ {
1861
+ public:
1862
+ string name;
1863
+ int spacedim;
1864
+ int numcoeffs;
1865
+ shared_ptr<T> (*creator)(const Array<shared_ptr<CoefficientFunction>> &);
1866
+
1867
+ IntegratorInfo (const string & aname,
1868
+ int aspacedim,
1869
+ int anumcoffs,
1870
+ shared_ptr<T> (*acreator)(const Array<shared_ptr<CoefficientFunction>> &));
1871
+ };
1872
+
1873
+
1874
+ Array<IntegratorInfo<BilinearFormIntegrator>*> bfis;
1875
+ Array<IntegratorInfo<LinearFormIntegrator>*> lfis;
1876
+
1877
+ public:
1878
+ ///
1879
+ Integrators();
1880
+ ///
1881
+ ~Integrators();
1882
+ ///
1883
+ void AddBFIntegrator (const string & aname, int aspacedim, int anumcoeffs,
1884
+ shared_ptr<BilinearFormIntegrator> (*acreator)(const Array<shared_ptr<CoefficientFunction>> &));
1885
+ ///
1886
+ void AddLFIntegrator (const string & aname, int aspacedim, int anumcoeffs,
1887
+ shared_ptr<LinearFormIntegrator> (*acreator)(const Array<shared_ptr<CoefficientFunction>> &));
1888
+
1889
+ ///
1890
+ const Array<IntegratorInfo<BilinearFormIntegrator>*> & GetBFIs() const { return bfis; }
1891
+ ///
1892
+ const IntegratorInfo<BilinearFormIntegrator> * GetBFI(const string & name, int dim) const;
1893
+ ///
1894
+ shared_ptr<BilinearFormIntegrator> CreateBFI(const string & name, int dim,
1895
+ const Array<shared_ptr<CoefficientFunction>> & coeffs) const;
1896
+ ///
1897
+ shared_ptr<BilinearFormIntegrator> CreateBFI(const string & name, int dim,
1898
+ shared_ptr<CoefficientFunction> coef) const;
1899
+ shared_ptr<BilinearFormIntegrator> CreateBFI(const string & name, int dim,
1900
+ const CoefficientFunction* coef) const;
1901
+
1902
+ ///
1903
+ const Array<IntegratorInfo<LinearFormIntegrator>*> & GetLFIs() const { return lfis; }
1904
+ ///
1905
+ const IntegratorInfo<LinearFormIntegrator> * GetLFI(const string & name, int dim) const;
1906
+ ///
1907
+ shared_ptr<LinearFormIntegrator> CreateLFI(const string & name, int dim,
1908
+ const Array<shared_ptr<CoefficientFunction>> & coeffs) const;
1909
+
1910
+ shared_ptr<LinearFormIntegrator> CreateLFI(const string & name, int dim,
1911
+ shared_ptr<CoefficientFunction> coef) const;
1912
+
1913
+ ///
1914
+ void Print (ostream & ost) const;
1915
+ };
1916
+
1917
+ ///
1918
+ extern NGS_DLL_HEADER Integrators & GetIntegrators ();
1919
+
1920
+ template <typename ... ARGS>
1921
+ inline shared_ptr<BilinearFormIntegrator> CreateBFI (ARGS ... args)
1922
+ {
1923
+ return GetIntegrators().CreateBFI (args...);
1924
+ }
1925
+
1926
+ template <typename ... ARGS>
1927
+ inline shared_ptr<LinearFormIntegrator> CreateLFI (ARGS ... args)
1928
+ {
1929
+ return GetIntegrators().CreateLFI (args...);
1930
+ }
1931
+
1932
+ /*
1933
+ class ConvertCoefs
1934
+ {
1935
+ Array<shared_ptr<CoefficientFunction> > coefs;
1936
+ Array<CoefficientFunction*> pcoefs;
1937
+ public:
1938
+
1939
+ ConvertCoefs (const Array<shared_ptr<CoefficientFunction>> & acoefs)
1940
+ : coefs (acoefs) // explicit copy !
1941
+ {
1942
+ for (int i = 0; i < acoefs.Size(); i++)
1943
+ pcoefs.Append (acoefs[i].get());
1944
+ }
1945
+
1946
+ ConvertCoefs (const Array<CoefficientFunction*> & acoefs)
1947
+ : pcoefs(acoefs)
1948
+ {
1949
+ for (int i = 0; i < acoefs.Size(); i++)
1950
+ coefs.Append (shared_ptr<CoefficientFunction> (acoefs[i], NOOP_Deleter));
1951
+ }
1952
+
1953
+ operator Array<shared_ptr<CoefficientFunction>> () const
1954
+ {
1955
+ return Array<shared_ptr<CoefficientFunction>> (coefs);
1956
+ }
1957
+
1958
+ operator Array<CoefficientFunction*> () const
1959
+ {
1960
+ return Array<CoefficientFunction*> (pcoefs);
1961
+ }
1962
+ };
1963
+ */
1964
+
1965
+ template <typename BFI>
1966
+ class RegisterBilinearFormIntegrator
1967
+ {
1968
+ public:
1969
+ RegisterBilinearFormIntegrator (string label, int dim, int numcoeffs)
1970
+ {
1971
+ GetIntegrators().AddBFIntegrator (label, dim, numcoeffs, Create);
1972
+ // cout << "register bf-integrator '" << label << "'" << endl;
1973
+ }
1974
+
1975
+ static shared_ptr<BilinearFormIntegrator> Create (const Array<shared_ptr<CoefficientFunction>> & coefs)
1976
+ {
1977
+ // return shared_ptr<BilinearFormIntegrator> (new BFI (ConvertCoefs (coefs)));
1978
+ // return make_shared<BFI>(ConvertCoefs (coefs));
1979
+ return make_shared<BFI>(coefs);
1980
+ }
1981
+
1982
+ // static shared_ptr<Integrator> Create (Array<CoefficientFunction*> & coefs)
1983
+ // {
1984
+ // return new BFI (ConvertCoefs (coefs));
1985
+ // }
1986
+ };
1987
+
1988
+
1989
+
1990
+ template <typename LFI>
1991
+ class RegisterLinearFormIntegrator
1992
+ {
1993
+ public:
1994
+ RegisterLinearFormIntegrator (string label, int dim, int numcoeffs)
1995
+ {
1996
+ GetIntegrators().AddLFIntegrator (label, dim, numcoeffs, Create);
1997
+ // cout << "register lf-integrator '" << label << "'" << endl;
1998
+ }
1999
+
2000
+ static shared_ptr<LinearFormIntegrator> Create (const Array<shared_ptr<CoefficientFunction>> & coefs)
2001
+ {
2002
+ // return shared_ptr<LinearFormIntegrator> (new LFI (ConvertCoefs(coefs)));
2003
+ return make_shared<LFI> (coefs);
2004
+ // return new LFI (coefs);
2005
+ }
2006
+ };
2007
+
2008
+
2009
+
2010
+
2011
+ }
2012
+ #endif