ngsolve 6.2.2501__cp312-cp312-macosx_10_15_universal2.whl → 6.2.2501.post37.dev1__cp312-cp312-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.dist-info → ngsolve-6.2.2501.post37.dev1.dist-info}/METADATA +2 -2
  3. ngsolve-6.2.2501.post37.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 -15
  237. ngsolve/eigenvalues.pyi +0 -30
  238. ngsolve/fem.pyi +0 -1707
  239. ngsolve/krylovspace.pyi +0 -301
  240. ngsolve/la.pyi +0 -1218
  241. ngsolve/ngslib.so +0 -0
  242. ngsolve/ngstd.pyi +0 -58
  243. ngsolve/nonlinearsolvers.pyi +0 -97
  244. ngsolve/preconditioners.pyi +0 -6
  245. ngsolve/solve.pyi +0 -108
  246. ngsolve/solvers.pyi +0 -14
  247. ngsolve/timestepping.pyi +0 -27
  248. ngsolve/timing.pyi +0 -54
  249. ngsolve/utils.pyi +0 -279
  250. ngsolve-6.2.2501.data/data/Netgen.icns +0 -0
  251. ngsolve-6.2.2501.data/data/bin/ngscxx +0 -17
  252. ngsolve-6.2.2501.data/data/bin/ngsld +0 -13
  253. ngsolve-6.2.2501.data/data/bin/ngsolve.tcl +0 -648
  254. ngsolve-6.2.2501.data/data/bin/ngspy +0 -2
  255. ngsolve-6.2.2501.data/data/share/ngsolve/beam.geo +0 -17
  256. ngsolve-6.2.2501.data/data/share/ngsolve/beam.vol +0 -240
  257. ngsolve-6.2.2501.data/data/share/ngsolve/chip.in2d +0 -41
  258. ngsolve-6.2.2501.data/data/share/ngsolve/chip.vol +0 -614
  259. ngsolve-6.2.2501.data/data/share/ngsolve/coil.geo +0 -12
  260. ngsolve-6.2.2501.data/data/share/ngsolve/coil.vol +0 -2560
  261. ngsolve-6.2.2501.data/data/share/ngsolve/coilshield.geo +0 -24
  262. ngsolve-6.2.2501.data/data/share/ngsolve/coilshield.vol +0 -3179
  263. ngsolve-6.2.2501.data/data/share/ngsolve/cube.geo +0 -19
  264. ngsolve-6.2.2501.data/data/share/ngsolve/cube.vol +0 -1832
  265. ngsolve-6.2.2501.data/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -50
  266. ngsolve-6.2.2501.data/data/share/ngsolve/d11_chip_nitsche.pde +0 -40
  267. ngsolve-6.2.2501.data/data/share/ngsolve/d1_square.pde +0 -43
  268. ngsolve-6.2.2501.data/data/share/ngsolve/d2_chip.pde +0 -35
  269. ngsolve-6.2.2501.data/data/share/ngsolve/d3_helmholtz.pde +0 -22
  270. ngsolve-6.2.2501.data/data/share/ngsolve/d4_cube.pde +0 -46
  271. ngsolve-6.2.2501.data/data/share/ngsolve/d5_beam.pde +0 -74
  272. ngsolve-6.2.2501.data/data/share/ngsolve/d6_shaft.pde +0 -73
  273. ngsolve-6.2.2501.data/data/share/ngsolve/d7_coil.pde +0 -50
  274. ngsolve-6.2.2501.data/data/share/ngsolve/d8_coilshield.pde +0 -49
  275. ngsolve-6.2.2501.data/data/share/ngsolve/d9_hybridDG.pde +0 -72
  276. ngsolve-6.2.2501.data/data/share/ngsolve/doubleglazing.in2d +0 -27
  277. ngsolve-6.2.2501.data/data/share/ngsolve/doubleglazing.vol +0 -737
  278. ngsolve-6.2.2501.data/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  279. ngsolve-6.2.2501.data/data/share/ngsolve/shaft.geo +0 -73
  280. ngsolve-6.2.2501.data/data/share/ngsolve/shaft.vol +0 -4291
  281. ngsolve-6.2.2501.data/data/share/ngsolve/square.in2d +0 -17
  282. ngsolve-6.2.2501.data/data/share/ngsolve/square.vol +0 -149
  283. ngsolve-6.2.2501.dist-info/RECORD +0 -304
  284. {ngsolve-6.2.2501.dist-info → ngsolve-6.2.2501.post37.dev1.dist-info}/LICENSE +0 -0
  285. {ngsolve-6.2.2501.dist-info → ngsolve-6.2.2501.post37.dev1.dist-info}/WHEEL +0 -0
  286. {ngsolve-6.2.2501.dist-info → ngsolve-6.2.2501.post37.dev1.dist-info}/top_level.txt +0 -0
