ngsolve 6.2.2502__cp311-cp311-win_amd64.whl → 6.2.2601__cp311-cp311-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. netgen/include/analytic_integrals.hpp +10 -0
  2. netgen/include/basematrix.hpp +6 -0
  3. netgen/include/bdbequations.hpp +55 -0
  4. netgen/include/bem_diffops.hpp +475 -0
  5. netgen/include/bilinearform.hpp +4 -1
  6. netgen/include/blockjacobi.hpp +17 -5
  7. netgen/include/bspline.hpp +2 -0
  8. netgen/include/cholesky.hpp +2 -2
  9. netgen/include/code_generation.hpp +2 -2
  10. netgen/include/complex_wrapper.hpp +30 -2
  11. netgen/include/contact.hpp +8 -0
  12. netgen/include/diagonalmatrix.hpp +6 -0
  13. netgen/include/diffop_impl.hpp +3 -1
  14. netgen/include/diffopwithfactor.hpp +123 -0
  15. netgen/include/elementbyelement.hpp +9 -3
  16. netgen/include/expr.hpp +45 -7
  17. netgen/include/fespace.hpp +12 -4
  18. netgen/include/gridfunction.hpp +3 -3
  19. netgen/include/h1amg.hpp +85 -2
  20. netgen/include/h1lumping.hpp +6 -0
  21. netgen/include/hcurl_equations.hpp +29 -0
  22. netgen/include/hcurlcurlfe.hpp +20 -0
  23. netgen/include/hdiv_equations.hpp +15 -0
  24. netgen/include/hdivfe_utils.hpp +1 -0
  25. netgen/include/hdivhofespace.hpp +2 -0
  26. netgen/include/integrator.hpp +4 -16
  27. netgen/include/intrule.hpp +2 -1
  28. netgen/include/intrules_SauterSchwab.hpp +25 -0
  29. netgen/include/jacobi.hpp +35 -18
  30. netgen/include/kernels.hpp +724 -0
  31. netgen/include/l2hofe.hpp +1 -0
  32. netgen/include/matrix.hpp +8 -3
  33. netgen/include/meshaccess.hpp +4 -3
  34. netgen/include/mp_coefficient.hpp +145 -0
  35. netgen/include/mptools.hpp +1331 -368
  36. netgen/include/mycomplex.hpp +1 -1
  37. netgen/include/ngblas.hpp +116 -7
  38. netgen/include/potentialtools.hpp +22 -0
  39. netgen/include/preconditioner.hpp +23 -23
  40. netgen/include/prolongation.hpp +132 -6
  41. netgen/include/recursive_pol.hpp +63 -11
  42. netgen/include/simd_complex.hpp +45 -0
  43. netgen/include/sparsecholesky.hpp +6 -2
  44. netgen/include/sparsefactorization_interface.hpp +159 -0
  45. netgen/include/sparsematrix.hpp +21 -7
  46. netgen/include/sparsematrix_dyn.hpp +6 -7
  47. netgen/include/sparsematrix_impl.hpp +175 -40
  48. netgen/include/special_matrix.hpp +2 -0
  49. netgen/include/statushandler.hpp +8 -8
  50. netgen/include/symbolicintegrator.hpp +2 -1
  51. netgen/include/tangentialfacetfespace.hpp +7 -22
  52. netgen/include/thdivfe_impl.hpp +66 -0
  53. netgen/include/tscalarfe.hpp +1 -1
  54. netgen/include/vector.hpp +272 -47
  55. netgen/lib/libngsolve.lib +0 -0
  56. netgen/libngsolve.dll +0 -0
  57. netgen/ngscxx.bat +1 -1
  58. netgen/ngsld.bat +1 -1
  59. ngsolve/__init__.py +1 -0
  60. ngsolve/cmake/NGSolveConfig.cmake +8 -8
  61. ngsolve/cmake/ngsolve-targets.cmake +24 -18
  62. ngsolve/config/config.py +7 -7
  63. ngsolve/demos/intro/cmagnet.py +19 -22
  64. ngsolve/directsolvers.py +9 -21
  65. ngsolve/krylovspace.py +172 -3
  66. ngsolve/ngslib.lib +0 -0
  67. ngsolve/ngslib.pyd +0 -0
  68. ngsolve/nonlinearsolvers.py +2 -2
  69. ngsolve/preconditioners.py +1 -0
  70. ngsolve/solve_implementation.py +168 -0
  71. ngsolve/{solvers.py → solvers/__init__.py} +1 -1
  72. ngsolve/solvers/cudss.py +112 -0
  73. ngsolve/webgui.py +2 -0
  74. {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2601.dist-info}/METADATA +2 -2
  75. {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2601.dist-info}/RECORD +107 -97
  76. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/Scripts/ngsolve.tcl +0 -0
  77. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/beam.geo +0 -0
  78. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/beam.vol +0 -0
  79. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/chip.in2d +0 -0
  80. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/chip.vol +0 -0
  81. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/coil.geo +0 -0
  82. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/coil.vol +0 -0
  83. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/coilshield.geo +0 -0
  84. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/coilshield.vol +0 -0
  85. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/cube.geo +0 -0
  86. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/cube.vol +0 -0
  87. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -0
  88. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/d11_chip_nitsche.pde +0 -0
  89. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/d1_square.pde +0 -0
  90. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/d2_chip.pde +0 -0
  91. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/d3_helmholtz.pde +0 -0
  92. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/d4_cube.pde +0 -0
  93. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/d5_beam.pde +0 -0
  94. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/d6_shaft.pde +0 -0
  95. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/d7_coil.pde +0 -0
  96. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/d8_coilshield.pde +0 -0
  97. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/d9_hybridDG.pde +0 -0
  98. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/doubleglazing.in2d +0 -0
  99. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/doubleglazing.vol +0 -0
  100. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  101. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/shaft.geo +0 -0
  102. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/shaft.vol +0 -0
  103. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/square.in2d +0 -0
  104. {ngsolve-6.2.2502.data → ngsolve-6.2.2601.data}/data/share/ngsolve/square.vol +0 -0
  105. {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2601.dist-info}/LICENSE +0 -0
  106. {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2601.dist-info}/WHEEL +0 -0
  107. {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2601.dist-info}/top_level.txt +0 -0
