ngsolve 6.2.2501.post39.dev1__cp310-cp310-win_amd64.whl → 6.2.2501.post60.dev1__cp310-cp310-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.

Potentially problematic release.


This version of ngsolve might be problematic. Click here for more details.

Files changed (46) hide show
  1. netgen/include/coefficient.hpp +29 -2
  2. netgen/include/coefficient_impl.hpp +1 -0
  3. netgen/include/coefficient_stdmath.hpp +10 -0
  4. netgen/include/mptools.hpp +40 -1131
  5. netgen/include/ngblas.hpp +11 -1
  6. netgen/include/vector.hpp +8 -0
  7. netgen/lib/libngsolve.lib +0 -0
  8. netgen/libngsolve.dll +0 -0
  9. ngsolve/cmake/NGSolveConfig.cmake +1 -1
  10. ngsolve/cmake/ngsolve-targets.cmake +1 -1
  11. ngsolve/config/config.py +5 -5
  12. ngsolve/ngslib.pyd +0 -0
  13. {ngsolve-6.2.2501.post39.dev1.dist-info → ngsolve-6.2.2501.post60.dev1.dist-info}/METADATA +2 -2
  14. {ngsolve-6.2.2501.post39.dev1.dist-info → ngsolve-6.2.2501.post60.dev1.dist-info}/RECORD +46 -46
  15. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/Scripts/ngsolve.tcl +0 -0
  16. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/beam.geo +0 -0
  17. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/beam.vol +0 -0
  18. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/chip.in2d +0 -0
  19. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/chip.vol +0 -0
  20. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/coil.geo +0 -0
  21. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/coil.vol +0 -0
  22. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/coilshield.geo +0 -0
  23. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/coilshield.vol +0 -0
  24. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/cube.geo +0 -0
  25. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/cube.vol +0 -0
  26. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -0
  27. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/d11_chip_nitsche.pde +0 -0
  28. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/d1_square.pde +0 -0
  29. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/d2_chip.pde +0 -0
  30. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/d3_helmholtz.pde +0 -0
  31. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/d4_cube.pde +0 -0
  32. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/d5_beam.pde +0 -0
  33. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/d6_shaft.pde +0 -0
  34. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/d7_coil.pde +0 -0
  35. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/d8_coilshield.pde +0 -0
  36. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/d9_hybridDG.pde +0 -0
  37. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/doubleglazing.in2d +0 -0
  38. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/doubleglazing.vol +0 -0
  39. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  40. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/shaft.geo +0 -0
  41. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/shaft.vol +0 -0
  42. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/square.in2d +0 -0
  43. {ngsolve-6.2.2501.post39.dev1.data → ngsolve-6.2.2501.post60.dev1.data}/data/share/ngsolve/square.vol +0 -0
  44. {ngsolve-6.2.2501.post39.dev1.dist-info → ngsolve-6.2.2501.post60.dev1.dist-info}/LICENSE +0 -0
  45. {ngsolve-6.2.2501.post39.dev1.dist-info → ngsolve-6.2.2501.post60.dev1.dist-info}/WHEEL +0 -0
  46. {ngsolve-6.2.2501.post39.dev1.dist-info → ngsolve-6.2.2501.post60.dev1.dist-info}/top_level.txt +0 -0
@@ -1293,11 +1293,24 @@ public:
1293
1293
 
1294
1294
  virtual shared_ptr<CoefficientFunction>
1295
1295
  Diff (const CoefficientFunction * var, shared_ptr<CoefficientFunction> dir) const override
1296
- { throw Exception ("unarycf "+name+" does not provide a derivative"); }
1296
+ {
1297
+ if (this == var) return dir;
1298
+ return CWMult (lam.Diff(c1), c1->Diff(var, dir));
1299
+
1300
+ // throw Exception ("unarycf "+name+" does not provide a derivative");
1301
+ }
1297
1302
 
1298
1303
  virtual shared_ptr<CoefficientFunction>
1299
1304
  DiffJacobi (const CoefficientFunction * var, T_DJC & cache) const override
1300
- { return BASE::DiffJacobi(var, cache); }
1305
+ {
1306
+ if (this == var) return make_shared<ConstantCoefficientFunction> (1);
1307
+ if (this->Dimensions().Size() == 0)
1308
+ return lam.Diff(c1) * c1->DiffJacobi(var, cache);
1309
+ else
1310
+ return MakeMultDiagMatCoefficientFunction (lam.Diff(c1),
1311
+ c1->DiffJacobi(var, cache));
1312
+ // return BASE::DiffJacobi(var, cache);
1313
+ }
1301
1314
 
1302
1315
 
