ngsolve 6.2.2503__cp310-cp310-win_amd64.whl → 6.2.2504.post44.dev0__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 (61) 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/integrator.hpp +4 -16
  6. netgen/include/intrule.hpp +2 -1
  7. netgen/include/jacobi.hpp +35 -18
  8. netgen/include/meshaccess.hpp +3 -2
  9. netgen/include/mp_coefficient.hpp +140 -0
  10. netgen/include/mptools.hpp +42 -161
  11. netgen/include/potentialtools.hpp +2 -0
  12. netgen/include/preconditioner.hpp +21 -21
  13. netgen/include/sparsematrix_dyn.hpp +6 -7
  14. netgen/include/sparsematrix_impl.hpp +4 -2
  15. netgen/include/special_matrix.hpp +2 -0
  16. netgen/include/symbolicintegrator.hpp +2 -1
  17. netgen/lib/libngsolve.lib +0 -0
  18. netgen/libngsolve.dll +0 -0
  19. ngsolve/__init__.py +1 -0
  20. ngsolve/cmake/NGSolveConfig.cmake +5 -5
  21. ngsolve/cmake/ngsolve-targets.cmake +1 -9
  22. ngsolve/config/config.py +6 -6
  23. ngsolve/ngslib.lib +0 -0
  24. ngsolve/ngslib.pyd +0 -0
  25. ngsolve/preconditioners.py +1 -0
  26. ngsolve/solve_implementation.py +155 -0
  27. ngsolve/webgui.py +1 -0
  28. {ngsolve-6.2.2503.dist-info → ngsolve-6.2.2504.post44.dev0.dist-info}/METADATA +2 -2
  29. {ngsolve-6.2.2503.dist-info → ngsolve-6.2.2504.post44.dev0.dist-info}/RECORD +61 -59
  30. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/Scripts/ngsolve.tcl +0 -0
  31. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/beam.geo +0 -0
  32. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/beam.vol +0 -0
  33. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/chip.in2d +0 -0
  34. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/chip.vol +0 -0
  35. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/coil.geo +0 -0
  36. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/coil.vol +0 -0
  37. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/coilshield.geo +0 -0
  38. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/coilshield.vol +0 -0
  39. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/cube.geo +0 -0
  40. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/cube.vol +0 -0
  41. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -0
  42. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d11_chip_nitsche.pde +0 -0
  43. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d1_square.pde +0 -0
  44. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d2_chip.pde +0 -0
  45. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d3_helmholtz.pde +0 -0
  46. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d4_cube.pde +0 -0
  47. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d5_beam.pde +0 -0
  48. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d6_shaft.pde +0 -0
  49. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d7_coil.pde +0 -0
  50. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d8_coilshield.pde +0 -0
  51. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/d9_hybridDG.pde +0 -0
  52. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/doubleglazing.in2d +0 -0
  53. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/doubleglazing.vol +0 -0
  54. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  55. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/shaft.geo +0 -0
  56. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/shaft.vol +0 -0
  57. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/square.in2d +0 -0
  58. {ngsolve-6.2.2503.data → ngsolve-6.2.2504.post44.dev0.data}/data/share/ngsolve/square.vol +0 -0
  59. {ngsolve-6.2.2503.dist-info → ngsolve-6.2.2504.post44.dev0.dist-info}/LICENSE +0 -0
  60. {ngsolve-6.2.2503.dist-info → ngsolve-6.2.2504.post44.dev0.dist-info}/WHEEL +0 -0
  61. {ngsolve-6.2.2503.dist-info → ngsolve-6.2.2504.post44.dev0.dist-info}/top_level.txt +0 -0
@@ -218,13 +218,11 @@ namespace ngsbem
218
218
  class MPSingular
