ngsolve 6.2.2505__cp311-cp311-macosx_10_15_universal2.whl → 6.2.2505.post94.dev0__cp311-cp311-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 (60) hide show
  1. netgen/include/bilinearform.hpp +1 -1
  2. netgen/include/diffop_impl.hpp +3 -1
  3. netgen/include/fespace.hpp +4 -2
  4. netgen/include/gridfunction.hpp +1 -1
  5. netgen/include/h1amg.hpp +24 -1
  6. netgen/include/hcurlcurlfe.hpp +20 -0
  7. netgen/include/hdivhofespace.hpp +2 -0
  8. netgen/include/mptools.hpp +832 -97
  9. netgen/include/ngblas.hpp +113 -4
  10. netgen/include/recursive_pol.hpp +63 -11
  11. netgen/include/simd_complex.hpp +20 -0
  12. netgen/include/sparsematrix_dyn.hpp +2 -2
  13. netgen/include/sparsematrix_impl.hpp +25 -0
  14. netgen/include/vector.hpp +15 -2
  15. netgen/libngbla.dylib +0 -0
  16. netgen/libngcomp.dylib +0 -0
  17. netgen/libngfem.dylib +0 -0
  18. netgen/libngla.dylib +0 -0
  19. netgen/libngsbem.dylib +0 -0
  20. netgen/libngstd.dylib +0 -0
  21. ngsolve/cmake/NGSolveConfig.cmake +1 -1
  22. ngsolve/config/config.py +5 -5
  23. {ngsolve-6.2.2505.dist-info → ngsolve-6.2.2505.post94.dev0.dist-info}/METADATA +2 -2
  24. {ngsolve-6.2.2505.dist-info → ngsolve-6.2.2505.post94.dev0.dist-info}/RECORD +60 -60
  25. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/Netgen.icns +0 -0
  26. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/bin/ngscxx +0 -0
  27. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/bin/ngsld +0 -0
  28. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/bin/ngsolve.tcl +0 -0
  29. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/bin/ngspy +0 -0
  30. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/beam.geo +0 -0
  31. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/beam.vol +0 -0
  32. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/chip.in2d +0 -0
  33. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/chip.vol +0 -0
  34. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/coil.geo +0 -0
  35. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/coil.vol +0 -0
  36. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/coilshield.geo +0 -0
  37. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/coilshield.vol +0 -0
  38. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/cube.geo +0 -0
  39. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/cube.vol +0 -0
  40. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -0
  41. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/d11_chip_nitsche.pde +0 -0
  42. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/d1_square.pde +0 -0
  43. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/d2_chip.pde +0 -0
  44. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/d3_helmholtz.pde +0 -0
  45. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/d4_cube.pde +0 -0
  46. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/d5_beam.pde +0 -0
  47. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/d6_shaft.pde +0 -0
  48. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/d7_coil.pde +0 -0
  49. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/d8_coilshield.pde +0 -0
  50. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/d9_hybridDG.pde +0 -0
  51. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/doubleglazing.in2d +0 -0
  52. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/doubleglazing.vol +0 -0
  53. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  54. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/shaft.geo +0 -0
  55. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/shaft.vol +0 -0
  56. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/square.in2d +0 -0
  57. {ngsolve-6.2.2505.data → ngsolve-6.2.2505.post94.dev0.data}/data/share/ngsolve/square.vol +0 -0
  58. {ngsolve-6.2.2505.dist-info → ngsolve-6.2.2505.post94.dev0.dist-info}/LICENSE +0 -0
  59. {ngsolve-6.2.2505.dist-info → ngsolve-6.2.2505.post94.dev0.dist-info}/WHEEL +0 -0
  60. {ngsolve-6.2.2505.dist-info → ngsolve-6.2.2505.post94.dev0.dist-info}/top_level.txt +0 -0
@@ -915,7 +915,7 @@ namespace ngcomp
915
915
  };
916
916
 