1303
1316
  /*
@@ -1775,6 +1788,16 @@ INLINE shared_ptr<CoefficientFunction> BinaryOpCF(shared_ptr<CoefficientFunction
1775
1788
  shared_ptr<CoefficientFunction> vec,
1776
1789
  int index);
1777
1790
 
1791
+ // diag(c1) * c2
1792
+ // general tensor (TODO)
1793
+ // C = A*B in sense of
1794
+ // C_ijk = A_ij B_ik
1795
+ // with i.. single index, and j,k multi-index
1796
+ NGS_DLL_HEADER shared_ptr<CoefficientFunction>
1797
+ MakeMultDiagMatCoefficientFunction (shared_ptr<CoefficientFunction> c1,
1798
+ shared_ptr<CoefficientFunction> c2);
1799
+
1800
+
1778
1801
  NGS_DLL_HEADER shared_ptr<CoefficientFunction>
1779
1802
  MakeCoordinateCoefficientFunction (int comp);
1780
1803
 
@@ -1848,6 +1871,10 @@ INLINE shared_ptr<CoefficientFunction> BinaryOpCF(shared_ptr<CoefficientFunction
1848
1871
  NGS_DLL_HEADER
1849
1872
  shared_ptr<CoefficientFunction> UnitVectorCF (int dim, int coord);
1850
1873
 
1874
+ NGS_DLL_HEADER
1875
+ shared_ptr<CoefficientFunction> OneVectorCF (FlatArray<int> dims);
1876
+
1877
+
1851
1878
  NGS_DLL_HEADER
1852
1879
  shared_ptr<CoefficientFunction> LeviCivitaCF(int dimension);
1853
1880
 
@@ -10,6 +10,7 @@ namespace ngfem
10
10
  {
11
11
  template <typename T> T operator() (T x) const { return x; }
12
12
  static string Name() { return " "; }
13
+ template <typename T> T Diff (T x) const { throw Exception("no GenericIdentity::Diff"); }
13
14
  void DoArchive(Archive& ar) {}
14
15
  };
15
16
 
@@ -13,12 +13,14 @@ namespace ngfem
13
13
 
14
14
  struct GenericSin {
15
15
  template <typename T> T operator() (T x) const { return sin(x); }
16
+ template <typename T> T Diff (T x) const { return cos(x); }
16
17
  static string Name() { return "sin"; }
17
18
  void DoArchive(Archive& ar) {}
18
19
  };
19
20
 
20
21
  struct GenericCos {
21
22
  template <typename T> T operator() (T x) const { return cos(x); }
23
+ template <typename T> T Diff (T x) const { return -sin(x); }
22
24
  static string Name() { return "cos"; }
23
25
  void DoArchive(Archive& ar) {}
24
26
  };
@@ -52,12 +54,14 @@ namespace ngfem
52
54
 
53
55
  struct GenericSinh {
54
56
  template <typename T> T operator() (T x) const { return sinh(x); }
57
+ template <typename T> T Diff (T x) const { return cosh(x); }
55
58
  static string Name() { return "sinh"; }
56
59
  void DoArchive(Archive& ar) {}
57
60
  };
58
61
 
59
62
  struct GenericCosh {
60
63
  template <typename T> T operator() (T x) const { return cosh(x); }
64
+ template <typename T> T Diff (T x) const { return sinh(x); }
61
65
  static string Name() { return "cosh"; }
62
66
  void DoArchive(Archive& ar) {}
63
67
  };
@@ -66,6 +70,7 @@ namespace ngfem
66
70
 
67
71
  struct GenericExp {
68
72
  template <typename T> T operator() (T x) const { return exp(x); }
73
+ template <typename T> T Diff (T x) const { return exp(x); }
69
74
  static string Name() { return "exp"; }
70
75
  void DoArchive(Archive& ar) {}
71
76
  };
@@ -73,6 +78,9 @@ namespace ngfem
73
78
  struct GenericLog {
74
79
  template <typename T> T operator() (T x) const { return log(x); }
75
80
  static string Name() { return "log"; }
81
+ auto Diff (shared_ptr<CoefficientFunction> x) const {
82
+ return OneVectorCF(x->Dimensions()) / x;
83
+ }
76
84
  void DoArchive(Archive& ar) {}
77
85
  };
78
86
 
@@ -94,6 +102,7 @@ struct GenericFloor {
94
102
  SIMD<Complex> operator() (SIMD<Complex> x) const { throw ExceptionNOSIMD("no floor for simd"); }
95
103
  // AutoDiff<1> operator() (AutoDiff<1> x) const { throw Exception("no floor for AD"); }
96
104
  AutoDiffDiff<1> operator() (AutoDiffDiff<1> x) const { throw Exception("no floor for ADD"); }
105
+ template <typename T> T Diff (T x) const { throw Exception("Generic Floor not differentiable"); }
97
106
  static string Name() { return "floor"; }
98
107
  void DoArchive(Archive& ar) {}
99
108
  };
@@ -104,6 +113,7 @@ struct GenericCeil {
104
113
  SIMD<Complex> operator() (SIMD<Complex> x) const { throw ExceptionNOSIMD("no ceil for simd"); }
105
114
  // AutoDiff<1> operator() (AutoDiff<1> x) const { throw Exception("no ceil for AD"); }
106
115
  AutoDiffDiff<1> operator() (AutoDiffDiff<1> x) const { throw Exception("no ceil for ADD"); }
116
+ template <typename T> T Diff (T x) const { throw Exception("Generic Ceil not differentiable"); }
107
117
  static string Name() { return "ceil"; }
108
118
  void DoArchive(Archive& ar) {}
109
119
  };