ngsolve 6.2.2501.post16.dev1__cp313-cp313-macosx_10_15_universal2.whl → 6.2.2501.post34.dev1__cp313-cp313-macosx_10_15_universal2.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (286) hide show
  1. ngsolve/webgui.py +1 -1
  2. {ngsolve-6.2.2501.post16.dev1.dist-info → ngsolve-6.2.2501.post34.dev1.dist-info}/METADATA +2 -2
  3. ngsolve-6.2.2501.post34.dev1.dist-info/RECORD +25 -0
  4. netgen/include/arnoldi.hpp +0 -55
  5. netgen/include/bandmatrix.hpp +0 -334
  6. netgen/include/basematrix.hpp +0 -957
  7. netgen/include/basevector.hpp +0 -1268
  8. netgen/include/bdbequations.hpp +0 -2752
  9. netgen/include/bdbintegrator.hpp +0 -1659
  10. netgen/include/bessel.hpp +0 -1064
  11. netgen/include/bilinearform.hpp +0 -963
  12. netgen/include/bla.hpp +0 -29
  13. netgen/include/blockalloc.hpp +0 -95
  14. netgen/include/blockjacobi.hpp +0 -316
  15. netgen/include/bspline.hpp +0 -114
  16. netgen/include/calcinverse.hpp +0 -141
  17. netgen/include/cg.hpp +0 -368
  18. netgen/include/chebyshev.hpp +0 -44
  19. netgen/include/cholesky.hpp +0 -720
  20. netgen/include/clapack.h +0 -7254
  21. netgen/include/code_generation.hpp +0 -296
  22. netgen/include/coefficient.hpp +0 -2006
  23. netgen/include/coefficient_impl.hpp +0 -18
  24. netgen/include/coefficient_stdmath.hpp +0 -157
  25. netgen/include/commutingAMG.hpp +0 -106
  26. netgen/include/comp.hpp +0 -79
  27. netgen/include/compatibility.hpp +0 -41
  28. netgen/include/complex_wrapper.hpp +0 -73
  29. netgen/include/compressedfespace.hpp +0 -110
  30. netgen/include/contact.hpp +0 -231
  31. netgen/include/diagonalmatrix.hpp +0 -154
  32. netgen/include/differentialoperator.hpp +0 -276
  33. netgen/include/diffop.hpp +0 -1286
  34. netgen/include/diffop_impl.hpp +0 -326
  35. netgen/include/discontinuous.hpp +0 -84
  36. netgen/include/dump.hpp +0 -949
  37. netgen/include/eigen.hpp +0 -60
  38. netgen/include/eigensystem.hpp +0 -18
  39. netgen/include/elasticity_equations.hpp +0 -595
  40. netgen/include/elementbyelement.hpp +0 -195
  41. netgen/include/elementtopology.hpp +0 -1760
  42. netgen/include/elementtransformation.hpp +0 -339
  43. netgen/include/evalfunc.hpp +0 -405
  44. netgen/include/expr.hpp +0 -1655
  45. netgen/include/facetfe.hpp +0 -175
  46. netgen/include/facetfespace.hpp +0 -178
  47. netgen/include/facethofe.hpp +0 -111
  48. netgen/include/facetsurffespace.hpp +0 -112
  49. netgen/include/fe_interfaces.hpp +0 -32
  50. netgen/include/fem.hpp +0 -87
  51. netgen/include/fesconvert.hpp +0 -14
  52. netgen/include/fespace.hpp +0 -1445
  53. netgen/include/finiteelement.hpp +0 -286
  54. netgen/include/globalinterfacespace.hpp +0 -77
  55. netgen/include/globalspace.hpp +0 -115
  56. netgen/include/gridfunction.hpp +0 -525
  57. netgen/include/h1amg.hpp +0 -41
  58. netgen/include/h1hofe.hpp +0 -188
  59. netgen/include/h1hofe_impl.hpp +0 -1262
  60. netgen/include/h1hofefo.hpp +0 -148
  61. netgen/include/h1hofefo_impl.hpp +0 -185
  62. netgen/include/h1hofespace.hpp +0 -167
  63. netgen/include/h1lofe.hpp +0 -1237
  64. netgen/include/h1lumping.hpp +0 -35
  65. netgen/include/hcurl_equations.hpp +0 -1352
  66. netgen/include/hcurlcurlfe.hpp +0 -2221
  67. netgen/include/hcurlcurlfespace.hpp +0 -78
  68. netgen/include/hcurlfe.hpp +0 -259
  69. netgen/include/hcurlfe_utils.hpp +0 -107
  70. netgen/include/hcurlhdiv_dshape.hpp +0 -857
  71. netgen/include/hcurlhdivfes.hpp +0 -308
  72. netgen/include/hcurlhofe.hpp +0 -175
  73. netgen/include/hcurlhofe_impl.hpp +0 -1871
  74. netgen/include/hcurlhofespace.hpp +0 -193
  75. netgen/include/hcurllofe.hpp +0 -1146
  76. netgen/include/hdiv_equations.hpp +0 -865
  77. netgen/include/hdivdivfe.hpp +0 -2923
  78. netgen/include/hdivdivsurfacespace.hpp +0 -76
  79. netgen/include/hdivfe.hpp +0 -206
  80. netgen/include/hdivfe_utils.hpp +0 -716
  81. netgen/include/hdivfes.hpp +0 -75
  82. netgen/include/hdivhofe.hpp +0 -447
  83. netgen/include/hdivhofe_impl.hpp +0 -1107
  84. netgen/include/hdivhofefo.hpp +0 -229
  85. netgen/include/hdivhofespace.hpp +0 -175
  86. netgen/include/hdivhosurfacefespace.hpp +0 -106
  87. netgen/include/hdivlofe.hpp +0 -773
  88. netgen/include/hidden.hpp +0 -74
  89. netgen/include/householder.hpp +0 -181
  90. netgen/include/hypre_ams_precond.hpp +0 -123
  91. netgen/include/hypre_precond.hpp +0 -73
  92. netgen/include/integrator.hpp +0 -2024
  93. netgen/include/integratorcf.hpp +0 -253
  94. netgen/include/interpolate.hpp +0 -49
  95. netgen/include/intrule.hpp +0 -2541
  96. netgen/include/irspace.hpp +0 -49
  97. netgen/include/jacobi.hpp +0 -136
  98. netgen/include/l2hofe.hpp +0 -193
  99. netgen/include/l2hofe_impl.hpp +0 -564
  100. netgen/include/l2hofefo.hpp +0 -542
  101. netgen/include/l2hofespace.hpp +0 -344
  102. netgen/include/la.hpp +0 -38
  103. netgen/include/linearform.hpp +0 -266
  104. netgen/include/matrix.hpp +0 -2140
  105. netgen/include/memusage.hpp +0 -41
  106. netgen/include/meshaccess.hpp +0 -1358
  107. netgen/include/mgpre.hpp +0 -204
  108. netgen/include/mptools.hpp +0 -2145
  109. netgen/include/multigrid.hpp +0 -42
  110. netgen/include/multivector.hpp +0 -447
  111. netgen/include/mumpsinverse.hpp +0 -187
  112. netgen/include/mycomplex.hpp +0 -361
  113. netgen/include/ng_lapack.hpp +0 -1661
  114. netgen/include/ngblas.hpp +0 -1099
  115. netgen/include/ngs_defines.hpp +0 -30
  116. netgen/include/ngs_stdcpp_include.hpp +0 -106
  117. netgen/include/ngs_utils.hpp +0 -121
  118. netgen/include/ngsobject.hpp +0 -1019
  119. netgen/include/ngsstream.hpp +0 -113
  120. netgen/include/ngstd.hpp +0 -72
  121. netgen/include/nodalhofe.hpp +0 -96
  122. netgen/include/nodalhofe_impl.hpp +0 -141
  123. netgen/include/normalfacetfe.hpp +0 -223
  124. netgen/include/normalfacetfespace.hpp +0 -98
  125. netgen/include/normalfacetsurfacefespace.hpp +0 -84
  126. netgen/include/order.hpp +0 -251
  127. netgen/include/parallel_matrices.hpp +0 -222
  128. netgen/include/paralleldofs.hpp +0 -340
  129. netgen/include/parallelngs.hpp +0 -23
  130. netgen/include/parallelvector.hpp +0 -269
  131. netgen/include/pardisoinverse.hpp +0 -200
  132. netgen/include/periodic.hpp +0 -125
  133. netgen/include/plateaufespace.hpp +0 -25
  134. netgen/include/pml.hpp +0 -275
  135. netgen/include/pmltrafo.hpp +0 -631
  136. netgen/include/postproc.hpp +0 -142
  137. netgen/include/precomp.hpp +0 -60
  138. netgen/include/preconditioner.hpp +0 -602
  139. netgen/include/prolongation.hpp +0 -235
  140. netgen/include/python_comp.hpp +0 -107
  141. netgen/include/python_fem.hpp +0 -89
  142. netgen/include/python_linalg.hpp +0 -58
  143. netgen/include/python_ngstd.hpp +0 -385
  144. netgen/include/recursive_pol.hpp +0 -4844
  145. netgen/include/recursive_pol_tet.hpp +0 -395
  146. netgen/include/recursive_pol_trig.hpp +0 -492
  147. netgen/include/reorderedfespace.hpp +0 -81
  148. netgen/include/sample_sort.hpp +0 -105
  149. netgen/include/scalarfe.hpp +0 -335
  150. netgen/include/shapefunction_utils.hpp +0 -113
  151. netgen/include/simd_complex.hpp +0 -284
  152. netgen/include/smoother.hpp +0 -253
  153. netgen/include/solve.hpp +0 -89
  154. netgen/include/sparsecholesky.hpp +0 -313
  155. netgen/include/sparsematrix.hpp +0 -1038
  156. netgen/include/sparsematrix_dyn.hpp +0 -91
  157. netgen/include/sparsematrix_impl.hpp +0 -920
  158. netgen/include/special_matrix.hpp +0 -461
  159. netgen/include/specialelement.hpp +0 -125
  160. netgen/include/statushandler.hpp +0 -33
  161. netgen/include/stringops.hpp +0 -12
  162. netgen/include/superluinverse.hpp +0 -136
  163. netgen/include/symbolicintegrator.hpp +0 -849
  164. netgen/include/symmetricmatrix.hpp +0 -144
  165. netgen/include/tangentialfacetfe.hpp +0 -224
  166. netgen/include/tangentialfacetfespace.hpp +0 -106
  167. netgen/include/tensor.hpp +0 -522
  168. netgen/include/tensorcoefficient.hpp +0 -446
  169. netgen/include/tensorproductintegrator.hpp +0 -113
  170. netgen/include/thcurlfe.hpp +0 -128
  171. netgen/include/thcurlfe_impl.hpp +0 -380
  172. netgen/include/thdivfe.hpp +0 -80
  173. netgen/include/thdivfe_impl.hpp +0 -426
  174. netgen/include/tpdiffop.hpp +0 -461
  175. netgen/include/tpfes.hpp +0 -133
  176. netgen/include/tpintrule.hpp +0 -224
  177. netgen/include/triangular.hpp +0 -465
  178. netgen/include/tscalarfe.hpp +0 -245
  179. netgen/include/tscalarfe_impl.hpp +0 -1029
  180. netgen/include/umfpackinverse.hpp +0 -148
  181. netgen/include/vector.hpp +0 -1219
  182. netgen/include/voxelcoefficientfunction.hpp +0 -41
  183. netgen/include/vtkoutput.hpp +0 -198
  184. netgen/include/vvector.hpp +0 -208
  185. netgen/include/webgui.hpp +0 -92
  186. netgen/libngbla.dylib +0 -0
  187. netgen/libngcomp.dylib +0 -0
  188. netgen/libngfem.dylib +0 -0
  189. netgen/libngla.dylib +0 -0
  190. netgen/libngsolve.dylib +0 -0
  191. netgen/libngstd.dylib +0 -0
  192. ngsolve/__init__.pyi +0 -231
  193. ngsolve/bla.pyi +0 -1139
  194. ngsolve/bvp.pyi +0 -32
  195. ngsolve/cmake/NGSolveConfig.cmake +0 -102
  196. ngsolve/cmake/ngsolve-targets-release.cmake +0 -69
  197. ngsolve/cmake/ngsolve-targets.cmake +0 -163
  198. ngsolve/comp/__init__.pyi +0 -5382
  199. ngsolve/comp/pml.pyi +0 -89
  200. ngsolve/config/__init__.py +0 -1
  201. ngsolve/config/__init__.pyi +0 -43
  202. ngsolve/config/__main__.py +0 -4
  203. ngsolve/config/config.py +0 -60
  204. ngsolve/config/config.pyi +0 -45
  205. ngsolve/demos/TensorProduct/__init__.py +0 -0
  206. ngsolve/demos/TensorProduct/tp_dg_1d_1d.py +0 -80
  207. ngsolve/demos/TensorProduct/tp_dg_1d_2d.py +0 -73
  208. ngsolve/demos/TensorProduct/tp_dg_2d_1d.py +0 -72
  209. ngsolve/demos/TensorProduct/tp_dg_2d_2d.py +0 -66
  210. ngsolve/demos/__init__.py +0 -0
  211. ngsolve/demos/howto/__init__.py +0 -0
  212. ngsolve/demos/howto/hhj.py +0 -44
  213. ngsolve/demos/howto/hybrid_dg.py +0 -53
  214. ngsolve/demos/howto/mixed.py +0 -30
  215. ngsolve/demos/howto/nonlin.py +0 -29
  216. ngsolve/demos/howto/pickling.py +0 -26
  217. ngsolve/demos/howto/pml.py +0 -31
  218. ngsolve/demos/howto/taskmanager.py +0 -20
  219. ngsolve/demos/howto/tdnns.py +0 -47
  220. ngsolve/demos/howto/timeDG-skeleton.py +0 -45
  221. ngsolve/demos/howto/timeDG.py +0 -38
  222. ngsolve/demos/howto/timeDGlap.py +0 -42
  223. ngsolve/demos/howto/timeDGwave.py +0 -61
  224. ngsolve/demos/intro/__init__.py +0 -0
  225. ngsolve/demos/intro/adaptive.py +0 -123
  226. ngsolve/demos/intro/cmagnet.py +0 -62
  227. ngsolve/demos/intro/elasticity.py +0 -76
  228. ngsolve/demos/intro/navierstokes.py +0 -74
  229. ngsolve/demos/intro/poisson.ipynb +0 -170
  230. ngsolve/demos/intro/poisson.py +0 -41
  231. ngsolve/demos/mpi/__init__.py +0 -0
  232. ngsolve/demos/mpi/mpi_cmagnet.py +0 -87
  233. ngsolve/demos/mpi/mpi_navierstokes.py +0 -117
  234. ngsolve/demos/mpi/mpi_poisson.py +0 -89
  235. ngsolve/demos/mpi/mpi_timeDG.py +0 -82
  236. ngsolve/directsolvers.pyi +0 -18
  237. ngsolve/eigenvalues.pyi +0 -30
  238. ngsolve/fem.pyi +0 -1707
  239. ngsolve/krylovspace.pyi +0 -309
  240. ngsolve/la.pyi +0 -1218
  241. ngsolve/ngslib.so +0 -0
  242. ngsolve/ngstd.pyi +0 -58
  243. ngsolve/nonlinearsolvers.pyi +0 -98
  244. ngsolve/preconditioners.pyi +0 -6
  245. ngsolve/solve.pyi +0 -108
  246. ngsolve/solvers.pyi +0 -14
  247. ngsolve/timestepping.pyi +0 -34
  248. ngsolve/timing.pyi +0 -57
  249. ngsolve/utils.pyi +0 -279
  250. ngsolve-6.2.2501.post16.dev1.data/data/Netgen.icns +0 -0
  251. ngsolve-6.2.2501.post16.dev1.data/data/bin/ngscxx +0 -17
  252. ngsolve-6.2.2501.post16.dev1.data/data/bin/ngsld +0 -13
  253. ngsolve-6.2.2501.post16.dev1.data/data/bin/ngsolve.tcl +0 -648
  254. ngsolve-6.2.2501.post16.dev1.data/data/bin/ngspy +0 -2
  255. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/beam.geo +0 -17
  256. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/beam.vol +0 -240
  257. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/chip.in2d +0 -41
  258. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/chip.vol +0 -614
  259. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/coil.geo +0 -12
  260. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/coil.vol +0 -2560
  261. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/coilshield.geo +0 -24
  262. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/coilshield.vol +0 -3179
  263. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/cube.geo +0 -19
  264. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/cube.vol +0 -1832
  265. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -50
  266. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/d11_chip_nitsche.pde +0 -40
  267. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/d1_square.pde +0 -43
  268. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/d2_chip.pde +0 -35
  269. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/d3_helmholtz.pde +0 -22
  270. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/d4_cube.pde +0 -46
  271. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/d5_beam.pde +0 -74
  272. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/d6_shaft.pde +0 -73
  273. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/d7_coil.pde +0 -50
  274. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/d8_coilshield.pde +0 -49
  275. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/d9_hybridDG.pde +0 -72
  276. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/doubleglazing.in2d +0 -27
  277. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/doubleglazing.vol +0 -737
  278. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  279. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/shaft.geo +0 -73
  280. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/shaft.vol +0 -4291
  281. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/square.in2d +0 -17
  282. ngsolve-6.2.2501.post16.dev1.data/data/share/ngsolve/square.vol +0 -149
  283. ngsolve-6.2.2501.post16.dev1.dist-info/RECORD +0 -304
  284. {ngsolve-6.2.2501.post16.dev1.dist-info → ngsolve-6.2.2501.post34.dev1.dist-info}/LICENSE +0 -0
  285. {ngsolve-6.2.2501.post16.dev1.dist-info → ngsolve-6.2.2501.post34.dev1.dist-info}/WHEEL +0 -0
  286. {ngsolve-6.2.2501.post16.dev1.dist-info → ngsolve-6.2.2501.post34.dev1.dist-info}/top_level.txt +0 -0
