ngsolve 6.2.2404.post109.dev0__cp39-cp39-win_amd64.whl → 6.2.2406.post112.dev1__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 (137) hide show
  1. netgen/include/arnoldi.hpp +3 -0
  2. netgen/include/basematrix.hpp +30 -19
  3. netgen/include/basevector.hpp +43 -71
  4. netgen/include/bdbequations.hpp +14 -3
  5. netgen/include/bilinearform.hpp +8 -59
  6. netgen/include/blockjacobi.hpp +4 -0
  7. netgen/include/cg.hpp +3 -0
  8. netgen/include/chebyshev.hpp +3 -0
  9. netgen/include/coefficient.hpp +6 -2
  10. netgen/include/comp.hpp +0 -4
  11. netgen/include/diagonalmatrix.hpp +154 -0
  12. netgen/include/dump.hpp +5 -5
  13. netgen/include/eigen.hpp +3 -0
  14. netgen/include/elementbyelement.hpp +6 -0
  15. netgen/include/elementtopology.hpp +0 -3
  16. netgen/include/expr.hpp +13 -8
  17. netgen/include/fespace.hpp +12 -14
  18. netgen/include/finiteelement.hpp +7 -7
  19. netgen/include/globalspace.hpp +28 -2
  20. netgen/include/gridfunction.hpp +4 -0
  21. netgen/include/h1amg.hpp +3 -1
  22. netgen/include/h1hofe.hpp +1 -1
  23. netgen/include/hcurlhdivfes.hpp +2 -0
  24. netgen/include/hcurlhofespace.hpp +4 -3
  25. netgen/include/hdivfes.hpp +3 -3
  26. netgen/include/hdivhosurfacefespace.hpp +3 -3
  27. netgen/include/integratorcf.hpp +14 -9
  28. netgen/include/intrule.hpp +15 -1
  29. netgen/include/jacobi.hpp +3 -0
  30. netgen/include/la.hpp +1 -13
  31. netgen/include/matrix.hpp +21 -0
  32. netgen/include/meshaccess.hpp +30 -51
  33. netgen/include/mgpre.hpp +1 -1
  34. netgen/include/mptools.hpp +2145 -0
  35. netgen/include/multivector.hpp +2 -0
  36. netgen/include/ngsobject.hpp +1 -1
  37. netgen/include/nodalhofe.hpp +3 -0
  38. netgen/include/normalfacetfespace.hpp +4 -5
  39. netgen/include/normalfacetsurfacefespace.hpp +1 -1
  40. netgen/include/order.hpp +3 -1
  41. netgen/include/parallel_matrices.hpp +5 -0
  42. netgen/include/paralleldofs.hpp +44 -95
  43. netgen/include/parallelngs.hpp +2 -1
  44. netgen/include/parallelvector.hpp +12 -16
  45. netgen/include/pardisoinverse.hpp +1 -0
  46. netgen/include/periodic.hpp +1 -0
  47. netgen/include/pmltrafo.hpp +5 -2
  48. netgen/include/preconditioner.hpp +3 -1
  49. netgen/include/scalarfe.hpp +4 -1
  50. netgen/include/shapefunction_utils.hpp +40 -1
  51. netgen/include/sparsecholesky.hpp +4 -0
  52. netgen/include/sparsematrix.hpp +25 -43
  53. netgen/include/sparsematrix_dyn.hpp +2 -0
  54. netgen/include/sparsematrix_impl.hpp +66 -1
  55. netgen/include/special_matrix.hpp +7 -134
  56. netgen/include/statushandler.hpp +7 -0
  57. netgen/include/symbolicintegrator.hpp +2 -1
  58. netgen/include/tensorcoefficient.hpp +56 -54
  59. netgen/include/tpdiffop.hpp +1 -0
  60. netgen/include/tpintrule.hpp +2 -0
  61. netgen/include/umfpackinverse.hpp +58 -30
  62. netgen/include/vector.hpp +8 -2
  63. netgen/include/voxelcoefficientfunction.hpp +2 -0
  64. netgen/include/vvector.hpp +10 -1
  65. netgen/lib/libngsolve.lib +0 -0
  66. netgen/libngsolve.dll +0 -0
  67. ngsolve/_scikit_build_core_dependencies.py +8 -1
  68. ngsolve/cmake/NGSolveConfig.cmake +5 -5
  69. ngsolve/config/config.py +6 -6
  70. ngsolve/config.py +6 -6
  71. ngsolve/demos/TensorProduct/__init__.py +0 -0
  72. ngsolve/demos/TensorProduct/tp_dg_1d_1d.py +80 -0
  73. ngsolve/demos/TensorProduct/tp_dg_1d_2d.py +73 -0
  74. ngsolve/demos/TensorProduct/tp_dg_2d_1d.py +72 -0
  75. ngsolve/demos/TensorProduct/tp_dg_2d_2d.py +66 -0
  76. ngsolve/demos/__init__.py +0 -0
  77. ngsolve/demos/howto/__init__.py +0 -0
  78. ngsolve/demos/howto/hhj.py +44 -0
  79. ngsolve/demos/howto/hybrid_dg.py +53 -0
  80. ngsolve/demos/howto/mixed.py +30 -0
  81. ngsolve/demos/howto/nonlin.py +29 -0
  82. ngsolve/demos/howto/pickling.py +26 -0
  83. ngsolve/demos/howto/pml.py +31 -0
  84. ngsolve/demos/howto/taskmanager.py +20 -0
  85. ngsolve/demos/howto/tdnns.py +47 -0
  86. ngsolve/demos/howto/timeDG-skeleton.py +45 -0
  87. ngsolve/demos/howto/timeDG.py +38 -0
  88. ngsolve/demos/howto/timeDGlap.py +42 -0
  89. ngsolve/demos/howto/timeDGwave.py +61 -0
  90. ngsolve/demos/intro/__init__.py +0 -0
  91. ngsolve/demos/intro/adaptive.py +123 -0
  92. ngsolve/demos/intro/cmagnet.py +62 -0
  93. ngsolve/demos/intro/elasticity.py +76 -0
  94. ngsolve/demos/intro/navierstokes.py +74 -0
  95. ngsolve/demos/intro/poisson.ipynb +170 -0
  96. ngsolve/demos/intro/poisson.py +41 -0
  97. ngsolve/demos/mpi/__init__.py +0 -0
  98. ngsolve/demos/mpi/mpi_cmagnet.py +87 -0
  99. ngsolve/demos/mpi/mpi_navierstokes.py +117 -0
  100. ngsolve/demos/mpi/mpi_poisson.py +89 -0
  101. ngsolve/demos/mpi/mpi_timeDG.py +82 -0
  102. ngsolve/internal.py +5 -0
  103. ngsolve/ngslib.pyd +0 -0
  104. {ngsolve-6.2.2404.post109.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/METADATA +2 -2
  105. {ngsolve-6.2.2404.post109.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/RECORD +137 -104
  106. {ngsolve-6.2.2404.post109.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/WHEEL +1 -1
  107. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/Scripts/ngsolve.tcl +0 -0
  108. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/beam.geo +0 -0
  109. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/beam.vol +0 -0
  110. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/chip.in2d +0 -0
  111. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/chip.vol +0 -0
  112. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coil.geo +0 -0
  113. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coil.vol +0 -0
  114. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coilshield.geo +0 -0
  115. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coilshield.vol +0 -0
  116. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/cube.geo +0 -0
  117. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/cube.vol +0 -0
  118. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -0
  119. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d11_chip_nitsche.pde +0 -0
  120. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d1_square.pde +0 -0
  121. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d2_chip.pde +0 -0
  122. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d3_helmholtz.pde +0 -0
  123. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d4_cube.pde +0 -0
  124. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d5_beam.pde +0 -0
  125. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d6_shaft.pde +0 -0
  126. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d7_coil.pde +0 -0
  127. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d8_coilshield.pde +0 -0
  128. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d9_hybridDG.pde +0 -0
  129. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/doubleglazing.in2d +0 -0
  130. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/doubleglazing.vol +0 -0
  131. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
  132. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/shaft.geo +0 -0
  133. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/shaft.vol +0 -0
  134. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/square.in2d +0 -0
  135. {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/square.vol +0 -0
  136. {ngsolve-6.2.2404.post109.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/LICENSE +0 -0
  137. {ngsolve-6.2.2404.post109.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/top_level.txt +0 -0
@@ -18,15 +18,16 @@
18
18
  ////////////////////////////////////////////////////////////////////////////////
19
19
 
20
20
  #include <umfpack.h>
21
-
21
+ #include "sparsecholesky.hpp" // for SparseFactorization
22
22
  namespace ngla
23
23
  {
24
24
 
25
- template<class TM>
26
- class UmfpackInverseTM : public SparseFactorization
25
+ template<class SCAL>
26
+ class S_UmfpackInverse : public SparseFactorization
27
27
  {
28
28
  public:
29
- typedef typename mat_traits<TM>::TSCAL TSCAL;
29
+ // typedef typename mat_traits<TM>::TSCAL TSCAL;
30
+ typedef SCAL TSCAL;
30
31
 
31
32
  protected:
32
33
  typedef SuiteSparse_long suite_long;
@@ -42,7 +43,8 @@ namespace ngla
42
43
  Array<suite_long> rowstart, indices;
43
44
  Array<TSCAL> values;
44
45
 
45
- bool symmetric, is_complex;
46
+ bool symmetric;
47
+ static constexpr bool is_complex = ngbla::IsComplex<TSCAL>();
46
48
 
47
49
  void SetMatrixType();
48
50
 
@@ -52,16 +54,17 @@ namespace ngla
52
54
  public:
53
55
 
54
56
  ///
55
- UmfpackInverseTM (shared_ptr<const SparseMatrixTM<TM>> a,
56
- shared_ptr<BitArray> ainner = nullptr,
57
+ S_UmfpackInverse (shared_ptr<const S_BaseSparseMatrix<TSCAL>> a,
58
+ shared_ptr<BitArray> ainner = nullptr,
57
59
  shared_ptr<const Array<int>> acluster = nullptr,
58
60
  int symmetric = 0);
61
+ virtual ~S_UmfpackInverse();
59
62
  ///
60
63
 
61
64
  template <typename TSUBSET>
62
- void GetUmfpackMatrix (const SparseMatrixTM<TM> & a, TSUBSET subset);
65
+ // void GetUmfpackMatrix (const SparseMatrixTM<TM> & a, TSUBSET subset);
66
+ void GetUmfpackMatrix (const S_BaseSparseMatrix<TSCAL> & a, TSUBSET subset);
63
67
 
64
- virtual ~UmfpackInverseTM ();
65
68
  ///
66
69
  int VHeight() const { return height/entrysize; }
67
70
  ///
@@ -74,44 +77,69 @@ namespace ngla
74
77
 
75
78
  virtual Array<MemoryUsage> GetMemoryUsage () const
76
79
  {
77
- return { MemoryUsage ("Umfpack", nze*sizeof(TM), 1) };
80
+ return { MemoryUsage ("Umfpack", nze*sizeof(TSCAL)*entrysize*entrysize, 1) };
78
81
  }
79
82
  };
80
83
 
81
84
 
85
+
86
+ template<class SCAL, class SCAL_VEC>
87
+ class S_UmfpackInverse_SVec : public S_UmfpackInverse<SCAL>
88
+ {
89
+ typedef S_UmfpackInverse<SCAL> BASE;
90
+ protected:
91
+ using typename BASE::TSCAL;
92
+ using BASE::height;
93
+ using BASE::is_complex;
94
+ using BASE::compressed_height;
95
+ using BASE::entrysize;
96
+ using BASE::rowstart;
97
+ using BASE::indices;
98
+ using BASE::compressed;
99
+ using BASE::compress;
100
+
101
+ using S_UmfpackInverse<SCAL>::S_UmfpackInverse;
102
+ static constexpr bool is_vector_complex = ngbla::IsComplex<SCAL_VEC>();
103
+
104
+ AutoVector CreateRowVector () const override { return CreateBaseVector(height/entrysize, is_vector_complex, entrysize); }
105
+ AutoVector CreateColVector () const override { return CreateBaseVector(height/entrysize, is_vector_complex, entrysize); }
106
+
107
+ void Mult (const BaseVector & x, BaseVector & y) const override;
108
+ void MultTrans (const BaseVector & x, BaseVector & y) const override;
109
+ };
110
+
111
+
82
112
  template<class TM,
83
113
  class TV_ROW = typename mat_traits<TM>::TV_ROW,
84
114
  class TV_COL = typename mat_traits<TM>::TV_COL>
85
- class UmfpackInverse : public UmfpackInverseTM<TM>
115
+ class UmfpackInverse : public S_UmfpackInverse_SVec<typename mat_traits<TM>::TSCAL, typename mat_traits<TV_COL>::TSCAL>
86
116
  {
87
- using UmfpackInverseTM<TM>::height;
88
- using UmfpackInverseTM<TM>::is_complex;
89
- using UmfpackInverseTM<TM>::compressed_height;
90
- using UmfpackInverseTM<TM>::entrysize;
91
- using UmfpackInverseTM<TM>::rowstart;
92
- using UmfpackInverseTM<TM>::indices;
93
- using UmfpackInverseTM<TM>::compressed;
94
- using UmfpackInverseTM<TM>::compress;
95
-
96
117
  public:
118
+ typedef S_UmfpackInverse_SVec<typename mat_traits<TM>::TSCAL, typename mat_traits<TV_COL>::TSCAL> BASE;
119
+
120
+ using typename BASE::TSCAL;
97
121
  typedef TV_COL TV;
98
122
  typedef TV_ROW TVX;
99
- typedef typename mat_traits<TM>::TSCAL TSCAL;
123
+
124
+ private:
125
+ using BASE::height;
126
+ using BASE::is_complex;
127
+ using BASE::is_vector_complex;
128
+ using BASE::compressed_height;
129
+ using BASE::entrysize;
130
+ using BASE::rowstart;
131
+ using BASE::indices;
132
+ using BASE::compressed;
133
+ using BASE::compress;
100
134
 
101
- ///
135
+ public:
102
136
  UmfpackInverse (shared_ptr<const SparseMatrix<TM,TV_ROW,TV_COL>> a,
103
137
  shared_ptr<BitArray> ainner = nullptr,
104
138
  shared_ptr<const Array<int>> acluster = nullptr,
105
139
  int symmetric = 0)
106
- : UmfpackInverseTM<TM> (a, ainner, acluster, symmetric) { ; }
140
+ : BASE (a, ainner, acluster, symmetric) { ; }
107
141
 
108
- virtual ~UmfpackInverse () { ; }
109
- ///
110
- void Mult (const BaseVector & x, BaseVector & y) const override;
111
- void MultTrans (const BaseVector & x, BaseVector & y) const override;
112
- ///
113
- AutoVector CreateRowVector () const override { return make_unique<VVector<TV>> (height/entrysize); }
114
- AutoVector CreateColVector () const override { return make_unique<VVector<TV>> (height/entrysize); }
142
+ // virtual ~UmfpackInverse () { ; }
115
143
  };
116
144
 
117
145
  }
netgen/include/vector.hpp CHANGED
@@ -338,7 +338,12 @@ namespace ngbla
338
338
  {
339
339
  NETGEN_CHECK_RANGE(next,first,Size()+1);
340
340
  return VectorView<T,size_t,TDIST> (next-first, dist, data+first*dist);
341
- }
341
+ }
342
+
343
+ INLINE auto Range (size_t next) const
344
+ {
345
+ return Range(0, next);
346
+ }
342
347
 
343
348
  INLINE auto Range (IntRange range) const
344
349
  {
@@ -361,7 +366,8 @@ namespace ngbla
361
366
 
362
367
  INLINE auto Reversed() const
363
368
  {
364
- return VectorView { Size(), -Dist(), Addr(Size()-1) };
369
+ // return VectorView { Size(), -Dist(), Addr(Size()-1) };
370
+ return VectorView<T,TS,decltype(-declval<TDIST>())> { Size(), -Dist(), Addr(Size()-1) };
365
371
  }
366
372
 
367
373
  INLINE auto operator+(int i) const { return VectorView(size-i, dist, data+i*dist); }
@@ -30,6 +30,8 @@ namespace ngfem
30
30
  Complex EvaluateComplex(const BaseMappedIntegrationPoint& ip) const override;
31
31
 
32
32
  void Evaluate(const BaseMappedIntegrationPoint& mip, FlatVector<Complex> values) const override;
33
+ auto GetCArgs() const
34
+ { return make_tuple(start, end, dim_vals, values, linear); }
33
35
 
34
36
  private:
35
37
  SCAL T_Evaluate(const BaseMappedIntegrationPoint& ip) const;
@@ -1,3 +1,8 @@
1
+ #ifndef FILE_VVECTOR
2
+ #define FILE_VVECTOR
3
+
4
+ #include "basevector.hpp"
5
+
1
6
  namespace ngla
2
7
  {
3
8
 
@@ -13,7 +18,7 @@ namespace ngla
13
18
  {
14
19
  protected:
15
20
  TSCAL * pdata;
16
- int es;
21
+ int es; // entry size in in term of TSCALs
17
22
  bool ownmem;
18
23
 
19
24
  public:
@@ -197,3 +202,7 @@ namespace ngla
197
202
  extern template class VVector<double>;
198
203
  extern template class VVector<Complex>;
199
204
  }
205
+
206
+
207
+
208
+ #endif
netgen/lib/libngsolve.lib CHANGED
Binary file
netgen/libngsolve.dll CHANGED
Binary file
@@ -1,3 +1,6 @@
1
+ import sys
2
+
3
+
1
4
  def dynamic_metadata(field, settings):
2
5
 
3
6
  if field != "dependencies":
@@ -8,7 +11,11 @@ def dynamic_metadata(field, settings):
8
11
  msg = "No inline configuration is supported"
9
12
  raise ValueError(msg)
10
13
 
11
- import tomllib
14
+ if sys.version_info >= (3, 11):
15
+ import tomllib
16
+ else:
17
+ import tomli as tomllib
18
+
12
19
  import importlib.metadata
13
20
 
14
21
  config = tomllib.load(open("pyproject.toml", "rb"))
@@ -1,4 +1,4 @@
1
- set(PACKAGE_VERSION "6.2.2404-109-g9268a867b")
1
+ set(PACKAGE_VERSION "6.2.2406-112-g6c1ab7fb2")
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:/Python39/include")
24
24
  set(NGSOLVE_PYTHON_LIBRARIES "C:/Python39/libs/python39.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.9/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.9/cmake-build/dependencies/src/project_tcl/generic")
27
27
  set(NGSOLVE_TCL_LIBRARY "C:/Python39/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.9/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.9/cmake-build/dependencies/src/project_tk/generic")
30
30
  set(NGSOLVE_TK_LIBRARY "C:/Python39/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.9/cmake-build/dependencies/zlib/include")
34
- set(NGSOLVE_ZLIB_LIBRARIES "C:/gitlabci/tools/builds/3zsqG5ns/0/ngsolve/netgen/_skbuild/win-amd64-3.9/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.9/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.9/cmake-build/dependencies/zlib/lib/zlibstatic.lib")
35
35
 
36
36
  set(NGSOLVE_INTEL_MIC OFF)
37
37
  set(NGSOLVE_USE_CCACHE ON)
ngsolve/config/config.py CHANGED
@@ -30,15 +30,15 @@ NGSOLVE_INSTALL_DIR_INCLUDE = "netgen/include"
30
30
  NGSOLVE_INSTALL_DIR_CMAKE = "ngsolve/cmake"
31
31
  NGSOLVE_INSTALL_DIR_RES = "share"
32
32
 
33
- NGSOLVE_VERSION = "6.2.2404-109-g9268a867b"
34
- NGSOLVE_VERSION_GIT = "v6.2.2404-109-g9268a867b"
35
- NGSOLVE_VERSION_PYTHON = "6.2.2404.post109.dev0"
33
+ NGSOLVE_VERSION = "6.2.2406-112-g6c1ab7fb2"
34
+ NGSOLVE_VERSION_GIT = "v6.2.2406-112-g6c1ab7fb2"
35
+ NGSOLVE_VERSION_PYTHON = "6.2.2406.post112.dev1"
36
36
 
37
37
  NGSOLVE_VERSION_MAJOR = "6"
38
38
  NGSOLVE_VERSION_MINOR = "2"
39
- NGSOLVE_VERSION_TWEAK = "109"
40
- NGSOLVE_VERSION_PATCH = "2404"
41
- NGSOLVE_VERSION_HASH = "g9268a867b"
39
+ NGSOLVE_VERSION_TWEAK = "112"
40
+ NGSOLVE_VERSION_PATCH = "2406"
41
+ NGSOLVE_VERSION_HASH = "g6c1ab7fb2"
42
42
 
43
43
  CMAKE_CXX_COMPILER = "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe"
44
44
  CMAKE_CUDA_COMPILER = ""
ngsolve/config.py CHANGED
@@ -30,15 +30,15 @@ NGSOLVE_INSTALL_DIR_INCLUDE = "netgen/include"
30
30
  NGSOLVE_INSTALL_DIR_CMAKE = "ngsolve/cmake"
31
31
  NGSOLVE_INSTALL_DIR_RES = "share"
32
32
 
33
- NGSOLVE_VERSION = "6.2.2404-109-g9268a867b"
34
- NGSOLVE_VERSION_GIT = "v6.2.2404-109-g9268a867b"
35
- NGSOLVE_VERSION_PYTHON = "6.2.2404.post109.dev0"
33
+ NGSOLVE_VERSION = "6.2.2406-112-g6c1ab7fb2"
34
+ NGSOLVE_VERSION_GIT = "v6.2.2406-112-g6c1ab7fb2"
35
+ NGSOLVE_VERSION_PYTHON = "6.2.2406.post112.dev1"
36
36
 
37
37
  NGSOLVE_VERSION_MAJOR = "6"
38
38
  NGSOLVE_VERSION_MINOR = "2"
39
- NGSOLVE_VERSION_TWEAK = "109"
40
- NGSOLVE_VERSION_PATCH = "2404"
41
- NGSOLVE_VERSION_HASH = "g9268a867b"
39
+ NGSOLVE_VERSION_TWEAK = "112"
40
+ NGSOLVE_VERSION_PATCH = "2406"
41
+ NGSOLVE_VERSION_HASH = "g6c1ab7fb2"
42
42
 
43
43
  CMAKE_CXX_COMPILER = "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe"
44
44
  CMAKE_CUDA_COMPILER = ""
File without changes
@@ -0,0 +1,80 @@
1
+ from ngsolve.TensorProductTools import *
2
+ from ngsolve.comp import *
3
+ from ngsolve import *
4
+ import netgen.gui
5
+
6
+ mesh1 = Mesh(SegMesh(20,0,1,periodic=True) )
7
+ mesh2 = Mesh(SegMesh(20,0,1,periodic=True) )
8
+
9
+ tpmesh = Mesh(MakeTensorProductMesh(mesh1,mesh2))
10
+ Draw(tpmesh)
11
+
12
+ n=5
13
+ m=5
14
+
15
+ fesx = L2(mesh1,order=n)
16
+ fesy = L2(mesh2,order=m)
17
+
18
+ tpfes = TensorProductFESpace([fesx,fesy])
19
+
20
+ fes = L2(tpmesh,order=n)
21
+ u = tpfes.TrialFunction()
22
+ v = tpfes.TestFunction()
23
+ vx = v.Operator("gradx")
24
+ vy = v.Operator("grady")
25
+ b = (-1)*CoefficientFunction( (0.25,0.5) )
26
+
27
+
28
+ uin = ProlongateCoefficientFunction(IfPos((1.0-x)*(x-0.5),sin((x-0.5)*2*3.14159),0) + IfPos((x-0.0)*(0.5-x),sin((x)*2*3.14159),0) , 0 , tpfes)
29
+
30
+ gradv = CoefficientFunction((vx,vy))
31
+
32
+ a = BilinearForm(tpfes)
33
+
34
+ n = CoefficientFunction((ProlongateCoefficientFunction(specialcf.normal(1),1,tpfes),ProlongateCoefficientFunction(specialcf.normal(1),0,tpfes)))
35
+ bn = b*n
36
+
37
+ a += SymbolicTPBFI ( (-u * b*gradv).Compile() )
38
+ a += SymbolicTPBFI ( (bn) *IfPos(bn, u, u.Other( )) * (v-v.Other()).Compile(), VOL, skeleton=True)
39
+ a += SymbolicTPBFI ( (bn) *IfPos(bn, u, u.Other(bnd = CoefficientFunction(uin) )) * (v).Compile(), BND, skeleton=True)
40
+
41
+
42
+
43
+ u = GridFunction(tpfes)
44
+ v = GridFunction(tpfes)
45
+
46
+ uu = GridFunction(fes)
47
+ print("Setting")
48
+ u.Set(exp( ProlongateCoefficientFunction(-200*(x-0.4)*(x-0.4), 1, tpfes)+ ProlongateCoefficientFunction(-200*(x-0.4)*(x-0.4),0,tpfes) ) )
49
+ print("Done")
50
+ Transfer2StdMesh(u,uu)
51
+
52
+ Draw(uu,sd=2,autoscale=False)
53
+
54
+ h = u.vec.CreateVector()
55
+ #u.vec[:] = 1.0
56
+ print('To start the simulation type Run(n_steps)!')
57
+
58
+ def Step():
59
+ a.Apply(u.vec,v.vec)
60
+ h.data = 0.00125*v.vec.data
61
+ tpfes.SolveM(rho=CoefficientFunction(1), vec = h)
62
+ u.vec.data-=h.data
63
+ #Redraw()
64
+
65
+ def Run(nsteps):
66
+ count = 0
67
+ with TaskManager():
68
+ for i in range(nsteps):
69
+ print("Step ",i+1, "/",nsteps)
70
+ Step()
71
+ count += 1
72
+ if count % 1 == 0:
73
+ Transfer2StdMesh(u,uu)
74
+ count = 0
75
+ Redraw()
76
+
77
+ Transfer2StdMesh(u,uu)
78
+ Run(100)
79
+ for t in Timers():
80
+ print(t["counts"], t["time"], t["name"])
@@ -0,0 +1,73 @@
1
+ from ngsolve.TensorProductTools import *
2
+ from ngsolve.comp import *
3
+ from ngsolve import *
4
+ from netgen.geom2d import unit_square
5
+ import netgen.gui
6
+
7
+ mesh1 = Mesh(SegMesh(20,0,1))
8
+ mesh2 = Mesh(unit_square.GenerateMesh(maxh=0.15))
9
+
10
+ tpmesh = Mesh(MakeTensorProductMesh(mesh1,mesh2))
11
+ Draw(tpmesh)
12
+
13
+ n=3
14
+ m=3
15
+
16
+ fesx = L2(mesh1,order=n)
17
+ fesy = L2(mesh2,order=m)
18
+ tpfes = TensorProductFESpace([fesx,fesy])
19
+
20
+ fes = L2(tpmesh,order=n)
21
+
22
+ u = tpfes.TrialFunction()
23
+ v = tpfes.TestFunction()
24
+
25
+ vx = v.Operator("gradx")
26
+ vy = v.Operator("grady")
27
+
28
+ b = CoefficientFunction( (ProlongateCoefficientFunction(x-0.5,0,tpfes),ProlongateCoefficientFunction(0.5-x,1,tpfes),0) )
29
+
30
+ uin = CoefficientFunction(0.0)
31
+
32
+
33
+ gradv = CoefficientFunction((vx,vy))
34
+
35
+ a = BilinearForm(tpfes)
36
+
37
+ n = CoefficientFunction(( ProlongateCoefficientFunction(specialcf.normal(1)[0],1,tpfes),ProlongateCoefficientFunction(specialcf.normal(2)[0],0,tpfes),ProlongateCoefficientFunction(specialcf.normal(2)[1],0,tpfes)))
38
+ bn = b*n
39
+
40
+ a += SymbolicTPBFI ( -u * b*gradv )
41
+ a += SymbolicTPBFI ( (bn) *IfPos(bn, u, u.Other(bnd = uin )) * (v-v.Other(bnd = 0.0)), VOL, skeleton=True)
42
+ a += SymbolicTPBFI ( (bn) *IfPos(bn, u, u.Other(bnd = uin )) * (v), BND, skeleton=True)
43
+
44
+
45
+ u = GridFunction(tpfes)
46
+ v = GridFunction(tpfes)
47
+
48
+
49
+ uu = GridFunction(fes)
50
+
51
+ u.Set(exp(ProlongateCoefficientFunction( -70*(x-0.25)*(x-0.25),1,tpfes) + ProlongateCoefficientFunction(-70*(x-0.25)*(x-0.25)-70*(y-0.75)*(y-0.75),0,tpfes) ))
52
+ Transfer2StdMesh(u,uu)
53
+ Draw(uu,sd=3,autoscale=False)
54
+
55
+ h = u.vec.CreateVector()
56
+ print('To start the simulation type Run(n_steps)!')
57
+ def Step():
58
+ a.Apply(u.vec,v.vec)
59
+ h.data = 0.001*v.vec.data
60
+ tpfes.SolveM(rho=CoefficientFunction(1), vec = h)
61
+ u.vec.data-=h.data
62
+ Transfer2StdMesh(u,uu)
63
+ Redraw()
64
+
65
+ def Run(nsteps):
66
+ with TaskManager():
67
+ for i in range(nsteps):
68
+ print("Step ",i+1, "/",nsteps)
69
+ Step()
70
+
71
+ #Run(100)
72
+ for t in Timers():
73
+ print(t["counts"], t["time"], t["name"])
@@ -0,0 +1,72 @@
1
+ from ngsolve.TensorProductTools import *
2
+ from ngsolve.comp import *
3
+ from ngsolve import *
4
+ from netgen.geom2d import unit_square
5
+ import netgen.gui
6
+
7
+ mesh1 = Mesh(unit_square.GenerateMesh(maxh=0.15))
8
+ mesh2 = Mesh(SegMesh(20,0,1))
9
+
10
+ tpmesh = Mesh(MakeTensorProductMesh(mesh1,mesh2))
11
+ Draw(tpmesh)
12
+
13
+ n=3
14
+ m=3
15
+
16
+ fesx = L2(mesh1,order=n)
17
+ fesy = L2(mesh2,order=m)
18
+ tpfes = TensorProductFESpace([fesx,fesy])
19
+
20
+ fes = L2(tpmesh,order=n)
21
+
22
+ u = tpfes.TrialFunction()
23
+ v = tpfes.TestFunction()
24
+
25
+ vx = v.Operator("gradx")
26
+ vy = v.Operator("grady")
27
+
28
+ b = CoefficientFunction( (0,0,1) )
29
+
30
+ uin = CoefficientFunction(0.0)
31
+
32
+ gradv = CoefficientFunction((vx,vy))
33
+
34
+ a = BilinearForm(tpfes)
35
+
36
+ n = CoefficientFunction((ProlongateCoefficientFunction(specialcf.normal(2)[0],1,tpfes),ProlongateCoefficientFunction(specialcf.normal(2)[1],1,tpfes),ProlongateCoefficientFunction(specialcf.normal(1)[0],0,tpfes)))
37
+ bn = b*n
38
+
39
+ a += SymbolicTPBFI ( -u * b*gradv )
40
+ a += SymbolicTPBFI ( (bn) *IfPos(bn, u, u.Other(bnd = uin )) * (v-v.Other(bnd = 0.0)), VOL, skeleton=True)
41
+ a += SymbolicTPBFI ( (bn) *IfPos(bn, u, u.Other(bnd = uin )) * (v), BND, skeleton=True)
42
+
43
+
44
+ u = GridFunction(tpfes)
45
+ v = GridFunction(tpfes)
46
+
47
+
48
+ uu = GridFunction(fes)
49
+
50
+ u.Set(exp(ProlongateCoefficientFunction(-70*(x-0.125)*(x-0.125)-70*(y-0.125)*(y-0.125),1,tpfes)+ProlongateCoefficientFunction(-70*(x-0.75)*(x-0.75),0,tpfes) ))
51
+ Transfer2StdMesh(u,uu)
52
+ Draw(uu,sd=3,autoscale=False)
53
+
54
+ h = u.vec.CreateVector()
55
+ print('To start the simulation type Run(n_steps)!')
56
+ def Step():
57
+ a.Apply(u.vec,v.vec)
58
+ h.data = 0.001*v.vec.data
59
+ tpfes.SolveM(rho=CoefficientFunction(1), vec = h)
60
+ u.vec.data-=h.data
61
+ Transfer2StdMesh(u,uu)
62
+ Redraw()
63
+
64
+ def Run(nsteps):
65
+ with TaskManager():
66
+ for i in range(nsteps):
67
+ print("Step ",i+1, "/",nsteps)
68
+ Step()
69
+
70
+ Run(100)
71
+ for t in Timers():
72
+ print(t["counts"], t["time"], t["name"])
@@ -0,0 +1,66 @@
1
+ from ngsolve.TensorProductTools import *
2
+ from ngsolve.comp import *
3
+ from ngsolve import *
4
+ from netgen.geom2d import unit_square
5
+ import netgen.gui
6
+
7
+ mesh1 = Mesh(unit_square.GenerateMesh(maxh=0.15))
8
+ mesh2 = Mesh(MakeHexagonalMesh2D(maxh=0.2))
9
+ n=4
10
+ m=4
11
+ SetHeapSize(1000000000)
12
+
13
+ fesx = L2(mesh1,order=n)
14
+ fesy = L2(mesh2,order=m)
15
+ tpfes = TensorProductFESpace([fesx,fesy])
16
+
17
+ u = tpfes.TrialFunction()
18
+ v = tpfes.TestFunction()
19
+
20
+ vx = v.Operator("gradx")
21
+ vy = v.Operator("grady")
22
+
23
+ b = CoefficientFunction( ( ProlongateCoefficientFunction(y-0.5,1,tpfes),ProlongateCoefficientFunction(0.5-x,1,tpfes),1,1 ) )
24
+
25
+ uin = CoefficientFunction(0.0)
26
+
27
+ gradv = CoefficientFunction((vx,vy))
28
+
29
+ a = BilinearForm(tpfes)
30
+
31
+ n = CoefficientFunction((ProlongateCoefficientFunction(specialcf.normal(2)[0],1,tpfes),ProlongateCoefficientFunction(specialcf.normal(2)[1],1,tpfes),ProlongateCoefficientFunction(specialcf.normal(2)[0],0,tpfes),ProlongateCoefficientFunction(specialcf.normal(2)[1],0,tpfes)))
32
+ bn = b*n
33
+
34
+ a += SymbolicTPBFI ( -u * b*gradv )
35
+ a += SymbolicTPBFI ( (bn) *IfPos(bn, u, u.Other(bnd = uin )) * (v-v.Other(bnd = 0.0)), VOL, skeleton=True)
36
+ a += SymbolicTPBFI ( (bn) *IfPos(bn, u, u.Other(bnd = uin )) * (v), BND, skeleton=True)
37
+
38
+
39
+ u = GridFunction(tpfes)
40
+ v = GridFunction(tpfes)
41
+ print(1)
42
+ with TaskManager():
43
+ u.Set(exp(ProlongateCoefficientFunction(-90*(x-0.25)*(x-0.25)-90*(y-0.5)*(y-0.5),1,tpfes)+ProlongateCoefficientFunction(-70*(x-0.75)*(x-0.75)-70*(y-0.75)*(y-0.75),0,tpfes) ))
44
+ print(2)
45
+ rho = GridFunction(fesx,name="rho")
46
+ Draw(rho)
47
+ h = u.vec.CreateVector()
48
+ print('To start the simulation type Run(n_steps)!')
49
+
50
+ def Step():
51
+ a.Apply(u.vec,v.vec)
52
+ h.data = 0.005*v.vec.data
53
+ tpfes.SolveM(rho=CoefficientFunction(1), vec = h)
54
+ u.vec.data-=h.data
55
+ TensorProductIntegrate(u,rho)
56
+ Redraw()
57
+
58
+ def Run(nsteps):
59
+ with TaskManager():
60
+ for i in range(nsteps):
61
+ print("Step ",i+1, "/",nsteps)
62
+ Step()
63
+
64
+ Run(1000)
65
+ for t in Timers():
66
+ print(t["counts"], t["time"], t["name"])
File without changes
File without changes
@@ -0,0 +1,44 @@
1
+ #
2
+ # The Hellan-Herrmann-Johnson method for a Kirchhoff plate
3
+ #
4
+ # M. I. Comodi: The Hellan–Herrmann-Johnson Method
5
+ # Some error estimates and postprocessing. Math. Comp. 52, 17–39, 1989
6
+ #
7
+
8
+ from ngsolve import *
9
+ from netgen.geom2d import unit_square
10
+
11
+ mesh = Mesh (unit_square.GenerateMesh(maxh=0.05))
12
+ order = 3
13
+
14
+ V = HDivDiv(mesh, order=order-1)
15
+ Q = H1(mesh, order=order, dirichlet="left|right|top|bottom")
16
+ X = V*Q
17
+
18
+ print ("ndof-V:", V.ndof, ", ndof-Q:", Q.ndof)
19
+
20
+ sigma, u = X.TrialFunction()
21
+ tau, v = X.TestFunction()
22
+
23
+ n = specialcf.normal(2)
24
+
25
+ def tang(u): return u-(u*n)*n
26
+
27
+ a = BilinearForm(X, symmetric=True)
28
+ a += (InnerProduct (sigma, tau) + div(sigma)*grad(v) + div(tau)*grad(u) - 1e-10*u*v)*dx
29
+ a += (-(sigma*n) * tang(grad(v)) - (tau*n)*tang(grad(u)))*dx(element_boundary=True)
30
+ a.Assemble()
31
+
32
+ f = LinearForm(X)
33
+ f += 1 * v * dx
34
+ # f += Trace(tau.Trace()) * ds("bottom")
35
+ f.Assemble()
36
+
37
+ u = GridFunction(X)
38
+ u.vec.data = a.mat.Inverse(X.FreeDofs()) * f.vec
39
+
40
+ Draw (u.components[0], mesh, name="sigma")
41
+ Draw (u.components[1], mesh, name="disp")
42
+
43
+
44
+