ngsolve 6.2.2502__cp312-cp312-macosx_10_15_universal2.whl → 6.2.2504__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 (70) hide show
  1. netgen/include/fespace.hpp +3 -2
  2. netgen/include/integrator.hpp +4 -16
  3. netgen/include/intrules_SauterSchwab.hpp +25 -0
  4. netgen/include/mp_coefficient.hpp +140 -0
  5. netgen/include/mptools.hpp +106 -161
  6. netgen/include/potentialtools.hpp +20 -0
  7. netgen/include/prolongation.hpp +126 -3
  8. netgen/include/sparsematrix_impl.hpp +71 -5
  9. netgen/include/symbolicintegrator.hpp +1 -0
  10. netgen/include/tangentialfacetfespace.hpp +7 -22
  11. netgen/libngbla.dylib +0 -0
  12. netgen/libngcomp.dylib +0 -0
  13. netgen/libngfem.dylib +0 -0
  14. netgen/libngla.dylib +0 -0
  15. netgen/libngsbem.dylib +0 -0
  16. netgen/libngsolve.dylib +0 -0
  17. netgen/libngstd.dylib +0 -0
  18. ngsolve/__init__.py +1 -0
  19. ngsolve/__init__.pyi +4 -2
  20. ngsolve/bla.pyi +8 -0
  21. ngsolve/cmake/NGSolveConfig.cmake +5 -5
  22. ngsolve/cmake/ngsolve-targets-release.cmake +10 -0
  23. ngsolve/cmake/ngsolve-targets.cmake +9 -2
  24. ngsolve/comp/__init__.pyi +12 -1
  25. ngsolve/config/__init__.pyi +6 -6
  26. ngsolve/config/config.py +5 -5
  27. ngsolve/config/config.pyi +6 -6
  28. ngsolve/fem.pyi +7 -118
  29. ngsolve/ngslib.so +0 -0
  30. ngsolve/solve_implementation.py +146 -0
  31. ngsolve/solve_implementation.pyi +42 -0
  32. ngsolve/utils.pyi +1 -13
  33. {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2504.dist-info}/METADATA +2 -2
  34. {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2504.dist-info}/RECORD +70 -64
  35. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/Netgen.icns +0 -0
  36. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/bin/ngscxx +0 -0
  37. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/bin/ngsld +0 -0
  38. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/bin/ngsolve.tcl +0 -0
  39. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/bin/ngspy +0 -0
  40. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/beam.geo +0 -0
  41. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/beam.vol +0 -0
  42. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/chip.in2d +0 -0
  43. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/chip.vol +0 -0
  44. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/coil.geo +0 -0
  45. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/coil.vol +0 -0
  46. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/coilshield.geo +0 -0
  47. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/coilshield.vol +0 -0
  48. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/cube.geo +0 -0
  49. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/cube.vol +0 -0
  50. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -0
  51. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d11_chip_nitsche.pde +0 -0
  52. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d1_square.pde +0 -0
  53. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d2_chip.pde +0 -0
  54. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d3_helmholtz.pde +0 -0
  55. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d4_cube.pde +0 -0
  56. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d5_beam.pde +0 -0
  57. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d6_shaft.pde +0 -0
  58. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d7_coil.pde +0 -0
  59. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d8_coilshield.pde +0 -0
  60. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d9_hybridDG.pde +0 -0
  61. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/doubleglazing.in2d +0 -0
  62. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/doubleglazing.vol +0 -0
  63. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  64. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/shaft.geo +0 -0
  65. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/shaft.vol +0 -0
  66. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/square.in2d +0 -0
  67. {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/square.vol +0 -0
  68. {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2504.dist-info}/LICENSE +0 -0
  69. {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2504.dist-info}/WHEEL +0 -0
  70. {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2504.dist-info}/top_level.txt +0 -0
@@ -256,7 +256,7 @@ ANY 1 1 1 1 | 15
256
256
 
257
257
  virtual void UpdateDofTables() { ; }
258
258
  virtual void UpdateCouplingDofArray() { ; }
259
-
259
+ virtual void UpdateFreeDofs();
260
260
  /// update element coloring
261
261
  virtual void FinalizeUpdate();
262
262
 
@@ -640,7 +640,7 @@ ANY 1 1 1 1 | 15
640
640
  /// Set multigrid prolongation
641
641
  // void SetProlongation (ngmg::Prolongation * aprol)
642
642
  // { prol = aprol; }
643
- virtual void SetHarmonicProlongation (shared_ptr<BilinearForm> bfa);
643
+ virtual void SetHarmonicProlongation (shared_ptr<BilinearForm> bfa, string inverse);
644
644
 
645
645
  /// returns function-evaluator
646
646
  shared_ptr<DifferentialOperator> GetEvaluator (VorB vb = VOL) const
@@ -1109,6 +1109,7 @@ ANY 1 1 1 1 | 15
1109
1109
 
1110
1110
  /// copies dofcoupling from components
1111
1111
  void UpdateCouplingDofArray() override;
1112
+ virtual void UpdateFreeDofs() override;
1112
1113
 
1113
1114
  void SetDefinedOn (VorB vb, const BitArray& defon) override;
1114
1115
 
@@ -781,20 +781,14 @@ namespace ngfem
781
781
  const FiniteElement & volumefel2, int LocalFacetNr2,
782
782
  const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
783
783
  FlatVector<double> elx, FlatVector<double> ely,
784
- LocalHeap & lh) const
785
- {
786
- throw Exception ("FacetBilinearFormIntegrator::ApplyFacetMatrix for inner facets not implemented!");
787
- }
784
+ LocalHeap & lh) const;
788
785
  virtual void
