ngsolve 6.2.2504__cp312-cp312-macosx_10_15_universal2.whl → 6.2.2504.post44.dev0__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 (71) hide show
  1. netgen/include/blockjacobi.hpp +17 -5
  2. netgen/include/cholesky.hpp +2 -2
  3. netgen/include/h1amg.hpp +62 -2
  4. netgen/include/hdiv_equations.hpp +15 -0
  5. netgen/include/intrule.hpp +2 -1
  6. netgen/include/jacobi.hpp +35 -18
  7. netgen/include/meshaccess.hpp +3 -2
  8. netgen/include/potentialtools.hpp +2 -0
  9. netgen/include/preconditioner.hpp +21 -21
  10. netgen/include/sparsematrix_dyn.hpp +6 -7
  11. netgen/include/sparsematrix_impl.hpp +4 -2
  12. netgen/include/special_matrix.hpp +2 -0
  13. netgen/include/symbolicintegrator.hpp +1 -1
  14. netgen/libngbla.dylib +0 -0
  15. netgen/libngcomp.dylib +0 -0
  16. netgen/libngfem.dylib +0 -0
  17. netgen/libngla.dylib +0 -0
  18. netgen/libngsbem.dylib +0 -0
  19. netgen/libngstd.dylib +0 -0
  20. ngsolve/__init__.pyi +2 -2
  21. ngsolve/cmake/NGSolveConfig.cmake +5 -5
  22. ngsolve/cmake/ngsolve-targets.cmake +1 -8
  23. ngsolve/comp/__init__.pyi +49 -20
  24. ngsolve/config/__init__.pyi +6 -6
  25. ngsolve/config/config.py +5 -5
  26. ngsolve/config/config.pyi +6 -6
  27. ngsolve/fem.pyi +1 -1
  28. ngsolve/la.pyi +2 -2
  29. ngsolve/preconditioners.py +1 -0
  30. ngsolve/preconditioners.pyi +2 -1
  31. ngsolve/solve_implementation.py +11 -2
  32. ngsolve/utils.pyi +3 -2
  33. ngsolve/webgui.py +1 -0
  34. {ngsolve-6.2.2504.dist-info → ngsolve-6.2.2504.post44.dev0.dist-info}/METADATA +2 -2
  35. {ngsolve-6.2.2504.dist-info → ngsolve-6.2.2504.post44.dev0.dist-info}/RECORD +71 -71
  36. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/Netgen.icns +0 -0
  37. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/bin/ngscxx +0 -0
  38. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/bin/ngsld +0 -0
  39. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/bin/ngsolve.tcl +0 -0
  40. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/bin/ngspy +0 -0
  41. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/beam.geo +0 -0
  42. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/beam.vol +0 -0
  43. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/chip.in2d +0 -0
  44. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/chip.vol +0 -0
  45. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/coil.geo +0 -0
  46. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/coil.vol +0 -0
  47. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/coilshield.geo +0 -0
  48. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/coilshield.vol +0 -0
  49. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/cube.geo +0 -0
  50. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/cube.vol +0 -0
  51. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -0
  52. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d11_chip_nitsche.pde +0 -0
  53. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d1_square.pde +0 -0
  54. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d2_chip.pde +0 -0
  55. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d3_helmholtz.pde +0 -0
  56. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d4_cube.pde +0 -0
  57. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d5_beam.pde +0 -0
  58. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d6_shaft.pde +0 -0
  59. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d7_coil.pde +0 -0
  60. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d8_coilshield.pde +0 -0
  61. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d9_hybridDG.pde +0 -0
  62. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/doubleglazing.in2d +0 -0
  63. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/doubleglazing.vol +0 -0
  64. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  65. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/shaft.geo +0 -0
  66. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/shaft.vol +0 -0
  67. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/square.in2d +0 -0
  68. {ngsolve-6.2.2504.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/square.vol +0 -0
  69. {ngsolve-6.2.2504.dist-info → ngsolve-6.2.2504.post44.dev0.dist-info}/LICENSE +0 -0
  70. {ngsolve-6.2.2504.dist-info → ngsolve-6.2.2504.post44.dev0.dist-info}/WHEEL +0 -0
  71. {ngsolve-6.2.2504.dist-info → ngsolve-6.2.2504.post44.dev0.dist-info}/top_level.txt +0 -0
@@ -9,6 +9,7 @@
9
9
 
10
10
 
11
11
  #include "sparsematrix.hpp"
12
+ #include "jacobi.hpp"
12
13
 
13
14
  namespace ngla
14
15
  {
@@ -16,7 +17,7 @@ namespace ngla
16
17
  /**
17
18
  Base class for Block - Jacobi and Block Gauss Seidel smoother.
18
19
  */
19
- class NGS_DLL_HEADER BaseBlockJacobiPrecond : virtual public BaseMatrix
20
+ class NGS_DLL_HEADER BaseBlockJacobiPrecond : public BaseMSMPrecond
20
21
  {
21
22
  protected:
22
23
  /// the table defining the blocks
@@ -38,6 +39,17 @@ namespace ngla
38
39
  /// deletes the table
39
40
  virtual ~BaseBlockJacobiPrecond ();
40
41
 
42
+ virtual void Smooth (BaseVector & x, const BaseVector & b, int steps = 1) const override
43
+ {
44
+ GSSmooth (x, b, steps);
45
+ }
46
+ virtual void SmoothBack (BaseVector & x, const BaseVector & b, int steps = 1) const override
47
+ {
48
+ GSSmoothBack (x, b, steps);
49
+ }
50
+
51
+
52
+
41
53
  /// performs steps Gauss-Seidel steps for the equation A x = b
42
54
  virtual void GSSmooth (BaseVector & x, const BaseVector & b,
43
55
  int steps = 1) const = 0;
@@ -101,8 +113,8 @@ namespace ngla
101
113
  The blocks are specified by a table container
102
114
  */
103
115
  template <class TM, class TV_ROW, class TV_COL>
104
- class NGS_DLL_HEADER BlockJacobiPrecond : virtual public BaseBlockJacobiPrecond,
105
- virtual public S_BaseMatrix<typename mat_traits<TM>::TSCAL>
116
+ class NGS_DLL_HEADER BlockJacobiPrecond : public BaseBlockJacobiPrecond,
117
+ public S_BaseMatrix<typename mat_traits<TM>::TSCAL>
106
118
  {
107
119
  protected:
108
120
  /// a reference to the matrix
@@ -190,8 +202,8 @@ namespace ngla
190
202
  ///
191
203
  template <class TM, class TV>
192
204
  class BlockJacobiPrecondSymmetric :
193
- virtual public BaseBlockJacobiPrecond,
194
- virtual public S_BaseMatrix<typename mat_traits<TM>::TSCAL>
205
+ public BaseBlockJacobiPrecond,
206
+ public S_BaseMatrix<typename mat_traits<TM>::TSCAL>
195
207
  {
196
208
  protected:
197
209
  shared_ptr<const SparseMatrixSymmetric<TM,TV>> mat;
@@ -503,7 +503,7 @@ namespace ngbla
503
503
 
504
504
  int n = mat.Height();
505
505
  STACK_ARRAY(T, mem, n);
506
- FlatVector<T> dinv(n, &mem);
506
+ FlatVector<T> dinv(n, &mem[0]);
507
507
 
508
508
  for (size_t i = 0; i < n; i++)
509
509
  // CalcInverse (mat(i,i), dinv(i));
@@ -528,7 +528,7 @@ namespace ngbla
528
528
  {
529
529
  size_t n = mat.Height();
530
530
  STACK_ARRAY(T,mem, n);
531
- FlatVector<T> dinv(n, &mem);
531
+ FlatVector<T> dinv(n, &mem[0]);
532
532
 
533
533
  for (size_t i = 0; i < n; i++)
534
534
  {
netgen/include/h1amg.hpp CHANGED
@@ -1,9 +1,10 @@
1
- #ifndef H1AMG_HPP_
2
- #define H1AMG_HPP_
1
+ #ifndef H1AMGxx_HPP_
2
+ #define H1AMGxx_HPP_
3
3
 
4
4
  // #include <la.hpp>
5
5
  #include <basematrix.hpp>
6
6
  #include <sparsematrix.hpp>
7
+ #include <preconditioner.hpp>
7
8
 
8
9
  namespace ngcomp
9
10
  {
@@ -36,6 +37,65 @@ namespace ngcomp
36
37
 
37
38
  virtual void Mult (const ngla::BaseVector & b, ngla::BaseVector & x) const override;
38
39
  };
40
+
41
+
42
+
43
+
44
+
45
+ template <class SCAL>
46
+ class H1AMG_Preconditioner : public Preconditioner
47
+ {
48
+ shared_ptr<BitArray> freedofs;
49
+ shared_ptr<H1AMG_Matrix<SCAL>> mat;
50
+
51
+ ParallelHashTable<IVec<2>,double> edge_weights_ht;
52
+ ParallelHashTable<IVec<1>,double> vertex_weights_ht;
53
+
54
+ public:
55
+
56
+ static shared_ptr<Preconditioner> CreateBF (shared_ptr<BilinearForm> bfa, const Flags & flags, const string & name)
57
+ {
58
+ if (bfa->GetFESpace()->IsComplex())
59
+ return make_shared<H1AMG_Preconditioner<Complex>> (bfa, flags, name);
60
+ else
61
+ return make_shared<H1AMG_Preconditioner<double>> (bfa, flags, name);
62
+ }
63
+
64
+ static DocInfo GetDocu ();
65
+
66
+ H1AMG_Preconditioner (shared_ptr<BilinearForm> abfa, const Flags & aflags,
67
+ const string aname = "H1AMG_cprecond")
68
+ : Preconditioner (abfa, aflags, aname)
69
+ {
70
+ if (is_same<SCAL,double>::value)
71
+ cout << IM(3) << "Create H1AMG" << endl;
72
+ else
73
+ cout << IM(3) << "Create H1AMG, complex" << endl;
74
+ }
75
+
76
+ virtual void InitLevel (shared_ptr<BitArray> _freedofs) override
77
+ {
78
+ freedofs = _freedofs;
79
+ }
80
+
81
+ virtual void FinalizeLevel (const BaseMatrix * matrix) override;
82
+
83
+ virtual void AddElementMatrix (FlatArray<int> dnums,
84
+ FlatMatrix<SCAL> elmat,
85
+ ElementId id,
86
+ LocalHeap & lh) override;
87
+
88
+ virtual void Update () override { ; }
89
+
90
+ virtual const BaseMatrix & GetMatrix() const override
91
+ {
92
+ return *mat;
93
+ }
94
+
95
+ };
96
+
97
+
98
+
39
99
  }
40
100
 
41
101
  #endif // H1AMG_HPP_
@@ -179,6 +179,14 @@ public:
179
179
  {
180
180
  return static_cast<const FEL&> (fel);
181
181
  }
182
+ static int DimRef() { return D-1; }
183
+
184
+ template <typename IP, typename MAT>
185
+ static void GenerateMatrixRef (const FiniteElement & fel, const IP & ip,
186
+ MAT && mat, LocalHeap & lh)
187
+ {
188
+ Cast(fel).CalcShape (ip, Trans(mat));
189
+ }
182
190
 
183
191
  template <typename AFEL, typename MIP, typename MAT>
184
192
  static void GenerateMatrix (const AFEL & fel, const MIP & mip,
@@ -188,6 +196,13 @@ public:
188
196
  Trans (Cast(fel).GetShape(mip.IP(),lh));
189
197
  }
190
198
 
199
+ template <typename MIP, typename MAT>
200
+ static void CalcTransformationMatrix (const MIP & bmip,
201
+ MAT & mat, LocalHeap & lh)
202
+ {
203
+ auto & mip = static_cast<const MappedIntegrationPoint<D-1,D>&>(bmip);
204
+ mat = 1./mip.GetJacobiDet() * mip.GetJacobian();
205
+ }
191
206
  /*
192
207
  template <typename AFEL, typename MIP, class TVX, class TVY>
193
208
  static void ApplyTrans (const AFEL & fel, const MIP & mip,
@@ -1525,7 +1525,8 @@ namespace ngfem
1525
1525
  else
1526
1526
  incr = 0;
1527
1527
  }
1528
-
1528
+
1529
+ virtual ~MappedIntegrationRule() { }
1529
1530
  INLINE MappedIntegrationPoint<DIM_ELEMENT, DIM_SPACE> & operator[] (size_t i) const
1530
1531
  {
1531
1532
  // return mips[i];
netgen/include/jacobi.hpp CHANGED
@@ -17,13 +17,30 @@ namespace ngla
17
17
  Jacobi and Gauss Seidel smoother
18
18
  for scalar, block and system matrices
19
19
  */
20
+
21
+ class BaseMSMPrecond : virtual public BaseMatrix
22
+ {
23
+ public:
24
+ virtual void Smooth (BaseVector & x, const BaseVector & b, int steps = 1) const = 0;
25
+ virtual void SmoothBack (BaseVector & x, const BaseVector & b, int steps = 1) const = 0;
26
+ };
20
27
 
21
- class BaseJacobiPrecond : virtual public BaseMatrix
28
+
29
+ class BaseJacobiPrecond : public BaseMSMPrecond
22
30
  {
23
31
  public:
24
- virtual void GSSmooth (BaseVector & x, const BaseVector & b) const = 0;
32
+ virtual void Smooth (BaseVector & x, const BaseVector & b, int steps = 1) const override
33
+ {
34
+ GSSmooth (x, b, steps);
35
+ }
36
+ virtual void SmoothBack (BaseVector & x, const BaseVector & b, int steps = 1) const override
37
+ {
38
+ GSSmoothBack (x, b, steps);
39
+ }
40
+
41
+ virtual void GSSmooth (BaseVector & x, const BaseVector & b, int steps = 1) const = 0;
25
42
  virtual void GSSmooth (BaseVector & x, const BaseVector & b, BaseVector & y) const = 0;
26
- virtual void GSSmoothBack (BaseVector & x, const BaseVector & b) const = 0;
43
+ virtual void GSSmoothBack (BaseVector & x, const BaseVector & b, int steps = 1) const = 0;
27
44
  };
28
45
 
29
46
 
@@ -31,7 +48,7 @@ namespace ngla
31
48
  {
32
49
  shared_ptr<BaseJacobiPrecond> jac;
33
50
  public:
34
- SymmetricGaussSeidelPrecond (const BaseSparseMatrix & mat, shared_ptr<BitArray> freedofs);
51
+ SymmetricGaussSeidelPrecond (shared_ptr<BaseSparseMatrix> mat, shared_ptr<BitArray> freedofs);
35
52
  int VHeight() const override { return jac->VHeight(); }
36
53
  int VWidth() const override { return jac->VHeight(); }
37
54
 
@@ -44,11 +61,11 @@ namespace ngla
44
61
 
45
62
  /// A Jaboci preconditioner for general sparse matrices
46
63
  template <class TM, class TV_ROW, class TV_COL>
47
- class JacobiPrecond : virtual public BaseJacobiPrecond,
48
- virtual public S_BaseMatrix<typename mat_traits<TM>::TSCAL>
64
+ class JacobiPrecond : public BaseJacobiPrecond,
65
+ public S_BaseMatrix<typename mat_traits<TM>::TSCAL>
49
66
  {
50
67
  protected:
51
- const SparseMatrix<TM,TV_ROW,TV_COL> & mat;
68
+ shared_ptr<SparseMatrix<TM,TV_ROW,TV_COL>> mat;
52
69
  ///
53
70
  shared_ptr<BitArray> inner;
54
71
  ///
@@ -60,7 +77,7 @@ namespace ngla
60
77
  typedef typename mat_traits<TM>::TSCAL TSCAL;
61
78
 
62
79
  ///
63
- JacobiPrecond (const SparseMatrix<TM,TV_ROW,TV_COL> & amat,
80
+ JacobiPrecond (shared_ptr<SparseMatrix<TM,TV_ROW,TV_COL>> amat,
64
81
  shared_ptr<BitArray> ainner = nullptr, bool use_par = true);
65
82
 
66
83
  int VHeight() const override { return height; }
@@ -74,20 +91,20 @@ namespace ngla
74
91
  void MultTransAdd (TSCAL s, const BaseVector & x, BaseVector & y) const override
75
92
  { MultAdd (s, x, y); }
76
93
  ///
77
- AutoVector CreateRowVector() const override { return mat.CreateColVector(); }
78
- AutoVector CreateColVector() const override { return mat.CreateRowVector(); }
94
+ AutoVector CreateRowVector() const override { return mat->CreateColVector(); }
95
+ AutoVector CreateColVector() const override { return mat->CreateRowVector(); }
79
96
  ///
80
- void GSSmooth (BaseVector & x, const BaseVector & b) const override;
97
+ void GSSmooth (BaseVector & x, const BaseVector & b, int steps) const override;
81
98
 
82
99
  /// computes partial residual y
83
100
  void GSSmooth (BaseVector & x, const BaseVector & b, BaseVector & y) const override
84
101
  {
85
- GSSmooth (x, b);
102
+ GSSmooth (x, b, 1);
86
103
  }
87
104
 
88
105
 
89
106
  ///
90
- void GSSmoothBack (BaseVector & x, const BaseVector & b) const override;
107
+ void GSSmoothBack (BaseVector & x, const BaseVector & b, int steps) const override;
91
108
 
92
109
  ///
93
110
  virtual void GSSmoothNumbering (BaseVector & x, const BaseVector & b,
@@ -111,23 +128,23 @@ namespace ngla
111
128
  typedef TV TVX;
112
129
 
113
130
  ///
114
- JacobiPrecondSymmetric (const SparseMatrixSymmetric<TM,TV> & amat,
131
+ JacobiPrecondSymmetric (shared_ptr<SparseMatrixSymmetric<TM,TV>> amat,
115
132
  shared_ptr<BitArray> ainner = nullptr, bool use_par = true);
116
133
 
117
134
  ///
118
- virtual void GSSmooth (BaseVector & x, const BaseVector & b) const;
135
+ virtual void GSSmooth (BaseVector & x, const BaseVector & b, int steps) const override;
119
136
 
120
137
  /// computes partial residual y
121
- virtual void GSSmooth (BaseVector & x, const BaseVector & b, BaseVector & y /* , BaseVector & help */) const;
138
+ virtual void GSSmooth (BaseVector & x, const BaseVector & b, BaseVector & y /* , BaseVector & help */) const override;
122
139
 
123
140
  ///
124
- virtual void GSSmoothBack (BaseVector & x, const BaseVector & b) const;
141
+ virtual void GSSmoothBack (BaseVector & x, const BaseVector & b, int steps) const override;
125
142
  virtual void GSSmoothBack (BaseVector & x, const BaseVector & b, BaseVector & y) const;
126
143
 
127
144
  ///
128
145
  virtual void GSSmoothNumbering (BaseVector & x, const BaseVector & b,
129
146
  const Array<int> & numbering,
130
- int forward = 1) const;
147
+ int forward = 1) const override;
131
148
  };
132
149
 
133
150
  }
@@ -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,
@@ -12,6 +12,8 @@
12
12
 
13
13
  namespace ngsbem
14
14
  {
15
+
16
+ extern void AddChargeDensity (SingularMLMultiPole<Complex> & mp, shared_ptr<CoefficientFunction> current, ngcomp::Region reg);
15
17
 
16
18
  extern void AddCurrentDensity (SingularMLMultiPole<Vec<3,Complex>> & mp, shared_ptr<CoefficientFunction> current, ngcomp::Region reg);
17
19
 
@@ -99,12 +99,12 @@ namespace ngcomp
99
99
  virtual void InitLevel (shared_ptr<BitArray> freedofs = NULL) { ; }
100
100
  virtual void FinalizeLevel (const ngla::BaseMatrix * mat = NULL) { ; }
101
101
  virtual void AddElementMatrix (FlatArray<int> dnums,
102
- const FlatMatrix<double> & elmat,
102
+ FlatMatrix<double> elmat,
103
103
  ElementId ei,
104
104
  LocalHeap & lh) { ; }
105
105
 
106
106
  virtual void AddElementMatrix (FlatArray<int> dnums,
107
- const FlatMatrix<Complex> & elmat,
107
+ FlatMatrix<Complex> elmat,
108
108
  ElementId ei,
109
109
  LocalHeap & lh) { ; }
110
110
 
@@ -186,12 +186,12 @@ namespace ngcomp
186
186
  static DocInfo GetDocu ();
187
187
 
188
188
  ///
189
- virtual bool IsComplex() const { return jacobi->IsComplex(); }
189
+ virtual bool IsComplex() const override { return jacobi->IsComplex(); }
190
190
 
191
191
  ///
192
- virtual void FinalizeLevel (const BaseMatrix * mat);
192
+ virtual void FinalizeLevel (const BaseMatrix * mat) override;
193
193
 
194
- virtual void Update ()
194
+ virtual void Update () override
195
195
  {
196
196
  if (GetTimeStamp() < bfa->GetTimeStamp())
197
197
  FinalizeLevel (&bfa->GetMatrix());
@@ -201,14 +201,14 @@ namespace ngcomp
201
201
 
202
202
 
203
203
  ///
204
- virtual const BaseMatrix & GetMatrix() const
204
+ virtual const BaseMatrix & GetMatrix() const override
205
205
  {
206
206
  if (!jacobi)
207
207
  ThrowPreconditionerNotReady();
208
208
  return *jacobi;
209
209
  }
210
210
 
211
- virtual shared_ptr<BaseMatrix> GetMatrixPtr()
211
+ virtual shared_ptr<BaseMatrix> GetMatrixPtr() override
212
212
  {
213
213
  if (!jacobi)
214
214
  ThrowPreconditionerNotReady();
@@ -216,12 +216,12 @@ namespace ngcomp
216
216
  }
217
217
 
218
218
  ///
219
- virtual const BaseMatrix & GetAMatrix() const
219
+ virtual const BaseMatrix & GetAMatrix() const override
220
220
  {
221
221
  return bfa->GetMatrix();
222
222
  }
223
223
  ///
224
- virtual const char * ClassName() const
224
+ virtual const char * ClassName() const override
225
225
  { return "Local Preconditioner"; }
226
226
  void LocPrecTest () const;
227
227
  };
@@ -258,29 +258,29 @@ namespace ngcomp
258
258
  ; // delete pre;
259
259
  }
260
260
 
261
- virtual void InitLevel (shared_ptr<BitArray> _freedofs);
261
+ virtual void InitLevel (shared_ptr<BitArray> _freedofs) override;
262
262
 
263
- virtual void FinalizeLevel (const BaseMatrix *);
263
+ virtual void FinalizeLevel (const BaseMatrix *) override;
264
264
  virtual void AddElementMatrix (FlatArray<int> dnums,
265
- const FlatMatrix<SCAL> & elmat,
265
+ FlatMatrix<SCAL> elmat,
266
266
  ElementId id,
267
- LocalHeap & lh);
267
+ LocalHeap & lh) override;
268
268
 
269
- virtual void Update ()
269
+ virtual void Update () override
270
270
  {
271
271
  if (timestamp < bfa->GetTimeStamp())
272
272
  throw Exception("A BDDC preconditioner must be defined before assembling");
273
273
  }
274
274
 
275
- virtual const BaseMatrix & GetAMatrix() const
275
+ virtual const BaseMatrix & GetAMatrix() const override
276
276
  {
277
277
  return bfa->GetMatrix();
278
278
  }
279
279
 
280
- virtual const BaseMatrix & GetMatrix() const;
281
- virtual shared_ptr<BaseMatrix> GetMatrixPtr();
280
+ virtual const BaseMatrix & GetMatrix() const override;
281
+ virtual shared_ptr<BaseMatrix> GetMatrixPtr() override;
282
282
 
283
- virtual void CleanUpLevel ()
283
+ virtual void CleanUpLevel () override
284
284
  {
285
285
  /*
286
286
  delete pre;
@@ -290,10 +290,10 @@ namespace ngcomp
290
290
  }
291
291
 
292
292
 
293
- virtual void Mult (const BaseVector & x, BaseVector & y) const;
294
- virtual void MultAdd (double s, const BaseVector & x, BaseVector & y) const;
293
+ virtual void Mult (const BaseVector & x, BaseVector & y) const override;
294
+ virtual void MultAdd (double s, const BaseVector & x, BaseVector & y) const override;
295
295
 
296
- virtual const char * ClassName() const
296
+ virtual const char * ClassName() const override
297
297
  { return "BDDC Preconditioner"; }
298
298
  };
299
299
 
@@ -42,20 +42,19 @@ namespace ngla
42
42
  fm = matvec(i);
43
43
  }
44
44
  }
45
-
45
+
46
46
  virtual int VHeight() const override { return size; }
47
47
  virtual int VWidth() const override { return width; }
48
-
48
+
49
49
  virtual void Mult (const BaseVector & x, BaseVector & y) const override;
50
50
  virtual void MultAdd (double s, const BaseVector & x, BaseVector & y) const override;
51
-
51
+
52
52
  AutoVector CreateRowVector() const override
53
- { throw Exception("CreateRowVector not implemented for SparseMatrixDynamic!"); }
53
+ { throw make_unique<VVector<TSCAL>> (VWidth()); }
54
54
  AutoVector CreateColVector() const override
55
- { throw Exception("CreateColVector not implemented for SparseMatrixDynamic!"); }
56
-
55
+ { throw make_unique<VVector<TSCAL>> (VHeight()); }
56
+
57
57
  virtual tuple<int,int> EntrySizes() const override { return { bh, bw }; }
58
-
59
58
  };
60
59
 
61
60
 
@@ -233,7 +233,8 @@ namespace ngla
233
233
  throw Exception(string("MAX_SYS_DIM = ")+to_string(MAX_SYS_DIM)+string(", need ")+to_string(mat_traits<TM>::HEIGHT));
234
234
  return nullptr;
235
235
  }
236
- else return make_shared<JacobiPrecond<TM,TV_ROW,TV_COL>> (*this, inner);
236
+ else return make_shared<JacobiPrecond<TM,TV_ROW,TV_COL>> ( dynamic_pointer_cast<SparseMatrix>
237
+ (const_cast<SparseMatrix*>(this)->shared_from_this()), inner);
237
238
  }
238
239
 
239
240
  template <class TM, class TV_ROW, class TV_COL>
@@ -860,7 +861,8 @@ namespace ngla
860
861
  shared_ptr<BaseJacobiPrecond>
861
862
  SparseMatrixSymmetric<TM,TV> :: CreateJacobiPrecond (shared_ptr<BitArray> inner) const
862
863
  {
863
- return make_shared<JacobiPrecondSymmetric<TM,TV>> (*this, inner);
864
+ return make_shared<JacobiPrecondSymmetric<TM,TV>> ( dynamic_pointer_cast<SparseMatrixSymmetric>
865
+ (const_cast<SparseMatrixSymmetric*>(this)->shared_from_this()), inner);
864
866
  }
865
867
 
866
868
 
@@ -182,6 +182,8 @@ namespace ngla
182
182
 
183
183
  virtual void MultAdd (double s, const BaseVector & x, BaseVector & y) const override;
184
184
  virtual void MultTransAdd (double s, const BaseVector & x, BaseVector & y) const override;
185
+
186
+ virtual shared_ptr<BaseSparseMatrix> CreateSparseMatrix() const override;
185
187
  };
186
188
 
187
189
 
@@ -615,7 +615,7 @@ public:
615
615
  SIMD_IntegrationRule simd_ir; // if non-empty use this integration-rule
616
616
 
617
617
  public:
618
- SymbolicFacetLinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb);
618
+ NGS_DLL_HEADER SymbolicFacetLinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb);
619
619
 
620
620
  virtual VorB VB() const override { return vb; }
621
621
  virtual bool BoundaryForm() const override { return vb == BND; }
netgen/libngbla.dylib CHANGED
Binary file
netgen/libngcomp.dylib CHANGED
Binary file
netgen/libngfem.dylib CHANGED
Binary file
netgen/libngla.dylib CHANGED
Binary file
netgen/libngsbem.dylib CHANGED
Binary file
netgen/libngstd.dylib CHANGED
Binary file
ngsolve/__init__.pyi CHANGED
@@ -44,8 +44,8 @@ from ngsolve.comp import HDiv
44
44
  from ngsolve.comp import HDivDiv
45
45
  from ngsolve.comp import HDivDivSurface
46
46
  from ngsolve.comp import HDivSurface
47
- from ngsolve.comp import Hidden as PrivateSpace
48
47
  from ngsolve.comp import Hidden
48
+ from ngsolve.comp import Hidden as PrivateSpace
49
49
  from ngsolve.comp import Integrate
50
50
  from ngsolve.comp import Interpolate
51
51
  from ngsolve.comp import L2
@@ -219,7 +219,7 @@ TET: fem.ET # value = <ET.TET: 20>
219
219
  TRIG: fem.ET # value = <ET.TRIG: 10>
220
220
  VERTEX: fem.NODE_TYPE # value = <NODE_TYPE.VERTEX: 0>
221
221
  VOL: comp.VorB # value = <VorB.VOL: 0>
222
- __version__: str = '6.2.2504'
222
+ __version__: str = '6.2.2504-44-g8fbbbc389'
223
223
  ds: comp.DifferentialSymbol # value = <ngsolve.comp.DifferentialSymbol object>
224
224
  dx: comp.DifferentialSymbol # value = <ngsolve.comp.DifferentialSymbol object>
225
225
  ngsglobals: comp.GlobalVariables # value = <ngsolve.comp.GlobalVariables object>
@@ -1,4 +1,4 @@
1
- set(PACKAGE_VERSION "6.2.2504")
1
+ set(PACKAGE_VERSION "6.2.2504-44-g8fbbbc389")
2
2
  find_package(Netgen CONFIG REQUIRED HINTS
3
3
  ${CMAKE_CURRENT_LIST_DIR}
4
4
  ${CMAKE_CURRENT_LIST_DIR}/..
@@ -23,15 +23,15 @@ set(NGSOLVE_PYBIND_INCLUDE_DIR "")
23
23
  set(NGSOLVE_PYTHON_INCLUDE_DIRS "/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12")
24
24
  set(NGSOLVE_PYTHON_LIBRARIES "/Library/Frameworks/Python.framework/Versions/3.12/lib/libpython3.12.dylib")
25
25
  set(NGSOLVE_PYTHON_PACKAGES_INSTALL_DIR "")
26
- set(NGSOLVE_TCL_INCLUDE_PATH "/Users/gitlab-runner/builds/builds/rL7WHzyj/0/ngsolve/netgen/_skbuild/macosx-10.15-universal2-3.12/cmake-build/dependencies/src/project_tcl/generic")
26
+ set(NGSOLVE_TCL_INCLUDE_PATH "/Users/gitlab-runner/builds/builds/rL7WHzyj/0/ngsolve/ngsolve/external_dependencies/netgen/_skbuild/macosx-10.15-universal2-3.12/cmake-build/dependencies/src/project_tcl/generic")
27
27
  set(NGSOLVE_TCL_LIBRARY "/Library/Frameworks/Python.framework/Versions/3.12/lib/libtclstub8.6.a")
28
28
  set(NGSOLVE_TK_DND_LIBRARY "")
29
- set(NGSOLVE_TK_INCLUDE_PATH "/Users/gitlab-runner/builds/builds/rL7WHzyj/0/ngsolve/netgen/_skbuild/macosx-10.15-universal2-3.12/cmake-build/dependencies/src/project_tk/generic")
29
+ set(NGSOLVE_TK_INCLUDE_PATH "/Users/gitlab-runner/builds/builds/rL7WHzyj/0/ngsolve/ngsolve/external_dependencies/netgen/_skbuild/macosx-10.15-universal2-3.12/cmake-build/dependencies/src/project_tk/generic")
30
30
  set(NGSOLVE_TK_LIBRARY "/Library/Frameworks/Python.framework/Versions/3.12/lib/libtkstub8.6.a")
31
31
  set(NGSOLVE_X11_X11_LIB "")
32
32
  set(NGSOLVE_X11_Xmu_LIB "")
33
- set(NGSOLVE_ZLIB_INCLUDE_DIRS "/Users/gitlab-runner/builds/builds/rL7WHzyj/0/ngsolve/netgen/_skbuild/macosx-10.15-universal2-3.12/cmake-build/dependencies/zlib/include")
34
- set(NGSOLVE_ZLIB_LIBRARIES "/Users/gitlab-runner/builds/builds/rL7WHzyj/0/ngsolve/netgen/_skbuild/macosx-10.15-universal2-3.12/cmake-build/dependencies/zlib/lib/libz.a")
33
+ set(NGSOLVE_ZLIB_INCLUDE_DIRS "/Users/gitlab-runner/builds/builds/rL7WHzyj/0/ngsolve/ngsolve/external_dependencies/netgen/_skbuild/macosx-10.15-universal2-3.12/cmake-build/dependencies/zlib/include")
34
+ set(NGSOLVE_ZLIB_LIBRARIES "/Users/gitlab-runner/builds/builds/rL7WHzyj/0/ngsolve/ngsolve/external_dependencies/netgen/_skbuild/macosx-10.15-universal2-3.12/cmake-build/dependencies/zlib/lib/libz.a")
35
35
 
36
36
  set(NGSOLVE_INTEL_MIC OFF)
37
37
  set(NGSOLVE_USE_CCACHE ON)
@@ -19,7 +19,7 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
19
19
  set(_cmake_targets_defined "")
20
20
  set(_cmake_targets_not_defined "")
21
21
  set(_cmake_expected_targets "")
22
- foreach(_cmake_expected_target IN ITEMS netgen_libs ngs_lapack netgen_python ngstd ngbla ngla ngfem ngsbem ngcomp ngsolve)
22
+ foreach(_cmake_expected_target IN ITEMS netgen_libs ngs_lapack ngstd ngbla ngla ngfem ngsbem ngcomp ngsolve)
23
23
  list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
24
24
  if(TARGET "${_cmake_expected_target}")
25
25
  list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
@@ -68,13 +68,6 @@ set_target_properties(ngs_lapack PROPERTIES
68
68
  INTERFACE_LINK_LIBRARIES "/System/Library/Frameworks/Accelerate.framework"
69
69
  )
70
70
 
71
- # Create imported target netgen_python
72
- add_library(netgen_python INTERFACE IMPORTED)
73
-
74
- set_target_properties(netgen_python PROPERTIES
75
- INTERFACE_INCLUDE_DIRECTORIES "/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12"
76
- )
77
-
78
71
  # Create imported target ngstd
79
72
  add_library(ngstd SHARED IMPORTED)
80
73