219
219
  {
220
220
  public:
221
- /*
222
221
  template <typename T>
223
222
  static void Eval (int order, double r, double scale, T && values)
224
223
  {
225
224
  SphericalHankel1(order, r, scale, values);
226
225
  }
227
- */
228
226
 
229
227
  template <typename T>
230
228
  static void Eval (int order, double kappa, double r, double rtyp, T && values)
@@ -235,7 +233,8 @@ namespace ngsbem
235
233
 
236
234
  static double Scale (double kappa, double rtyp)
237
235
  {
238
- return min(1.0, rtyp*kappa);
236
+ // return min(1.0, rtyp*kappa);
237
+ return min(1.0, 0.5*rtyp*kappa);
239
238
  }
240
239
  };
241
240
 
@@ -245,13 +244,11 @@ namespace ngsbem
245
244
  class MPRegular
246
245
  {
247
246
  public:
248
- /*
249
247
  template <typename T>
250
248
  static void Eval (int order, double r, double scale, T && values)
251
249
  {
252
250
  SphericalBessel (order, r, 1.0/scale, values);
253
251
  }
254
- */
255
252
 
256
253
  template <typename T>
257
254
  static void Eval (int order, double kappa, double r, double rtyp, T && values)
@@ -262,7 +259,8 @@ namespace ngsbem
262
259
 
263
260
  static double Scale (double kappa, double rtyp)
264
261
  {
265
- return 1.0/ min(1.0, 0.25*rtyp*kappa);
262
+ // return 1.0/ min(1.0, 0.25*rtyp*kappa);
263
+ return 1.0/ min(1.0, 0.5*rtyp*kappa);
266
264
  }
267
265
 
268
266
  };
@@ -276,12 +274,7 @@ namespace ngsbem
276
274
  SphericalHarmonics<entry_type> sh;
277
275
  double kappa;
278
276
  double rtyp;
279
- // double scale;
280
277
  public:
281
- /*
282
- MultiPole (int aorder, double akappa, double ascale = 1)
283
- : sh(aorder), kappa(akappa), scale(ascale) { }
284
- */
285
278
 
286
279
  MultiPole (int aorder, double akappa, double artyp)
287
280
  : sh(aorder), kappa(akappa), rtyp(artyp) { }
@@ -362,8 +355,8 @@ namespace ngsbem
362
355
  return;
363
356
  }
364
357
 
365
- static Timer t("mptool Transform "+ToString(typeid(RADIAL).name())+ToString(typeid(TARGET).name()));
366
- RegionTimer reg(t);
358
+ // static Timer t("mptool Transform "+ToString(typeid(RADIAL).name())+ToString(typeid(TARGET).name()));
359
+ // RegionTimer reg(t);
367
360
 
368
361
  double len = L2Norm(dist);
369
362
  double theta, phi;
@@ -379,7 +372,10 @@ namespace ngsbem
379
372
  phi = atan2(dist(1), dist(0));
380
373
 
381
374
 
382
- MultiPole<RADIAL,entry_type> tmp(*this);
375
+ // MultiPole<RADIAL,entry_type> tmp{*this};
376
+ MultiPole<RADIAL,entry_type> tmp(Order(), kappa, rtyp);
377
+ tmp.SH().Coefs() = SH().Coefs();
378
+
383
379
  tmp.SH().RotateZ(phi);
384
380
  tmp.SH().RotateY(theta);
385
381
 
@@ -434,11 +430,9 @@ namespace ngsbem
434
430
  Array<tuple<Vec<3>, Vec<3>, Complex,int>> currents;
435
431
  int total_sources;
436
432
 
437
- Node (Vec<3> acenter, double ar, int alevel, int order, double kappa)
438
- : center(acenter), r(ar), level(alevel), mp(MPOrder(ar*kappa), kappa, min(1.0, r*kappa))
439
- // : center(acenter), r(ar), level(alevel), mp(MPOrder(ar*kappa), kappa, 1.0)
433
+ Node (Vec<3> acenter, double ar, int alevel, double akappa)
434
+ : center(acenter), r(ar), level(alevel), mp(MPOrder(ar*akappa), akappa, ar) // min(1.0, ar*akappa))
440
435
  {
441
- // cout << "singml, add node, level = " << level << endl;
442
436
  if (level < nodes_on_level.Size())
443
437
  nodes_on_level[level]++;
444
438
  }
@@ -453,7 +447,7 @@ namespace ngsbem
453
447
  cc(0) += (i&1) ? r/2 : -r/2;