789
786
  ApplyFacetMatrix (const FiniteElement & volumefel1, int LocalFacetNr1,
790
787
  const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
791
788
  const FiniteElement & volumefel2, int LocalFacetNr2,
792
789
  const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
793
790
  FlatVector<Complex> elx, FlatVector<Complex> ely,
794
- LocalHeap & lh) const
795
- {
796
- throw Exception ("FacetBilinearFormIntegrator::ApplyFacetMatrix for inner facets not implemented!");
797
- }
791
+ LocalHeap & lh) const;
798
792
 
799
793
 
800
794
  virtual void
@@ -841,19 +835,13 @@ namespace ngfem
841
835
  const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
842
836
  const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
843
837
  FlatVector<double> elx, FlatVector<double> ely,
844
- LocalHeap & lh) const
845
- {
846
- throw Exception ("FacetBilinearFormIntegrator::ApplyFacetMatrix for boundary facets not implemented!");
847
- }
838
+ LocalHeap & lh) const;
848
839
  virtual void
849
840
  ApplyFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
850
841
  const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
851
842
  const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
852
843
  FlatVector<Complex> elx, FlatVector<Complex> ely,
853
- LocalHeap & lh) const
854
- {
855
- throw Exception ("FacetBilinearFormIntegrator::ApplyFacetMatrix for boundary facets not implemented!");
856
- }
844
+ LocalHeap & lh) const;
857
845
 
858
846
 
859
847
  // calculate traces in integration points
