ngsolve 6.2.2506.post33.dev0__cp39-cp39-win_amd64.whl → 6.2.2506.post45.dev0__cp39-cp39-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 (47) hide show
  1. netgen/include/expr.hpp +32 -1
  2. netgen/include/kernels.hpp +124 -4
  3. netgen/include/l2hofe.hpp +1 -0
  4. netgen/include/mptools.hpp +442 -212
  5. netgen/include/recursive_pol.hpp +2 -2
  6. netgen/include/sparsematrix.hpp +1 -1
  7. netgen/include/thdivfe_impl.hpp +1 -1
  8. netgen/include/vector.hpp +7 -2
  9. netgen/lib/libngsolve.lib +0 -0
  10. netgen/libngsolve.dll +0 -0
  11. ngsolve/cmake/NGSolveConfig.cmake +1 -1
  12. ngsolve/config/config.py +5 -5
  13. ngsolve/ngslib.pyd +0 -0
  14. {ngsolve-6.2.2506.post33.dev0.dist-info → ngsolve-6.2.2506.post45.dev0.dist-info}/METADATA +1 -1
  15. {ngsolve-6.2.2506.post33.dev0.dist-info → ngsolve-6.2.2506.post45.dev0.dist-info}/RECORD +47 -47
  16. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/Scripts/ngsolve.tcl +0 -0
  17. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/beam.geo +0 -0
  18. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/beam.vol +0 -0
  19. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/chip.in2d +0 -0
  20. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/chip.vol +0 -0
  21. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/coil.geo +0 -0
  22. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/coil.vol +0 -0
  23. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/coilshield.geo +0 -0
  24. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/coilshield.vol +0 -0
  25. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/cube.geo +0 -0
  26. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/cube.vol +0 -0
  27. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -0
  28. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/d11_chip_nitsche.pde +0 -0
  29. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/d1_square.pde +0 -0
  30. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/d2_chip.pde +0 -0
  31. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/d3_helmholtz.pde +0 -0
  32. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/d4_cube.pde +0 -0
  33. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/d5_beam.pde +0 -0
  34. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/d6_shaft.pde +0 -0
  35. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/d7_coil.pde +0 -0
  36. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/d8_coilshield.pde +0 -0
  37. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/d9_hybridDG.pde +0 -0
  38. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/doubleglazing.in2d +0 -0
  39. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/doubleglazing.vol +0 -0
  40. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  41. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/shaft.geo +0 -0
  42. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/shaft.vol +0 -0
  43. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/square.in2d +0 -0
  44. {ngsolve-6.2.2506.post33.dev0.data → ngsolve-6.2.2506.post45.dev0.data}/data/share/ngsolve/square.vol +0 -0
  45. {ngsolve-6.2.2506.post33.dev0.dist-info → ngsolve-6.2.2506.post45.dev0.dist-info}/LICENSE +0 -0
  46. {ngsolve-6.2.2506.post33.dev0.dist-info → ngsolve-6.2.2506.post45.dev0.dist-info}/WHEEL +0 -0
  47. {ngsolve-6.2.2506.post33.dev0.dist-info → ngsolve-6.2.2506.post45.dev0.dist-info}/top_level.txt +0 -0
netgen/include/expr.hpp CHANGED
@@ -515,7 +515,7 @@ namespace ngbla
515
515
  }
516
516
 
517
517
 
518
- if (TB::IsLinear())
518
+ if constexpr (TB::IsLinear())
519
519
  {
520
520
  if (T::IsLinear())
521
521
  {
@@ -1492,8 +1492,39 @@ namespace ngbla
1492
1492
  }
1493
1493
 
1494
1494
 
1495
+ /* ************************* OuterProduct ********************** */
1496
+
1497
+ template <class TA, class TB>
1498
+ class OuterProductExpr : public Expr<OuterProductExpr<TA,TB>>
1499
+ {
1500
+ TA a;
1501
+ TB b;
1502
+ public:
1503
+ OuterProductExpr (TA aa, TB ab) : a(aa), b(ab) { ; }
1495
1504
 
1505
+ // INLINE auto operator() (size_t i) const { return a[i] * b(i); }
1506
+ INLINE auto operator() (size_t i, size_t j) const { return a[i] * b[j]; }
1496
1507
 
1508
+ INLINE auto View() const { return *this; }
1509
+ INLINE auto Shape() const
1510
+ {
1511
+ return tuple<size_t,size_t> (a.Size(), b.Width());
1512
+ }
1513
+
1514
+ INLINE const auto A() const { return a; }
1515
+ INLINE const auto B() const { return b; }
1516
+ INLINE auto Height() const { return a.Size(); }
1517
+ INLINE auto Width() const { return b.Size(); }
1518
+
1519
+ static constexpr bool IsLinear() { return false; }
1520
+ };
1521
+
1522
+
1523
+ template <typename TA, typename TB>
1524
+ INLINE auto OuterProduct (const Expr<TA> & a, const Expr<TB> & b)
1525
+ {
1526
+ return OuterProductExpr (a.View(), b.View());
1527
+ }
1497
1528
 
1498
1529
 
1499
1530
 
@@ -485,10 +485,9 @@ namespace ngsbem
485
485
 
486
486
  void AddSource (SingularMLExpansion<Complex> & mp, Vec<3> pnt, Vec<3> nv, BareSliceVector<Complex> val) const
487
487
  {
488
- /*
489
- mp.AddCharge(pnt, Complex(0, -kappa)*val(0));
490
- mp.AddDipole(pnt, -nv, val(0));
491
- */
488
+ // mp.AddCharge(pnt, Complex(0, -kappa)*val(0));
489
+ // mp.AddDipole(pnt, -nv, val(0));
490
+
492
491
  mp.AddChargeDipole (pnt, Complex(0, -kappa)*val(0), -nv, val(0));
493
492
  }
494
493
 
@@ -647,6 +646,127 @@ namespace ngsbem
647
646
  };