454
448
  cc(1) += (i&2) ? r/2 : -r/2;
455
449
  cc(2) += (i&4) ? r/2 : -r/2;
456
- childs[i] = make_unique<Node> (cc, r/2, level+1, max(mp.SH().Order()/2, 8), mp.Kappa());
450
+ childs[i] = make_unique<Node> (cc, r/2, level+1, mp.Kappa());
457
451
  }
458
452
  }
459
453
 
@@ -473,7 +467,8 @@ namespace ngsbem
473
467
 
474
468
  charges.Append( tuple{x,c} );
475
469
 
476
- if (r*mp.Kappa() < 1e-8) return;
470
+ // if (r*mp.Kappa() < 1e-8) return;
471
+ if (level > 20) return;
477
472
  if (charges.Size() < maxdirect && r*mp.Kappa() < 1)
478
473
  return;
479
474
 
@@ -588,9 +583,17 @@ namespace ngsbem
588
583
  return sum;
589
584
  }
590
585
 
591
- for (auto [x,c] : charges)
592
- if (double rho = L2Norm(p-x); rho > 0)
593
- sum += (1/(4*M_PI))*exp(Complex(0,rho*mp.Kappa())) / rho * c;
586
+ // static Timer t("fmm direct eval"); RegionTimer reg(t);
587
+ if (mp.Kappa() < 1e-8)
588
+ {
589
+ for (auto [x,c] : charges)
590
+ if (double rho = L2Norm(p-x); rho > 0)
591
+ sum += (1/(4*M_PI))*Complex(1,rho*mp.Kappa()) / rho * c;
592
+ }
593
+ else
594
+ for (auto [x,c] : charges)
595
+ if (double rho = L2Norm(p-x); rho > 0)
596
+ sum += (1/(4*M_PI))*exp(Complex(0,rho*mp.Kappa())) / rho * c;
594
597
 
595
598
  for (auto [x,d,c] : dipoles)
596
599
  if (double rho = L2Norm(p-x); rho > 0)
@@ -771,8 +774,8 @@ namespace ngsbem
771
774
  bool havemp = false;
772
775
 
773
776
  public:
774
- SingularMLMultiPole (Vec<3> center, double r, int order, double kappa)
775
- : root(center, r, 0, order, kappa)
777
+ SingularMLMultiPole (Vec<3> center, double r, double kappa)
778
+ : root(center, r, 0, kappa)
776
779
  {
777
780
  nodes_on_level = 0;
778
781
  nodes_on_level[0] = 1;
@@ -842,6 +845,7 @@ namespace ngsbem
842
845
  for (int i = 0; i <= maxlevel; i++)
843
846
  cout << "sing " << i << ": " << nodes_on_level[i] << endl;
844
847
  */
848
+
845
849
  root.CalcTotalSources();
846
850
  root.CalcMP();
847
851
 
@@ -886,8 +890,8 @@ namespace ngsbem
886
890
 
887
891
  Array<const typename SingularMLMultiPole<elem_type>::Node*> singnodes;
888
892
 
889
- Node (Vec<3> acenter, double ar, int alevel, int order, double kappa)
890
- : center(acenter), r(ar), level(alevel), mp(MPOrder(ar*kappa), kappa, 1.0/min(1.0, 0.25*r*kappa))
893
+ Node (Vec<3> acenter, double ar, int alevel, double kappa)
894
+ : center(acenter), r(ar), level(alevel), mp(MPOrder(ar*kappa), kappa, ar) // 1.0/min(1.0, 0.25*r*kappa))
891
895
  // : center(acenter), r(ar), level(alevel), mp(MPOrder(ar*kappa), kappa, 1.0)
892
896
  {
893
897
  if (level < nodes_on_level.Size())
@@ -905,7 +909,7 @@ namespace ngsbem
905
909
  cc(0) += (i&1) ? r/2 : -r/2;
906
910
  cc(1) += (i&2) ? r/2 : -r/2;
907
911
  cc(2) += (i&4) ? r/2 : -r/2;
908
- childs[i] = make_unique<Node> (cc, r/2, level+1, max(mp.SH().Order()/2, 8), mp.Kappa());
912
+ childs[i] = make_unique<Node> (cc, r/2, level+1, mp.Kappa());
909
913
  }
910
914
  }