netgen/include/l2hofe.hpp CHANGED
@@ -71,6 +71,7 @@ namespace ngfem
71
71
 
72
72
  public:
73
73
  using ET_trait<ET>::ElementType;
74
+ using BaseScalarFiniteElement::CalcShape;
74
75
 
75
76
  INLINE L2HighOrderFE () { ; }
76
77
  INLINE L2HighOrderFE (int aorder)
netgen/include/matrix.hpp CHANGED
@@ -1107,7 +1107,7 @@ namespace ngbla
1107
1107
  //
1108
1108
  MatrixView() = default;
1109
1109
  // : h{0}, w{0}, dist{0}, data{nullptr} { }
1110
- INLINE MatrixView(const MatrixView &) = default;
1110
+ MatrixView(const MatrixView &) = default;
1111
1111
 
1112
1112
  template <typename T2, typename TH2, typename TW2, typename TDIST2,
1113
1113
  enable_if_t<is_convertible<T2*,T*>::value, int> =0,
@@ -1742,7 +1742,8 @@ namespace ngbla
1742
1742
  double operator() (int i) const
1743
1743
  {
1744
1744
  static_assert (true, "linear access of id");
1745
- cerr << "id, linear access" << endl; return 0;
1745
+ return 0;
1746
+ // cerr << "id, linear access" << endl; return 0;
1746
1747
  }
1747
1748
  ///
1748
1749
  double operator() (int i, int j) const { return (i == j) ? 1 : 0; }
