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
netgen/include/diffop.hpp DELETED
@@ -1,1286 +0,0 @@
1
- #ifndef FILE_DIFFOP
2
- #define FILE_DIFFOP
3
-
4
- /*********************************************************************/
5
- /* File: diffop.hpp */
6
- /* Author: Joachim Schoeberl */
7
- /* Date: 24. Nov. 2009 */
8
- /*********************************************************************/
9
-
10
- #include "finiteelement.hpp"
11
- #include "differentialoperator.hpp"
12
- #include <core/register_archive.hpp>
13
-
14
-
15
- namespace ngfem
16
- {
17
-
18
-
19
-
20
- /**
21
- Differential Operator.
22
- Base-class for template-polymorphismus.
23
- Provides application and transpose-application.
24
- Operations can be applied for one integration point, or for the whole integration rule at once.
25
- */
26
- template<class DOP>
27
- class DiffOp
28
- {
29
- public:
30
-
31
- static string Name() { return typeid(DiffOp<DOP>()).name(); }
32
- static constexpr bool SUPPORT_PML = false;
33
- // static Array<int> GetDimensions() { return Array<int> ( { DOP::DIM_DMAT } ); };
34
- static IVec<1> GetDimensions() { return { DOP::DIM_DMAT }; };
35
- static bool SupportsVB (VorB checkvb) { return int(DOP::DIM_SPACE)-int(DOP::DIM_ELEMENT) == int(checkvb); }
36
-
37
-
38
- typedef void DIFFOP_TRACE; //
39
-
40
- /**
41
- Computes the B-matrix.
42
- The height is DIM_DMAT, the width is fel.GetNDof().
43
- FEL is the FiniteElement type specified in the BDB-Integrator
44
- mip is the mapped integration point containing the Jacobi-Matrix
45
- MAT is the resulting matrix (usually a FixedHeightMatrix)
46
- */
47
-
48
- template <typename FEL, typename MIP, typename MAT>
49
- static void GenerateMatrix (const FEL & fel, const MIP & mip,
50
- MAT & mat, LocalHeap & lh)
51
- {
52
- Exception::Throw("DIFFOP::GenerateMatrix should not be here, diffop = ", typeid(DOP).name());
53
- }
54
-
55
- /// tbd
56
- template <typename FEL, typename MIR, typename MAT>
57
- static void GenerateMatrixIR (const FEL & fel, const MIR & mir,
58
- MAT & mat, LocalHeap & lh)
59
- {
60
- for (size_t i = 0; i < mir.Size(); i++)
61
- {
62
- auto submat = mat.Rows(i*DOP::DIM_DMAT, (i+1)*DOP::DIM_DMAT).Cols(DOP::DIM*fel.GetNDof());
63
- DOP::GenerateMatrix (fel, mir[i], submat, lh);
64
- }
65
- }
66
-
67
- template <typename FEL, typename MIR>
68
- static void GenerateMatrixSIMDIR (const FEL & fel, const MIR & mir, BareSliceMatrix<SIMD<double>> mat)
69
- {
70
- throw ExceptionNOSIMD ("generate matrix simdir not implemented for diffop ", typeid(DOP).name());
71
- }
72
- /**
73
- Applies the B-matrix.
74
- Computes matrix-vector product with the B-matrix
75
- */
76
- template <typename FEL, typename MIP, class TVX, class TVY>
77
- static void Apply (const FEL & fel, const MIP & mip,
78
- const TVX & x, TVY && y,
79
- LocalHeap & lh)
80
- {
81
- // typedef typename TVY::TSCAL TSCAL;
82
- typedef typename MIP::TSCAL TSCAL;
83
- HeapReset hr(lh);
84
-
85
- FlatMatrixFixHeight<DOP::DIM_DMAT, TSCAL> mat(DOP::DIM*fel.GetNDof(), lh);
86
- DOP::GenerateMatrix (fel, mip, mat, lh);
87
- y = mat * x.Range(DOP::DIM*fel.GetNDof());
88
- }
89
-
90
- /// Computes B-matrix times element vector in many points
91
- template <typename FEL, class MIR, class TVX, class TVY>
92
- static void ApplyIR (const FEL & fel, const MIR & mir,
93
- const TVX & x, TVY & y,
94
- LocalHeap & lh)
95
- {
96
- for (size_t i = 0; i < mir.Size(); i++)
97
- {
98
- HeapReset hr(lh);
99
- auto yrow = y.Row(i);
100
- DOP::Apply (fel, mir[i], x, yrow, lh);
101
- }
102
- }
103
-
104
- /// Computes B-matrix times element vector in many points
105
- template <typename FEL, class MIR, class TVX, class TVY>
106
- static void ApplySIMDIR (const FEL & fel, const MIR & mir,
107
- const TVX & x, TVY & y)
108
- // LocalHeap & lh)
109
- {
110
- throw ExceptionNOSIMD ("apply simdir not implemented for diffop ", typeid(DOP).name());
111
- }
112
-
113
-
114
- /// Computes Transpose (B-matrix) times point value
115
- template <typename FEL, typename MIP, class TVX, class TVY>
116
- static void ApplyTrans (const FEL & fel, const MIP & mip,
117
- const TVX & x, TVY & y,
118
- LocalHeap & lh)
119
- {
120
- // typedef typename TVY::TSCAL TSCAL;
121
- typedef typename MIP::TSCAL TSCAL;
122
-
123
- HeapReset hr(lh);
124
-
125
- FlatMatrixFixHeight<DOP::DIM_DMAT, TSCAL> mat(DOP::DIM*fel.GetNDof(), lh);
126
- DOP::GenerateMatrix (fel, mip, mat, lh);
127
- y.Range(0,DOP::DIM*fel.GetNDof()) = Trans (mat) * x;
128
- }
129
-
130
- /// Computes Transpose (B-matrix) times point value
131
- template <typename FEL, typename MIP, class TVX, class TVY>
132
- static void ApplyTransAdd (const FEL & fel, const MIP & mip,
133
- const TVX & x, TVY & y,
134
- LocalHeap & lh)
135
- {
136
- typedef typename MIP::TSCAL TSCAL;
137
-
138
- HeapReset hr(lh);
139
-
140
- FlatMatrixFixHeight<DOP::DIM_DMAT, TSCAL> mat(DOP::DIM*fel.GetNDof(), lh);
141
- DOP::GenerateMatrix (fel, mip, mat, lh);
142
- y.Range(DOP::DIM*fel.GetNDof()) += Trans (mat) * x;
143
- }
144
-
145
-
146
- /// Computes Transpose (B-matrix) times point value
147
- template <typename FEL, typename MIR, class TVX, class TVY>
148
- static void ApplyTransIR (const FEL & fel, const MIR & mir,
149
- const TVX & x, TVY & y,
150
- LocalHeap & lh)
151
- {
152
- y.Range(0,DOP::DIM*fel.GetNDof()) = 0.0;
153
- for (size_t i = 0; i < mir.Size(); i++)
154
- {
155
- HeapReset hr(lh);
156
- ApplyTransAdd (fel, mir[i], x.Row(i), y, lh);
157
- }
158
- }
159
-
160
- /// Computes Transpose (B-matrix) times point value
161
- template <typename FEL, class MIR, class TVX, class TVY>
162
- static void AddTransSIMDIR (const FEL & fel, const MIR & mir,
163
- const TVX & x, TVY & y)
164
- // LocalHeap & lh)
165
- {
166
- throw ExceptionNOSIMD ("AddTrans simdir not implemented for diffop ", typeid(DOP).name());
167
- }
168
-
169
- static int DimRef()
170
- {
171
- Exception::Throw ("DIFFOP::DimRef should not be here, diffop = ", typeid(DOP).name());
172
- }
173
-
174
- template <typename FEL, typename IP, typename MAT>
175
- static void GenerateMatrixRef (const FEL & fel, const IP & ip,
176
- MAT & mat, LocalHeap & lh)
177
- {
178
- // cout << "DIFFOP::GenerateMatrixRef should not be here, diffop = " << typeid(DOP).name() << endl;
179
- Exception::Throw("DIFFOP::GenerateMatrixRef should not be here, diffop = ", typeid(DOP).name());
180
- }
181
-
182
- template <typename MIP, typename MAT>
183
- static void CalcTransformationMatrix (const MIP & mip,
184
- MAT & mat, LocalHeap & lh)
185
- {
186
- Exception::Throw("DIFFOP::CalcTransformationMatrix should not be here, diffop = ", typeid(DOP).name());
187
- }
188
-
189
- static shared_ptr<CoefficientFunction>
190
- DiffShape (shared_ptr<CoefficientFunction> proxy,
191
- shared_ptr<CoefficientFunction> dir,
192
- bool Eulerian)
193
- {
194
- Exception::Throw ("shape derivative not implemented for DifferentialOperator", typeid(DOP).name());
195
- }
196
-
197
- };
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
- class BlockDifferentialOperator : public DifferentialOperator
206
- {
207
- protected:
208
- shared_ptr<DifferentialOperator> diffop;
209
- int dim;
210
- int comp;
211
- public:
212
- BlockDifferentialOperator (shared_ptr<DifferentialOperator> adiffop,
213
- int adim, int acomp = -1)
214
- : DifferentialOperator(adim*adiffop->Dim(), adim*adiffop->BlockDim(),
215
- adiffop->VB(), adiffop->DiffOrder()),
216
- diffop(adiffop), dim(adim), comp(acomp)
217
- {
218
- if(adiffop->Dimensions().Size()==0)
219
- SetDimensions( { BlockDim() } );
220
- }
221
-
222
- NGS_DLL_HEADER virtual ~BlockDifferentialOperator ();
223
-
224
- virtual string Name() const override { return diffop->Name(); }
225
- shared_ptr<DifferentialOperator> BaseDiffOp() const { return diffop; }
226
- virtual bool SupportsVB (VorB checkvb) const override { return diffop->SupportsVB(checkvb); }
227
-
228
- virtual IntRange UsedDofs(const FiniteElement & fel) const override { return dim*diffop->UsedDofs(fel); }
229
-
230
- shared_ptr<DifferentialOperator> GetTrace() const override
231
- {
232
- if (auto diffoptrace = diffop->GetTrace())
233
- return make_shared<BlockDifferentialOperator> (diffoptrace,
234
- dim, comp);
235
- else
236
- return nullptr;
237
- }
238
-
239
- NGS_DLL_HEADER virtual void
240
- CalcMatrix (const FiniteElement & fel,
241
- const BaseMappedIntegrationPoint & mip,
242
- BareSliceMatrix<double,ColMajor> mat,
243
- LocalHeap & lh) const override;
244
-
245
- NGS_DLL_HEADER virtual void
246
- CalcMatrix (const FiniteElement & fel,
247
- const SIMD_BaseMappedIntegrationRule & mir,
248
- BareSliceMatrix<SIMD<double>> mat) const override;
249
-
250
- NGS_DLL_HEADER virtual void
251
- Apply (const FiniteElement & fel,
252
- const BaseMappedIntegrationPoint & mip,
253
- BareSliceVector<double> x,
254
- FlatVector<double> flux,
255
- LocalHeap & lh) const override;
256
-
257
- NGS_DLL_HEADER virtual void
258
- Apply (const FiniteElement & bfel,
259
- const SIMD_BaseMappedIntegrationRule & bmir,
260
- BareSliceVector<double> x,
261
- BareSliceMatrix<SIMD<double>> flux) const override;
262
-
263
- NGS_DLL_HEADER virtual void
264
- ApplyTrans (const FiniteElement & fel,
265
- const BaseMappedIntegrationPoint & mip,
266
- FlatVector<double> flux,
267
- BareSliceVector<double> x,
268
- LocalHeap & lh) const override;
269
-
270
- NGS_DLL_HEADER virtual void
271
- ApplyTrans (const FiniteElement & fel,
272
- const BaseMappedIntegrationPoint & mip,
273
- FlatVector<Complex> flux,
274
- BareSliceVector<Complex> x,
275
- LocalHeap & lh) const override;
276
-
277
- NGS_DLL_HEADER virtual void
278
- ApplyTrans (const FiniteElement & fel,
279
- const BaseMappedIntegrationRule & mir,
280
- FlatMatrix<double> flux,
281
- BareSliceVector<double> x,
282
- LocalHeap & lh) const override;
283
-
284
- NGS_DLL_HEADER virtual void
285
- ApplyTrans (const FiniteElement & fel,
286
- const BaseMappedIntegrationRule & mir,
287
- FlatMatrix<Complex> flux,
288
- BareSliceVector<Complex> x,
289
- LocalHeap & lh) const override;
290
-
291
- NGS_DLL_HEADER virtual void
292
- AddTrans (const FiniteElement & bfel,
293
- const SIMD_BaseMappedIntegrationRule & bmir,
294
- BareSliceMatrix<SIMD<double>> flux,
295
- BareSliceVector<double> x) const override;
296
-
297
- NGS_DLL_HEADER virtual void
298
- AddTrans (const FiniteElement & bfel,
299
- const SIMD_BaseMappedIntegrationRule & bmir,
300
- BareSliceMatrix<SIMD<Complex>> flux,
301
- BareSliceVector<Complex> x) const override;
302
-
303
-
304
- NGS_DLL_HEADER shared_ptr<CoefficientFunction> DiffShape (shared_ptr<CoefficientFunction> proxy,
305
- shared_ptr<CoefficientFunction> dir,
306
- bool Eulerian) const override;
307
- };
308
-
309
-
310
-
311
-
312
- class BlockDifferentialOperatorTrans : public DifferentialOperator
313
- {
314
- protected:
315
- shared_ptr<DifferentialOperator> diffop;
316
- int dim;
317
- int comp;
318
- public:
319
- BlockDifferentialOperatorTrans (shared_ptr<DifferentialOperator> adiffop,
320
- int adim, int acomp = -1)
321
- : DifferentialOperator(adim*adiffop->Dim(), adim*adiffop->BlockDim(),
322
- adiffop->VB(), adiffop->DiffOrder()),
323
- diffop(adiffop), dim(adim), comp(acomp)
324
- {
325
- // dimensions = Array<int> ( { adim, adiffop->Dim() });
326
- SetDimensions ( { adim, adiffop->Dim() } );
327
- }
328
-
329
- NGS_DLL_HEADER virtual ~BlockDifferentialOperatorTrans ();
330
-
331
- virtual string Name() const override { return diffop->Name(); }
332
- shared_ptr<DifferentialOperator> BaseDiffOp() const { return diffop; }
333
- virtual bool SupportsVB (VorB checkvb) const override { return diffop->SupportsVB(checkvb); }
334
-
335
- virtual IntRange UsedDofs(const FiniteElement & fel) const override { return dim*diffop->UsedDofs(fel); }
336
-
337
- shared_ptr<DifferentialOperator> GetTrace() const override
338
- {
339
- if (auto diffoptrace = diffop->GetTrace())
340
- return make_shared<BlockDifferentialOperatorTrans> (diffoptrace,
341
- dim, comp);
342
- else
343
- return nullptr;
344
- }
345
-
346
-
347
-
348
- NGS_DLL_HEADER virtual void
349
- CalcMatrix (const FiniteElement & fel,
350
- const BaseMappedIntegrationPoint & mip,
351
- BareSliceMatrix<double,ColMajor> mat,
352
- LocalHeap & lh) const override;
353
-
354
- NGS_DLL_HEADER virtual void
355
- CalcMatrix (const FiniteElement & fel,
356
- const SIMD_BaseMappedIntegrationRule & mir,
357
- BareSliceMatrix<SIMD<double>> mat) const override;
358
-
359
- NGS_DLL_HEADER virtual void
360
- Apply (const FiniteElement & fel,
361
- const BaseMappedIntegrationPoint & mip,
362
- BareSliceVector<double> x,
363
- FlatVector<double> flux,
364
- LocalHeap & lh) const override;
365
-
366
- NGS_DLL_HEADER virtual void
367
- Apply (const FiniteElement & bfel,
368
- const SIMD_BaseMappedIntegrationRule & bmir,
369
- BareSliceVector<double> x,
370
- BareSliceMatrix<SIMD<double>> flux) const override;
371
-
372
- NGS_DLL_HEADER virtual void
373
- ApplyTrans (const FiniteElement & fel,
374
- const BaseMappedIntegrationPoint & mip,
375
- FlatVector<double> flux,
376
- BareSliceVector<double> x,
377
- LocalHeap & lh) const override;
378
-
379
- NGS_DLL_HEADER virtual void
380
- ApplyTrans (const FiniteElement & fel,
381
- const BaseMappedIntegrationPoint & mip,
382
- FlatVector<Complex> flux,
383
- BareSliceVector<Complex> x,
384
- LocalHeap & lh) const override;
385
-
386
- NGS_DLL_HEADER virtual void
387
- AddTrans (const FiniteElement & bfel,
388
- const SIMD_BaseMappedIntegrationRule & bmir,
389
- BareSliceMatrix<SIMD<double>> flux,
390
- BareSliceVector<double> x) const override;
391
-
392
- NGS_DLL_HEADER virtual void
393
- AddTrans (const FiniteElement & bfel,
394
- const SIMD_BaseMappedIntegrationRule & bmir,
395
- BareSliceMatrix<SIMD<Complex>> flux,
396
- BareSliceVector<Complex> x) const override;
397
-
398
-
399
- shared_ptr<CoefficientFunction> DiffShape (shared_ptr<CoefficientFunction> proxy,
400
- shared_ptr<CoefficientFunction> dir,
401
- bool Eulerian) const override;
402
- };
403
-
404
-
405
-
406
- // like BlockDifferentialOperator, but element is CompoundFE here
407
- class VectorDifferentialOperator : public DifferentialOperator
408
- {
409
- protected:
410
- shared_ptr<DifferentialOperator> diffop;
411
- int dim;
412
- public:
413
- VectorDifferentialOperator (shared_ptr<DifferentialOperator> adiffop,
414
- int adim)
415
- : DifferentialOperator(adim*adiffop->Dim(), /* adim* */ adiffop->BlockDim(),
416
- adiffop->VB(), adiffop->DiffOrder()),
417
- diffop(adiffop), dim(adim)
418
- {
419
- if (adiffop->Dimensions().Size() == 0)
420
- // dimensions = Array<int> ( { adim });
421
- SetDimensions ( { adim } );
422
- else
423
- // dimensions = Array<int> ( { adim, adiffop->Dim() });
424
- SetDimensions ( { adim, adiffop->Dim() } );
425
- }
426
-
427
- NGS_DLL_HEADER virtual ~VectorDifferentialOperator ();
428
-
429
- virtual string Name() const override { return diffop->Name(); }
430
- shared_ptr<DifferentialOperator> BaseDiffOp() const { return diffop; }
431
- virtual bool SupportsVB (VorB checkvb) const override { return diffop->SupportsVB(checkvb); }
432
-
433
- virtual IntRange UsedDofs(const FiniteElement & fel) const override { return IntRange(0, fel.GetNDof()); }
434
-
435
- shared_ptr<DifferentialOperator> GetTrace() const override
436
- {
437
- if (auto diffoptrace = diffop->GetTrace())
438
- return make_shared<VectorDifferentialOperator> (diffoptrace, dim);
439
- else
440
- return nullptr;
441
- }
442
-
443
- NGS_DLL_HEADER virtual void
444
- CalcMatrix (const FiniteElement & fel,
445
- const BaseMappedIntegrationPoint & mip,
446
- BareSliceMatrix<double,ColMajor> mat,
447
- LocalHeap & lh) const override;
448
-
449
- NGS_DLL_HEADER virtual void
450
- CalcMatrix (const FiniteElement & fel,
451
- const SIMD_BaseMappedIntegrationRule & mir,
452
- BareSliceMatrix<SIMD<double>> mat) const override;
453
-
454
-
455
- NGS_DLL_HEADER virtual int DimRef() const override;
456
-
457
- NGS_DLL_HEADER virtual void
458
- CalcMatrix (const FiniteElement & fel,
459
- const IntegrationPoint & ip,
460
- BareSliceMatrix<double,ColMajor> mat,
461
- LocalHeap & lh) const override;
462
-
463
- NGS_DLL_HEADER virtual void
464
- CalcTransformationMatrix (const BaseMappedIntegrationPoint & mip,
465
- SliceMatrix<double> trans,
466
- LocalHeap & lh) const override;
467
-
468
- NGS_DLL_HEADER virtual void
469
- Apply (const FiniteElement & fel,
470
- const BaseMappedIntegrationPoint & mip,
471
- BareSliceVector<double> x,
472
- FlatVector<double> flux,
473
- LocalHeap & lh) const override;
474
-
475
- NGS_DLL_HEADER virtual void
476
- Apply (const FiniteElement & bfel,
477
- const SIMD_BaseMappedIntegrationRule & bmir,
478
- BareSliceVector<double> x,
479
- BareSliceMatrix<SIMD<double>> flux) const override;
480
-
481
- NGS_DLL_HEADER virtual void
482
- ApplyTrans (const FiniteElement & fel,
483
- const BaseMappedIntegrationPoint & mip,
484
- FlatVector<double> flux,
485
- BareSliceVector<double> x,
486
- LocalHeap & lh) const override;
487
-
488
- NGS_DLL_HEADER virtual void
489
- ApplyTrans (const FiniteElement & fel,
490
- const BaseMappedIntegrationPoint & mip,
491
- FlatVector<Complex> flux,
492
- BareSliceVector<Complex> x,
493
- LocalHeap & lh) const override;
494
-
495
- NGS_DLL_HEADER virtual void
496
- AddTrans (const FiniteElement & bfel,
497
- const SIMD_BaseMappedIntegrationRule & bmir,
498
- BareSliceMatrix<SIMD<double>> flux,
499
- BareSliceVector<double> x) const override;
500
-
501
- NGS_DLL_HEADER virtual void
502
- AddTrans (const FiniteElement & bfel,
503
- const SIMD_BaseMappedIntegrationRule & bmir,
504
- BareSliceMatrix<SIMD<Complex>> flux,
505
- BareSliceVector<Complex> x) const override;
506
-
507
- shared_ptr<CoefficientFunction> DiffShape (shared_ptr<CoefficientFunction> proxy,
508
- shared_ptr<CoefficientFunction> dir,
509
- bool Eulerian) const override;
510
- };
511
-
512
-
513
- class MatrixDifferentialOperator : public DifferentialOperator
514
- {
515
- protected:
516
- shared_ptr<DifferentialOperator> diffop;
517
- int vdim;
518
- public:
519
- MatrixDifferentialOperator (shared_ptr<DifferentialOperator> adiffop,
520
- int avdim);
521
-
522
- NGS_DLL_HEADER virtual ~MatrixDifferentialOperator ();
523
-
524
- virtual string Name() const override { return diffop->Name(); }
525
- shared_ptr<DifferentialOperator> BaseDiffOp() const { return diffop; }
526
- virtual bool SupportsVB (VorB checkvb) const override { return diffop->SupportsVB(checkvb); }
527
-
528
- virtual IntRange UsedDofs(const FiniteElement & fel) const override { return IntRange(0, fel.GetNDof()); }
529
-
530
- shared_ptr<DifferentialOperator> GetTrace() const override
531
- {
532
- if (auto diffoptrace = diffop->GetTrace())
533
- return make_shared<MatrixDifferentialOperator> (diffoptrace, vdim);
534
- else
535
- return nullptr;
536
- }
537
-
538
- NGS_DLL_HEADER virtual void
539
- CalcMatrix (const FiniteElement & fel,
540
- const BaseMappedIntegrationPoint & mip,
541
- BareSliceMatrix<double,ColMajor> mat,
542
- LocalHeap & lh) const override;
543
-
544
- NGS_DLL_HEADER virtual void
545
- CalcMatrix (const FiniteElement & bfel,
546
- const SIMD_BaseMappedIntegrationRule & mir,
547
- BareSliceMatrix<SIMD<double>> bmat) const override;
548
-
549
- NGS_DLL_HEADER virtual void
550
- Apply (const FiniteElement & bfel,
551
- const SIMD_BaseMappedIntegrationRule & bmir,
552
- BareSliceVector<double> x,
553
- BareSliceMatrix<SIMD<double>> flux) const override;
554
-
555
- NGS_DLL_HEADER virtual void
556
- AddTrans (const FiniteElement & bfel,
557
- const SIMD_BaseMappedIntegrationRule & bmir,
558
- BareSliceMatrix<SIMD<double>> flux,
559
- BareSliceVector<double> x) const override;
560
- };
561
-
562
- class SymMatrixDifferentialOperator : public DifferentialOperator
563
- {
564
- protected:
565
- shared_ptr<DifferentialOperator> diffop;
566
- int vdim;
567
- public:
568
- NGS_DLL_HEADER SymMatrixDifferentialOperator (shared_ptr<DifferentialOperator> adiffop,
569
- int avdim);
570
-
571
- NGS_DLL_HEADER virtual ~SymMatrixDifferentialOperator ();
572
-
573
- virtual string Name() const override { return diffop->Name(); }
574
- shared_ptr<DifferentialOperator> BaseDiffOp() const { return diffop; }
575
- virtual bool SupportsVB (VorB checkvb) const override { return diffop->SupportsVB(checkvb); }
576
-
577
- virtual IntRange UsedDofs(const FiniteElement & fel) const override
578
- { return IntRange(0, fel.GetNDof()); }
579
-
580
- shared_ptr<DifferentialOperator> GetTrace() const override
581
- {
582
- if (auto diffoptrace = diffop->GetTrace())
583
- return make_shared<SymMatrixDifferentialOperator> (diffoptrace, vdim);
584
- else
585
- return nullptr;
586
- }
587
-
588
- NGS_DLL_HEADER virtual void
589
- CalcMatrix (const FiniteElement & fel,
590
- const BaseMappedIntegrationPoint & mip,
591
- BareSliceMatrix<double,ColMajor> mat,
592
- LocalHeap & lh) const override;
593
-
594
- NGS_DLL_HEADER virtual void
595
- CalcMatrixVS (const FiniteElement & fel,
596
- const BaseMappedIntegrationPoint & mip,
597
- SliceMatrix<double,ColMajor> mat,
598
- LocalHeap & lh) const override;
599
-
600
- NGS_DLL_HEADER virtual void
601
- CalcMatrix (const FiniteElement & bfel,
602
- const SIMD_BaseMappedIntegrationRule & mir,
603
- BareSliceMatrix<SIMD<double>> bmat) const override;
604
-
605
- NGS_DLL_HEADER virtual void
606
- Apply (const FiniteElement & bfel,
607
- const SIMD_BaseMappedIntegrationRule & bmir,
608
- BareSliceVector<double> x,
609
- BareSliceMatrix<SIMD<double>> flux) const override;
610
-
611
- NGS_DLL_HEADER virtual void
612
- AddTrans (const FiniteElement & bfel,
613
- const SIMD_BaseMappedIntegrationRule & bmir,
614
- BareSliceMatrix<SIMD<double>> flux,
615
- BareSliceVector<double> x) const override;
616
- };
617
-
618
-
619
-
620
-
621
- class SymDevMatrixDifferentialOperator : public DifferentialOperator
622
- {
623
- protected:
624
- shared_ptr<DifferentialOperator> diffop;
625
- int vdim;
626
- public:
627
- NGS_DLL_HEADER SymDevMatrixDifferentialOperator (shared_ptr<DifferentialOperator> adiffop,
628
- int avdim);
629
-
630
- NGS_DLL_HEADER virtual ~SymDevMatrixDifferentialOperator ();
631
-
632
- virtual string Name() const override { return diffop->Name(); }
633
- shared_ptr<DifferentialOperator> BaseDiffOp() const { return diffop; }
634
- virtual bool SupportsVB (VorB checkvb) const override { return diffop->SupportsVB(checkvb); }
635
-
636
- virtual IntRange UsedDofs(const FiniteElement & fel) const override
637
- { return IntRange(0, fel.GetNDof()); }
638
-
639
- shared_ptr<DifferentialOperator> GetTrace() const override
640
- {
641
- if (auto diffoptrace = diffop->GetTrace())
642
- return make_shared<SymMatrixDifferentialOperator> (diffoptrace, vdim);
643
- else
644
- return nullptr;
645
- }
646
-
647
- NGS_DLL_HEADER virtual void
648
- CalcMatrix (const FiniteElement & fel,
649
- const BaseMappedIntegrationPoint & mip,
650
- BareSliceMatrix<double,ColMajor> mat,
651
- LocalHeap & lh) const override;
652
-
653
- NGS_DLL_HEADER virtual void
654
- CalcMatrixVS (const FiniteElement & fel,
655
- const BaseMappedIntegrationPoint & mip,
656
- SliceMatrix<double,ColMajor> mat,
657
- LocalHeap & lh) const override;
658
-
659
- NGS_DLL_HEADER virtual void
660
- CalcMatrix (const FiniteElement & bfel,
661
- const SIMD_BaseMappedIntegrationRule & mir,
662
- BareSliceMatrix<SIMD<double>> bmat) const override;
663
-
664
- NGS_DLL_HEADER virtual void
665
- Apply (const FiniteElement & bfel,
666
- const SIMD_BaseMappedIntegrationRule & mir,
667
- BareSliceVector<double> x,
668
- BareSliceMatrix<SIMD<double>> flux) const override;
669
-
670
- NGS_DLL_HEADER virtual void
671
- AddTrans (const FiniteElement & bfel,
672
- const SIMD_BaseMappedIntegrationRule & mir,
673
- BareSliceMatrix<SIMD<double>> flux,
674
- BareSliceVector<double> y) const override;
675
-
676
- /*
677
- NGS_DLL_HEADER virtual void
678
- Apply (const FiniteElement & bfel,
679
- const SIMD_BaseMappedIntegrationRule & bmir,
680
- BareSliceVector<double> x,
681
- BareSliceMatrix<SIMD<double>> flux) const override;
682
-
683
- NGS_DLL_HEADER virtual void
684
- AddTrans (const FiniteElement & bfel,
685
- const SIMD_BaseMappedIntegrationRule & bmir,
686
- BareSliceMatrix<SIMD<double>> flux,
687
- BareSliceVector<double> x) const override;
688
- */
689
- };
690
-
691
- class SkewMatrixDifferentialOperator : public DifferentialOperator
692
- {
693
- protected:
694
- shared_ptr<DifferentialOperator> diffop;
695
- int vdim;
696
- public:
697
- NGS_DLL_HEADER SkewMatrixDifferentialOperator (shared_ptr<DifferentialOperator> adiffop,
698
- int avdim);
699
-
700
- NGS_DLL_HEADER virtual ~SkewMatrixDifferentialOperator ();
701
-
702
- virtual string Name() const override { return diffop->Name(); }
703
- shared_ptr<DifferentialOperator> BaseDiffOp() const { return diffop; }
704
- virtual bool SupportsVB (VorB checkvb) const override { return diffop->SupportsVB(checkvb); }
705
-
706
- virtual IntRange UsedDofs(const FiniteElement & fel) const override
707
- { return IntRange(0, fel.GetNDof()); }
708
-
709
- shared_ptr<DifferentialOperator> GetTrace() const override
710
- {
711
- if (auto diffoptrace = diffop->GetTrace())
712
- return make_shared<SkewMatrixDifferentialOperator> (diffoptrace, vdim);
713
- else
714
- return nullptr;
715
- }
716
-
717
- NGS_DLL_HEADER virtual void
718
- CalcMatrix (const FiniteElement & fel,
719
- const BaseMappedIntegrationPoint & mip,
720
- BareSliceMatrix<double,ColMajor> mat,
721
- LocalHeap & lh) const override;
722
-
723
- NGS_DLL_HEADER virtual void
724
- CalcMatrixVS (const FiniteElement & fel,
725
- const BaseMappedIntegrationPoint & mip,
726
- SliceMatrix<double,ColMajor> mat,
727
- LocalHeap & lh) const override;
728
-
729
- NGS_DLL_HEADER virtual void
730
- CalcMatrix (const FiniteElement & bfel,
731
- const SIMD_BaseMappedIntegrationRule & mir,
732
- BareSliceMatrix<SIMD<double>> bmat) const override;
733
-
734
- NGS_DLL_HEADER virtual void
735
- Apply (const FiniteElement & bfel,
736
- const SIMD_BaseMappedIntegrationRule & bmir,
737
- BareSliceVector<double> x,
738
- BareSliceMatrix<SIMD<double>> flux) const override;
739
-
740
- NGS_DLL_HEADER virtual void
741
- AddTrans (const FiniteElement & bfel,
742
- const SIMD_BaseMappedIntegrationRule & bmir,
743
- BareSliceMatrix<SIMD<double>> flux,
744
- BareSliceVector<double> x) const override;
745
- };
746
-
747
-
748
-
749
-
750
-
751
-
752
-
753
- class CompoundDifferentialOperator : public DifferentialOperator
754
- {
755
- shared_ptr<DifferentialOperator> diffop;
756
- int comp;
757
- public:
758
- CompoundDifferentialOperator (shared_ptr<DifferentialOperator> adiffop,
759
- int acomp)
760
- : DifferentialOperator(adiffop->Dim(), adiffop->BlockDim(),
761
- adiffop->VB(), adiffop->DiffOrder()),
762
- diffop(adiffop), comp(acomp)
763
- {
764
- // dimensions = adiffop->Dimensions();
765
- SetDimensions ( adiffop->Dimensions() );
766
- if (auto vsemb = diffop->GetVSEmbedding(); vsemb)
767
- SetVectorSpaceEmbedding (*vsemb);
768
- }
769
-
770
- virtual ~CompoundDifferentialOperator () = default;
771
- shared_ptr<DifferentialOperator> BaseDiffOp() const { return diffop; }
772
- int Component () const { return comp; }
773
- virtual bool SupportsVB (VorB checkvb) const override { return diffop->SupportsVB(checkvb); }
774
-
775
- shared_ptr<DifferentialOperator> GetTrace() const override
776
- {
777
- if (auto diffoptrace = diffop->GetTrace())
778
- return make_shared<CompoundDifferentialOperator> (diffoptrace, comp);
779
- else
780
- return nullptr;
781
- }
782
-
783
- virtual bool operator== (const DifferentialOperator & diffop2) const override
784
- {
785
- const CompoundDifferentialOperator * do2 =
786
- dynamic_cast<const CompoundDifferentialOperator*> (&diffop2);
787
- if (do2 && do2->Component() == Component())
788
- return *diffop == *(do2->diffop);
789
- return false;
790
- }
791
-
792
-
793
- virtual string Name() const override { return diffop->Name(); }
794
-
795
- virtual IntRange UsedDofs(const FiniteElement & bfel) const override
796
- {
797
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
798
- size_t base = BlockDim() * fel.GetRange(comp).First();
799
- IntRange r1 = diffop->UsedDofs(fel[comp]);
800
- return r1+base;
801
- }
802
-
803
- NGS_DLL_HEADER virtual void
804
- CalcMatrix (const FiniteElement & bfel,
805
- const BaseMappedIntegrationPoint & mip,
806
- BareSliceMatrix<double,ColMajor> mat,
807
- LocalHeap & lh) const override
808
- {
809
- mat.AddSize(Dim(), bfel.GetNDof()) = 0;
810
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
811
- IntRange r = BlockDim() * fel.GetRange(comp);
812
- diffop->CalcMatrix (fel[comp], mip, mat.Cols(r), lh);
813
- }
814
-
815
- NGS_DLL_HEADER virtual void
816
- CalcMatrixVS (const FiniteElement & bfel,
817
- const BaseMappedIntegrationPoint & mip,
818
- SliceMatrix<double,ColMajor> mat,
819
- LocalHeap & lh) const override
820
- {
821
- mat.AddSize(Dim(), bfel.GetNDof()) = 0;
822
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
823
- IntRange r = BlockDim() * fel.GetRange(comp);
824
- diffop->CalcMatrixVS (fel[comp], mip, mat.Cols(r), lh);
825
- }
826
-
827
- NGS_DLL_HEADER virtual void
828
- CalcMatrix (const FiniteElement & bfel,
829
- const BaseMappedIntegrationPoint & mip,
830
- BareSliceMatrix<Complex,ColMajor> mat,
831
- LocalHeap & lh) const override
832
- {
833
- mat.AddSize(Dim(), bfel.GetNDof()) = 0;
834
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
835
- IntRange r = BlockDim() * fel.GetRange(comp);
836
- diffop->CalcMatrix (fel[comp], mip, mat.Cols(r), lh);
837
- }
838
-
839
- NGS_DLL_HEADER virtual void
840
- CalcMatrix (const FiniteElement & bfel,
841
- const BaseMappedIntegrationRule & mir,
842
- BareSliceMatrix<double,ColMajor> mat,
843
- LocalHeap & lh) const override
844
- {
845
- mat.AddSize(Dim()*mir.Size(), bfel.GetNDof()) = 0;
846
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
847
- IntRange r = BlockDim() * fel.GetRange(comp);
848
- diffop->CalcMatrix (fel[comp], mir, mat.Cols(r), lh);
849
- }
850
-
851
- NGS_DLL_HEADER virtual void
852
- CalcMatrix (const FiniteElement & bfel,
853
- const BaseMappedIntegrationRule & mir,
854
- BareSliceMatrix<Complex,ColMajor> mat,
855
- LocalHeap & lh) const override
856
- {
857
- mat.AddSize(Dim()*mir.Size(), bfel.GetNDof()) = 0;
858
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
859
- IntRange r = BlockDim() * fel.GetRange(comp);
860
- diffop->CalcMatrix (fel[comp], mir, mat.Cols(r), lh);
861
- }
862
-
863
- NGS_DLL_HEADER virtual void
864
- CalcMatrix (const FiniteElement & bfel,
865
- const SIMD_BaseMappedIntegrationRule & mir,
866
- BareSliceMatrix<SIMD<double>> mat) const override
867
- {
868
- // mat = 0; // take care: unused elements not zerod !!!!
869
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
870
- IntRange r = Dim() * BlockDim() * fel.GetRange(comp);
871
- diffop->CalcMatrix (fel[comp], mir, mat.Rows(r));
872
- }
873
-
874
- NGS_DLL_HEADER virtual void
875
- Apply (const FiniteElement & bfel,
876
- const BaseMappedIntegrationPoint & mip,
877
- BareSliceVector<double> x,
878
- FlatVector<double> flux,
879
- LocalHeap & lh) const override
880
- {
881
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
882
- IntRange r = BlockDim() * fel.GetRange(comp);
883
- diffop->Apply (fel[comp], mip, x.Range(r), flux, lh);
884
- }
885
-
886
- NGS_DLL_HEADER virtual void
887
- Apply (const FiniteElement & bfel,
888
- const BaseMappedIntegrationPoint & mip,
889
- BareSliceVector<Complex> x,
890
- FlatVector<Complex> flux,
891
- LocalHeap & lh) const override
892
- {
893
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
894
- IntRange r = BlockDim() * fel.GetRange(comp);
895
- diffop->Apply (fel[comp], mip, x.Range(r), flux, lh);
896
- }
897
-
898
-
899
- virtual void
900
- Apply (const FiniteElement & bfel,
901
- const SIMD_BaseMappedIntegrationRule & bmir,
902
- BareSliceVector<double> x,
903
- BareSliceMatrix<SIMD<double>> flux) const override
904
- {
905
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
906
- IntRange r = BlockDim() * fel.GetRange(comp);
907
- diffop->Apply (fel[comp], bmir, x.Range(r), flux);
908
- }
909
-
910
- virtual void
911
- Apply (const FiniteElement & bfel,
912
- const SIMD_BaseMappedIntegrationRule & bmir,
913
- BareSliceVector<Complex> x,
914
- BareSliceMatrix<SIMD<Complex>> flux) const override
915
- {
916
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
917
- IntRange r = BlockDim() * fel.GetRange(comp);
918
- diffop->Apply (fel[comp], bmir, x.Range(r), flux);
919
- }
920
-
921
-
922
-
923
- NGS_DLL_HEADER virtual void
924
- ApplyTrans (const FiniteElement & bfel,
925
- const BaseMappedIntegrationPoint & mip,
926
- FlatVector<double> flux,
927
- BareSliceVector<double> x,
928
- LocalHeap & lh) const override
929
- {
930
- x.Range(0,bfel.GetNDof()) = 0;
931
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
932
- IntRange r = BlockDim() * fel.GetRange(comp);
933
- diffop->ApplyTrans (fel[comp], mip, flux, x.Range(r), lh);
934
- }
935
-
936
- NGS_DLL_HEADER virtual void
937
- ApplyTrans (const FiniteElement & bfel,
938
- const BaseMappedIntegrationPoint & mip,
939
- FlatVector<Complex> flux,
940
- BareSliceVector<Complex> x,
941
- LocalHeap & lh) const override
942
- {
943
- x.Range(0,BlockDim()*bfel.GetNDof()) = 0;
944
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
945
- IntRange r = BlockDim() * fel.GetRange(comp);
946
- diffop->ApplyTrans (fel[comp], mip, flux, x.Range(r), lh);
947
- }
948
-
949
- NGS_DLL_HEADER virtual void
950
- AddTrans (const FiniteElement & bfel,
951
- const SIMD_BaseMappedIntegrationRule & bmir,
952
- BareSliceMatrix<SIMD<double>> flux,
953
- BareSliceVector<double> x) const override
954
- {
955
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
956
- IntRange r = BlockDim() * fel.GetRange(comp);
957
- diffop->AddTrans (fel[comp], bmir, flux, x.Range(r));
958
- }
959
-
960
- NGS_DLL_HEADER virtual void
961
- AddTrans (const FiniteElement & bfel,
962
- const SIMD_BaseMappedIntegrationRule & bmir,
963
- BareSliceMatrix<SIMD<Complex>> flux,
964
- BareSliceVector<Complex> x) const override
965
- {
966
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
967
- IntRange r = BlockDim() * fel.GetRange(comp);
968
- diffop->AddTrans (fel[comp], bmir, flux, x.Range(r));
969
- }
970
-
971
-
972
- /// calculates matrix on reference element
973
-
974
- NGS_DLL_HEADER virtual int DimRef() const override
975
- {
976
- return BlockDim()*diffop->DimRef();
977
- }
978
-
979
- NGS_DLL_HEADER virtual void
980
- CalcMatrix (const FiniteElement & bfel,
981
- const IntegrationPoint & ip,
982
- BareSliceMatrix<double,ColMajor> mat,
983
- LocalHeap & lh) const override
984
- {
985
- const CompoundFiniteElement & fel = static_cast<const CompoundFiniteElement&> (bfel);
986
- IntRange r = BlockDim() * fel.GetRange(comp);
987
- mat.AddSize(DimRef(), bfel.GetNDof()) = 0.0;
988
- diffop->CalcMatrix (fel[comp], ip, mat.Cols(r), lh);
989
- }
990
-
991
-
992
- NGS_DLL_HEADER virtual void
993
- CalcTransformationMatrix (const BaseMappedIntegrationPoint & mip,
994
- SliceMatrix<double> trans,
995
- LocalHeap & lh) const override
996
- {
997
- diffop->CalcTransformationMatrix(mip, trans, lh);
998
- }
999
-
1000
-
1001
- virtual shared_ptr<CoefficientFunction>
1002
- DiffShape (shared_ptr<CoefficientFunction> proxy,
1003
- shared_ptr<CoefficientFunction> dir, bool Eulerian) const override
1004
- {
1005
- return diffop->DiffShape(proxy,dir,Eulerian);
1006
- }
1007
- };
1008
-
1009
-
1010
-
1011
-
1012
-
1013
-
1014
-
1015
-
1016
-
1017
- /**
1018
- Connect compile-time polymorph DiffOp to run-time polymorph DifferentialOperator.
1019
- */
1020
- template <typename DIFFOP>
1021
- class T_DifferentialOperator : public DifferentialOperator
1022
- {
1023
- protected:
1024
- enum { DIM_SPACE = DIFFOP::DIM_SPACE };
1025
- enum { DIM_ELEMENT = DIFFOP::DIM_ELEMENT };
1026
- enum { DIM_DMAT = DIFFOP::DIM_DMAT };
1027
- enum { DIM = DIFFOP::DIM };
1028
-
1029
- public:
1030
- T_DifferentialOperator()
1031
- : DifferentialOperator(DIFFOP::DIM_DMAT, 1, VorB(int(DIM_SPACE)-int(DIM_ELEMENT)), DIFFOP::DIFFORDER)
1032
- {
1033
- static ngcore::RegisterClassForArchive<ngfem::T_DifferentialOperator<DIFFOP>, DifferentialOperator> reg;
1034
- Array<int> hdims;
1035
- hdims = DIFFOP::GetDimensions();
1036
- SetDimensions ( hdims );
1037
- }
1038
-
1039
- virtual string Name() const override { return DIFFOP::Name(); }
1040
-
1041
- virtual bool operator== (const DifferentialOperator & diffop2) const override
1042
- { return typeid(*this) == typeid(diffop2); }
1043
-
1044
- virtual bool SupportsVB (VorB checkvb) const override { return DIFFOP::SupportsVB(checkvb); }
1045
-
1046
- virtual shared_ptr<DifferentialOperator> GetTrace() const override
1047
- {
1048
- if constexpr (is_same_v<void,typename DIFFOP::DIFFOP_TRACE>)
1049
- return nullptr;
1050
- else
1051
- return make_shared<T_DifferentialOperator<typename DIFFOP::DIFFOP_TRACE>> ();
1052
- }
1053
-
1054
- virtual void
1055
- CalcMatrix (const FiniteElement & bfel,
1056
- const BaseMappedIntegrationPoint & bmip,
1057
- BareSliceMatrix<double,ColMajor> mat,
1058
- LocalHeap & lh) const override;
1059
-
1060
- virtual void
1061
- CalcMatrix (const FiniteElement & bfel,
1062
- const BaseMappedIntegrationPoint & bmip,
1063
- BareSliceMatrix<Complex,ColMajor> mat,
1064
- LocalHeap & lh) const override;
1065
-
1066
- virtual void
1067
- CalcMatrix (const FiniteElement & bfel,
1068
- const BaseMappedIntegrationRule & bmir,
1069
- BareSliceMatrix<double,ColMajor> mat,
1070
- LocalHeap & lh) const override;
1071
-
1072
- virtual void
1073
- CalcMatrix (const FiniteElement & fel,
1074
- const SIMD_BaseMappedIntegrationRule & mir,
1075
- BareSliceMatrix<SIMD<double>> mat) const override;
1076
-
1077
- virtual void
1078
- Apply (const FiniteElement & bfel,
1079
- const BaseMappedIntegrationPoint & bmip,
1080
- BareSliceVector<double> x,
1081
- FlatVector<double> flux,
1082
- LocalHeap & lh) const override;
1083
-
1084
- #ifndef FASTCOMPILE
1085
- virtual void
1086
- Apply (const FiniteElement & bfel,
1087
- const BaseMappedIntegrationRule & bmir,
1088
- BareSliceVector<double> x,
1089
- BareSliceMatrix<double> flux,
1090
- LocalHeap & lh) const override;
1091
-
1092
- virtual void
1093
- Apply (const FiniteElement & bfel,
1094
- const BaseMappedIntegrationPoint & bmip,
1095
- BareSliceVector<Complex> x,
1096
- FlatVector<Complex> flux,
1097
- LocalHeap & lh) const override;
1098
-
1099
- virtual void
1100
- Apply (const FiniteElement & bfel,
1101
- const BaseMappedIntegrationRule & bmir,
1102
- BareSliceVector<Complex> x,
1103
- BareSliceMatrix<Complex> flux,
1104
- LocalHeap & lh) const override;
1105
-
1106
- virtual void
1107
- Apply (const FiniteElement & bfel,
1108
- const SIMD_BaseMappedIntegrationRule & bmir,
1109
- BareSliceVector<double> x,
1110
- BareSliceMatrix<SIMD<double>> flux) const override;
1111
-
1112
- virtual void
1113
- Apply (const FiniteElement & bfel,
1114
- const SIMD_BaseMappedIntegrationRule & bmir,
1115
- BareSliceVector<Complex> x,
1116
- BareSliceMatrix<SIMD<Complex>> flux) const override;
1117
-
1118
-
1119
- virtual void
1120
- ApplyTrans (const FiniteElement & bfel,
1121
- const BaseMappedIntegrationPoint & bmip,
1122
- FlatVector<double> flux,
1123
- BareSliceVector<double> x,
1124
- LocalHeap & lh) const override;
1125
-
1126
- virtual void
1127
- ApplyTrans (const FiniteElement & bfel,
1128
- const BaseMappedIntegrationPoint & bmip,
1129
- FlatVector<Complex> flux,
1130
- BareSliceVector<Complex> x,
1131
- LocalHeap & lh) const override;
1132
-
1133
- virtual void
1134
- ApplyTrans (const FiniteElement & bfel,
1135
- const BaseMappedIntegrationRule & bmir,
1136
- FlatMatrix<double> flux,
1137
- BareSliceVector<double> x,
1138
- LocalHeap & lh) const override;
1139
-
1140
- virtual void
1141
- ApplyTrans (const FiniteElement & bfel,
1142
- const BaseMappedIntegrationRule & bmir,
1143
- FlatMatrix<Complex> flux,
1144
- BareSliceVector<Complex> x,
1145
- LocalHeap & lh) const override;
1146
-
1147
- virtual void
1148
- AddTrans (const FiniteElement & bfel,
1149
- const SIMD_BaseMappedIntegrationRule & bmir,
1150
- BareSliceMatrix<SIMD<double>> flux,
1151
- BareSliceVector<double> x) const override;
1152
-
1153
- virtual void
1154
- AddTrans (const FiniteElement & bfel,
1155
- const SIMD_BaseMappedIntegrationRule & bmir,
1156
- BareSliceMatrix<SIMD<Complex>> flux,
1157
- BareSliceVector<Complex> x) const override;
1158
-
1159
-
1160
- /// calculates matrix on reference element
1161
-
1162
- virtual int DimRef() const override;
1163
-
1164
- virtual void
1165
- CalcMatrix (const FiniteElement & fel,
1166
- const IntegrationPoint & ip,
1167
- BareSliceMatrix<double,ColMajor> mat,
1168
- LocalHeap & lh) const override;
1169
-
1170
- virtual void
1171
- CalcTransformationMatrix (const BaseMappedIntegrationPoint & mip,
1172
- SliceMatrix<double> trans,
1173
- LocalHeap & lh) const override;
1174
-
1175
-
1176
-
1177
- #endif
1178
- shared_ptr<CoefficientFunction> DiffShape (shared_ptr<CoefficientFunction> proxy,
1179
- shared_ptr<CoefficientFunction> dir,
1180
- bool Eulerian) const override
1181
- {
1182
- return DIFFOP::DiffShape(proxy, dir, Eulerian);
1183
- }
1184
-
1185
- };
1186
-
1187
-
1188
-
1189
-
1190
-
1191
-
1192
-
1193
-
1194
-
1195
- // new design, code is still experimental ...
1196
- template <typename DOP, typename F>
1197
- class // [[deprecated("guess it never got over the first experimental use")]]
1198
- T_FunctionDiffOp : public DifferentialOperator
1199
- {
1200
-
1201
- // possible conversion from vector to scalar
1202
- class V2VS
1203
- {
1204
- FlatVector<> v;
1205
- FlatVector<Complex> vc;
1206
- public:
1207
- V2VS (FlatVector<> av) : v(av), vc(0,(Complex*)nullptr) { ; }
1208
- V2VS (FlatVector<Complex> avc) : v(0,(double*)nullptr), vc(avc) { ; }
1209
-
1210
- template <int D>
1211
- V2VS (Vec<D> av) : v(av) { ; }
1212
-
1213
- operator double () { return v(0); }
1214
-
1215
- operator FlatVector<> () { return v; }
1216
-
1217
- template <int D>
1218
- operator Vec<D> () { return v; }
1219
-
1220
- template <int D>
1221
- operator Vec<D,Complex> () { return vc; }
1222
- };
1223
-
1224
-
1225
- int dim;
1226
- const F & func;
1227
- public:
1228
-
1229
- T_FunctionDiffOp (const F & afunc, int adim) : func(afunc), dim(adim) { ; }
1230
-
1231
- virtual int Dim() const { return dim; }
1232
- virtual int DiffOrder () const { return 0; }
1233
- virtual void Apply (const FiniteElement & fel,
1234
- const BaseMappedIntegrationPoint & mip,
1235
- FlatVector<double> x,
1236
- FlatVector<double> flux,
1237
- LocalHeap & lh) const
1238
- {
1239
- Vec<DOP::DIM_DMAT> u;
1240
- DOP::Apply (fel, static_cast<const MappedIntegrationPoint<3,3>&> (mip), x, u, lh);
1241
- flux = func(V2VS(u));
1242
- }
1243
-
1244
- /*
1245
- virtual void Apply (const FiniteElement & fel,
1246
- const BaseMappedIntegrationPoint & mip,
1247
- FlatVector<Complex> x,
1248
- FlatVector<Complex> flux,
1249
- LocalHeap & lh) const
1250
- {
1251
- Vec<DOP::DIM_DMAT,Complex> u;
1252
- DOP::Apply (fel, static_cast<const MappedIntegrationPoint<3,3>&> (mip), x, u, lh);
1253
- flux = func(V2VS(u));
1254
- }
1255
- */
1256
- };
1257
-
1258
-
1259
-
1260
- template <typename DOP, typename F> // [[deprecated("guess it never got over the first experimental use")]]
1261
- shared_ptr<DifferentialOperator> CreateFunctionDiffOp (const DOP & dop,
1262
- const F & func, int dim = 1)
1263
- {
1264
- return make_shared<T_FunctionDiffOp<DOP, F>> (func, dim);
1265
- }
1266
-
1267
-
1268
- /* examples:
1269
-
1270
- double myexp (double x) { return exp(x); }
1271
- Vec<1> myexpVec (FlatVector<> x) { return Vec<1> (exp(x(0))); }
1272
-
1273
- CreateFunctionDiffOp(DiffOpId<2>(), myexpVec));
1274
- */
1275
-
1276
-
1277
-
1278
-
1279
-
1280
-
1281
-
1282
-
1283
- }
1284
-
1285
-
1286
- #endif