911
915
 
@@ -1027,7 +1031,7 @@ namespace ngsbem
1027
1031
  sum = mp.Eval(p-center);
1028
1032
 
1029
1033
 
1030
- static Timer t("mptool direct evaluate"); RegionTimer r(t);
1034
+ // static Timer t("mptool direct evaluate"); RegionTimer r(t);
1031
1035
  for (auto sn : singnodes)
1032
1036
  sum += sn->EvaluateMP(p);
1033
1037
 
@@ -1089,7 +1093,8 @@ namespace ngsbem
1089
1093
 
1090
1094
  targets.Append( x );
1091
1095
 
1092
- if (r*mp.Kappa() < 1e-8) return;
1096
+ // if (r*mp.Kappa() < 1e-8) return;
1097
+ if (level > 20) return;
1093
1098
  if (targets.Size() < maxdirect && r*mp.Kappa() < 1)
1094
1099
  return;
1095
1100
 
@@ -1145,8 +1150,8 @@ namespace ngsbem
1145
1150
  shared_ptr<SingularMLMultiPole<elem_type>> singmp;
1146
1151
 
1147
1152
  public:
1148
- RegularMLMultiPole (shared_ptr<SingularMLMultiPole<elem_type>> asingmp, Vec<3> center, double r, int order)
1149
- : root(center, r, 0, order, asingmp->Kappa()), singmp(asingmp)
1153
+ RegularMLMultiPole (shared_ptr<SingularMLMultiPole<elem_type>> asingmp, Vec<3> center, double r)
1154
+ : root(center, r, 0, asingmp->Kappa()), singmp(asingmp)
1150
1155
  {
1151
1156
  if (!singmp->havemp) throw Exception("first call Calc for singular MP");
1152
1157
 
@@ -1175,8 +1180,8 @@ namespace ngsbem
1175
1180
  }
1176
1181
  }
1177
1182
 