@@ -1764,7 +1765,11 @@ namespace ngbla
1764
1765
  INLINE Identity (size_t s) : size(s) { ; }
1765
1766
 
1766
1767
  INLINE double operator() (int i) const
1767
- { cerr << "Identity, linear access" << endl; return 0; }
1768
+ {
1769
+ static_assert (true, "linear access of Identity");
1770
+ return 0;
1771
+ // cerr << "Identity, linear access" << endl; return 0;
1772
+ }
1768
1773
 
1769
1774
  INLINE double operator() (int i, int j) const { return (i == j) ? 1 : 0; }
1770
1775
  INLINE auto View() const { return Identity(size); }
@@ -1029,11 +1029,12 @@ namespace ngcomp
1029
1029
  ElementId FindElementOfPoint (FlatVector<double> point,
1030
1030
  IntegrationPoint & ip,
1031
1031
  bool build_searchtree,
1032
- const Array<int> * const indices = NULL) const;
1032
+ const Array<int> * const indices = NULL,
1033
+ double tol = 1e-4) const;
1033
1034
  ElementId FindElementOfPoint (FlatVector<double> point,
1034
1035
  IntegrationPoint & ip,
1035
1036
  bool build_searchtree,
1036
- int index) const;
1037
+ int index, double tol = 1e-4) const;
1037
1038
  int FindSurfaceElementOfPoint (FlatVector<double> point,
1038
1039
  IntegrationPoint & ip,
1039
1040
  bool build_searchtree,
@@ -1200,7 +1201,7 @@ namespace ngcomp
1200
1201
  shared_ptr<BitArray> MaskPtr() { return mask; }
1201
1202
  const shared_ptr<MeshAccess> & Mesh() const { return mesh; }
1202
1203
  void DoArchive(Archive& ar)
1203
- { ar & mesh & vb & mask; }
1204
+ { ar.Shallow(mesh) & vb & mask; }
1204
1205
  Region operator+ (const Region & r2) const
1205
1206
  {
1206
1207
  return Region (mesh, vb, BitArray(*mask).Or(r2.Mask()));
@@ -0,0 +1,145 @@
1
+ #ifndef MP_COEFFICIENT
2
+ #define MP_COEFFICIENT
3
+
4
+
5
+ #include "mptools.hpp"
6
+
7
+ namespace ngsbem
8
+ {
9
+
10
+
11
+ // ******************** Coefficient Functions *********************
12
+
13
+
14
+ class SphericalHarmonicsCF : public CoefficientFunction
15
+ {
16
+ SphericalHarmonics<Complex> sh;
17
+ public:
18
+ SphericalHarmonicsCF (int order)
19
+ : CoefficientFunction(1, true), sh(order) { }
20
+ Complex & Coef(int n, int m) { return sh.Coef(n,m); }
21
+
22
+ virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
23
+ { throw Exception("real eval not available"); }
24
+
25
+ virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
26
+ {
27
+ values(0) = sh.Eval(mip.GetPoint());
28
+ }
29
+
30
+ virtual void Evaluate (const BaseMappedIntegrationRule & ir, BareSliceMatrix<Complex> values) const override
31
+ {
32
+ for (int i = 0; i < ir.Size(); i++)
33
+ {
34
+ auto & mip = ir[i];
35
+ values(i,0) = sh.Eval(mip.GetPoint());
36
+ }
37
+ }
38
+
39
+ auto & SH() { return sh; }
40
+ };
41
+
42
+
43
+
44
+ template <typename entry_type> class RegularMLExpansionCF;
45
+
46
+
47
+ template <typename RADIAL, typename entry_type=Complex>
48
+ class SphericalExpansionCF : public CoefficientFunction
49
+ {
50
+ SphericalExpansion<RADIAL, entry_type> mp;
51
+ Vec<3> center;
52
+ public:
53
+ SphericalExpansionCF (int order, double kappa, Vec<3> acenter, double rtyp = 1)
54
+ : CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mp(order, kappa, rtyp), center(acenter) { }
55
+
56
+ entry_type & Coef(int n, int m) { return mp.Coef(n,m); }
57
+ auto & SH() { return mp.SH(); }
58
+ auto & MP() { return mp; }
59
+ Vec<3> Center() const { return center; }
60
+
61
+ virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
62
+ { throw Exception("real eval not available"); }
63
+
64
+ virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
65
+ {
66
+ if constexpr (std::is_same<entry_type, Complex>())
67
+ values(0) = mp.Eval(mip.GetPoint()-center);
68
+ else
69
+ values = mp.Eval(mip.GetPoint()-center);
70
+ }
71
+
72
+ template <typename TARGET>
73
+ void ShiftZ (double z, SphericalExpansion<TARGET, entry_type> & target) { mp.ShiftZ(z, target); }
74
+
75
+ using CoefficientFunction::Transform;
76
+ template <typename TARGET>
77
+ void Transform (SphericalExpansionCF<TARGET, entry_type> & target)
78
+ {
79
+ mp.Transform (target.MP(), target.Center()-center);
80
+ }
81
+ template <typename TARGET>
82
+ void TransformAdd (SphericalExpansionCF<TARGET, entry_type> & target)
83
+ {
84
+ mp.TransformAdd (target.MP(), target.Center()-center);
85
+ }
86
+ };
87
+
88
+ template <typename entry_type>
89
+ class SingularMLExpansionCF : public CoefficientFunction
90
+ {
91
+ shared_ptr<SingularMLExpansion<entry_type>> mlmp;
92
+ public:
93
+ SingularMLExpansionCF (Vec<3> center, double r, double kappa)
94
+ : CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<SingularMLExpansion<entry_type>>(center, r, kappa)} { }
95
+
96
+ virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
97
+ { throw Exception("real eval not available"); }
98
+
99
+ virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
100
+ {
101
+ // values(0) = mlmp->Evaluate(mip.GetPoint());
102
+
103
+ if constexpr (std::is_same<entry_type, Complex>())
104
+ values(0) = mlmp->Evaluate(mip.GetPoint());
105
+ else
106
+ values = mlmp->Evaluate(mip.GetPoint());
107
+
108
+
109
+ }
110
+
111
+ shared_ptr<SingularMLExpansion<entry_type>> MLExpansion() const { return mlmp; }
112
+ shared_ptr<RegularMLExpansionCF<entry_type>> CreateRegularExpansion(Vec<3> center, double r) const;
113
+ };
114
+
115
+
116
+ template <typename entry_type>
117
+ class RegularMLExpansionCF : public CoefficientFunction
118
+ {
119
+ shared_ptr<RegularMLExpansion<entry_type>> mlmp;
120
+ public:
121
+ RegularMLExpansionCF (shared_ptr<SingularMLExpansionCF<entry_type>> asingmp, Vec<3> center, double r)
122
+ : CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<RegularMLExpansion<entry_type>>(asingmp->MLExpansion(), center, r, FMM_Parameters())} { }
123
+ RegularMLExpansionCF (shared_ptr<SingularMLExpansion<entry_type>> asingmp, Vec<3> center, double r)
124
+ : CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<RegularMLExpansion<entry_type>>(asingmp, center, r, FMM_Parameters())} { }
125
+
126
+ virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
127
+ { throw Exception("real eval not available"); }
128
+
129
+ virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
130
+ {
131
+ // values(0) = mlmp->Evaluate(mip.GetPoint());
132
+
133
+ if constexpr (std::is_same<entry_type, Complex>())
134
+ values(0) = mlmp->Evaluate(mip.GetPoint());
135
+ else
136
+ values = mlmp->Evaluate(mip.GetPoint());
137
+ }
138
+
139
+ shared_ptr<RegularMLExpansion<entry_type>> MLExpansion() { return mlmp; }
140
+ };
141
+
142
+
143
+ }
144
+
145
+ #endif