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,1352 +0,0 @@
1
- #ifndef FILE_HCURL_EQUATIONS
2
- #define FILE_HCURL_EQUATIONS
3
-
4
- /*********************************************************************/
5
- /* File: hcurl_equations.hpp */
6
- /* Author: Joachim Schoeberl */
7
- /* Date: 10. Feb. 2002 */
8
- /*********************************************************************/
9
-
10
- #include "hcurlhdiv_dshape.hpp"
11
- #include "hcurlfe.hpp"
12
- #include "diffop.hpp"
13
- #include "coefficient.hpp"
14
- #include "bdbequations.hpp"
15
-
16
- namespace ngfem
17
- {
18
-
19
-
20
- /*
21
-
22
- Maxwell integrators:
23
-
24
-
25
- Finite Element Integrators for H(curl)
26
-
27
- Mapping with covariant transformation
28
-
29
- Requires H(curl) finite elements
30
- */
31
-
32
-
33
-
34
-
35
-
36
- /// Identity operator, covariant transformation
37
- template <int D, typename FEL = HCurlFiniteElement<D> >
38
- class DiffOpIdEdge : public DiffOp<DiffOpIdEdge<D, FEL> >
39
- {
40
- public:
41
- enum { DIM = 1 };
42
- enum { DIM_SPACE = D };
43
- enum { DIM_ELEMENT = D };
44
- enum { DIM_DMAT = D };
45
- enum { DIFFORDER = 0 };
46
-
47
- static const FEL & Cast (const FiniteElement & fel)
48
- { return static_cast<const FEL&> (fel); }
49
-
50
- static constexpr bool SUPPORT_PML = true;
51
- template <typename MIP, typename MAT>
52
- static void GenerateMatrix (const FiniteElement & fel,
53
- const MIP & mip,
54
- MAT && mat, LocalHeap & lh)
55
- {
56
- // GenerateMatrix2 (fel, mip, SliceIfPossible<double> (Trans(mat)), lh);
57
- GenerateMatrix2 (fel, mip, make_BareSliceMatrix (Trans(mat)), lh);
58
- }
59
-
60
- template <typename AFEL, typename MIP, typename MAT>
61
- static void GenerateMatrix2 (const AFEL & fel, const MIP & mip,
62
- MAT && mat, LocalHeap & lh)
63
- {
64
- HeapReset hr(lh);
65
- mat = Cast(fel).GetShape(mip.IP(), lh) * mip.GetJacobianInverse();
66
- }
67
-
68
- template <typename AFEL>
69
- static void GenerateMatrix2 (const AFEL & fel,
70
- const MappedIntegrationPoint<D,D> & mip,
71
- BareSliceMatrix<> mat, LocalHeap & lh)
72
- {
73
- Cast(fel).CalcMappedShape (mip, mat);
74
- }
75
-
76
-
77
-
78
-
79
- static int DimRef() { return D; }
80
-
81
- template <typename IP, typename MAT>
82
- static void GenerateMatrixRef (const FiniteElement & fel, const IP & ip,
83
- MAT && mat, LocalHeap & lh)
84
- {
85
- Cast(fel).CalcShape (ip, Trans(mat));
86
- }
87
-
88
- template <typename MIP, typename MAT>
89
- static void CalcTransformationMatrix (const MIP & mip,
90
- MAT & mat, LocalHeap & lh)
91
- {
92
- mat = Trans(static_cast<const MappedIntegrationPoint<D,D>&>(mip).GetJacobianInverse());
93
- }
94
-
95
-
96
-
97
-
98
-
99
- static void GenerateMatrixIR (const FiniteElement & fel,
100
- const MappedIntegrationRule<D,D> & mir,
101
- BareSliceMatrix<double,ColMajor> mat, LocalHeap & lh)
102
- {
103
- Cast(fel).CalcMappedShape (mir, Trans(mat));
104
- }
105
-
106
- static void GenerateMatrixSIMDIR (const FiniteElement & fel,
107
- const SIMD_BaseMappedIntegrationRule & mir,
108
- BareSliceMatrix<SIMD<double>> mat)
109
- {
110
- Cast(fel).CalcMappedShape (mir, mat);
111
- }
112
-
113
-
114
- template <typename FEL1, typename MIP, class TVX, class TVY>
115
- static void Apply (const FEL1 & fel, const MIP & mip,
116
- const TVX & x, TVY && y,
117
- LocalHeap & lh)
118
- {
119
- // typedef typename TVX::TSCAL TSCAL;
120
- typedef decltype(RemoveConst(x(0))) TSCAL;
121
- HeapReset hr(lh);
122
- Vec<D,TSCAL> hx;
123
- hx = Trans (Cast(fel).GetShape (mip.IP(), lh)) * x;
124
- y = Trans (mip.GetJacobianInverse()) * hx;
125
- }
126
-
127
- template <typename FEL1, class TVX, class TVY>
128
- static void Apply (const FEL1 & fel, const MappedIntegrationPoint<D,D> & mip,
129
- const TVX & x, TVY && y,
130
- LocalHeap & lh)
131
- {
132
- HeapReset hr(lh);
133
- FlatMatrixFixWidth<D> shape(fel.GetNDof(), lh);
134
- Cast(fel).CalcMappedShape (mip, shape);
135
- y = Trans(shape) * x;
136
- }
137
-
138
-
139
- template <typename FEL1, typename MIP, class TVX, class TVY>
140
- static void ApplyTrans (const FEL1 & fel, const MIP & mip,
141
- const TVX & x, TVY & y,
142
- LocalHeap & lh)
143
- {
144
- typedef typename TVX::TSCAL TSCAL;
145
- HeapReset hr(lh);
146
- Vec<D,TSCAL> hx;
147
- hx = mip.GetJacobianInverse() * x;
148
- y.Range(0,fel.GetNDof()) = Cast(fel).GetShape (mip.IP(),lh) * hx;
149
- }
150
-
151
- template <typename FEL1, class TVX, class TVY>
152
- static void ApplyTrans (const FEL1 & fel, const MappedIntegrationPoint<D,D> & mip,
153
- const TVX & x, TVY & y,
154
- LocalHeap & lh)
155
- {
156
- HeapReset hr(lh);
157
- FlatMatrixFixWidth<D> shape(fel.GetNDof(), lh);
158
- Cast(fel).CalcMappedShape (mip, shape);
159
- y.Range(0,fel.GetNDof()) = shape * x;
160
- }
161
-
162
- using DiffOp<DiffOpIdEdge<D, FEL> >::ApplyIR;
163
- template <class MIR>
164
- static void ApplyIR (const FiniteElement & fel, const MIR & mir,
165
- BareSliceVector<double> x, SliceMatrix<double> y,
166
- LocalHeap & lh)
167
- {
168
- Cast(fel).Evaluate (mir, x, y);
169
- }
170
-
171
-
172
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
173
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
174
- {
175
- Cast(fel).Evaluate (mir, x, y);
176
- }
177
-
178
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
179
- BareSliceVector<Complex> x, BareSliceMatrix<SIMD<Complex>> y)
180
- {
181
- Cast(fel).Evaluate (mir, x, y);
182
- }
183
-
184
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
185
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
186
- {
187
- Cast(fel).AddTrans (mir, y, x);
188
- }
189
-
190
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
191
- BareSliceMatrix<SIMD<Complex>> y, BareSliceVector<Complex> x)
192
- {
193
- Cast(fel).AddTrans (mir, y, x);
194
- }
195
-
196
- static shared_ptr<CoefficientFunction>
197
- DiffShape (shared_ptr<CoefficientFunction> proxy,
198
- shared_ptr<CoefficientFunction> dir,
199
- bool Eulerian)
200
- {
201
- if (Eulerian) throw Exception("DiffShape Eulerian not implemented for DiffOpIdEdge");
202
- return -TransposeCF(dir->Operator("Grad")) * proxy;
203
- }
204
- };
205
-
206
-
207
-
208
-
209
-
210
-
211
-
212
-
213
- /// Operator $curl$, Piola-transformation
214
- template <int D, typename FEL = HCurlFiniteElement<D> >
215
- class DiffOpCurlEdge : public DiffOp<DiffOpCurlEdge<D, FEL> >
216
- {
217
- };
218
-
219
- template <typename FEL> class DiffOpCurlEdge<2,FEL>
220
- : public DiffOp<DiffOpCurlEdge<2, FEL> >
221
- {
222
- public:
223
- enum { DIM = 1 };
224
- enum { DIM_SPACE = 2 };
225
- enum { DIM_ELEMENT = 2 };
226
- enum { DIM_DMAT = 1 };
227
- enum { DIFFORDER = 1 };
228
-
229
- static string Name() { return "curl"; }
230
-
231
- static constexpr bool SUPPORT_PML = true;
232
-
233
- template <typename AFEL, typename MIP, typename MAT>
234
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
235
- MAT && mat, LocalHeap & lh)
236
- {
237
- HeapReset hr(lh);
238
- mat = 1.0/mip.GetJacobiDet() *
239
- Trans (static_cast<const FEL&> (fel).GetCurlShape(mip.IP(), lh));
240
- }
241
-
242
- static void GenerateMatrixSIMDIR (const FiniteElement & fel,
243
- const SIMD_BaseMappedIntegrationRule & mir,
244
- BareSliceMatrix<SIMD<double>> mat)
245
- {
246
- static_cast<const FEL&>(fel).CalcMappedCurlShape (mir, mat);
247
- }
248
-
249
- template <typename AFEL, typename MIP, class TVX, class TVY>
250
- static void Apply (const AFEL & fel, const MIP & mip,
251
- const TVX & x, TVY && y,
252
- LocalHeap & lh)
253
- {
254
- HeapReset hr(lh);
255
- y = (1.0/mip.GetJacobiDet()) *
256
- (Trans (static_cast<const FEL&>(fel).GetCurlShape(mip.IP(), lh)) * x);
257
- }
258
-
259
- using DiffOp<DiffOpCurlEdge<2> >::ApplySIMDIR;
260
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
261
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
262
- {
263
- static_cast<const FEL&> (fel).EvaluateCurl (mir, x, y);
264
- }
265
-
266
- using DiffOp<DiffOpCurlEdge<2> >::AddTransSIMDIR;
267
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
268
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
269
- {
270
- static_cast<const FEL&> (fel).AddCurlTrans (mir, y, x);
271
- }
272
-
273
- static shared_ptr<CoefficientFunction>
274
- DiffShape (shared_ptr<CoefficientFunction> proxy,
275
- shared_ptr<CoefficientFunction> dir,
276
- bool Eulerian)
277
- {
278
- if (Eulerian) throw Exception("DiffShape Eulerian not implemented for DiffOpCurlEdge");
279
- auto grad = dir->Operator("Grad");
280
- return -TraceCF(grad) * proxy;
281
- }
282
-
283
- };
284
-
285
- template <typename FEL> class DiffOpCurlEdge<3,FEL> : public DiffOp<DiffOpCurlEdge<3,FEL> >
286
- {
287
- public:
288
- enum { DIM = 1 };
289
- enum { DIM_SPACE = 3 };
290
- enum { DIM_ELEMENT = 3 };
291
- enum { DIM_DMAT = 3 };
292
- enum { DIFFORDER = 1 };
293
-
294
- static string Name() { return "curl"; }
295
-
296
- static constexpr bool SUPPORT_PML = true;
297
-
298
-
299
- template <typename MIP, typename MAT>
300
- static void GenerateMatrix (const FiniteElement & fel,
301
- const MIP & mip,
302
- MAT && mat, LocalHeap & lh)
303
- {
304
- // GenerateMatrix2 (fel, mip, SliceIfPossible<double> (Trans(mat)), lh);
305
- GenerateMatrix2 (fel, mip, make_BareSliceMatrix (Trans(mat)), lh);
306
- }
307
-
308
- template <typename AFEL, typename MIP, typename MAT>
309
- static void GenerateMatrix2 (const AFEL & fel, const MIP & mip,
310
- MAT && mat, LocalHeap & lh)
311
- {
312
- // cout << "diffopcurl: slow matrix" << endl;
313
- // cout << "mtype = " << typeid(mat).name() << endl;
314
-
315
- mat = (1.0/mip.GetJacobiDet())
316
- * (static_cast<const FEL&>(fel).GetCurlShape(mip.IP(), lh) * Trans(mip.GetJacobian()));
317
- }
318
-
319
- template <typename AFEL>
320
- static void GenerateMatrix2 (const AFEL & fel,
321
- const MappedIntegrationPoint<3,3> & mip,
322
- BareSliceMatrix<> mat, LocalHeap & lh)
323
- {
324
- static_cast<const FEL&> (fel).CalcMappedCurlShape (mip, mat);
325
- }
326
-
327
- static void GenerateMatrixIR (const FiniteElement & fel,
328
- const MappedIntegrationRule<3,3> & mir,
329
- BareSliceMatrix<double,ColMajor> mat, LocalHeap & lh)
330
- {
331
- static_cast<const FEL&> (fel).CalcMappedCurlShape (mir, Trans(mat));
332
- }
333
-
334
- static void GenerateMatrixSIMDIR (const FiniteElement & fel,
335
- const SIMD_BaseMappedIntegrationRule & mir,
336
- BareSliceMatrix<SIMD<double>> mat)
337
- {
338
- static_cast<const FEL&>(fel).CalcMappedCurlShape (mir, mat);
339
- }
340
-
341
-
342
- template <typename AFEL, typename MIP, class TVX, class TVY>
343
- static void Apply (const AFEL & fel, const MIP & mip,
344
- const TVX & x, TVY && y,
345
- LocalHeap & lh)
346
- {
347
- // typedef typename TVX::TSCAL TSCAL;
348
- // Vec<3,TSCAL> hx;
349
- auto hx = static_cast<const FEL&>(fel).EvaluateCurlShape (mip.IP(), x, lh);
350
- y = (1.0/mip.GetJacobiDet()) * (mip.GetJacobian() * hx);
351
- }
352
-
353
-
354
- template <typename AFEL, typename MIP, class TVX, class TVY>
355
- static void ApplyTrans (const AFEL & fel, const MIP & mip,
356
- const TVX & x, TVY & y,
357
- LocalHeap & lh)
358
- {
359
- typedef typename TVX::TSCAL TSCAL;
360
-
361
- Vec<3,TSCAL> hx;
362
- hx = (1.0/mip.GetJacobiDet()) * (Trans (mip.GetJacobian()) * x);
363
- y.Range(0,fel.GetNDof()) = static_cast<const FEL&>(fel).GetCurlShape(mip.IP(), lh) * hx;
364
- }
365
-
366
- using DiffOp<DiffOpCurlEdge<3> >::ApplySIMDIR;
367
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
368
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
369
- {
370
- static_cast<const FEL&> (fel).EvaluateCurl (mir, x, y);
371
- }
372
-
373
- using DiffOp<DiffOpCurlEdge<3> >::AddTransSIMDIR;
374
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
375
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
376
- {
377
- static_cast<const FEL&> (fel).AddCurlTrans (mir, y, x);
378
- }
379
-
380
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
381
- BareSliceMatrix<SIMD<Complex>> y, BareSliceVector<Complex> x)
382
- {
383
- static_cast<const FEL&> (fel).AddCurlTrans (mir, y, x);
384
- }
385
-
386
- static shared_ptr<CoefficientFunction>
387
- DiffShape (shared_ptr<CoefficientFunction> proxy,
388
- shared_ptr<CoefficientFunction> dir,
389
- bool Eulerian)
390
- {
391
- if (Eulerian) throw Exception("DiffShape Eulerian not implemented for DiffOpCurlEdge");
392
- auto grad = dir->Operator("Grad");
393
- return grad * proxy - TraceCF(grad) * proxy;
394
- }
395
- };
396
-
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
-
411
-
412
-
413
- // \int_{C} v.\tau
414
- template <int D>
415
- class DiffOpTangentialComponentEdge : public DiffOp<DiffOpTangentialComponentEdge<D> >
416
- {
417
- public:
418
- enum { DIM = D };
419
- enum { DIM_SPACE = D };
420
- enum { DIM_ELEMENT = D };
421
- enum { DIM_DMAT = 1 };
422
- enum { DIFFORDER = 0 };
423
- static constexpr bool SUPPORT_PML = true;
424
-
425
- template <typename FEL, typename MIP, typename MAT>
426
- static void GenerateMatrix (const FEL & fel, const MIP & mip,
427
- MAT & mat, LocalHeap & lh)
428
- {
429
- Vec<D> tv = mip.GetTV();
430
- Vec<D> tv_JI = mip.GetJacobianInverse () * tv;
431
-
432
- mat = Trans ( fel.GetShape(mip.IP(), lh) * tv_JI );
433
- }
434
- };
435
-
436
-
437
- /// Identity on codim 2
438
- template <int D, typename FEL = HCurlFiniteElement<D-2> >
439
- class DiffOpIdBBoundaryEdge : public DiffOp<DiffOpIdBBoundaryEdge<D,FEL> >
440
- {
441
- public:
442
- enum { DIM = 1 };
443
- enum { DIM_SPACE = D };
444
- enum { DIM_ELEMENT = D-2 };
445
- enum { DIM_DMAT = D };
446
- enum { DIFFORDER = 0 };
447
- static constexpr bool SUPPORT_PML = true;
448
-
449
- template <typename FEL1, typename MIP, typename MAT>
450
- static void GenerateMatrix (const FEL1 & fel, const MIP & mip,
451
- MAT && mat, LocalHeap & lh)
452
- {
453
- mat = Trans (mip.GetJacobianInverse ()) *
454
- Trans (static_cast<const FEL&> (fel).GetShape(mip.IP(),lh));
455
- }
456
-
457
- template <typename FEL1, typename MIP, class TVX, class TVY>
458
- static void Apply (const FEL1 & fel, const MIP & mip,
459
- const TVX & x, TVY && y,
460
- LocalHeap & lh)
461
- {
462
- typedef typename TVX::TSCAL TSCAL;
463
-
464
- Vec<DIM_ELEMENT,TSCAL> hx;
465
- hx = Trans (static_cast<const FEL&> (fel).GetShape (mip.IP(),lh)) * x;
466
- y = Trans (mip.GetJacobianInverse()) * hx;
467
- }
468
-
469
- template <typename FEL1, typename MIP, class TVX, class TVY>
470
- static void ApplyTrans (const FEL1 & fel, const MIP & mip,
471
- const TVX & x, TVY & y,
472
- LocalHeap & lh)
473
- {
474
- typedef typename TVX::TSCAL TSCAL;
475
-
476
- Vec<DIM_ELEMENT,TSCAL> hx;
477
- hx = mip.GetJacobianInverse() * x;
478
- y.Range(0, fel.GetNDof()) = static_cast<const FEL&> (fel).GetShape (mip.IP(),lh) * hx;
479
-
480
- /*
481
- FlatMatrixFixWidth<DIM_ELEMENT> mshape (y.Height(), &hv(0));
482
- FlatMatrix<> mshape2 (y.Height(), DIM_ELEMENT, &hv(0));
483
- y = mshape2 * hx;
484
- */
485
- }
486
-
487
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
488
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
489
- {
490
- static_cast<const FEL&> (fel).Evaluate (mir, x, y);
491
- }
492
-
493
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
494
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
495
- {
496
- static_cast<const FEL&> (fel).AddTrans (mir, y, x);
497
- }
498
-
499
-
500
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
501
- BareSliceVector<Complex> x, BareSliceMatrix<SIMD<Complex>> y)
502
- {
503
- static_cast<const FEL&> (fel).Evaluate (mir, x, y);
504
- }
505
-
506
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
507
- BareSliceMatrix<SIMD<Complex>> y, BareSliceVector<Complex> x)
508
- {
509
- static_cast<const FEL&> (fel).AddTrans (mir, y, x);
510
- }
511
-
512
-
513
- };
514
-
515
-
516
-
517
- /// Identity on boundary
518
- template <int D, typename FEL = HCurlFiniteElement<D-1> >
519
- class DiffOpIdBoundaryEdge : public DiffOp<DiffOpIdBoundaryEdge<D,FEL> >
520
- {
521
- public:
522
- enum { DIM = 1 };
523
- enum { DIM_SPACE = D };
524
- enum { DIM_ELEMENT = D-1 };
525
- enum { DIM_DMAT = D };
526
- enum { DIFFORDER = 0 };
527
-
528
- static constexpr bool SUPPORT_PML = true;
529
- template <typename FEL1, typename MIP, typename MAT>
530
- static void GenerateMatrix (const FEL1 & fel, const MIP & mip,
531
- MAT && mat, LocalHeap & lh)
532
- {
533
- // GenerateMatrix2 (fel, mip, SliceIfPossible<double> (Trans(mat)), lh);
534
- GenerateMatrix2 (fel, mip, make_BareSliceMatrix (Trans(mat)), lh);
535
- }
536
-
537
- template <typename AFEL, typename MIP, typename MAT>
538
- static void GenerateMatrix2 (const AFEL & fel, const MIP & mip,
539
- MAT && mat, LocalHeap & lh)
540
- {
541
- HeapReset hr(lh);
542
- mat = static_cast<const FEL&> (fel).GetShape(mip.IP(),lh)*mip.GetJacobianInverse();
543
- }
544
-
545
- template <typename AFEL>
546
- static void GenerateMatrix2 (const AFEL & fel,
547
- const MappedIntegrationPoint<D-1,D> & bmip,
548
- BareSliceMatrix<> mat, LocalHeap & lh)
549
- {
550
- static_cast<const FEL&> (fel).CalcMappedShape (bmip, mat);
551
- }
552
-
553
-
554
- static void GenerateMatrixSIMDIR (const FiniteElement & fel,
555
- const SIMD_BaseMappedIntegrationRule & mir,
556
- BareSliceMatrix<SIMD<double>> mat)
557
- {
558
- static_cast<const FEL&>(fel).CalcMappedShape (mir, mat);
559
- }
560
-
561
- template <typename FEL1, typename MIP, class TVX, class TVY>
562
- static void Apply (const FEL1 & fel, const MIP & mip,
563
- const TVX & x, TVY && y,
564
- LocalHeap & lh)
565
- {
566
- typedef typename TVX::TSCAL TSCAL;
567
- HeapReset hr(lh);
568
- Vec<D-1,TSCAL> hx;
569
- hx = Trans (static_cast<const FEL&> (fel).GetShape (mip.IP(),lh)) * x;
570
- y = Trans (mip.GetJacobianInverse()) * hx;
571
- }
572
-
573
- template <typename FEL1, typename MIP, class TVX, class TVY>
574
- static void ApplyTrans (const FEL1 & fel, const MIP & mip,
575
- const TVX & x, TVY & y,
576
- LocalHeap & lh)
577
- {
578
- typedef typename TVX::TSCAL TSCAL;
579
- HeapReset hr(lh);
580
- Vec<DIM_ELEMENT,TSCAL> hx;
581
- hx = mip.GetJacobianInverse() * x;
582
- y.Range(0,fel.GetNDof()) = static_cast<const FEL&> (fel).GetShape (mip.IP(),lh) * hx;
583
-
584
- /*
585
- FlatMatrixFixWidth<DIM_ELEMENT> mshape (y.Height(), &hv(0));
586
- FlatMatrix<> mshape2 (y.Height(), DIM_ELEMENT, &hv(0));
587
- y = mshape2 * hx;
588
- */
589
- }
590
-
591
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
592
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
593
- {
594
- static_cast<const FEL&> (fel).Evaluate (mir, x, y);
595
- }
596
-
597
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
598
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
599
- {
600
- static_cast<const FEL&> (fel).AddTrans (mir, y, x);
601
- }
602
-
603
-
604
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
605
- BareSliceVector<Complex> x, BareSliceMatrix<SIMD<Complex>> y)
606
- {
607
- static_cast<const FEL&> (fel).Evaluate (mir, x, y);
608
- }
609
-
610
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
611
- BareSliceMatrix<SIMD<Complex>> y, BareSliceVector<Complex> x)
612
- {
613
- static_cast<const FEL&> (fel).AddTrans (mir, y, x);
614
- }
615
-
616
- static shared_ptr<CoefficientFunction>
617
- DiffShape (shared_ptr<CoefficientFunction> proxy,
618
- shared_ptr<CoefficientFunction> dir,
619
- bool Eulerian)
620
- {
621
- if (Eulerian) throw Exception("DiffShape Eulerian not implemented for DiffOpIdBoundaryEdge");
622
- int dim = dir->Dimension();
623
- auto n = NormalVectorCF(dim) -> Reshape(Array<int> ( { dim, 1 } ));
624
- //n -> SetDimensions( Array<int> ( { dim, 1 } ) );
625
- auto Pn = n * TransposeCF(n);
626
-
627
- return (2*SymmetricCF(Pn * dir->Operator("Gradboundary"))
628
- -TransposeCF(dir->Operator("Gradboundary"))) * proxy;
629
- }
630
-
631
- };
632
-
633
-
634
-
635
- /// Curl on boundary
636
- template <typename FEL = HCurlFiniteElement<2> >
637
- class DiffOpCurlBoundaryEdge : public DiffOp<DiffOpCurlBoundaryEdge<FEL> >
638
- {
639
- public:
640
- enum { DIM = 1 };
641
- enum { DIM_SPACE = 3 };
642
- enum { DIM_ELEMENT = 2 };
643
- enum { DIM_DMAT = 1 };
644
- enum { DIFFORDER = 1 };
645
-
646
- static constexpr bool SUPPORT_PML = true;
647
- template <typename AFEL, typename MIP, typename MAT>
648
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
649
- MAT && mat, LocalHeap & lh)
650
- {
651
- mat = 1.0/mip.GetJacobiDet() *
652
- Trans (static_cast<const FEL&>(fel).GetCurlShape(mip.IP(),lh));
653
- }
654
-
655
- static void GenerateMatrixSIMDIR (const FiniteElement & fel,
656
- const SIMD_BaseMappedIntegrationRule & mir,
657
- BareSliceMatrix<SIMD<double>> mat)
658
- {
659
- constexpr size_t BS=16;
660
- LocalHeapMem<BS*SIMD<double>::Size()*sizeof(SIMD<MappedIntegrationPoint<2,2>>)+64> lh("genmatlh");
661
- FE_ElementTransformation<2,2> trafo2d(fel.ElementType());
662
- for (size_t first = 0; first < mir.Size(); first += BS)
663
- {
664
- HeapReset hr(lh);
665
- size_t next = std::min(first+BS, mir.Size());
666
- SIMD_MappedIntegrationRule<2,2> mir2d(mir.IR().Range(first, next), trafo2d, lh);
667
- static_cast<const FEL&>(fel).CalcMappedCurlShape (mir2d, mat.Cols(first, next));
668
- }
669
- for (size_t i = 0; i < mir.Size(); i++)
670
- mat.Col(i).Range(fel.GetNDof()) *= 1.0 / mir[i].GetJacobiDet();
671
- }
672
-
673
- template <typename AFEL, typename MIP, class TVX, class TVY>
674
- static void Apply (const AFEL & fel, const MIP & mip,
675
- const TVX & x, TVY && y,
676
- LocalHeap & lh)
677
- {
678
- y = (1.0/mip.GetJacobiDet()) *
679
- (Trans (static_cast<const FEL&> (fel).GetCurlShape(mip.IP(),lh)) * x);
680
- }
681
-
682
- template <typename AFEL, typename MIP, class TVX, class TVY>
683
- static void ApplyTrans (const AFEL & fel, const MIP & mip,
684
- const TVX & x, TVY & y,
685
- LocalHeap & lh)
686
- {
687
- y.Range(0,fel.GetNDof()) = static_cast<const FEL&>(fel).GetCurlShape(mip.IP(),lh) * ((1.0/mip.GetJacobiDet()) * x);
688
-
689
- }
690
- };
691
-
692
-
693
-
694
- template <typename FEL = HCurlFiniteElement<2> >
695
- class DiffOpCurlBoundaryEdgeVec : public DiffOp<DiffOpCurlBoundaryEdgeVec<FEL> >
696
- {
697
- public:
698
- enum { DIM = 1 };
699
- enum { DIM_SPACE = 3 };
700
- enum { DIM_ELEMENT = 2 };
701
- enum { DIM_DMAT = 3 };
702
- enum { DIFFORDER = 1 };
703
-
704
- static constexpr bool SUPPORT_PML = true;
705
- static const FEL & Cast (const FiniteElement & fel)
706
- { return static_cast<const FEL&> (fel); }
707
-
708
- template <typename AFEL, typename MIP, typename MAT>
709
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
710
- MAT && mat, LocalHeap & lh)
711
- {
712
- auto scaled_nv = (1.0/mip.GetJacobiDet()) * mip.GetNV();
713
- mat = scaled_nv * Trans(Cast(fel).GetCurlShape (mip.IP(), lh));
714
- }
715
-
716
- static void GenerateMatrixSIMDIR (const FiniteElement & fel,
717
- const SIMD_BaseMappedIntegrationRule & mir,
718
- BareSliceMatrix<SIMD<double>> mat)
719
- {
720
- static_cast<const FEL&>(fel).CalcMappedCurlShape (mir, mat);
721
- }
722
-
723
-
724
- template <typename AFEL, typename MIP, class TVX, class TVY>
725
- static void Apply (const AFEL & fel, const MIP & mip,
726
- const TVX & x, TVY && y,
727
- LocalHeap & lh)
728
- {
729
- y = ( (1.0/mip.GetJacobiDet())*(InnerProduct (Cast(fel).GetCurlShape (mip.IP(), lh), x) )) * mip.GetNV();
730
- }
731
-
732
- template <typename AFEL, typename MIP, class TVX, class TVY>
733
- static void ApplyTrans (const AFEL & fel, const MIP & mip,
734
- const TVX & x, TVY & y,
735
- LocalHeap & lh)
736
- {
737
- y.Range(0,fel.GetNDof()) =
738
- ((1.0/mip.GetJacobiDet())* InnerProduct (x, mip.GetNV()) ) * Cast(fel).GetCurlShape (mip.IP(), lh).AsVector();
739
- }
740
-
741
- static shared_ptr<CoefficientFunction>
742
- DiffShape (shared_ptr<CoefficientFunction> proxy,
743
- shared_ptr<CoefficientFunction> dir,
744
- bool Eulerian)
745
- {
746
- if (Eulerian) throw Exception("DiffShape Eulerian not implemented for DiffOpCurlBoundaryEdge");
747
- auto grad = dir->Operator("Gradboundary");
748
- return -TraceCF(grad)*proxy + grad * proxy;
749
- }
750
- };
751
-
752
-
753
- template <int D>
754
- class DiffOpHCurlDualBoundary;
755
-
756
- /// Dual operator for HCurl
757
- template <int D>
758
- class DiffOpHCurlDual : public DiffOp<DiffOpHCurlDual<D> >
759
- {
760
- public:
761
- typedef DiffOp<DiffOpHCurlDual<D>> BASE;
762
- enum { DIM = 1 };
763
- enum { DIM_SPACE = D };
764
- enum { DIM_ELEMENT = D };
765
- enum { DIM_DMAT = D };
766
- enum { DIFFORDER = 0 };
767
-
768
- typedef DiffOpHCurlDualBoundary<D> DIFFOP_TRACE;
769
-
770
- static auto & Cast (const FiniteElement & fel)
771
- { return static_cast<const HCurlFiniteElement<D>&> (fel); }
772
-
773
-
774
- template <typename AFEL, typename MIP, typename MAT,
775
- typename std::enable_if<std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
776
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
777
- MAT && mat, LocalHeap & lh)
778
- {
779
- Cast(fel).CalcDualShape (mip, Trans(mat));
780
- }
781
- template <typename AFEL, typename MIP, typename MAT,
782
- typename std::enable_if<!std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
783
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
784
- MAT && mat, LocalHeap & lh)
785
- {
786
- // fel.CalcDualShape (mip, mat);
787
- throw Exception(string("DiffOpHCurlDual not available for mat ")+typeid(mat).name());
788
- }
789
-
790
- static void GenerateMatrixSIMDIR (const FiniteElement & fel,
791
- const SIMD_BaseMappedIntegrationRule & mir,
792
- BareSliceMatrix<SIMD<double>> mat)
793
- {
794
- Cast(fel).CalcDualShape (mir, mat);
795
- }
796
-
797
- using BASE::ApplySIMDIR;
798
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
799
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
800
- {
801
- Cast(fel).EvaluateDual (mir, x, y);
802
- }
803
-
804
- using BASE::AddTransSIMDIR;
805
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
806
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
807
- {
808
- Cast(fel).AddDualTrans (mir, y, x);
809
- }
810
-
811
- };
812
-
813
- /// Dual boundary operator for HCurl
814
- template <int D>
815
- class DiffOpHCurlDualBoundary : public DiffOp<DiffOpHCurlDualBoundary<D> >
816
- {
817
- public:
818
- typedef DiffOp<DiffOpHCurlDualBoundary<D>> BASE;
819
- enum { DIM = 1 };
820
- enum { DIM_SPACE = D };
821
- enum { DIM_ELEMENT = D-1 };
822
- enum { DIM_DMAT = D };
823
- enum { DIFFORDER = 0 };
824
-
825
- typedef void DIFFOP_TRACE;
826
-
827
- static auto & Cast (const FiniteElement & fel)
828
- { return static_cast<const HCurlFiniteElement<D-1>&> (fel); }
829
-
830
-
831
- template <typename AFEL, typename MIP, typename MAT,
832
- typename std::enable_if<std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
833
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
834
- MAT && mat, LocalHeap & lh)
835
- {
836
- Cast(fel).CalcDualShape (mip, Trans(mat));
837
- }
838
- template <typename AFEL, typename MIP, typename MAT,
839
- typename std::enable_if<!std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
840
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
841
- MAT & mat, LocalHeap & lh)
842
- {
843
- throw Exception(string("DiffOpHCurlDual not available for mat ")+typeid(mat).name());
844
- }
845
-
846
- static void GenerateMatrixSIMDIR (const FiniteElement & fel,
847
- const SIMD_BaseMappedIntegrationRule & mir,
848
- BareSliceMatrix<SIMD<double>> mat)
849
- {
850
- Cast(fel).CalcDualShape (mir, mat);
851
- }
852
-
853
- using BASE::ApplySIMDIR;
854
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
855
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
856
- {
857
- Cast(fel).EvaluateDual (mir, x, y);
858
- }
859
-
860
- using BASE::AddTransSIMDIR;
861
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
862
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
863
- {
864
- Cast(fel).AddDualTrans (mir, y, x);
865
- }
866
-
867
- };
868
-
869
-
870
-
871
-
872
-
873
- // bilinearform integrators
874
-
875
-
876
-
877
- /*
878
- ///
879
- template <int D, typename FEL = HCurlFiniteElement<D> >
880
- class CurlCurlEdgeIntegrator
881
- : public T_BDBIntegrator<DiffOpCurlEdge<D>, DiagDMat<DIM_CURL_TRAIT<D>::DIM>, FEL>
882
- {
883
- typedef T_BDBIntegrator<DiffOpCurlEdge<D>, DiagDMat<DIM_CURL_TRAIT<D>::DIM>, FEL> BASE;
884
- public:
885
- using BASE::T_BDBIntegrator;
886
- virtual string Name () const { return "CurlCurlEdge"; }
887
- };
888
- */
889
-
890
- template <int D>
891
- using CurlCurlEdgeIntegrator = T_BDBIntegrator<DiffOpCurlEdge<D>, DiagDMat<DIM_CURL_(D)>, HCurlFiniteElement<D>>;
892
-
893
-
894
-
895
- ///
896
- class CurlCurlBoundaryEdgeIntegrator
897
- : public T_BDBIntegrator<DiffOpCurlBoundaryEdge<>, DiagDMat<1>, HCurlFiniteElement<2> >
898
- {
899
- typedef T_BDBIntegrator<DiffOpCurlBoundaryEdge<>, DiagDMat<1>, HCurlFiniteElement<2> > BASE;
900
- public:
901
- using T_BDBIntegrator<DiffOpCurlBoundaryEdge<>, DiagDMat<1>, HCurlFiniteElement<2> >::T_BDBIntegrator;
902
- ///
903
- virtual bool BoundaryForm () const { return 1; }
904
- ///
905
- virtual string Name () const { return "CurlCurlBoundaryEdge"; }
906
- };
907
-
908
- ///
909
- template <int D, typename FEL = HCurlFiniteElement<D> >
910
- class CurlCurlEdgeOrthoIntegrator
911
- : public T_BDBIntegrator<DiffOpCurlEdge<D>, OrthoDMat<DIM_CURL_(D)>, FEL>
912
- {
913
- typedef T_BDBIntegrator<DiffOpCurlEdge<D>, OrthoDMat<DIM_CURL_(D)>, FEL> BASE;
914
- public:
915
- using T_BDBIntegrator<DiffOpCurlEdge<D>, OrthoDMat<DIM_CURL_(D)>, FEL>::T_BDBIntegrator;
916
- ///
917
- virtual string Name () const { return "CurlCurlEdgeOrtho"; }
918
- };
919
-
920
-
921
-
922
- /*
923
- ///
924
- template <int D, typename FEL = HCurlFiniteElement<D> >
925
- class MassEdgeIntegrator
926
- : public T_BDBIntegrator<DiffOpIdEdge<D>, DiagDMat<D>, FEL>
927
- {
928
- typedef T_BDBIntegrator<DiffOpIdEdge<D>, DiagDMat<D>, FEL> BASE;
929
- public:
930
- using BASE::T_BDBIntegrator;
931
- ///
932
- virtual string Name () const { return "MassEdge"; }
933
- };
934
- */
935
-
936
- template <int D>
937
- using MassEdgeIntegrator = T_BDBIntegrator<DiffOpIdEdge<D>, DiagDMat<D>, HCurlFiniteElement<D>>;
938
-
939
-
940
- ///
941
- template <int D, typename FEL = HCurlFiniteElement<D> >
942
- class MassEdgeOrthoIntegrator
943
- : public T_BDBIntegrator<DiffOpIdEdge<D>, OrthoDMat<D>, FEL>
944
- {
945
- public:
946
- using T_BDBIntegrator<DiffOpIdEdge<D>, OrthoDMat<D>, FEL>::T_BDBIntegrator;
947
- /*
948
- ///
949
- MassEdgeOrthoIntegrator (CoefficientFunction * coeff1,
950
- CoefficientFunction * coeff2)
951
- : T_BDBIntegrator<DiffOpIdEdge<D>, OrthoDMat<D>, FEL> (OrthoDMat<D> (coeff1, coeff2))
952
- { ; }
953
-
954
- MassEdgeOrthoIntegrator (CoefficientFunction * coeff1,
955
- CoefficientFunction * coeff2,
956
- CoefficientFunction * coeff3)
957
- : T_BDBIntegrator<DiffOpIdEdge<D>, OrthoDMat<D>, FEL> (OrthoDMat<D> (coeff1, coeff2, coeff3))
958
- { ; }
959
-
960
- static Integrator * Create (Array<CoefficientFunction*> & coeffs)
961
- {
962
- if (D == 2)
963
- return new MassEdgeOrthoIntegrator (coeffs[0], coeffs[1]);
964
- else
965
- return new MassEdgeOrthoIntegrator (coeffs[0], coeffs[1], coeffs[2]);
966
- }
967
- */
968
- ///
969
- virtual string Name () const { return "MassEdgeOrtho"; }
970
- };
971
-
972
-
973
-
974
-
975
-
976
- ///
977
- template <int D, typename FEL = HCurlFiniteElement<D-1> >
978
- class RobinEdgeIntegrator
979
- : public T_BDBIntegrator<DiffOpIdBoundaryEdge<D,FEL>, DiagDMat<D>, FEL>
980
- {
981
- typedef T_BDBIntegrator<DiffOpIdBoundaryEdge<D,FEL>, DiagDMat<D>, FEL> BASE;
982
- public:
983
- using T_BDBIntegrator<DiffOpIdBoundaryEdge<D,FEL>, DiagDMat<D>, FEL>::T_BDBIntegrator;
984
- virtual string Name () const { return "RobinEdge"; }
985
- };
986
-
987
-
988
-
989
-
990
-
991
- // Linearform integrators
992
-
993
- template <int D, typename FEL = HCurlFiniteElement<D> >
994
- class NGS_DLL_HEADER SourceEdgeIntegrator
995
- : public T_BIntegrator<DiffOpIdEdge<D>, DVec<D>, FEL>
996
- {
997
- typedef T_BIntegrator<DiffOpIdEdge<D>, DVec<D>, FEL> BASE;
998
- public:
999
- using T_BIntegrator<DiffOpIdEdge<D>, DVec<D>, FEL>::T_BIntegrator;
1000
- virtual string Name () const { return "SourceEdge"; }
1001
- };
1002
-
1003
-
1004
-
1005
-
1006
-
1007
-
1008
-
1009
-
1010
- ///
1011
- template <int D, typename FEL = HCurlFiniteElement<D> >
1012
- class TangentialSourceEdgeIntegrator
1013
- : public T_BIntegrator<DiffOpIdEdge<D>, TVec<D>, FEL>
1014
- {
1015
- public:
1016
- using T_BIntegrator<DiffOpIdEdge<D>, TVec<D>, FEL>::T_BIntegrator;
1017
- ///
1018
- virtual string Name () const { return "TangentialSourceEdge"; }
1019
- };
1020
-
1021
-
1022
- ///
1023
- template <int D, typename FEL = HCurlFiniteElement<D-1> >
1024
- class NeumannEdgeIntegrator
1025
- : public T_BIntegrator<DiffOpIdBoundaryEdge<D,FEL>, DVec<D>, FEL>
1026
- {
1027
- typedef T_BIntegrator<DiffOpIdBoundaryEdge<D,FEL>, DVec<D>, FEL> BASE;
1028
- public:
1029
- using T_BIntegrator<DiffOpIdBoundaryEdge<D,FEL>, DVec<D>, FEL>::T_BIntegrator;
1030
- ///
1031
- /*
1032
- NeumannEdgeIntegrator (CoefficientFunction * coeff1,
1033
- CoefficientFunction * coeff2,
1034
- CoefficientFunction * coeff3)
1035
- : T_BIntegrator<DiffOpIdBoundaryEdge<D,FEL>,DVec<D>, FEL>
1036
- (DVec<D> (coeff1, coeff2, coeff3))
1037
- { ; }
1038
- NeumannEdgeIntegrator (CoefficientFunction * coeff1,
1039
- CoefficientFunction * coeff2)
1040
- : T_BIntegrator<DiffOpIdBoundaryEdge<D,FEL>,DVec<D>, FEL>
1041
- (DVec<D> (coeff1, coeff2))
1042
- { ; }
1043
-
1044
- NeumannEdgeIntegrator (Array<CoefficientFunction*> & coeffs)
1045
- : T_BIntegrator<DiffOpIdBoundaryEdge<D,FEL>,DVec<D>, FEL>
1046
- (DVec<D> (coeffs))
1047
- { ; }
1048
- */
1049
-
1050
- /*
1051
- static Integrator * Create (Array<CoefficientFunction*> & coeffs)
1052
- {
1053
- if (D == 3)
1054
- return new NeumannEdgeIntegrator<3> (coeffs[0], coeffs[1], coeffs[2]);
1055
- else
1056
- return new NeumannEdgeIntegrator<2> (coeffs[0], coeffs[1]);
1057
- }
1058
- */
1059
- ///
1060
- virtual bool BoundaryForm () const { return 1; }
1061
- ///
1062
- virtual string Name () const { return "NeumannEdge"; }
1063
- };
1064
-
1065
-
1066
-
1067
-
1068
-
1069
-
1070
- ///
1071
- template <int D, typename FEL = HCurlFiniteElement<D> >
1072
- class CurlEdgeIntegrator
1073
- : public T_BIntegrator<DiffOpCurlEdge<D>, DVec<DIM_CURL_(D)>, FEL>
1074
- {
1075
- typedef T_BIntegrator<DiffOpCurlEdge<D>, DVec<DIM_CURL_(D)>, FEL> BASE;
1076
- public:
1077
- using T_BIntegrator<DiffOpCurlEdge<D>, DVec<DIM_CURL_(D)>, FEL>::T_BIntegrator;
1078
- /*
1079
- ///
1080
- CurlEdgeIntegrator (CoefficientFunction * coeff1)
1081
- : T_BIntegrator<DiffOpCurlEdge<D>, DVec<DIM_CURL_TRAIT<D>::DIM>, FEL>
1082
- (DVec<DIM_CURL_TRAIT<D>::DIM> (coeff1))
1083
- { ; }
1084
-
1085
- CurlEdgeIntegrator (CoefficientFunction * coeffx,
1086
- CoefficientFunction * coeffy,
1087
- CoefficientFunction * coeffz)
1088
- : T_BIntegrator<DiffOpCurlEdge<D,FEL>, DVec<DIM_CURL_TRAIT<D>::DIM>, FEL>
1089
- (DVec<DIM_CURL_TRAIT<D>::DIM> (coeffx, coeffy, coeffz))
1090
- { ; }
1091
-
1092
- CurlEdgeIntegrator (Array<CoefficientFunction*> & coeffs)
1093
- : T_BIntegrator<DiffOpCurlEdge<D,FEL>, DVec<DIM_CURL_TRAIT<D>::DIM>, FEL>
1094
- (DVec<DIM_CURL_TRAIT<D>::DIM> (coeffs))
1095
- { ; }
1096
- */
1097
-
1098
-
1099
- /*
1100
- static Integrator * Create (Array<CoefficientFunction*> & coeffs)
1101
- {
1102
- if (D == 2)
1103
- return new CurlEdgeIntegrator<2> (coeffs[0]);
1104
- else
1105
- return new CurlEdgeIntegrator<3> (coeffs[0], coeffs[1], coeffs[2]);
1106
- }
1107
- */
1108
-
1109
- ///
1110
- virtual bool BoundaryForm () const { return 0; }
1111
- ///
1112
- virtual string Name () const { return "CurlEdge"; }
1113
- };
1114
-
1115
-
1116
-
1117
-
1118
- ///
1119
- template <typename FEL = HCurlFiniteElement<2> >
1120
- class CurlBoundaryEdgeIntegrator
1121
- : public T_BIntegrator<DiffOpCurlBoundaryEdge<FEL>, DVec<1>, FEL>
1122
- {
1123
- typedef T_BIntegrator<DiffOpCurlBoundaryEdge<FEL>, DVec<1>, FEL> BASE;
1124
- public:
1125
- using T_BIntegrator<DiffOpCurlBoundaryEdge<FEL>, DVec<1>, FEL>::T_BIntegrator;
1126
- /*
1127
- ///
1128
- CurlBoundaryEdgeIntegrator (CoefficientFunction * coeff1)
1129
- : T_BIntegrator<DiffOpCurlBoundaryEdge<FEL>, DVec<1>, FEL>
1130
- (DVec<1> (coeff1))
1131
- { ; }
1132
-
1133
- static Integrator * Create (Array<CoefficientFunction*> & coeffs)
1134
- {
1135
- return new CurlBoundaryEdgeIntegrator (coeffs[0]);
1136
- }
1137
- */
1138
- ///
1139
- virtual bool BoundaryForm () const { return 1; }
1140
- ///
1141
- virtual string Name () const { return "CurlBoundaryEdge"; }
1142
- };
1143
-
1144
-
1145
-
1146
-
1147
- template <int D, typename FEL = HCurlFiniteElement<D-1> >
1148
- class DiffOpGradientBoundaryHCurl;
1149
-
1150
- /// Gradient operator for HCurl
1151
- template <int D, typename FEL = HCurlFiniteElement<D> >
1152
- // class DiffOpGradientHCurl : public DiffOp<DiffOpGradientHCurl<D> >
1153
- class DiffOpGradientHCurl : public NumDiffGradient<DiffOpGradientHCurl<D>, DiffOpIdEdge<D>, FEL>
1154
- {
1155
- typedef NumDiffGradient<DiffOpGradientHCurl<D>, DiffOpIdEdge<D>, FEL> BASE;
1156
- public:
1157
- using BASE::eps;
1158
- using BASE::DIM_ELEMENT;
1159
- using BASE::DIM_SPACE;
1160
-
1161
- // enum { DIM = 1 };
1162
- // enum { DIM_SPACE = D };
1163
- // enum { DIM_ELEMENT = D };
1164
- // enum { DIM_DMAT = D*D };
1165
- // enum { DIFFORDER = 1 };
1166
-
1167
- static string Name() { return "grad"; }
1168
-
1169
- static Array<int> GetDimensions() { return Array<int> ( { DIM_SPACE, DIM_SPACE } ); }
1170
-
1171
- // static constexpr double eps() { return 1e-4; }
1172
-
1173
- typedef DiffOpGradientBoundaryHCurl<D> DIFFOP_TRACE;
1174
- ///
1175
-
1176
- /*
1177
- template <typename AFEL, typename SIP, typename MAT,
1178
- typename std::enable_if<!std::is_convertible<MAT,SliceMatrix<double,ColMajor>>::value, int>::type = 0>
1179
- static void GenerateMatrix (const AFEL & fel, const SIP & sip,
1180
- MAT & mat, LocalHeap & lh)
1181
- {
1182
- cout << "nicht gut" << endl;
1183
- cout << "type(fel) = " << typeid(fel).name() << ", sip = " << typeid(sip).name()
1184
- << ", mat = " << typeid(mat).name() << endl;
1185
- }
1186
-
1187
- // template <typename AFEL, typename SIP>
1188
- // static void GenerateMatrix (const AFEL & fel, const SIP & sip,
1189
- // SliceMatrix<double,ColMajor> mat, LocalHeap & lh)
1190
- template <typename AFEL, typename MIP, typename MAT,
1191
- typename std::enable_if<std::is_convertible<MAT,SliceMatrix<double,ColMajor>>::value, int>::type = 0>
1192
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
1193
- MAT mat, LocalHeap & lh)
1194
- {
1195
- // cout << "gen matrix" << endl;
1196
- CalcDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(fel), mip, Trans(mat), lh, eps());
1197
- }
1198
-
1199
-
1200
- template <typename AFEL, typename MIP, class TVX, class TVY>
1201
- static void Apply (const AFEL & fel, const MIP & mip,
1202
- const TVX & x, TVY && y,
1203
- LocalHeap & lh)
1204
- {
1205
- // cout << "apply matrix" << endl;
1206
- // typedef typename TVX::TSCAL TSCAL;
1207
- HeapReset hr(lh);
1208
- FlatMatrixFixWidth<D*D> hm(fel.GetNDof(),lh);
1209
- CalcDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(fel), mip, hm, lh, eps());
1210
- y = Trans(hm)*x;
1211
- }
1212
-
1213
- template <typename AFEL, typename MIP, class TVX, class TVY>
1214
- static void ApplyTrans (const AFEL & fel, const MIP & mip,
1215
- const TVX & x, TVY & by,
1216
- LocalHeap & lh)
1217
- {
1218
- ApplyTransDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(fel), mip, x, by, lh, eps());
1219
- }
1220
-
1221
- static void GenerateMatrixSIMDIR (const FiniteElement & bfel,
1222
- const SIMD_BaseMappedIntegrationRule & bmir, BareSliceMatrix<SIMD<double>> mat)
1223
- {
1224
- // cout << "gen matrix simd" << endl;
1225
- CalcSIMDDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(bfel), static_cast<const SIMD_MappedIntegrationRule<D,D> &>(bmir), mat, eps());
1226
- }
1227
-
1228
- using BASE::ApplySIMDIR;
1229
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & bmir,
1230
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
1231
- {
1232
- cout << "apply simd" << endl;
1233
- ApplySIMDDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(fel), bmir, x, y, eps());
1234
- }
1235
-
1236
- using DiffOp<DiffOpGradientHCurl<D>>::AddTransSIMDIR;
1237
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & bmir,
1238
- BareSliceMatrix<SIMD<double>> x, BareSliceVector<double> y)
1239
- {
1240
- AddTransSIMDDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(fel), bmir, x, y, eps());
1241
- }
1242
- */
1243
-
1244
- };
1245
-
1246
- /// Boundary Gradient operator for HCurl
1247
- template <int D, typename FEL>// = HCurlFiniteElement<D-1> >
1248
- class DiffOpGradientBoundaryHCurl : public DiffOp<DiffOpGradientBoundaryHCurl<D> >
1249
- {
1250
- public:
1251
- enum { DIM = 1 };
1252
- enum { DIM_SPACE = D };
1253
- enum { DIM_ELEMENT = D-1 };
1254
- enum { DIM_DMAT = D*D };
1255
- enum { DIFFORDER = 1 };
1256
-
1257
- static string Name() { return "gradboundary"; }
1258
-
1259
- static Array<int> GetDimensions() { return Array<int> ( { DIM_SPACE, DIM_SPACE } ); }
1260
-
1261
- static constexpr double eps() { return 1e-6; }
1262
-
1263
- typedef void DIFFOP_TRACE;
1264
- ///
1265
- template <typename AFEL, typename SIP, typename MAT,
1266
- typename std::enable_if<!std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
1267
- static void GenerateMatrix (const AFEL & fel, const SIP & sip,
1268
- MAT && mat, LocalHeap & lh)
1269
- {
1270
- cout << "nicht gut" << endl;
1271
- cout << "type(fel) = " << typeid(fel).name() << ", sip = " << typeid(sip).name()
1272
- << ", mat = " << typeid(mat).name() << endl;
1273
- }
1274
-
1275
- template <typename AFEL, typename MIP, typename MAT,
1276
- typename std::enable_if<std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
1277
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
1278
- MAT mat, LocalHeap & lh)
1279
- {
1280
- CalcDShapeFE<FEL,D,D-1,D>(static_cast<const FEL&>(fel), mip, Trans(mat), lh, eps());
1281
- }
1282
- };
1283
-
1284
-
1285
-
1286
-
1287
-
1288
-
1289
-
1290
-
1291
-
1292
-
1293
-
1294
- #ifdef FILE_HCURL_EQUATIONS_CPP
1295
- #define HCURL_EQUATIONS_EXTERN
1296
- #else
1297
- #define HCURL_EQUATIONS_EXTERN extern
1298
- #endif
1299
-
1300
- HCURL_EQUATIONS_EXTERN template class DiffOpIdEdge<2>;
1301
- HCURL_EQUATIONS_EXTERN template class DiffOpIdEdge<3>;
1302
-
1303
- HCURL_EQUATIONS_EXTERN template class DiffOpCurlEdge<2>;
1304
- HCURL_EQUATIONS_EXTERN template class DiffOpCurlEdge<3>;
1305
-
1306
-
1307
- HCURL_EQUATIONS_EXTERN template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpIdEdge<2> >;
1308
- HCURL_EQUATIONS_EXTERN template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpIdEdge<3> >;
1309
- HCURL_EQUATIONS_EXTERN template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpIdBoundaryEdge<2> >;
1310
- HCURL_EQUATIONS_EXTERN template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpIdBoundaryEdge<3> >;
1311
- HCURL_EQUATIONS_EXTERN template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpCurlEdge<2> >;
1312
- HCURL_EQUATIONS_EXTERN template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpCurlEdge<3> >;
1313
- HCURL_EQUATIONS_EXTERN template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpCurlBoundaryEdge<> >;
1314
-
1315
- // HCURL_EQUATIONS_EXTERN template class MassEdgeIntegrator<2>;
1316
- // HCURL_EQUATIONS_EXTERN template class MassEdgeIntegrator<3>;
1317
-
1318
- HCURL_EQUATIONS_EXTERN template class RobinEdgeIntegrator<2>;
1319
- HCURL_EQUATIONS_EXTERN template class RobinEdgeIntegrator<3>;
1320
-
1321
- // HCURL_EQUATIONS_EXTERN template class CurlCurlEdgeIntegrator<2>;
1322
- // HCURL_EQUATIONS_EXTERN template class CurlCurlEdgeIntegrator<3>;
1323
-
1324
- // HCURL_EQUATIONS_EXTERN template class MassEdgeAnisotropicIntegrator<3>;
1325
-
1326
- HCURL_EQUATIONS_EXTERN template class T_BDBIntegrator<DiffOpIdEdge<2>, DiagDMat<2>, HCurlFiniteElement<2>>;
1327
- HCURL_EQUATIONS_EXTERN template class T_BDBIntegrator<DiffOpIdEdge<3>, DiagDMat<3>, HCurlFiniteElement<3>>;
1328
- // HCURL_EQUATIONS_EXTERN template class T_BDBIntegrator<DiffOpIdEdge<3>, SymDMat<3>, HCurlFiniteElement<3>>;
1329
- HCURL_EQUATIONS_EXTERN template class T_BDBIntegrator<DiffOpIdBoundaryEdge<2>, DiagDMat<2>, HCurlFiniteElement<1>>;
1330
- HCURL_EQUATIONS_EXTERN template class T_BDBIntegrator<DiffOpIdBoundaryEdge<3>, DiagDMat<3>, HCurlFiniteElement<2>>;
1331
- HCURL_EQUATIONS_EXTERN template class T_BDBIntegrator<DiffOpCurlEdge<2>, DiagDMat<1>, HCurlFiniteElement<2>>;
1332
- HCURL_EQUATIONS_EXTERN template class T_BDBIntegrator<DiffOpCurlEdge<3>, DiagDMat<3>, HCurlFiniteElement<3>>;
1333
- HCURL_EQUATIONS_EXTERN template class T_BDBIntegrator<DiffOpCurlBoundaryEdge<>, DiagDMat<1>, HCurlFiniteElement<2> >;
1334
-
1335
- HCURL_EQUATIONS_EXTERN template class SourceEdgeIntegrator<2, HCurlFiniteElement<2>>;
1336
- HCURL_EQUATIONS_EXTERN template class SourceEdgeIntegrator<3, HCurlFiniteElement<3>>;
1337
-
1338
- HCURL_EQUATIONS_EXTERN template class T_BIntegrator<DiffOpIdEdge<2>, DVec<2>, HCurlFiniteElement<2>>;
1339
- HCURL_EQUATIONS_EXTERN template class T_BIntegrator<DiffOpIdEdge<3>, DVec<3>, HCurlFiniteElement<3>>;
1340
- HCURL_EQUATIONS_EXTERN template class T_BIntegrator<DiffOpIdBoundaryEdge<2>, DVec<2>, HCurlFiniteElement<1>>;
1341
- HCURL_EQUATIONS_EXTERN template class T_BIntegrator<DiffOpIdBoundaryEdge<3>, DVec<3>, HCurlFiniteElement<2>>;
1342
- HCURL_EQUATIONS_EXTERN template class T_BIntegrator<DiffOpCurlEdge<2>, DVec<1>, HCurlFiniteElement<2>>;
1343
- HCURL_EQUATIONS_EXTERN template class T_BIntegrator<DiffOpCurlEdge<3>, DVec<3>, HCurlFiniteElement<3>>;
1344
-
1345
-
1346
- /*
1347
- HCURL_EQUATIONS_EXTERN template class
1348
- HCURL_EQUATIONS_EXTERN template class
1349
- */
1350
- }
1351
-
1352
- #endif