1178
- RegularMLMultiPole (Vec<3> center, double r, int order, double kappa)
1179
- : root(center, r, 0, order, kappa)
1183
+ RegularMLMultiPole (Vec<3> center, double r, double kappa)
1184
+ : root(center, r, 0, kappa)
1180
1185
  {
1181
1186
  nodes_on_level = 0;
1182
1187
  nodes_on_level[0] = 1;
@@ -1189,6 +1194,8 @@ namespace ngsbem
1189
1194
 
1190
1195
  void CalcMP(shared_ptr<SingularMLMultiPole<elem_type>> asingmp)
1191
1196
  {
1197
+ static Timer t("mptool regular MLMP"); RegionTimer rg(t);
1198
+
1192
1199
  singmp = asingmp;
1193
1200
 
1194
1201
  root.CalcTotalTargets();
@@ -1205,6 +1212,7 @@ namespace ngsbem
1205
1212
  cout << "reg " << i << ": " << RegularMLMultiPole::nodes_on_level[i] << endl;
1206
1213
  */
1207
1214
 
1215
+ static Timer tloc("mptool regular localize expansion"); RegionTimer rloc(tloc);
1208
1216
  root.LocalizeExpansion(false);
1209
1217
  }
1210
1218
 
@@ -1251,132 +1259,5 @@ namespace ngsbem
1251
1259
 
1252
1260
 
1253
1261
 
1254
- // ******************** Coefficient Functions *********************
1255
-
1256
-
1257
- class SphericalHarmonicsCF : public CoefficientFunction
1258
- {
1259
- SphericalHarmonics<Complex> sh;
1260
- public:
1261
- SphericalHarmonicsCF (int order)
1262
- : CoefficientFunction(1, true), sh(order) { }
1263
- Complex & Coef(int n, int m) { return sh.Coef(n,m); }
1264
-
1265
- virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
1266
- { throw Exception("real eval not available"); }
1267
-
1268
- virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
1269
- {
1270
- values(0) = sh.Eval(mip.GetPoint());
1271
- }
1272
-
1273
- virtual void Evaluate (const BaseMappedIntegrationRule & ir, BareSliceMatrix<Complex> values) const override
1274
- {
1275
- for (int i = 0; i < ir.Size(); i++)
1276
- {
1277
- auto & mip = ir[i];
1278
- values(i,0) = sh.Eval(mip.GetPoint());
1279
- }
1280
- }
1281
-
1282
- auto & SH() { return sh; }
1283
- };
1284
-
1285
-
1286
-
1287
- template <typename entry_type> class RegularMLMultiPoleCF;
1288
-
1289
-
1290
- template <typename RADIAL, typename entry_type=Complex>
1291
- class MultiPoleCF : public CoefficientFunction
1292
- {
1293
- MultiPole<RADIAL, entry_type> mp;
1294
- Vec<3> center;
1295
- public:
1296
- MultiPoleCF (int order, double kappa, Vec<3> acenter, double scale = 1)
1297
- : CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mp(order, kappa, scale), center(acenter) { }
1298
-
1299
- entry_type & Coef(int n, int m) { return mp.Coef(n,m); }
1300
- auto & SH() { return mp.SH(); }
1301
- auto & MP() { return mp; }
1302
- Vec<3> Center() const { return center; }
1303
-
1304
- virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
1305
- { throw Exception("real eval not available"); }
1306
-
1307
- virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
1308
- {
1309
- if constexpr (std::is_same<entry_type, Complex>())
1310
- values(0) = mp.Eval(mip.GetPoint()-center);
1311
- else
1312
- values = mp.Eval(mip.GetPoint()-center);
1313
- }
1314
-
1315
- template <typename TARGET>
1316
- void ShiftZ (double z, MultiPole<TARGET, entry_type> & target) { mp.ShiftZ(z, target); }
1317
-
1318
- using CoefficientFunction::Transform;
1319
- template <typename TARGET>
1320
- void Transform (MultiPoleCF<TARGET, entry_type> & target)
1321
- {
1322
- mp.Transform (target.MP(), target.Center()-center);
1323
- }
1324
- };
1325
-
1326
- template <typename entry_type>
1327
- class SingularMLMultiPoleCF : public CoefficientFunction
1328
- {
1329
- shared_ptr<SingularMLMultiPole<entry_type>> mlmp;
1330
- public:
1331
- SingularMLMultiPoleCF (Vec<3> center, double r, int order, double kappa)
1332
- : CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<SingularMLMultiPole<entry_type>>(center, r, order, kappa)} { }
1333
-
1334
- virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
1335
- { throw Exception("real eval not available"); }
1336
-
1337
- virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
1338
- {
1339
- // values(0) = mlmp->Evaluate(mip.GetPoint());
1340
-
1341
- if constexpr (std::is_same<entry_type, Complex>())
1342
- values(0) = mlmp->Evaluate(mip.GetPoint());
1343
- else
1344
- values = mlmp->Evaluate(mip.GetPoint());
1345
-
1346
-
1347
- }
1348
-
1349
- shared_ptr<SingularMLMultiPole<entry_type>> MLMP() const { return mlmp; }
1350
- shared_ptr<RegularMLMultiPoleCF<entry_type>> CreateRegularExpansion(Vec<3> center, double r) const;
1351
- };
1352
-
1353
-
1354
- template <typename entry_type>
1355
- class RegularMLMultiPoleCF : public CoefficientFunction
1356
- {
1357
- shared_ptr<RegularMLMultiPole<entry_type>> mlmp;
1358
- public:
1359
- RegularMLMultiPoleCF (shared_ptr<SingularMLMultiPoleCF<entry_type>> asingmp, Vec<3> center, double r, int order)
1360
- : CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<RegularMLMultiPole<entry_type>>(asingmp->MLMP(), center, r, order)} { }
1361
- RegularMLMultiPoleCF (shared_ptr<SingularMLMultiPole<entry_type>> asingmp, Vec<3> center, double r, int order)
1362
- : CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<RegularMLMultiPole<entry_type>>(asingmp, center, r, order)} { }
1363
-
1364
- virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
1365
- { throw Exception("real eval not available"); }
1366
-
1367
- virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
1368
- {
1369
- // values(0) = mlmp->Evaluate(mip.GetPoint());
1370
-
1371
- if constexpr (std::is_same<entry_type, Complex>())
1372
- values(0) = mlmp->Evaluate(mip.GetPoint());
1373
- else
1374
- values = mlmp->Evaluate(mip.GetPoint());
1375
- }
1376
-
1377
- shared_ptr<RegularMLMultiPole<entry_type>> MLMP() { return mlmp; }
1378
- };
1379
-
1380
-
1381
1262
  }