648
647
 
649
648
 
649
+
650
+
651
+
652
+ /*
653
+ Dissertation Guenther Of
654
+ "BETI–Gebietszerlegungsmethoden
655
+ mit schnellen Randelementverfahren
656
+ und Anwendungen"
657
+ page 85
658
+ */
659
+
660
+ template <int D> class LameSLKernel;
661
+
662
+ template<>
663
+ class LameSLKernel<3> : public BaseKernel
664
+ {
665
+ double E, nu;
666
+ double alpha;
667
+ public:
668
+ typedef double value_type;
669
+
670
+ static string Name() { return "LameSL"; }
671
+ static auto Shape() { return IVec<2>(3,3); }
672
+
673
+ LameSLKernel (const LameSLKernel&) = default;
674
+ LameSLKernel (LameSLKernel&&) = default;
675
+ LameSLKernel (double _E, double _nu) : E(_E), nu(_nu)
676
+ {
677
+ alpha = (1+nu)/((1-nu)*2*E);
678
+
679
+ terms += { 3-4*nu, 0, 0, 0 };
680
+ terms += { 3-4*nu, 0, 1, 1 };
681
+ terms += { 3-4*nu, 0, 2, 2 };
682
+
683
+ terms += { 1, 1, 0, 0 };
684
+ terms += { 1, 2, 0, 1 };
685
+ terms += { 1, 2, 1, 0 };
686
+
687
+ terms += { 1, 3, 0, 2 };
688
+ terms += { 1, 3, 2, 0 };
689
+ terms += { 1, 4, 1, 1 };
690
+
691
+ terms += { 1, 5, 1, 2 };
692
+ terms += { 1, 5, 2, 1 };
693
+ terms += { 1, 6, 2, 2 };
694
+ }
695
+
696
+ Array<KernelTerm> terms;
697
+
698
+ template <typename T>
699
+ auto Evaluate (Vec<3,T> x, Vec<3,T> y, Vec<3,T> nx, Vec<3,T> ny) const
700
+ {
701
+ T norm = L2Norm(x-y);
702
+ auto lapkern = alpha / (4 * M_PI * norm); // lapkern times factor
703
+
704
+ return Vec<7,T> { lapkern,
705
+ (x(0)-y(0))*(x(0)-y(0))/sqr(norm) * lapkern,
706
+ (x(0)-y(0))*(x(1)-y(1))/sqr(norm) * lapkern,
707
+ (x(0)-y(0))*(x(2)-y(2))/sqr(norm) * lapkern,
708
+ (x(1)-y(1))*(x(1)-y(1))/sqr(norm) * lapkern,
709
+ (x(1)-y(1))*(x(2)-y(2))/sqr(norm) * lapkern,
710
+ (x(2)-y(2))*(x(2)-y(2))/sqr(norm) * lapkern
711
+ };
712
+ }
713
+
714
+
715
+ auto CreateMultipoleExpansion (Vec<3> c, double r) const
716
+ {
717
+ return make_shared<SingularMLExpansion<Vec<6,Complex>>> (c, r, 1e-16);
718
+ }
719
+
720
+ auto CreateLocalExpansion (Vec<3> c, double r) const
721
+ {
722
+ return make_shared<RegularMLExpansion<Vec<6,Complex>>> (c, r, 1e-16);
723
+ }
724
+
725
+
726
+ void AddSource (SingularMLExpansion<Vec<6,Complex>> & mp, Vec<3> pnt, Vec<3> nv, BareSliceVector<double> val) const
727
+ {
728
+ Vec<6> charge = 0.0;
729
+ charge.Range(0,3) = val;
730
+ mp.AddCharge(pnt, charge); // Row 1+2
731
+
732
+ Mat<3,3> jacobi = OuterProduct(pnt, val) + InnerProduct(pnt, val) * Id<3>();
733
+
734
+ for (int k = 0; k < 3; k++)
735
+ {
736
+ Vec<6> dipole_charge = 0.0;
737
+ dipole_charge.Range(3,6) = jacobi.Col(k);
738
+
739
+ auto ek = UnitVec<3>(k);
740
+ mp.AddDipole(pnt, -ek, dipole_charge);
741
+ }
742
+ }
743
+
744
+ void EvaluateMP (RegularMLExpansion<Vec<6,Complex>> & mp, Vec<3> pnt, Vec<3> nv, BareSliceVector<double> val) const
745
+ {
746
+ Vec<6> mpval = Real(mp.Evaluate (pnt));
747
+ val.Range(0,3) = 0;
748
+ val += (3-4*nu)*alpha * mpval.Range(0,3); // Row 1
749
+
750
+ val -= alpha/2 * mpval.Range(3,6); // Row 3
751
+
752
+ // Row 2
753
+ Mat<3,3> jacobi = 0.0;
754
+ for (int k = 0; k < 3; k++)
755
+ {
756
+ auto ek = UnitVec<3>(k);
757
+ jacobi.Col(k) = Real(mp.EvaluateDirectionalDerivative(pnt, ek).Range(0,3));
758
+ }
759
+
760
+ val -= alpha/2 * ( Trans(jacobi) * pnt + Trace(jacobi) * pnt);
761
+ }
762
+ };
763
+
764
+
765
+
766
+
767
+
768
+
769
+
650
770
  }
651
771
 
652
772
 
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)