@@ -1,865 +0,0 @@
1
- #ifndef FILE_HDIV_EQUATIONS
2
- #define FILE_HDIV_EQUATIONS
3
-
4
- /*********************************************************************/
5
- /* File: hdiv_equations.hpp */
6
- /* Author: Joachim Schoeberl, Almedin Becirovic */
7
- /* Date: 10. Feb. 2002 */
8
- /*********************************************************************/
9
-
10
- #include "hcurlhdiv_dshape.hpp"
11
- #include "hdivfe.hpp"
12
- #include "bdbequations.hpp"
13
-
14
- namespace ngfem
15
- {
16
-
17
-
18
- /*
19
- Finite Element Integrators for H(div)
20
-
21
- Mapping with Piola transformation
22
-
23
- Requires H(div) finite elements
24
- */
25
-
26
-
27
-
28
- /// Identity operator, Piola transformation
29
- template <int D, typename FEL = HDivFiniteElement<D> >
30
- class DiffOpIdHDiv : public DiffOp<DiffOpIdHDiv<D, FEL> >
31
- {
32
- public:
33
- enum { DIM = 1 };
34
- enum { DIM_SPACE = D };
35
- enum { DIM_ELEMENT = D };
36
- enum { DIM_DMAT = D };
37
- enum { DIFFORDER = 0 };
38
-
39
- static const FEL & Cast (const FiniteElement & fel)
40
- { return static_cast<const FEL&> (fel); }
41
-
42
- /*
43
- template <typename AFEL, typename MIP, typename MAT>
44
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
45
- MAT & mat, LocalHeap & lh)
46
- {
47
- mat = (1.0/mip.GetJacobiDet()) *
48
- (mip.GetJacobian() * Trans (Cast(fel).GetShape(mip.IP(), lh)));
49
- }
50
- */
51
-
52
- static void GenerateMatrix (const FiniteElement & fel,
53
- const MappedIntegrationPoint<D,D> & mip,
54
- BareSliceMatrix<double,ColMajor> mat, LocalHeap & lh)
55
- {
56
- Cast(fel).CalcMappedShape (mip, Trans(mat));
57
- }
58
-
59
- template <typename MAT>
60
- static void GenerateMatrix (const FiniteElement & fel,
61
- const MappedIntegrationPoint<D,D,Complex> & mip,
62
- MAT && mat, LocalHeap & lh)
63
- {
64
- HeapReset hr(lh);
65
-
66
- mat = (1.0/mip.GetJacobiDet()) *
67
- (mip.GetJacobian() * Trans (Cast(fel).GetShape(mip.IP(), lh)));
68
- }
69
-
70
-
71
- static int DimRef() { return D; }
72
-
73
- template <typename IP, typename MAT>
74
- static void GenerateMatrixRef (const FiniteElement & fel, const IP & ip,
75
- MAT && mat, LocalHeap & lh)
76
- {
77
- Cast(fel).CalcShape (ip, Trans(mat));
78
- }
79
-
80
- template <typename MIP, typename MAT>
81
- static void CalcTransformationMatrix (const MIP & bmip,
82
- MAT & mat, LocalHeap & lh)
83
- {
84
- // mat = Trans(static_cast<const MappedIntegrationPoint<D,D>&>(mip).GetJacobianInverse());
85
- auto & mip = static_cast<const MappedIntegrationPoint<D,D>&>(bmip);
86
- mat = 1./mip.GetJacobiDet() * mip.GetJacobian();
87
- }
88
-
89
-
90
- static void GenerateMatrixSIMDIR (const FiniteElement & fel,
91
- const SIMD_BaseMappedIntegrationRule & mir, BareSliceMatrix<SIMD<double>> mat)
92
- {
93
- Cast(fel).CalcMappedShape (mir, mat);
94
- }
95
-
96
-
97
- template <typename AFEL, typename MIP, class TVX, class TVY>
98
- static void Apply (const AFEL & fel, const MIP & mip,
99
- const TVX & x, TVY && y,
100
- LocalHeap & lh)
101
- {
102
- HeapReset hr(lh);
103
- typedef typename TVX::TSCAL TSCAL;
104
-
105
- Vec<D,TSCAL> hv = Trans (Cast(fel).GetShape(mip.IP(), lh)) * x;
106
- hv *= (1.0/mip.GetJacobiDet());
107
- y = mip.GetJacobian() * hv;
108
- }
109
-
110
- using DiffOp<DiffOpIdHDiv<D, FEL> >::ApplyIR;
111
-
112
- template <typename AFEL, class MIR>
113
- static void ApplyIR (const AFEL & fel, const MIR & mir,
114
- FlatVector<double> x, FlatMatrixFixWidth<D,double> y,
115
- LocalHeap & lh)
116
- {
117
- static Timer t("ApplyIR - HDivfe");
118
- t.Start();
119
- Cast(fel).Evaluate (mir.IR(), x, y);
120
- t.Stop();
121
-
122
- for (int i = 0; i < mir.Size(); i++)
123
- {
124
- Vec<D> hy = mir[i].GetJacobian() * y.Row(i);
125
- y.Row(i) = (1.0 / mir[i].GetJacobiDet()) * hy;
126
- }
127
- }
128
-
129
-
130
-
131
- template <typename AFEL, typename MIP, class TVX, class TVY>
132
- static void ApplyTrans (const AFEL & fel, const MIP & mip,
133
- const TVX & x, TVY & y,
134
- LocalHeap & lh)
135
- {
136
- HeapReset hr(lh);
137
- typedef typename TVX::TSCAL TSCAL;
138
-
139
- Vec<D,TSCAL> hv = Trans (mip.GetJacobian()) * x;
140
- hv *= (1.0/mip.GetJacobiDet());
141
- y.Range(0,fel.GetNDof()) = Cast(fel).GetShape(mip.IP(),lh) * hv;
142
- }
143
-
144
- using DiffOp<DiffOpIdHDiv<D,FEL>>::ApplySIMDIR;
145
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
146
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
147
- {
148
- Cast(fel).Evaluate (mir, x, y);
149
- }
150
-
151
- using DiffOp<DiffOpIdHDiv<D,FEL>>::AddTransSIMDIR;
152
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
153
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
154
- {
155
- Cast(fel).AddTrans (mir, y, x);
156
- }
157
-
158
- static shared_ptr<CoefficientFunction>
159
- DiffShape (shared_ptr<CoefficientFunction> proxy,
160
- shared_ptr<CoefficientFunction> dir,
161
- bool Eulerian)
162
- {
163
- if (Eulerian) throw Exception("DiffShape Eulerian not implemented for DiffOpIdHDiv");
164
- return -TraceCF(dir->Operator("Grad"))*proxy + dir->Operator("Grad") * proxy;
165
- }
166
- };
167
-
168
- template <int D, typename FEL = HDivFiniteElement<D-1> >
169
- class DiffOpIdHDivSurface : public DiffOp<DiffOpIdHDivSurface<D, FEL> >
170
- {
171
- public:
172
- enum { DIM = 1 };
173
- enum { DIM_SPACE = D };
174
- enum { DIM_ELEMENT = D-1 };
175
- enum { DIM_DMAT = D };
176
- enum { DIFFORDER = 0 };
177
-
178
- static const FEL & Cast(const FiniteElement & fel)
179
- {
180
- return static_cast<const FEL&> (fel);
181
- }
182
-
183
- template <typename AFEL, typename MIP, typename MAT>
184
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
185
- MAT && mat, LocalHeap & lh)
186
- {
187
- mat = (1.0 / mip.GetJacobiDet()) *mip.GetJacobian () *
188
- Trans (Cast(fel).GetShape(mip.IP(),lh));
189
- }
190
-
191
- /*
192
- template <typename AFEL, typename MIP, class TVX, class TVY>
193
- static void ApplyTrans (const AFEL & fel, const MIP & mip,
194
- const TVX & x, TVY & y,
195
- LocalHeap & lh)
196
- {
197
- throw Exception("in DiffOpIdHDivSurface::ApplyTrans");
198
- HeapReset hr(lh);
199
- typedef typename TVX::TSCAL TSCAL;
200
-
201
- Vec<D,TSCAL> hv = Trans (mip.GetJacobian()) * x;
202
- hv *= (1.0/mip.GetJacobiDet());
203
- y = Cast(fel).GetShape(mip.IP(),lh) * hv;
204
- }
205
- */
206
-
207
- static void GenerateMatrixSIMDIR (const FiniteElement & fel,
208
- const SIMD_BaseMappedIntegrationRule & mir, BareSliceMatrix<SIMD<double>> mat)
209
- {
210
- Cast(fel).CalcMappedShape (mir, mat);
211
- }
212
-
213
- using DiffOp<DiffOpIdHDivSurface<D,FEL>>::ApplySIMDIR;
214
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
215
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
216
- {
217
- Cast(fel).Evaluate (mir, x, y);
218
- }
219
-
220
- using DiffOp<DiffOpIdHDivSurface<D,FEL>>::AddTransSIMDIR;
221
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
222
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
223
- {
224
- Cast(fel).AddTrans (mir, y, x);
225
- }
226
-
227
- static shared_ptr<CoefficientFunction>
228
- DiffShape (shared_ptr<CoefficientFunction> proxy,
229
- shared_ptr<CoefficientFunction> dir,
230
- bool Eulerian)
231
- {
232
- if (Eulerian) throw Exception("DiffShape Eulerian not implemented for DiffOpIdHDivSurface");
233
- return -TraceCF(dir->Operator("Gradboundary"))*proxy + dir->Operator("Gradboundary") * proxy;
234
- }
235
-
236
- };
237
-
238
-
239
- /// divergence Operator
240
- template <int D, typename FEL = HDivFiniteElement<D> >
241
- class DiffOpDivHDiv : public DiffOp<DiffOpDivHDiv<D, FEL> >
242
- {
243
- public:
244
- enum { DIM = 1 };
245
- enum { DIM_SPACE = D };
246
- enum { DIM_ELEMENT = D };
247
- enum { DIM_DMAT = 1 };
248
- enum { DIFFORDER = 1 };
249
-
250
- static string Name() { return "div"; }
251
-
252
- static const FEL & Cast (const FiniteElement & fel)
253
- { return static_cast<const FEL&> (fel); }
254
-
255
- template <typename AFEL, typename MIP, typename MAT>
256
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
257
- MAT && mat, LocalHeap & lh)
258
- {
259
- HeapReset hr(lh);
260
- mat = 1.0/mip.GetJacobiDet() *
261
- Trans (static_cast<const FEL&>(fel).GetDivShape(mip.IP(), lh));
262
- }
263
-
264
- template <typename AFEL, typename MIP>
265
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
266
- FlatVector<double> & mat, LocalHeap & lh)
267
- {
268
- HeapReset hr(lh);
269
- mat = 1.0/mip.GetJacobiDet() *
270
- (static_cast<const FEL&>(fel).GetDivShape(mip.IP(), lh));
271
- }
272
-
273
- static void GenerateMatrixSIMDIR (const FiniteElement & fel,
274
- const SIMD_BaseMappedIntegrationRule & mir, BareSliceMatrix<SIMD<double>> mat)
275
- {
276
- Cast(fel).CalcMappedDivShape (mir, mat);
277
- }
278
-
279
-
280
- template <typename AFEL, typename MIP, class TVX, class TVY>
281
- static void Apply (const AFEL & fel, const MIP & mip,
282
- const TVX & x, TVY && y,
283
- LocalHeap & lh)
284
- {
285
- HeapReset hr(lh);
286
- typedef typename TVX::TSCAL TSCAL;
287
- Vec<DIM,TSCAL> hv = Trans (static_cast<const FEL&>(fel).GetDivShape(mip.IP(), lh)) * x;
288
- y = (1.0/mip.GetJacobiDet()) * hv;
289
- }
290
-
291
- template <typename AFEL, typename MIP, class TVX, class TVY>
292
- static void ApplyTrans (const AFEL & fel, const MIP & mip,
293
- const TVX & x, TVY & y,
294
- LocalHeap & lh)
295
- {
296
- HeapReset hr(lh);
297
- typedef typename TVX::TSCAL TSCAL;
298
- Vec<DIM,TSCAL> hv = x;
299
- hv *= (1.0/mip.GetJacobiDet());
300
- y.Range(0,fel.GetNDof()) = static_cast<const FEL&>(fel).GetDivShape(mip.IP(),lh) * hv;
301
- }
302
-
303
-
304
- using DiffOp<DiffOpDivHDiv<D,FEL>>::ApplySIMDIR;
305
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
306
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
307
- {
308
- Cast(fel).EvaluateDiv (mir, x, y.Row(0));
309
- }
310
-
311
- using DiffOp<DiffOpDivHDiv<D,FEL>>::AddTransSIMDIR;
312
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
313
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
314
- {
315
- Cast(fel).AddDivTrans (mir, y.Row(0), x);
316
- }
317
-
318
- static shared_ptr<CoefficientFunction>
319
- DiffShape (shared_ptr<CoefficientFunction> proxy,
320
- shared_ptr<CoefficientFunction> dir,
321
- bool Eulerian)
322
- {
323
- if (Eulerian) throw Exception("DiffShape Eulerian not implemented for DiffOpDivHDiv");
324
- return -TraceCF(dir->Operator("Grad"))*proxy;
325
- }
326
-
327
- };
328
-
329
-
330
-
331
-
332
- /// Identity for boundary-normal elements
333
- template <int D, typename FEL = HDivNormalFiniteElement<D-1> >
334
- class DiffOpIdHDivBoundary : public DiffOp<DiffOpIdHDivBoundary<D, FEL> >
335
- {
336
- public:
337
- enum { DIM = 1 };
338
- enum { DIM_SPACE = D };
339
- enum { DIM_ELEMENT = D-1 };
340
- enum { DIM_DMAT = 1 };
341
- enum { DIFFORDER = 0 };
342
-
343
- template <typename AFEL, typename MIP, typename MAT>
344
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
345
- MAT && mat, LocalHeap & lh)
346
- {
347
- mat = (1.0/mip.GetJacobiDet())*
348
- Trans(static_cast<const FEL&> (fel).GetShape (mip.IP(), lh));
349
- }
350
-
351
- template <typename AFEL, typename MIP, class TVX, class TVY>
352
- static void Apply (const AFEL & fel, const MIP & mip,
353
- const TVX & x, TVY && y,
354
- LocalHeap & lh)
355
- {
356
- y = (1.0/mip.GetJacobiDet())*
357
- (Trans (static_cast<const FEL&> (fel).GetShape (mip.IP(), lh)) * x);
358
- }
359
-
360
- template <typename AFEL, typename MIP, class TVX, class TVY>
361
- static void ApplyTrans (const AFEL & fel, const MIP & mip,
362
- const TVX & x, TVY & y,
363
- LocalHeap & lh)
364
- {
365
- y.Range(0,fel.GetNDof()) = static_cast<const FEL&> (fel).GetShape (mip.IP(), lh)*((1.0/mip.GetJacobiDet())* x);
366
- }
367
- };
368
-
369
-
370
- /// Identity for boundary-normal elements, gives q_n n
371
- template <int D, typename FEL = HDivNormalFiniteElement<D-1> >
372
- class DiffOpIdVecHDivBoundary : public DiffOp<DiffOpIdVecHDivBoundary<D,FEL> >
373
- {
374
- public:
375
- enum { DIM = 1 };
376
- enum { DIM_SPACE = D };
377
- enum { DIM_ELEMENT = D-1 };
378
- enum { DIM_DMAT = D };
379
- enum { DIFFORDER = 0 };
380
-
381
- static const FEL & Cast (const FiniteElement & fel)
382
- { return static_cast<const FEL&> (fel); }
383
-
384
- template <typename AFEL, typename MIP, typename MAT>
385
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
386
- MAT && mat, LocalHeap & lh)
387
- {
388
- // Vec<D> scaled_nv = (1.0/mip.GetJacobiDet()) * mip.GetNV();
389
- auto scaled_nv = (1.0/mip.GetJacobiDet()) * mip.GetNV();
390
- mat = scaled_nv * Trans(Cast(fel).GetShape (mip.IP(), lh));
391
-
392
- //Cast(fel).CalcMappedShape(mip, Trans(mat));
393
-
394
- /*
395
- mat = (1.0/mip.GetJacobiDet())*
396
- Trans(static_cast<const FEL&> (fel).GetShape (mip.IP(), lh))
397
- * Trans (mip.GetNV());
398
- */
399
- }
400
-
401
- template <typename AFEL, typename MIP, class TVX, class TVY>
402
- static void Apply (const AFEL & fel, const MIP & mip,
403
- const TVX & x, TVY && y,
404
- LocalHeap & lh)
405
- {
406
- y = ( (1.0/mip.GetJacobiDet())*(InnerProduct (Cast(fel).GetShape (mip.IP(), lh), x) )) * mip.GetNV();
407
- }
408
-
409
- template <typename AFEL, typename MIP, class TVX, class TVY>
410
- static void ApplyTrans (const AFEL & fel, const MIP & mip,
411
- const TVX & x, TVY & y,
412
- LocalHeap & lh)
413
- {
414
- y.Range(0,fel.GetNDof()) = ((1.0/mip.GetJacobiDet())* InnerProduct (x, mip.GetNV()) ) * Cast(fel).GetShape (mip.IP(), lh);
415
- }
416
-
417
- using DiffOp<DiffOpIdVecHDivBoundary<D,FEL>>::ApplySIMDIR;
418
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
419
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
420
- {
421
- Cast(fel).Evaluate (mir, x, y);
422
- }
423
-
424
- using DiffOp<DiffOpIdVecHDivBoundary<D,FEL>>::AddTransSIMDIR;
425
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
426
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
427
- {
428
- Cast(fel).AddTrans (mir, y, x);
429
- }
430
- };
431
-
432
- //Dual diffop
433
- template <int D>
434
- class DiffOpHDivDual : public DiffOp<DiffOpHDivDual<D> >
435
- {
436
- public:
437
- typedef DiffOp<DiffOpHDivDual<D>> BASE;
438
- enum { DIM = 1 };
439
- enum { DIM_SPACE = D };
440
- enum { DIM_ELEMENT = D };
441
- enum { DIM_DMAT = D };
442
- enum { DIFFORDER = 0 };
443
-
444
- static auto & Cast (const FiniteElement & fel)
445
- { return static_cast<const HDivFiniteElement<D>&> (fel); }
446
-
447
-
448
- template <typename AFEL, typename MIP, typename MAT,
449
- typename std::enable_if<std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
450
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
451
- MAT && mat, LocalHeap & lh)
452
- {
453
- Cast(fel).CalcDualShape (mip, Trans(mat));
454
- }
455
- template <typename AFEL, typename MIP, typename MAT,
456
- typename std::enable_if<!std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
457
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
458
- MAT && mat, LocalHeap & lh)
459
- {
460
- // fel.CalcDualShape (mip, mat);
461
- throw Exception(string("DiffOpHDivDual not available for mat ")+typeid(mat).name());
462
- }
463
-
464
- /*static void GenerateMatrixSIMDIR (const FiniteElement & fel,
465
- const SIMD_BaseMappedIntegrationRule & mir,
466
- BareSliceMatrix<SIMD<double>> mat)
467
- {
468
- Cast(fel).CalcDualShape (static_cast<const SIMD_MappedIntegrationRule<D,D>&>(mir), mat);
469
- }
470
-
471
- using BASE::ApplySIMDIR;
472
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
473
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
474
- {
475
- Cast(fel).EvaluateDual (static_cast<const SIMD_MappedIntegrationRule<D,D>&> (mir), x, y);
476
- }
477
-
478
- using BASE::AddTransSIMDIR;
479
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & mir,
480
- BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
481
- {
482
- Cast(fel).AddDualTrans (static_cast<const SIMD_MappedIntegrationRule<D,D>&> (mir), y, x);
483
- } */
484
-
485
- };
486
-
487
- template <int D>
488
- class DiffOpHDivDualSurface : public DiffOp<DiffOpHDivDualSurface<D> >
489
- {
490
- public:
491
- enum { DIM = 1 };
492
- enum { DIM_SPACE = D };
493
- enum { DIM_ELEMENT = D-1 };
494
- enum { DIM_DMAT = D };
495
- enum { DIFFORDER = 0 };
496
-
497
- typedef DiffOpHDivDualSurface<D> DIFFOP_TRACE;
498
-
499
-
500
- static auto & Cast (const FiniteElement & fel)
501
- { return static_cast<const HDivFiniteElement<D-1>&> (fel); }
502
-
503
-
504
- template <typename AFEL, typename MIP, typename MAT,
505
- typename std::enable_if<std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
506
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
507
- MAT && mat, LocalHeap & lh)
508
- {
509
- Cast(fel).CalcDualShape (mip, Trans(mat));
510
- }
511
- template <typename AFEL, typename MIP, typename MAT,
512
- typename std::enable_if<!std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
513
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
514
- MAT && mat, LocalHeap & lh)
515
- {
516
- throw Exception(string("DiffOpHDivDualSurface not available for mat ")+typeid(mat).name());
517
- }
518
-
519
-
520
- };
521
-
522
-
523
-
524
-
525
- template <int D, typename FEL = HDivNormalFiniteElement<D-1> >
526
- class DiffOpGradientTraceHDiv;
527
-
528
- /// Gradient operator for HDiv
529
- template <int D, typename FEL = HDivFiniteElement<D> >
530
- // class DiffOpGradientHDiv : public DiffOp<DiffOpGradientHDiv<D> >
531
- class DiffOpGradientHDiv : public NumDiffGradient<DiffOpGradientHDiv<D>, DiffOpIdHDiv<D>, FEL>
532
- {
533
- public:
534
- /*
535
- enum { DIM = 1 };
536
- enum { DIM_SPACE = D };
537
- enum { DIM_ELEMENT = D };
538
- enum { DIM_DMAT = D*D };
539
- enum { DIFFORDER = 1 };
540
- */
541
-
542
- static Array<int> GetDimensions() { return Array<int> ( { D, D } ); };
543
-
544
- // static constexpr double eps() { return 1e-4; }
545
-
546
- typedef DiffOpGradientTraceHDiv<D> DIFFOP_TRACE;
547
- ///
548
-
549
-
550
-
551
- #ifdef UNUSED
552
- template <typename AFEL, typename SIP, typename MAT,
553
- typename std::enable_if<!std::is_convertible<MAT,SliceMatrix<double,ColMajor>>::value, int>::type = 0>
554
- static void GenerateMatrix (const AFEL & fel, const SIP & sip,
555
- MAT & mat, LocalHeap & lh)
556
- {
557
- cout << "nicht gut" << endl;
558
- cout << "type(fel) = " << typeid(fel).name() << ", sip = " << typeid(sip).name()
559
- << ", mat = " << typeid(mat).name() << endl;
560
- }
561
-
562
- // template <typename AFEL, typename SIP>
563
- // static void GenerateMatrix (const AFEL & fel, const SIP & sip,
564
- // SliceMatrix<double,ColMajor> mat, LocalHeap & lh)
565
- template <typename AFEL, typename MIP, typename MAT,
566
- typename std::enable_if<std::is_convertible<MAT,SliceMatrix<double,ColMajor>>::value, int>::type = 0>
567
- static void GenerateMatrix (const AFEL & fel, const MIP & mip,
568
- MAT mat, LocalHeap & lh)
569
- {
570
- CalcDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(fel), mip, Trans(mat), lh, eps());
571
- }
572
-
573
- static void GenerateMatrixSIMDIR (const FiniteElement & bfel,
574
- const SIMD_BaseMappedIntegrationRule & bmir, BareSliceMatrix<SIMD<double>> mat)
575
- {
576
- CalcSIMDDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(bfel), static_cast<const SIMD_MappedIntegrationRule<D,D> &>(bmir), mat, eps());
577
- }
578
-
579
- template <typename AFEL, typename MIP, class TVX, class TVY>
580
- static void Apply (const AFEL & fel, const MIP & mip,
581
- const TVX & x, TVY && y,
582
- LocalHeap & lh)
583
- {
584
- // typedef typename TVX::TSCAL TSCAL;
585
- HeapReset hr(lh);
586
- FlatMatrixFixWidth<D*D> hm(fel.GetNDof(),lh);
587
- CalcDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(fel), mip, hm, lh, eps());
588
- y = Trans(hm)*x;
589
- }
590
-
591
-
592
- template <typename AFEL, typename MIP, class TVX, class TVY>
593
- static void ApplyTrans (const AFEL & fel, const MIP & mip,
594
- const TVX & x, TVY & by,
595
- LocalHeap & lh)
596
- {
597
- ApplyTransDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(fel), mip, x, by, lh, eps());
598
- }
599
-
600
- using DiffOp<DiffOpGradientHDiv<D>>::ApplySIMDIR;
601
- static void ApplySIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & bmir,
602
- BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
603
- {
604
- ApplySIMDDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(fel), bmir, x, y, eps());
605
- }
606
-
607
-
608
-
609
- using DiffOp<DiffOpGradientHDiv<D>>::AddTransSIMDIR;
610
- static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & bmir,
611
- BareSliceMatrix<SIMD<double>> x, BareSliceVector<double> y)
612
- {
613
- AddTransSIMDDShapeFE<FEL,D,D,D>(static_cast<const FEL&>(fel), bmir, x, y, eps());
614
- }
615
- #endif
616
- };
617
-
618
-
619
- /// Trace gradient operator for HDiv
620
- template <int D, typename FEL>
621
- class DiffOpGradientTraceHDiv : public DiffOp<DiffOpGradientTraceHDiv<D> >
622
- {
623
- public:
624
- enum { DIM = 1 };
625
- enum { DIM_SPACE = D };
626
- enum { DIM_ELEMENT = D-1 };
627
- enum { DIM_DMAT = D*D };
628
- enum { DIFFORDER = 1 };
629
- static Array<int> GetDimensions() { return Array<int> ( { D, D } ); };
630
-
631
- static constexpr double eps() { return 1e-4; }
632
-
633
- typedef void DIFFOP_TRACE;
634
- ///
635
- template <typename AFEL, typename SIP, typename MAT,
636
- typename std::enable_if<!std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
637
- static void GenerateMatrix (const AFEL & fel, const SIP & sip,
638
- MAT & mat, LocalHeap & lh)
639
- {
640
- cout << "nicht gut" << endl;
641
- cout << "type(fel) = " << typeid(fel).name() << ", sip = " << typeid(sip).name()
642
- << ", mat = " << typeid(mat).name() << endl;
643
- }
644
-
645
- template <typename AFEL, typename MIP, typename MAT,
646
- typename std::enable_if<std::is_convertible<MAT,BareSliceMatrix<double,ColMajor>>::value, int>::type = 0>
647
- static void GenerateMatrix (const AFEL & fel, const MIP & mip, MAT mat, LocalHeap & lh)
648
- {
649
- CalcDShapeFE<FEL,D,D-1,D>(static_cast<const FEL&>(fel), mip, Trans(mat), lh, eps());
650
- }
651
- };
652
-
653
-
654
-
655
-
656
-
657
-
658
- /// Integrator for term of zero-th order
659
- template <int D>
660
- class MassHDivIntegrator
661
- : public T_BDBIntegrator<DiffOpIdHDiv<D>, DiagDMat<D>, HDivFiniteElement<D> >
662
- {
663
- typedef T_BDBIntegrator<DiffOpIdHDiv<D>, DiagDMat<D>, HDivFiniteElement<D> > BASE;
664
- public:
665
- using T_BDBIntegrator<DiffOpIdHDiv<D>, DiagDMat<D>, HDivFiniteElement<D> >::T_BDBIntegrator;
666
- virtual string Name () const { return "MassHDiv"; }
667
- };
668
-
669
-
670
-
671
- /// Integrator for div u div v
672
- template <int D>
673
- class DivDivHDivIntegrator
674
- : public T_BDBIntegrator<DiffOpDivHDiv<D>, DiagDMat<1>, HDivFiniteElement<D> >
675
- {
676
- typedef T_BDBIntegrator<DiffOpDivHDiv<D>, DiagDMat<1>, HDivFiniteElement<D> > BASE;
677
- public:
678
- using T_BDBIntegrator<DiffOpDivHDiv<D>, DiagDMat<1>, HDivFiniteElement<D> >::T_BDBIntegrator;
679
- virtual string Name () const { return "DivDivHDiv"; }
680
- };
681
-
682
-
683
-
684
-
685
- /// source term integrator for \ff div v
686
- template <int D>
687
- class NGS_DLL_HEADER DivSourceHDivIntegrator
688
- : public T_BIntegrator<DiffOpDivHDiv<D>, DVec<1>, HDivFiniteElement<D> >
689
- {
690
- typedef T_BIntegrator<DiffOpDivHDiv<D>, DVec<1>, HDivFiniteElement<D> > BASE;
691
- public:
692
- using T_BIntegrator<DiffOpDivHDiv<D>, DVec<1>, HDivFiniteElement<D> >::T_BIntegrator;
693
- virtual string Name () const { return "DivSourceHDiv"; }
694
- };
695
-
696
- /*
697
- /// source term for H(div)
698
- template <int D>
699
- class SourceHDivIntegrator
700
- : public T_BIntegrator<DiffOpIdHDiv<D>, DVec<D>, HDivFiniteElement<D> >
701
- {
702
- public:
703
- SourceHDivIntegrator (CoefficientFunction * coeff1,
704
- CoefficientFunction * coeff2,
705
- CoefficientFunction * coeff3);
706
-
707
- SourceHDivIntegrator (CoefficientFunction * coeff1,
708
- CoefficientFunction * coeff2);
709
-
710
- static Integrator * Create (Array<CoefficientFunction*> & coeffs)
711
- {
712
- if(D == 2)
713
- return new SourceHDivIntegrator (coeffs[0], coeffs[1]);
714
- else if (D == 3)
715
- return new SourceHDivIntegrator (coeffs[0], coeffs[1], coeffs[2]);
716
- }
717
-
718
- ///
719
- virtual string Name () const { return "SourceHDiv"; }
720
- };
721
- */
722
-
723
-
724
- template <int D> class SourceHDivIntegrator;
725
-
726
-
727
- template <int D>
728
- class NGS_DLL_HEADER BaseSourceHDivIntegrator
729
- : public T_BIntegrator<DiffOpIdHDiv<D>, DVec<D>, HDivFiniteElement<D> >
730
- {
731
- typedef T_BIntegrator<DiffOpIdHDiv<D>, DVec<D>, HDivFiniteElement<D> > BASE;
732
- public:
733
- using T_BIntegrator<DiffOpIdHDiv<D>, DVec<D>, HDivFiniteElement<D> >::T_BIntegrator;
734
- virtual string Name () const { return "SourceHDiv"; }
735
- };
736
-
737
-
738
-
739
- template <>
740
- class NGS_DLL_HEADER SourceHDivIntegrator<2>
741
- : public BaseSourceHDivIntegrator<2>
742
- {
743
- typedef BaseSourceHDivIntegrator<2> BASE;
744
- public:
745
- using BaseSourceHDivIntegrator<2>::BaseSourceHDivIntegrator;
746
- SourceHDivIntegrator() = delete;
747
- };
748
-
749
- template <>
750
- class NGS_DLL_HEADER SourceHDivIntegrator<3>
751
- : public BaseSourceHDivIntegrator<3>
752
- {
753
- typedef BaseSourceHDivIntegrator<3> BASE;
754
- public:
755
- using BaseSourceHDivIntegrator<3>::BaseSourceHDivIntegrator;
756
- SourceHDivIntegrator() = delete;
757
- };
758
-
759
-
760
-
761
- template <int D>
762
- class NGS_DLL_HEADER SourceHDivIntegratorN
763
- : public T_BIntegrator<DiffOpIdHDiv<D>, DVecN<D>, HDivFiniteElement<D> >
764
- {
765
- typedef T_BIntegrator<DiffOpIdHDiv<D>, DVecN<D>, HDivFiniteElement<D> > BASE;
766
- public:
767
- using T_BIntegrator<DiffOpIdHDiv<D>, DVecN<D>, HDivFiniteElement<D> >::T_BIntegrator;
768
- virtual string Name () const { return "VecSourceHDiv"; }
769
- };
770
-
771
-
772
-
773
-
774
-
775
-
776
-
777
- ///
778
- template <int D, typename FEL = HDivNormalFiniteElement<D-1> >
779
- class NGS_DLL_HEADER NeumannHDivIntegrator
780
- : public T_BIntegrator<DiffOpIdHDivBoundary<D>, DVec<1>, FEL>
781
- {
782
- typedef T_BIntegrator<DiffOpIdHDivBoundary<D>, DVec<1>, FEL> BASE;
783
- public:
784
- using T_BIntegrator<DiffOpIdHDivBoundary<D>, DVec<1>, FEL>::T_BIntegrator;
785
- ///
786
- /*
787
- NeumannHDivIntegrator (CoefficientFunction * coeff)
788
- : T_BIntegrator<DiffOpIdHDivBoundary<D>, DVec<1>, FEL> (DVec<1> (coeff))
789
- { ; }
790
-
791
- static Integrator * Create (Array<CoefficientFunction*> & coeffs)
792
- {
793
- return new NeumannHDivIntegrator (coeffs[0]);
794
- }
795
- */
796
- ///
797
- virtual bool BoundaryForm () const { return 1; }
798
- ///
799
- virtual string Name () const { return "NeumannHDiv"; }
800
- };
801
-
802
-
803
- /// integrator for \f$\int_\Gamma \sigma_n \tau_n \, ds\f$
804
- template <int D>
805
- class RobinHDivIntegrator
806
- : public T_BDBIntegrator<DiffOpIdVecHDivBoundary<D>, DiagDMat<D>, HDivNormalFiniteElement<D-1> >
807
- {
808
- typedef T_BDBIntegrator<DiffOpIdVecHDivBoundary<D>, DiagDMat<D>, HDivNormalFiniteElement<D-1> > BASE;
809
- public:
810
- using T_BDBIntegrator<DiffOpIdVecHDivBoundary<D>, DiagDMat<D>, HDivNormalFiniteElement<D-1> >::T_BDBIntegrator;
811
- /*
812
- NGS_DLL_HEADER RobinHDivIntegrator (CoefficientFunction * coeff)
813
- : T_BDBIntegrator<DiffOpIdVecHDivBoundary<D>, DiagDMat<D>, HDivNormalFiniteElement<D-1> > (DiagDMat<D> (coeff))
814
- { ; }
815
-
816
-
817
- static Integrator * Create (Array<CoefficientFunction*> & coeffs)
818
- {
819
- return new RobinHDivIntegrator (coeffs[0]);
820
-
821
- }
822
- */
823
- virtual bool BoundaryForm () const { return 1; }
824
- virtual string Name () const { return "RobinHDiv"; }
825
- };
826
-
827
-
828
- }
829
-
830
-
831
- #ifdef FILE_HDIV_EQUATIONS_CPP
832
- #define HDIV_EQUATIONS_EXTERN
833
- #else
834
- #define HDIV_EQUATIONS_EXTERN extern
835
- #endif
836
-
837
- namespace ngfem
838
- {
839
-
840
- HDIV_EQUATIONS_EXTERN template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpIdHDiv<2> >;
841
- HDIV_EQUATIONS_EXTERN template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpIdHDiv<3> >;
842
- HDIV_EQUATIONS_EXTERN template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpDivHDiv<2> >;
843
- HDIV_EQUATIONS_EXTERN template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpDivHDiv<3> >;
844
-
845
- HDIV_EQUATIONS_EXTERN template class MassHDivIntegrator<2>;
846
- HDIV_EQUATIONS_EXTERN template class DivDivHDivIntegrator<2>;
847
- // HDIV_EQUATIONS_EXTERN template class SourceHDivIntegrator<2>;
848
- HDIV_EQUATIONS_EXTERN template class SourceHDivIntegratorN<2>;
849
- HDIV_EQUATIONS_EXTERN template class DivSourceHDivIntegrator<2>;
850
-
851
- HDIV_EQUATIONS_EXTERN template class MassHDivIntegrator<3>;
852
- HDIV_EQUATIONS_EXTERN template class DivDivHDivIntegrator<3>;
853
- // HDIV_EQUATIONS_EXTERN template class SourceHDivIntegrator<3>;
854
- HDIV_EQUATIONS_EXTERN template class SourceHDivIntegratorN<3>;
855
- HDIV_EQUATIONS_EXTERN template class DivSourceHDivIntegrator<3>;
856
-
857
-
858
-
859
- }
860
-
861
-
862
- #endif
863
-
864
-
865
-