@@ -1,849 +0,0 @@
1
- #ifndef FILE_SYMBOLICINTEGRATOR
2
- #define FILE_SYMBOLICINTEGRATOR
3
-
4
- /*********************************************************************/
5
- /* File: symbolicintegrator.hpp */
6
- /* Author: Joachim Schoeberl */
7
- /* Date: August 2015 */
8
- /*********************************************************************/
9
-
10
- namespace ngcomp
11
- {
12
- class FESpace;
13
- }
14
-
15
-
16
- #include "integrator.hpp"
17
- #include "coefficient.hpp"
18
-
19
-
20
- namespace ngfem
21
- {
22
-
23
- class NGS_DLL_HEADER ProxyFunction : public CoefficientFunction
24
- {
25
- protected:
26
- shared_ptr<ngcomp::FESpace> fes;
27
- bool testfunction; // true .. test, false .. trial
28
- // bool is_complex;
29
- bool is_other; // neighbour element (DG)
30
- shared_ptr<ProxyFunction> primaryproxy; // derivatives and traces point to it
31
- shared_ptr<DifferentialOperator> evaluator;
32
- shared_ptr<DifferentialOperator> deriv_evaluator;
33
- shared_ptr<DifferentialOperator> trace_evaluator;
34
- shared_ptr<DifferentialOperator> trace_deriv_evaluator;
35
- shared_ptr<DifferentialOperator> ttrace_evaluator;
36
- shared_ptr<DifferentialOperator> ttrace_deriv_evaluator;
37
- weak_ptr<ProxyFunction> deriv_proxy; // weak since we point to the primary proxy
38
- shared_ptr<CoefficientFunction> boundary_values; // for DG - apply
39
-
40
- SymbolTable<shared_ptr<DifferentialOperator>> additional_diffops;
41
- mutable SymbolTable<weak_ptr<ProxyFunction>> additional_proxies;
42
-
43
- mutable weak_ptr<ProxyFunction> dt;
44
- mutable shared_ptr<ProxyFunction> anti_dt;
45
- // int dim;
46
- public:
47
- ProxyFunction (shared_ptr<ngcomp::FESpace> afes,
48
- bool atestfunction, bool ais_complex,
49
- shared_ptr<DifferentialOperator> aevaluator,
50
- shared_ptr<DifferentialOperator> aderiv_evaluator,
51
- shared_ptr<DifferentialOperator> atrace_evaluator,
52
- shared_ptr<DifferentialOperator> atrace_deriv_evaluator,
53
- shared_ptr<DifferentialOperator> attrace_evaluator,
54
- shared_ptr<DifferentialOperator> attrace_deriv_evaluator);
55
-
56
- ProxyFunction (const ProxyFunction &) = default;
57
-
58
- bool IsTrialFunction () const { return !testfunction; }
59
- bool IsTestFunction () const { return testfunction; }
60
- bool IsOther() const { return is_other; }
61
-
62
- string GetDescription () const override;
63
-
64
- void GenerateCode(Code &code, FlatArray<int> inputs, int index) const override;
65
-
66
- const shared_ptr<DifferentialOperator> & Evaluator() const { return evaluator; }
67
- const shared_ptr<DifferentialOperator> & DerivEvaluator() const { return deriv_evaluator; }
68
- const shared_ptr<DifferentialOperator> & TraceEvaluator() const { return trace_evaluator; }
69
- const shared_ptr<DifferentialOperator> & TraceDerivEvaluator() const { return trace_deriv_evaluator; }
70
- const shared_ptr<DifferentialOperator> & TTraceEvaluator() const { return ttrace_evaluator; }
71
- const shared_ptr<DifferentialOperator> & TTraceDerivEvaluator() const { return ttrace_deriv_evaluator; }
72
-
73
- shared_ptr<ProxyFunction> Deriv() const;
74
- shared_ptr<ProxyFunction> Trace() const;
75
- shared_ptr<CoefficientFunction> Primary() const override
76
- { return primaryproxy; }
77
-
78
- shared_ptr<ProxyFunction> Dt() const;
79
- shared_ptr<ProxyFunction> AntiDt() const;
80
- int OrderDt() const;
81
-
82
-
83
- shared_ptr<ProxyFunction> Other(shared_ptr<CoefficientFunction> _boundary_values) const;
84
-
85
- const shared_ptr<CoefficientFunction> & BoundaryValues() const { return boundary_values; }
86
-
87
- void SetAdditionalEvaluator (string name, shared_ptr<DifferentialOperator> diffop)
88
- {
89
- additional_diffops.Set (name, diffop);
90
- }
91
-
92
- virtual shared_ptr<DifferentialOperator> GetAdditionalEvaluator (string name) const
93
- {
94
- if (additional_diffops.Used(name))
95
- return additional_diffops[name];
96
- return nullptr; // shared_ptr<DifferentialOperator>();
97
- }
98
-
99
- SymbolTable<shared_ptr<DifferentialOperator>> GetAdditionalEvaluators () const
100
- {
101
- return additional_diffops;
102
- }
103
-
104
- virtual shared_ptr<ProxyFunction> GetAdditionalProxy (string name) const;
105
-
106
- shared_ptr<CoefficientFunction> Operator (const string & name) const override;
107
- shared_ptr<CoefficientFunction> Operator (shared_ptr<DifferentialOperator> diffop) const override;
108
-
109
- const shared_ptr<ngcomp::FESpace> & GetFESpace() const { return fes; }
110
- void SetFESpace(shared_ptr<ngcomp::FESpace> fespace) { fes = fespace; }
111
-
112
- virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
113
- {
114
- // Vector<> tmp(Dimension());
115
- STACK_ARRAY(double, mem, Dimension());
116
- FlatVector<> tmp(Dimension(), &mem[0]);
117
- Evaluate (ip, tmp);
118
- return tmp(0);
119
- }
120
-
121
- virtual void Evaluate (const BaseMappedIntegrationPoint & ip,
122
- FlatVector<> result) const override;
123
-
124
- virtual void Evaluate (const BaseMappedIntegrationPoint & ip,
125
- FlatVector<Complex> result) const override;
126
-
127
- virtual void Evaluate (const BaseMappedIntegrationRule & ir,
128
- BareSliceMatrix<> result) const override;
129
-
130
- virtual void Evaluate (const BaseMappedIntegrationRule & ir,
131
- BareSliceMatrix<Complex> result) const override;
132
-
133
- // virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir,
134
- // AFlatMatrix<double> values) const;
135
-
136
- virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir,
137
- BareSliceMatrix<SIMD<double>> values) const override;
138
- virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir,
139
- BareSliceMatrix<SIMD<Complex>> values) const override;
140
-
141
- /*
142
- virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir,
143
- FlatArray<AFlatMatrix<double>*> input,
144
- AFlatMatrix<double> values) const override;
145
-
146
- virtual void EvaluateDeriv (const BaseMappedIntegrationRule & mir,
147
- FlatMatrix<> result,
148
- FlatMatrix<> deriv) const override;
149
-
150
- virtual void EvaluateDDeriv (const BaseMappedIntegrationRule & mir,
151
- FlatMatrix<> result,
152
- FlatMatrix<> deriv,
153
- FlatMatrix<> dderiv) const override;
154
-
155
- virtual void EvaluateDeriv (const SIMD_BaseMappedIntegrationRule & ir,
156
- AFlatMatrix<double> values, AFlatMatrix<double> deriv) const override;
157
-
158
- virtual void EvaluateDDeriv (const SIMD_BaseMappedIntegrationRule & ir,
159
- AFlatMatrix<double> values, AFlatMatrix<double> deriv,
160
- AFlatMatrix<double> dderiv) const override;
161
- */
162
- virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir,
163
- FlatArray<BareSliceMatrix<SIMD<double>>> input,
164
- BareSliceMatrix<SIMD<double>> values) const override
165
- {
166
- ProxyFunction::Evaluate (ir, values);
167
- }
168
-
169
- virtual void Evaluate (const BaseMappedIntegrationRule & ir,
170
- BareSliceMatrix<AutoDiff<1,double>> values) const override;
171
-
172
- virtual void Evaluate (const BaseMappedIntegrationRule & ir,
173
- BareSliceMatrix<AutoDiffDiff<1,double>> values) const override;
174
-
175
- virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir,
176
- BareSliceMatrix<AutoDiff<1,SIMD<double>>> values) const override;
177
-
178
- virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir,
179
- FlatArray<BareSliceMatrix<AutoDiff<1,SIMD<double>>>> input,
180
- BareSliceMatrix<AutoDiff<1,SIMD<double>>> values) const override
181
- {
182
- ProxyFunction::Evaluate (ir, values);
183
- }
184
-
185
- virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir,
186
- BareSliceMatrix<AutoDiffDiff<1,SIMD<double>>> values) const override;
187
-
188
- virtual void Evaluate (const SIMD_BaseMappedIntegrationRule & ir,
189
- FlatArray<BareSliceMatrix<AutoDiffDiff<1,SIMD<double>>>> input,
190
- BareSliceMatrix<AutoDiffDiff<1,SIMD<double>>> values) const override
191
- {
192
- ProxyFunction::Evaluate (ir, values);
193
- }
194
-
195
- /*
196
- virtual void EvaluateDeriv (const SIMD_BaseMappedIntegrationRule & ir,
197
- FlatArray<AFlatMatrix<>*> input,
198
- FlatArray<AFlatMatrix<>*> dinput,
199
- AFlatMatrix<> result,
200
- AFlatMatrix<> deriv) const override
201
- {
202
- EvaluateDeriv (ir, result, deriv);
203
- }
204
-
205
- virtual void EvaluateDDeriv (const SIMD_BaseMappedIntegrationRule & ir,
206
- FlatArray<AFlatMatrix<>*> input,
207
- FlatArray<AFlatMatrix<>*> dinput,
208
- FlatArray<AFlatMatrix<>*> ddinput,
209
- AFlatMatrix<> result,
210
- AFlatMatrix<> deriv,
211
- AFlatMatrix<> dderiv) const override
212
- {
213
- EvaluateDDeriv (ir, result, deriv, dderiv);
214
- }
215
- */
216
-
217
- // virtual bool ElementwiseConstant () const override{ return true; }
218
-
219
- // the old one, to be replaced
220
- void NonZeroPattern (const class ProxyUserData & ud,
221
- FlatVector<bool> nonzero,
222
- FlatVector<bool> nonzero_deriv,
223
- FlatVector<bool> nonzero_dderiv) const;
224
-
225
- virtual void NonZeroPattern (const class ProxyUserData & ud,
226
- FlatVector<AutoDiffDiff<1,NonZero>> values) const override;
227
-
228
- virtual void NonZeroPattern (const class ProxyUserData & ud,
229
- FlatArray<FlatVector<AutoDiffDiff<1,NonZero>>> input,
230
- FlatVector<AutoDiffDiff<1,NonZero>> values) const override
231
- {
232
- NonZeroPattern (ud, values);
233
- /*
234
- Vector<bool> nz(values.Size()), nzd(values.Size()), nzdd(values.Size());
235
- NonZeroPattern (ud, nz, nzd, nzdd);
236
- for (size_t i = 0; i < values.Size(); i++)
237
- {
238
- values(i).Value() = nz(i);
239
- values(i).DValue(0) = nzd(i);
240
- values(i).DDValue(0) = nzdd(i);
241
- }
242
- */
243
- }
244
-
245
-
246
- virtual shared_ptr<CoefficientFunction>
247
- Diff (const CoefficientFunction * var, shared_ptr<CoefficientFunction> dir) const override;
248
- };
249
-
250
-
251
- class SumOfIntegrals;
252
- class DualProxyFunction : public ProxyFunction
253
- {
254
- public:
255
- DualProxyFunction(const ProxyFunction & proxy)
256
- : ProxyFunction(proxy) { ; }
257
-
258
- shared_ptr<SumOfIntegrals> operator() (shared_ptr<CoefficientFunction> u) const;
259
- };
260
-
261
-
262
-
263
- class ProxyUserData
264
- {
265
- FlatArray<const ProxyFunction*> remember_first;
266
- FlatArray<FlatMatrix<double>> remember_second;
267
- FlatArray<FlatMatrix<SIMD<double>>> remember_asecond;
268
-
269
- FlatArray<const CoefficientFunction*> remember_cf_first;
270
- FlatArray<FlatMatrix<double>> remember_cf_second;
271
- FlatArray<FlatMatrix<SIMD<double>>> remember_cf_asecond;
272
- FlatArray<bool> remember_cf_computed;
273
- public:
274
- class ProxyFunction * testfunction = nullptr;
275
- int test_comp;
276
- class ProxyFunction * trialfunction = nullptr;
277
- int trial_comp;
278
- int eval_deriv = 0; // 0 .. evaluate bfi, 1 .. deriv, 2 .. second order deriv
279
- const FiniteElement * fel = nullptr;
280
- FlatArray<pair<const CoefficientFunction*, void*>> caches;
281
-
282
- FlatVector<double> *trial_elvec = nullptr, *test_elvec = nullptr; // for shape-wise evaluate
283
- LocalHeap * lh = nullptr;
284
-
285
-
286
- ProxyUserData ()
287
- : remember_first(0,nullptr), remember_second(0,nullptr), remember_asecond(0,nullptr),
288
- remember_cf_first(0, nullptr), remember_cf_second(0,nullptr),remember_cf_asecond(0,nullptr), remember_cf_computed(0, nullptr)
289
- { ; }
290
- ProxyUserData (size_t ntrial, size_t ncf, LocalHeap & lh)
291
- : remember_first(ntrial, lh), remember_second(ntrial, lh),
292
- remember_asecond(ntrial, lh),
293
- remember_cf_first(ncf, lh), remember_cf_second(ncf, lh),
294
- remember_cf_asecond(ncf, lh),
295
- remember_cf_computed(ncf, lh)
296
- { remember_first = nullptr; remember_cf_first = nullptr; }
297
-
298
- ProxyUserData (int ntrial, LocalHeap & lh)
299
- : ProxyUserData (ntrial, 0, lh) { ; }
300
-
301
- void AssignMemory (const ProxyFunction * proxy, size_t h, size_t w, LocalHeap & lh)
302
- {
303
- for (size_t i = 0; i < remember_first.Size(); i++)
304
- {
305
- if (remember_first[i] == nullptr)
306
- {
307
- remember_first[i] = proxy;
308
- new (&remember_second[i]) FlatMatrix<> (h, w, lh);
309
- new (&remember_asecond[i]) FlatMatrix<SIMD<double>> (w, (h+SIMD<double>::Size()-1)/SIMD<double>::Size(), lh);
310
- return;
311
- }
312
- }
313
- throw Exception ("no space for userdata - memory available");
314
- }
315
-
316
- void AssignMemory (const ProxyFunction * proxy, FlatMatrix<SIMD<double>> mat)
317
- {
318
- for (size_t i = 0; i < remember_first.Size(); i++)
319
- {
320
- if (remember_first[i] == nullptr || remember_first[i] == proxy)
321
- {
322
- remember_first[i] = proxy;
323
- new (&remember_asecond[i]) FlatMatrix<SIMD<double>> (mat);
324
- return;
325
- }
326
- }
327
- throw Exception ("no space for userdata - memory available");
328
- }
329
-
330
-
331
- void AssignMemory (const CoefficientFunction * cf, size_t h, size_t w, LocalHeap & lh)
332
- {
333
- for (size_t i = 0; i < remember_cf_first.Size(); i++)
334
- {
335
- if (remember_cf_first[i] == nullptr)
336
- {
337
- remember_cf_first[i] = cf;
338
- new (&remember_cf_second[i]) FlatMatrix<double> (h, w, lh);
339
- new (&remember_cf_asecond[i]) FlatMatrix<SIMD<double>> (w, (h+SIMD<double>::Size()-1)/SIMD<double>::Size(), lh);
340
- remember_cf_computed[i] = false;
341
- return;
342
- }
343
- }
344
- throw Exception ("no space for userdata - memory available");
345
- }
346
-
347
- void AssignMemory (const CoefficientFunction * cf, FlatMatrix<SIMD<double>> mat)
348
- {
349
- for (size_t i = 0; i < remember_cf_first.Size(); i++)
350
- {
351
- if (remember_cf_first[i] == nullptr || remember_cf_first[i] == cf)
352
- {
353
- remember_cf_first[i] = cf;
354
- new (&remember_cf_asecond[i]) FlatMatrix<SIMD<double>> (mat);
355
- remember_cf_computed[i] = true;
356
- return;
357
- }
358
- }
359
- throw Exception ("no space for userdata - memory available");
360
- }
361
-
362
-
363
-
364
- bool HasMemory (const ProxyFunction * proxy) const
365
- {
366
- return remember_first.Contains(proxy);
367
- }
368
- bool HasMemory (const CoefficientFunction * cf) const
369
- {
370
- return remember_cf_first.Contains(cf);
371
- }
372
- FlatMatrix<> GetMemory (const ProxyFunction * proxy) const
373
- {
374
- return remember_second[remember_first.PosSure(proxy)];
375
- }
376
- FlatMatrix<SIMD<double>> GetAMemory (const ProxyFunction * proxy) const
377
- {
378
- return remember_asecond[remember_first.PosSure(proxy)];
379
- }
380
- FlatMatrix<double> GetMemory (const CoefficientFunction * cf) const
381
- {
382
- return remember_cf_second[remember_cf_first.PosSure(cf)];
383
- }
384
- FlatMatrix<SIMD<double>> GetAMemory (const CoefficientFunction * cf) const
385
- {
386
- return remember_cf_asecond[remember_cf_first.PosSure(cf)];
387
- }
388
- bool Computed (const CoefficientFunction * cf) const
389
- {
390
- return remember_cf_computed[remember_cf_first.PosSure(cf)];
391
- }
392
- void SetComputed (const CoefficientFunction * cf, bool val = true) const
393
- {
394
- remember_cf_computed[remember_cf_first.PosSure(cf)] = val;
395
- }
396
- };
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
- class SymbolicLinearFormIntegrator : public LinearFormIntegrator
405
- {
406
- protected:
407
- shared_ptr<CoefficientFunction> cf;
408
- Array<ProxyFunction*> proxies;
409
- Array<CoefficientFunction*> gridfunction_cfs;
410
- Array<CoefficientFunction*> cache_cfs;
411
- Array<shared_ptr<CoefficientFunction>> dcf_dtest;
412
-
413
- VorB vb;
414
- // bool element_boundary;
415
- VorB element_vb;
416
-
417
- public:
418
- NGS_DLL_HEADER SymbolicLinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb,
419
- VorB aelement_vb);
420
-
421
- virtual VorB VB() const override { return vb; }
422
- virtual string Name () const override { return string ("Symbolic LFI"); }
423
- virtual int GetDimension() const override { return proxies[0]->Evaluator()->BlockDim(); }
424
-
425
- virtual void
426
- CalcElementVector (const FiniteElement & fel,
427
- const ElementTransformation & trafo,
428
- FlatVector<double> elvec,
429
- LocalHeap & lh) const override;
430
-
431
- virtual void
432
- CalcElementVector (const FiniteElement & fel,
433
- const ElementTransformation & trafo,
434
- FlatVector<Complex> elvec,
435
- LocalHeap & lh) const override;
436
-
437
- template <typename SCAL>
438
- void T_CalcElementVector (const FiniteElement & fel,
439
- const ElementTransformation & trafo,
440
- FlatVector<SCAL> elvec,
441
- LocalHeap & lh) const;
442
- };
443
-
444
-
445
-
446
- class SymbolicBilinearFormIntegrator : public BilinearFormIntegrator
447
- {
448
- protected:
449
- shared_ptr<CoefficientFunction> cf;
450
- Array<ProxyFunction*> trial_proxies, test_proxies;
451
- Array<CoefficientFunction*> gridfunction_cfs;
452
- Array<CoefficientFunction*> cache_cfs;
453
- Array<int> trial_cum, test_cum; // cumulated dimension of proxies
454
- VorB vb; // on the boundary of the domain ?
455
- // bool element_boundary;
456
- VorB element_vb; // on the boundary of the element ?
457
- Matrix<bool> nonzeros; // do components interact ?
458
- Matrix<bool> nonzeros_deriv; // do components interact ?
459
- Matrix<bool> nonzeros_proxies; // do proxies interact ?
460
- Matrix<bool> diagonal_proxies; // do proxies interact diagonally ?
461
- Matrix<bool> same_diffops; // are diffops the same ?
462
- bool elementwise_constant;
463
-
464
- int trial_difforder, test_difforder;
465
- bool is_symmetric;
466
- bool has_interpolate; // is there an interpolate in the expression tree ?
467
- shared_ptr<BilinearFormIntegrator> linearization;
468
- Array<shared_ptr<CoefficientFunction>> dcf_dtest; // derivatives by test-functions
469
- Matrix<shared_ptr<CoefficientFunction>> ddcf_dtest_dtrial; // derivatives by test- and trial-functions
470
- public:
471
- NGS_DLL_HEADER SymbolicBilinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb,
472
- VorB aelement_boundary);
473
-
474
- virtual VorB VB() const override { return vb; }
475
- virtual VorB ElementVB() const { return element_vb; }
476
- virtual xbool IsSymmetric() const override { return is_symmetric ? xbool(true) : xbool(maybe); }
477
- virtual string Name () const override { return string ("Symbolic BFI"); }
478
-
479
- using Integrator::GetIntegrationRule;
480
- NGS_DLL_HEADER virtual const IntegrationRule& GetIntegrationRule (const FiniteElement & fel, LocalHeap & lh) const;
481
- NGS_DLL_HEADER virtual const SIMD_IntegrationRule& Get_SIMD_IntegrationRule (const FiniteElement & fel, LocalHeap & lh) const;
482
- // virtual IntegrationRule GetIntegrationRuleEB (const FiniteElement & fel, int facetnr, LocalHeap & lh) const;
483
- // virtual SIMD_IntegrationRule Get_SIMD_IntegrationRuleEB (const FiniteElement & fel, int facetnr, LocalHeap & lh) const;
484
-
485
- virtual int GetDimension() const override { return trial_proxies[0]->Evaluator()->BlockDim(); }
486
- void SetLinearization(shared_ptr<BilinearFormIntegrator> _lin)
487
- { linearization = _lin; }
488
-
489
- NGS_DLL_HEADER virtual void
490
- CalcElementMatrix (const FiniteElement & fel,
491
- const ElementTransformation & trafo,
492
- FlatMatrix<double> elmat,
493
- LocalHeap & lh) const override;
494
-
495
- NGS_DLL_HEADER virtual void
496
- CalcElementMatrix (const FiniteElement & fel,
497
- const ElementTransformation & trafo,
498
- FlatMatrix<Complex> elmat,
499
- LocalHeap & lh) const override;
500
-
501
- NGS_DLL_HEADER virtual void
502
- CalcElementMatrixAdd (const FiniteElement & fel,
503
- const ElementTransformation & trafo,
504
- FlatMatrix<double> elmat,
505
- bool & symmetric_so_far,
506
- LocalHeap & lh) const override;
507
-
508
- NGS_DLL_HEADER virtual void
509
- CalcElementMatrixAdd (const FiniteElement & fel,
510
- const ElementTransformation & trafo,
511
- FlatMatrix<Complex> elmat,
512
- bool & symmetric_so_far,
513
- LocalHeap & lh) const override;
514
-
515
-
516
- template <typename SCAL, typename SCAL_SHAPES, typename SCAL_RES>
517
- void T_CalcElementMatrixAdd (const FiniteElement & fel,
518
- const ElementTransformation & trafo,
519
- FlatMatrix<SCAL_RES> elmat,
520
- bool & symmetric_so_far,
521
- LocalHeap & lh) const;
522
-
523
- template <typename SCAL, typename SCAL_SHAPES, typename SCAL_RES>
524
- void T_CalcElementMatrixEBAdd (const FiniteElement & fel,
525
- const ElementTransformation & trafo,
526
- FlatMatrix<SCAL_RES> elmat,
527
- LocalHeap & lh) const;
528
-
529
- template <typename SCAL, typename SCAL_SHAPES, typename SCAL_RES>
530
- void T_CalcElementMatrixAddShapeWise (const FiniteElement & fel,
531
- const ElementTransformation & trafo,
532
- FlatMatrix<SCAL_RES> elmat,
533
- LocalHeap & lh) const;
534
-
535
-
536
- NGS_DLL_HEADER virtual void
537
- CalcLinearizedElementMatrix (const FiniteElement & fel,
538
- const ElementTransformation & trafo,
539
- FlatVector<double> elveclin,
540
- FlatMatrix<double> elmat,
541
- LocalHeap & lh) const override;
542
-
543
- NGS_DLL_HEADER virtual void
544
- CalcLinearizedElementMatrix (const FiniteElement & fel,
545
- const ElementTransformation & trafo,
546
- FlatVector<Complex> elveclin,
547
- FlatMatrix<Complex> elmat,
548
- LocalHeap & lh) const override;
549
-
550
- template<typename SCAL> void
551
- T_CalcLinearizedElementMatrixFrozen (const FiniteElement & fel,
552
- const ElementTransformation & trafo,
553
- FlatVector<SCAL> elveclin,
554
- FlatMatrix<SCAL> elmat,
555
- LocalHeap & lh) const;
556
-
557
- template <typename SCAL, typename SCAL_SHAPES>
558
- void T_CalcLinearizedElementMatrixEB (const FiniteElement & fel,
559
- const ElementTransformation & trafo,
560
- FlatVector<double> elveclin,
561
- FlatMatrix<double> elmat,
562
- LocalHeap & lh) const;
563
-
564
- NGS_DLL_HEADER virtual void
565
- ApplyElementMatrix (const FiniteElement & fel,
566
- const ElementTransformation & trafo,
567
- const FlatVector<double> elx,
568
- FlatVector<double> ely,
569
- void * precomputed,
570
- LocalHeap & lh) const override;
571
-
572
- template <typename SCAL, typename SCAL_SHAPES>
573
- void T_ApplyElementMatrixEB (const FiniteElement & fel,
574
- const ElementTransformation & trafo,
575
- const FlatVector<double> elx,
576
- FlatVector<double> ely,
577
- void * precomputed,
578
- LocalHeap & lh) const;
579
-
580
- NGS_DLL_HEADER virtual void
581
- ApplyElementMatrixTrans (const FiniteElement & fel,
582
- const ElementTransformation & trafo,
583
- const FlatVector<double> elx,
584
- FlatVector<double> ely,
585
- void * precomputed,
586
- LocalHeap & lh) const override;
587
-
588
- template <typename SCAL, typename SCAL_SHAPES>
589
- void T_ApplyElementMatrixTransEB (const FiniteElement & fel,
590
- const ElementTransformation & trafo,
591
- const FlatVector<double> elx,
592
- FlatVector<double> ely,
593
- void * precomputed,
594
- LocalHeap & lh) const;
595
-
596
-
597
- const auto & GetCoefficientFunction() { return cf; }
598
- const auto & TrialProxies() { return trial_proxies; }
599
- const auto & TestProxies() { return test_proxies; }
600
- const auto & GridFunctionCoefficients() { return gridfunction_cfs; }
601
- };
602
-
603
-
604
-
605
- class SymbolicFacetLinearFormIntegrator : public FacetLinearFormIntegrator
606
- {
607
- shared_ptr<CoefficientFunction> cf;
608
- Array<ProxyFunction*> proxies;
609
- Array<CoefficientFunction*> cache_cfs;
610
- Array<int> test_cum; // cumulated dimension of proxies
611
- VorB vb; // only BND supported by now
612
- // bool element_boundary; /// not needed (by now ???)
613
- IntegrationRule ir; // if non-empty use this integration-rule
614
- SIMD_IntegrationRule simd_ir; // if non-empty use this integration-rule
615
-
616
- public:
617
- SymbolicFacetLinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb);
618
-
619
- virtual VorB VB() const override { return vb; }
620
- virtual bool BoundaryForm() const override { return vb == BND; }
621
-
622
- NGS_DLL_HEADER void
623
- CalcFacetVector (const FiniteElement & volumefel1, int LocalFacetNr1,
624
- const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
625
- const FiniteElement & volumefel2, int LocalFacetNr2,
626
- const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
627
- FlatVector<double> elvec,
628
- LocalHeap & lh) const override;
629
-
630
- NGS_DLL_HEADER void
631
- CalcFacetVector (const FiniteElement & volumefel1, int LocalFacetNr1,
632
- const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
633
- const FiniteElement & volumefel2, int LocalFacetNr2,
634
- const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
635
- FlatVector<Complex> elvec,
636
- LocalHeap & lh) const override;
637
-
638
- NGS_DLL_HEADER void
639
- CalcFacetVector(const FiniteElement & volumefel, int LocalFacetNr,
640
- const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
641
- const ElementTransformation & seltrans,
642
- FlatVector<double> elvec,
643
- LocalHeap & lh) const override;
644
-
645
- NGS_DLL_HEADER void
646
- CalcFacetVector(const FiniteElement & volumefel, int LocalFacetNr,
647
- const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
648
- const ElementTransformation & seltrans,
649
- FlatVector<Complex> elvec,
650
- LocalHeap & lh) const override;
651
-
652
- private:
653
- template<typename TSCAL>
654
- void T_CalcFacetVector (const FiniteElement & fel1, int LocalFacetNr1,
655
- const ElementTransformation & trafo1, FlatArray<int> & ElVertices1,
656
- const FiniteElement & fel2, int LocalFacetNr2,
657
- const ElementTransformation & trafo2, FlatArray<int> & ElVertices2,
658
- FlatVector<TSCAL> elvec,
659
- LocalHeap &lh) const;
660
-
661
- template<typename TSCAL>
662
- void T_CalcFacetVector (const FiniteElement & volumefel, int LocalFacetNr,
663
- const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
664
- const ElementTransformation & seltrans,
665
- FlatVector<TSCAL> elvec,
666
- LocalHeap & lh) const;
667
- };
668
-
669
-
670
-
671
-
672
- class SymbolicFacetBilinearFormIntegrator : public FacetBilinearFormIntegrator
673
- {
674
- protected:
675
- shared_ptr<CoefficientFunction> cf;
676
- Array<ProxyFunction*> trial_proxies, test_proxies;
677
- Array<CoefficientFunction*> gridfunction_cfs;
678
- Array<CoefficientFunction*> cache_cfs;
679
- Array<int> trial_cum, test_cum; // cumulated dimension of proxies
680
- VorB vb;
681
- bool element_boundary;
682
- bool neighbor_testfunction;
683
- Array<shared_ptr<CoefficientFunction>> dcf_dtest; // derivatives by test-functions
684
- public:
685
- NGS_DLL_HEADER SymbolicFacetBilinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb, bool aelement_boundary);
686
-
687
- virtual VorB VB() const { return vb; }
688
- virtual bool BoundaryForm() const { return vb == BND; }
689
- virtual xbool IsSymmetric() const { return maybe; }
690
-
691
- virtual DGFormulation GetDGFormulation() const { return DGFormulation(neighbor_testfunction,
692
- element_boundary); }
693
-
694
- NGS_DLL_HEADER virtual void
695
- CalcFacetMatrix (const FiniteElement & volumefel1, int LocalFacetNr1,
696
- const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
697
- const FiniteElement & volumefel2, int LocalFacetNr2,
698
- const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
699
- FlatMatrix<double> elmat,
700
- LocalHeap & lh) const;
701
-
702
- NGS_DLL_HEADER virtual void
703
- CalcFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
704
- const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
705
- const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
706
- FlatMatrix<double> elmat,
707
- LocalHeap & lh) const;
708
-
709
- NGS_DLL_HEADER virtual void
710
- CalcFacetMatrix (const FiniteElement & volumefel1, int LocalFacetNr1,
711
- const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
712
- const FiniteElement & volumefel2, int LocalFacetNr2,
713
- const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
714
- FlatMatrix<Complex> elmat,
715
- LocalHeap & lh) const;
716
-
717
- NGS_DLL_HEADER virtual void
718
- CalcFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
719
- const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
720
- const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
721
- FlatMatrix<Complex> elmat,
722
- LocalHeap & lh) const;
723
-
724
- NGS_DLL_HEADER virtual void
725
- CalcLinearizedFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
726
- const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
727
- const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
728
- FlatVector<double> vec, FlatMatrix<double> elmat,
729
- LocalHeap & lh) const;
730
-
731
- NGS_DLL_HEADER virtual void
732
- ApplyFacetMatrix (const FiniteElement & volumefel1, int LocalFacetNr1,
733
- const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
734
- const FiniteElement & volumefel2, int LocalFacetNr2,
735
- const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
736
- FlatVector<double> elx, FlatVector<double> ely,
737
- LocalHeap & lh) const;
738
-
739
- NGS_DLL_HEADER virtual void
740
- CalcTraceValues (const FiniteElement & volumefel, int LocalFacetNr,
741
- const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
742
- FlatVector<double> & trace, FlatVector<double> elx, LocalHeap & lh) const;
743
-
744
- NGS_DLL_HEADER virtual void
745
- ApplyFromTraceValues (const FiniteElement & volumefel, int LocalFacetNr,
746
- const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
747
- FlatVector<double> trace,
748
- FlatVector<double> elx, FlatVector<double> ely,
749
- LocalHeap & lh) const;
750
-
751
- NGS_DLL_HEADER virtual void
752
- ApplyFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
753
- const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
754
- const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
755
- FlatVector<double> elx, FlatVector<double> ely,
756
- LocalHeap & lh) const;
757
-
758
- private:
759
- template<typename TSCAL, typename SCAL_SHAPES = double>
760
- void T_CalcFacetMatrix(const FiniteElement & volumefel1, int LocalFacetNr1,
761
- const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
762
- const FiniteElement & volumefel2, int LocalFacetNr2,
763
- const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
764
- FlatMatrix<TSCAL> elmat,
765
- LocalHeap & lh) const;
766
-
767
- template<typename TSCAL, typename SCAL_SHAPES = double>
768
- void T_CalcFacetMatrix(const FiniteElement & volumefel, int LocalFacetNr,
769
- const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
770
- const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
771
- FlatMatrix<TSCAL> elmat,
772
- LocalHeap & lh) const;
773
- };
774
-
775
- class SymbolicEnergy : public BilinearFormIntegrator
776
- {
777
- protected:
778
- shared_ptr<CoefficientFunction> cf;
779
- VorB vb;
780
- Array<ProxyFunction*> trial_proxies;
781
- VorB element_vb;
782
-
783
- Timer<TNoTracing> timer{"SymbolicEnergy"};
784
- Array<int> trial_cum; // cumulated dimension of proxies
785
- Matrix<bool> nonzeros; // do components interact ?
786
- Matrix<bool> nonzeros_proxies; // do proxies interact ?
787
- Array<shared_ptr<CoefficientFunction>> dcf, ddcf;
788
-
789
- public:
790
- SymbolicEnergy (shared_ptr<CoefficientFunction> acf, VorB avb, VorB aelement_vb);
791
-
792
- virtual VorB VB() const { return vb; }
793
- virtual xbool IsSymmetric() const { return true; }
794
- virtual string Name () const { return string ("Symbolic Energy"); }
795
-
796
-
797
- using Integrator::GetIntegrationRule;
798
- NGS_DLL_HEADER virtual const IntegrationRule& GetIntegrationRule (const FiniteElement & fel, LocalHeap & lh) const;
799
- NGS_DLL_HEADER virtual const SIMD_IntegrationRule& Get_SIMD_IntegrationRule (const FiniteElement & fel, LocalHeap & lh) const;
800
-
801
- virtual void
802
- CalcElementMatrix (const FiniteElement & fel,
803
- const ElementTransformation & trafo,
804
- FlatMatrix<double> elmat,
805
- LocalHeap & lh) const;
806
-
807
- virtual void
808
- CalcLinearizedElementMatrix (const FiniteElement & fel,
809
- const ElementTransformation & trafo,
810
- FlatVector<double> elveclin,
811
- FlatMatrix<double> elmat,
812
- LocalHeap & lh) const;
813
-
814
- void AddLinearizedElementMatrix (const FiniteElement & fel,
815
- ProxyUserData & ud,
816
- const BaseMappedIntegrationRule & mir,
817
- FlatVector<double> elveclin,
818
- FlatMatrix<double> elmat,
819
- LocalHeap & lh) const;
820
-
821
- void AddLinearizedElementMatrix (const FiniteElement & fel,
822
- const ElementTransformation & trafo,
823
- const SIMD_BaseMappedIntegrationRule & mir,
824
- FlatVector<double> elveclin,
825
- FlatMatrix<double> elmat,
826
- LocalHeap & lh) const;
827
-
828
-
829
- virtual double Energy (const FiniteElement & fel,
830
- const ElementTransformation & trafo,
831
- FlatVector<double> elx,
832
- LocalHeap & lh) const;
833
-
834
- virtual void
835
- ApplyElementMatrix (const FiniteElement & fel,
836
- const ElementTransformation & trafo,
837
- const FlatVector<double> elx,
838
- FlatVector<double> ely,
839
- void * precomputed,
840
- LocalHeap & lh) const;
841
- };
842
-
843
-
844
-
845
-
846
- }
847
-
848
-
849
- #endif