917
917
 
918
-
918
+ // template <int DIM_ELEMENT, int DIM_SPACE>
919
919
  class ApplyIntegrationPoints : public BaseMatrix
920
920
  {
921
921
  Array<shared_ptr<CoefficientFunction>> coefs;
@@ -312,10 +312,12 @@ namespace ngfem
312
312
 
313
313
  template <typename DIFFOP>
314
314
  void T_DifferentialOperator<DIFFOP> ::
315
- CalcTransformationMatrix (const BaseMappedIntegrationPoint & mip,
315
+ CalcTransformationMatrix (const BaseMappedIntegrationPoint & bmip,
316
316
  SliceMatrix<double> trans,
317
317
  LocalHeap & lh) const
318
318
  {
319
+ const MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE> & mip =
320
+ static_cast<const MappedIntegrationPoint<DIM_ELEMENT,DIM_SPACE>&> (bmip);
319
321
  DIFFOP::CalcTransformationMatrix(mip, trans, lh);
320
322
  }
321
323
 
@@ -448,7 +448,8 @@ ANY 1 1 1 1 | 15
448
448
  virtual void GetDofNrs (NodeId ni, Array<DofId> & dnums) const;
449
449
  BitArray GetDofs (const Region & reg) const;
450
450
  Table<int> CreateDofTable (VorB vorb) const;
451
-
451
+ virtual void SelectDofs (const string & name, BitArray & dofs) const;
452
+
452
453
  /// get coupling types of dofs
453
454
  virtual void GetDofCouplingTypes (int elnr, Array<COUPLING_TYPE> & dnums) const;
454
455
 
@@ -1141,7 +1142,8 @@ ANY 1 1 1 1 | 15
1141
1142
  void GetEdgeDofNrs (int ednr, Array<DofId> & dnums) const override;
1142
1143
  void GetFaceDofNrs (int fanr, Array<DofId> & dnums) const override;
1143
1144
  void GetInnerDofNrs (int elnr, Array<DofId> & dnums) const override;
1144
-
1145
+ void SelectDofs (const string & name, BitArray & dofs) const override;
1146
+
1145
1147
  void SolveM(CoefficientFunction * rho, BaseVector & vec, Region * definedon,
1146
1148
  LocalHeap & lh) const override;
1147
1149
  void ApplyM(CoefficientFunction * rho, BaseVector & vec, Region * definedon,
@@ -166,7 +166,7 @@ namespace ngcomp
166
166
  ///
167
167
  shared_ptr<FESpace> GetFESpace() const { return fespace; }
168
168
  ///
169
- shared_ptr<MeshAccess> GetMeshAccess() const { return fespace->GetMeshAccess(); }
169
+ const shared_ptr<MeshAccess> & GetMeshAccess() const { return fespace->GetMeshAccess(); }
170
170
  ///
171
171
  virtual string GetClassName () const
172
172
  {
netgen/include/h1amg.hpp CHANGED
@@ -9,6 +9,20 @@
9
9
  namespace ngcomp
10
10
  {
11
11
  using namespace ngla;
12
+
13
+
14
+
15
+ struct H1AMG_Parameters
16
+ {
17
+ int verbose = 0;
18
+ int smoothing_steps = 3;
19
+ int coarsenings_per_level = 3; // number of binary coarsenings per level
20
+ bool block_smoother = true; // block or point smoother ?
21
+ bool use_smoothed_prolongation = true;
22
+ int max_coarse = 10;
23
+ int max_level = 20;
24
+ };
25
+
12
26
 
13
27
  template <class SCAL>
14
28
  class NGS_DLL_HEADER H1AMG_Matrix : public ngla::BaseMatrix
@@ -26,6 +40,7 @@ namespace ngcomp
26
40
  ngcore::FlatArray<ngcore::IVec<2>> e2v,
27
41
  ngcore::FlatArray<double> edge_weights,
28
42
  ngcore::FlatArray<double> vertex_weights,
43
+ const H1AMG_Parameters & param,
29
44
  size_t level);
30
45
 
31
46
  virtual int VHeight() const override { return size; }
@@ -50,7 +65,9 @@ namespace ngcomp
50
65
 
51
66
  ParallelHashTable<IVec<2>,double> edge_weights_ht;
52
67
  ParallelHashTable<IVec<1>,double> vertex_weights_ht;
53
-
68
+
69
+ H1AMG_Parameters param;
70
+
54
71
  public:
55
72
 
56
73
  static shared_ptr<Preconditioner> CreateBF (shared_ptr<BilinearForm> bfa, const Flags & flags, const string & name)
@@ -71,6 +88,12 @@ namespace ngcomp
71
88
  cout << IM(3) << "Create H1AMG" << endl;
72
89
  else
73
90
  cout << IM(3) << "Create H1AMG, complex" << endl;
91
+
92
+ param.verbose = int(flags.GetNumFlag("verbose", 0));
93
+ param.smoothing_steps = int(flags.GetNumFlag("smoothingsteps", 1));
94
+ param.use_smoothed_prolongation = flags.GetDefineFlagX("smoothedprolongation").IsMaybeTrue();
95
+ param.max_coarse = int(flags.GetNumFlag("maxcoarse", 10));
96
+ param.max_level = int(flags.GetNumFlag("maxlevel", 20));
74
97
  }
75
98
 
76
99
  virtual void InitLevel (shared_ptr<BitArray> _freedofs) override
@@ -88,6 +88,9 @@ namespace ngfem
88
88
  BareSliceVector<> coefs) const = 0;
89
89
 
90
90
 
91
+ virtual void CalcMappedShape (const SIMD<BaseMappedIntegrationPoint> & bmip,
92
+ BareSliceMatrix<SIMD<double>> shapes) const = 0;
93
+
91
94
  virtual void CalcMappedShape (const SIMD_BaseMappedIntegrationRule & bmir,
92
95
  BareSliceMatrix<SIMD<double>> shapes) const = 0;
93
96
 
@@ -931,6 +934,23 @@ namespace ngfem
931
934
  else
932
935
  throw Exception("HCurlCurl::CalcMappedCurlShape implemented only for TRIG and TET");
933
936
  }
937
+
938
+
939
+ virtual void CalcMappedShape (const SIMD<BaseMappedIntegrationPoint> & bmip,
940
+ BareSliceMatrix<SIMD<double>> shape) const override
941
+ {
942
+ Switch<4-DIM>
943
+ (bmip.DimSpace()-DIM,[this, &bmip, shape](auto CODIM)
944
+ {
945
+ constexpr auto DIMSPACE = DIM+CODIM.value;
946
+ auto & mip = static_cast<const SIMD<MappedIntegrationPoint<DIM,DIM+CODIM.value>>&> (bmip);
947
+ this->Cast() -> T_CalcShape (GetTIP(mip),
948
+ SBLambda ([shape,DIMSPACE] (size_t j, auto val)
949
+ {
950
+ shape.Rows(j*sqr(DIMSPACE), (j+1)*sqr(DIMSPACE)).Col(0).Range(0,sqr(DIMSPACE)) = val.Value().AsVector();
951
+ }));
952
+ });
953
+ }
934
954
 
935
955
  virtual void CalcMappedShape (const SIMD_BaseMappedIntegrationRule & bmir,
936
956
  BareSliceMatrix<SIMD<double>> shapes) const override
@@ -143,6 +143,8 @@ namespace ngcomp
143
143
  }
144
144
  }
145
145
 
146
+ void SelectDofs (const string & name, BitArray & dofs) const override;
147
+
146
148
  int GetFirstInnerDof(int elnr) const { return(first_inner_dof[elnr]);};
147
149
  // virtual int LowOrderDof() const { if(discont) return(0); else return(1);}
148
150