1382
1263
  #endif
@@ -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
 
@@ -604,6 +604,7 @@ public:
604
604
 
605
605
  class SymbolicFacetLinearFormIntegrator : public FacetLinearFormIntegrator
606
606
  {
607
+ protected:
607
608
  shared_ptr<CoefficientFunction> cf;
608
609
  Array<ProxyFunction*> proxies;
609
610
  Array<CoefficientFunction*> cache_cfs;
@@ -614,7 +615,7 @@ public:
614
615
  SIMD_IntegrationRule simd_ir; // if non-empty use this integration-rule
615
616
 
616
617
  public:
617
- SymbolicFacetLinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb);
618
+ NGS_DLL_HEADER SymbolicFacetLinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb);
618
619
 
619
620
  virtual VorB VB() const override { return vb; }
620
621
  virtual bool BoundaryForm() const override { return vb == BND; }
netgen/lib/libngsolve.lib CHANGED
Binary file
netgen/libngsolve.dll CHANGED
Binary file
ngsolve/__init__.py CHANGED
@@ -75,6 +75,7 @@ from .utils import x, y, z, dx, ds, grad, Grad, curl, div, Deviator, PyId, PyTra
75
75
  from . import solvers
76
76
  from . import preconditioners
77
77
  from . import timestepping
78
+ from .solve_implementation import Solve
78
79
 
79
80
  try:
80
81
  from netgen.occ import unit_square, unit_cube
@@ -1,4 +1,4 @@
1
- set(PACKAGE_VERSION "6.2.2503")
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 "C:/Python310/include")
24
24
  set(NGSOLVE_PYTHON_LIBRARIES "C:/Python310/libs/python310.lib")
25
25
  set(NGSOLVE_PYTHON_PACKAGES_INSTALL_DIR "")
26
- set(NGSOLVE_TCL_INCLUDE_PATH "C:/gitlabci/tools/builds/3zsqG5ns/0/ngsolve/netgen/_skbuild/win-amd64-3.10/cmake-build/dependencies/src/project_tcl/generic")
26
+ set(NGSOLVE_TCL_INCLUDE_PATH "C:/gitlabci/tools/builds/3zsqG5ns/0/ngsolve/ngsolve/external_dependencies/netgen/_skbuild/win-amd64-3.10/cmake-build/dependencies/src/project_tcl/generic")
27
27
  set(NGSOLVE_TCL_LIBRARY "C:/Python310/tcl/tclstub86.lib")
28
28
  set(NGSOLVE_TK_DND_LIBRARY "")
29
- set(NGSOLVE_TK_INCLUDE_PATH "C:/gitlabci/tools/builds/3zsqG5ns/0/ngsolve/netgen/_skbuild/win-amd64-3.10/cmake-build/dependencies/src/project_tk/generic")
29
+ set(NGSOLVE_TK_INCLUDE_PATH "C:/gitlabci/tools/builds/3zsqG5ns/0/ngsolve/ngsolve/external_dependencies/netgen/_skbuild/win-amd64-3.10/cmake-build/dependencies/src/project_tk/generic")
30
30
  set(NGSOLVE_TK_LIBRARY "C:/Python310/tcl/tkstub86.lib")
31
31
  set(NGSOLVE_X11_X11_LIB "")
32
32
  set(NGSOLVE_X11_Xmu_LIB "")