@@ -0,0 +1,25 @@
1
+ #ifndef INTRULES_HPP
2
+ #define INTRULES_HPP
3
+
4
+ #include <bla.hpp>
5
+
6
+ namespace ngsbem
7
+ {
8
+ using namespace ngbla;
9
+
10
+ // x, y in triangle [(0,0), (1,0), (0,1)]
11
+ tuple<Array<Vec<2>>, Array<Vec<2>>, Array<double>> IdenticPanelIntegrationRule (int order);
12
+
13
+
14
+ // x, y in triangle [(0,0), (1,0), (0,1)]
15
+ // x=(0,0) and y=(0,0) are common vertices
16
+ tuple<Array<Vec<2>>, Array<Vec<2>>, Array<double>> CommonVertexIntegrationRule (int order);
17
+
18
+
19
+ // x, y in triangle [(0,0), (1,0), (0,1)]
20
+ // x in [(0,0),(1,0)] and y in [(0,0),(1,0)] are common edges
21
+ tuple<Array<Vec<2>>, Array<Vec<2>>, Array<double>> CommonEdgeIntegrationRule (int order);
22
+
23
+ }
24
+
25
+ #endif
@@ -0,0 +1,140 @@
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 RegularMLMultiPoleCF;
45
+
46
+
47
+ template <typename RADIAL, typename entry_type=Complex>
48
+ class MultiPoleCF : public CoefficientFunction
49
+ {
50
+ MultiPole<RADIAL, entry_type> mp;
51
+ Vec<3> center;
52
+ public:
53
+ MultiPoleCF (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, MultiPole<TARGET, entry_type> & target) { mp.ShiftZ(z, target); }
74
+
75
+ using CoefficientFunction::Transform;
76
+ template <typename TARGET>
77
+ void Transform (MultiPoleCF<TARGET, entry_type> & target)
78
+ {
79
+ mp.Transform (target.MP(), target.Center()-center);
80
+ }
81
+ };
82
+
83
+ template <typename entry_type>
84
+ class SingularMLMultiPoleCF : public CoefficientFunction
85
+ {
86
+ shared_ptr<SingularMLMultiPole<entry_type>> mlmp;
87
+ public:
88
+ SingularMLMultiPoleCF (Vec<3> center, double r, double kappa)
89
+ : CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<SingularMLMultiPole<entry_type>>(center, r, kappa)} { }
90
+
91
+ virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
92
+ { throw Exception("real eval not available"); }
93
+
94
+ virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
95
+ {
96
+ // values(0) = mlmp->Evaluate(mip.GetPoint());
97
+
98
+ if constexpr (std::is_same<entry_type, Complex>())
99
+ values(0) = mlmp->Evaluate(mip.GetPoint());
100
+ else
101
+ values = mlmp->Evaluate(mip.GetPoint());
102
+
103
+
104
+ }
105
+
106
+ shared_ptr<SingularMLMultiPole<entry_type>> MLMP() const { return mlmp; }
107
+ shared_ptr<RegularMLMultiPoleCF<entry_type>> CreateRegularExpansion(Vec<3> center, double r) const;
108
+ };
109
+
110
+
111
+ template <typename entry_type>
112
+ class RegularMLMultiPoleCF : public CoefficientFunction
113
+ {
114
+ shared_ptr<RegularMLMultiPole<entry_type>> mlmp;
115
+ public:
116
+ RegularMLMultiPoleCF (shared_ptr<SingularMLMultiPoleCF<entry_type>> asingmp, Vec<3> center, double r)
117
+ : CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<RegularMLMultiPole<entry_type>>(asingmp->MLMP(), center, r)} { }
118
+ RegularMLMultiPoleCF (shared_ptr<SingularMLMultiPole<entry_type>> asingmp, Vec<3> center, double r)
119
+ : CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<RegularMLMultiPole<entry_type>>(asingmp, center, r)} { }
120
+
121
+ virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
122
+ { throw Exception("real eval not available"); }
123
+
124
+ virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
125
+ {
126
+ // values(0) = mlmp->Evaluate(mip.GetPoint());
127
+
128
+ if constexpr (std::is_same<entry_type, Complex>())
129
+ values(0) = mlmp->Evaluate(mip.GetPoint());
130
+ else
131
+ values = mlmp->Evaluate(mip.GetPoint());
132
+ }
133
+
134
+ shared_ptr<RegularMLMultiPole<entry_type>> MLMP() { return mlmp; }
135
+ };
136
+
137
+
138
+ }
139
+
140
+ #endif