33
- set(NGSOLVE_ZLIB_INCLUDE_DIRS "C:/gitlabci/tools/builds/3zsqG5ns/0/ngsolve/netgen/_skbuild/win-amd64-3.10/cmake-build/dependencies/zlib/include")
34
- set(NGSOLVE_ZLIB_LIBRARIES "C:/gitlabci/tools/builds/3zsqG5ns/0/ngsolve/netgen/_skbuild/win-amd64-3.10/cmake-build/dependencies/zlib/lib/zlibstatic.lib")
33
+ set(NGSOLVE_ZLIB_INCLUDE_DIRS "C:/gitlabci/tools/builds/3zsqG5ns/0/ngsolve/ngsolve/external_dependencies/netgen/_skbuild/win-amd64-3.10/cmake-build/dependencies/zlib/include")
34
+ set(NGSOLVE_ZLIB_LIBRARIES "C:/gitlabci/tools/builds/3zsqG5ns/0/ngsolve/ngsolve/external_dependencies/netgen/_skbuild/win-amd64-3.10/cmake-build/dependencies/zlib/lib/zlibstatic.lib")
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}")
@@ -69,14 +69,6 @@ set_target_properties(ngs_lapack PROPERTIES
69
69
  INTERFACE_LINK_LIBRARIES "C:/gitlabci/tools/builds/3zsqG5ns/0/ngsolve/venv_ngs/Library/lib/mkl_rt.lib"
70
70
  )
71
71
 
72
- # Create imported target netgen_python
73
- add_library(netgen_python INTERFACE IMPORTED)
74
-
75
- set_target_properties(netgen_python PROPERTIES
76
- INTERFACE_INCLUDE_DIRECTORIES "C:/Python310/include"
77
- INTERFACE_LINK_LIBRARIES "C:/Python310/libs/python310.lib"
78
- )
79
-
80
72
  # Create imported target ngstd
81
73
  add_library(ngstd INTERFACE IMPORTED)
82
74
 
ngsolve/config/config.py CHANGED
@@ -29,15 +29,15 @@ NGSOLVE_INSTALL_DIR_INCLUDE = "netgen/include"
29
29
  NGSOLVE_INSTALL_DIR_CMAKE = "ngsolve/cmake"
30
30
  NGSOLVE_INSTALL_DIR_RES = "share"
31
31
 
32
- NGSOLVE_VERSION = "6.2.2503"
33
- NGSOLVE_VERSION_GIT = "v6.2.2503-0-ga44fe5348"
34
- NGSOLVE_VERSION_PYTHON = "6.2.2503"
32
+ NGSOLVE_VERSION = "6.2.2504-44-g8fbbbc389"
33
+ NGSOLVE_VERSION_GIT = "v6.2.2504-44-g8fbbbc389"
34
+ NGSOLVE_VERSION_PYTHON = "6.2.2504.post44.dev0"
35
35
 
36
36
  NGSOLVE_VERSION_MAJOR = "6"
37
37
  NGSOLVE_VERSION_MINOR = "2"
38
- NGSOLVE_VERSION_TWEAK = "0"
39
- NGSOLVE_VERSION_PATCH = "2503"
40
- NGSOLVE_VERSION_HASH = "ga44fe5348"
38
+ NGSOLVE_VERSION_TWEAK = "44"
39
+ NGSOLVE_VERSION_PATCH = "2504"
40
+ NGSOLVE_VERSION_HASH = "g8fbbbc389"
41
41
 
42
42
  CMAKE_CXX_COMPILER = "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe"
43
43
  CMAKE_CUDA_COMPILER = ""
ngsolve/ngslib.lib CHANGED
Binary file
ngsolve/ngslib.pyd CHANGED
Binary file
@@ -1,6 +1,7 @@
1
1
  from ngsolve.comp import MultiGridPreconditioner as MultiGrid
2
2
  from ngsolve.comp import LocalPreconditioner as Local
3
3
  from ngsolve.comp import HCurlAMG
4
+ from ngsolve.comp import H1AMG
4
5
  from ngsolve.comp import BDDCPreconditioner as BDDC
5
6
 
6
7