ngsolve 6.2.2404.post156.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.
- netgen/include/arnoldi.hpp +3 -0
- netgen/include/basematrix.hpp +27 -22
- netgen/include/basevector.hpp +43 -71
- netgen/include/bdbequations.hpp +14 -3
- netgen/include/bilinearform.hpp +8 -59
- netgen/include/blockjacobi.hpp +4 -0
- netgen/include/cg.hpp +3 -0
- netgen/include/chebyshev.hpp +3 -0
- netgen/include/coefficient.hpp +6 -2
- netgen/include/comp.hpp +0 -4
- netgen/include/diagonalmatrix.hpp +154 -0
- netgen/include/dump.hpp +5 -5
- netgen/include/eigen.hpp +3 -0
- netgen/include/elementbyelement.hpp +6 -0
- netgen/include/elementtopology.hpp +0 -3
- netgen/include/expr.hpp +13 -8
- netgen/include/fespace.hpp +12 -14
- netgen/include/finiteelement.hpp +7 -7
- netgen/include/globalspace.hpp +28 -2
- netgen/include/gridfunction.hpp +4 -0
- netgen/include/h1amg.hpp +3 -1
- netgen/include/h1hofe.hpp +1 -1
- netgen/include/hcurlhdivfes.hpp +2 -0
- netgen/include/hcurlhofespace.hpp +4 -3
- netgen/include/hdivfes.hpp +3 -3
- netgen/include/hdivhosurfacefespace.hpp +3 -3
- netgen/include/intrule.hpp +15 -1
- netgen/include/jacobi.hpp +3 -0
- netgen/include/la.hpp +1 -13
- netgen/include/matrix.hpp +21 -0
- netgen/include/meshaccess.hpp +24 -51
- netgen/include/mgpre.hpp +1 -1
- netgen/include/mptools.hpp +1 -2
- netgen/include/multivector.hpp +2 -0
- netgen/include/ngsobject.hpp +1 -1
- netgen/include/nodalhofe.hpp +3 -0
- netgen/include/normalfacetfespace.hpp +4 -5
- netgen/include/normalfacetsurfacefespace.hpp +1 -1
- netgen/include/order.hpp +3 -1
- netgen/include/parallel_matrices.hpp +5 -0
- netgen/include/paralleldofs.hpp +44 -95
- netgen/include/parallelngs.hpp +2 -1
- netgen/include/parallelvector.hpp +12 -16
- netgen/include/pardisoinverse.hpp +1 -0
- netgen/include/periodic.hpp +1 -0
- netgen/include/pmltrafo.hpp +5 -2
- netgen/include/preconditioner.hpp +3 -1
- netgen/include/scalarfe.hpp +4 -1
- netgen/include/sparsecholesky.hpp +4 -0
- netgen/include/sparsematrix.hpp +18 -45
- netgen/include/sparsematrix_dyn.hpp +2 -0
- netgen/include/sparsematrix_impl.hpp +66 -1
- netgen/include/special_matrix.hpp +7 -138
- netgen/include/statushandler.hpp +7 -0
- netgen/include/symbolicintegrator.hpp +2 -1
- netgen/include/tensorcoefficient.hpp +56 -54
- netgen/include/tpdiffop.hpp +1 -0
- netgen/include/tpintrule.hpp +2 -0
- netgen/include/umfpackinverse.hpp +58 -30
- netgen/include/vector.hpp +6 -1
- netgen/include/voxelcoefficientfunction.hpp +2 -0
- netgen/include/vvector.hpp +10 -1
- netgen/lib/libngsolve.lib +0 -0
- netgen/libngsolve.dll +0 -0
- ngsolve/_scikit_build_core_dependencies.py +8 -1
- ngsolve/cmake/NGSolveConfig.cmake +1 -1
- ngsolve/config/config.py +6 -6
- ngsolve/config.py +6 -6
- ngsolve/demos/TensorProduct/__init__.py +0 -0
- ngsolve/demos/TensorProduct/tp_dg_1d_1d.py +80 -0
- ngsolve/demos/TensorProduct/tp_dg_1d_2d.py +73 -0
- ngsolve/demos/TensorProduct/tp_dg_2d_1d.py +72 -0
- ngsolve/demos/TensorProduct/tp_dg_2d_2d.py +66 -0
- ngsolve/demos/__init__.py +0 -0
- ngsolve/demos/howto/__init__.py +0 -0
- ngsolve/demos/howto/hhj.py +44 -0
- ngsolve/demos/howto/hybrid_dg.py +53 -0
- ngsolve/demos/howto/mixed.py +30 -0
- ngsolve/demos/howto/nonlin.py +29 -0
- ngsolve/demos/howto/pickling.py +26 -0
- ngsolve/demos/howto/pml.py +31 -0
- ngsolve/demos/howto/taskmanager.py +20 -0
- ngsolve/demos/howto/tdnns.py +47 -0
- ngsolve/demos/howto/timeDG-skeleton.py +45 -0
- ngsolve/demos/howto/timeDG.py +38 -0
- ngsolve/demos/howto/timeDGlap.py +42 -0
- ngsolve/demos/howto/timeDGwave.py +61 -0
- ngsolve/demos/intro/__init__.py +0 -0
- ngsolve/demos/intro/adaptive.py +123 -0
- ngsolve/demos/intro/cmagnet.py +62 -0
- ngsolve/demos/intro/elasticity.py +76 -0
- ngsolve/demos/intro/navierstokes.py +74 -0
- ngsolve/demos/intro/poisson.ipynb +170 -0
- ngsolve/demos/intro/poisson.py +41 -0
- ngsolve/demos/mpi/__init__.py +0 -0
- ngsolve/demos/mpi/mpi_cmagnet.py +87 -0
- ngsolve/demos/mpi/mpi_navierstokes.py +117 -0
- ngsolve/demos/mpi/mpi_poisson.py +89 -0
- ngsolve/demos/mpi/mpi_timeDG.py +82 -0
- ngsolve/ngslib.pyd +0 -0
- {ngsolve-6.2.2404.post156.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/METADATA +2 -2
- {ngsolve-6.2.2404.post156.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/RECORD +134 -102
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/Scripts/ngsolve.tcl +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/beam.geo +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/beam.vol +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/chip.in2d +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/chip.vol +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coil.geo +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coil.vol +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coilshield.geo +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coilshield.vol +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/cube.geo +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/cube.vol +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d11_chip_nitsche.pde +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d1_square.pde +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d2_chip.pde +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d3_helmholtz.pde +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d4_cube.pde +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d5_beam.pde +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d6_shaft.pde +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d7_coil.pde +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d8_coilshield.pde +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d9_hybridDG.pde +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/doubleglazing.in2d +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/doubleglazing.vol +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/shaft.geo +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/shaft.vol +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/square.in2d +0 -0
- {ngsolve-6.2.2404.post156.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/square.vol +0 -0
- {ngsolve-6.2.2404.post156.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/LICENSE +0 -0
- {ngsolve-6.2.2404.post156.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/WHEEL +0 -0
- {ngsolve-6.2.2404.post156.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/top_level.txt +0 -0
|
@@ -191,77 +191,79 @@ namespace ngfem {
|
|
|
191
191
|
optimize_identities(string, const Array<shared_ptr<CoefficientFunction>>& cfs,
|
|
192
192
|
const map<string, bool> &options);
|
|
193
193
|
|
|
194
|
-
class LeviCivitaCoefficientFunction
|
|
195
|
-
: public T_CoefficientFunction<LeviCivitaCoefficientFunction> {
|
|
196
|
-
using BASE = T_CoefficientFunction<LeviCivitaCoefficientFunction>;
|
|
197
194
|
|
|
198
|
-
|
|
199
|
-
|
|
195
|
+
// class LeviCivitaCoefficientFunction
|
|
196
|
+
// : public T_CoefficientFunction<LeviCivitaCoefficientFunction> {
|
|
197
|
+
// using BASE = T_CoefficientFunction<LeviCivitaCoefficientFunction>;
|
|
200
198
|
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
// int dim = 0;
|
|
200
|
+
// MultiIndex mi{};
|
|
203
201
|
|
|
204
|
-
|
|
202
|
+
// public:
|
|
203
|
+
// LeviCivitaCoefficientFunction() = default;
|
|
205
204
|
|
|
206
|
-
|
|
207
|
-
func(*this);
|
|
208
|
-
}
|
|
205
|
+
// LeviCivitaCoefficientFunction(int adim);
|
|
209
206
|
|
|
210
|
-
|
|
207
|
+
// virtual void TraverseTree(const function<void(CoefficientFunction &)> &func) override {
|
|
208
|
+
// func(*this);
|
|
209
|
+
// }
|
|
211
210
|
|
|
212
|
-
|
|
211
|
+
// virtual string GetDescription() const override { return string("Levi-Civita Symbol"); }
|
|
213
212
|
|
|
214
|
-
|
|
215
|
-
GenerateCode(code, inputs, index, false);
|
|
216
|
-
}
|
|
213
|
+
// virtual void DoArchive(Archive &ar) override;
|
|
217
214
|
|
|
218
|
-
|
|
219
|
-
|
|
215
|
+
// virtual void GenerateCode(Code &code, FlatArray<int> inputs, int index) const override {
|
|
216
|
+
// GenerateCode(code, inputs, index, false);
|
|
217
|
+
// }
|
|
220
218
|
|
|
221
|
-
|
|
222
|
-
|
|
219
|
+
// virtual void GenerateCode(Code &code, FlatArray<int> inputs, int index,
|
|
220
|
+
// bool skip_zeroes = true) const;
|
|
223
221
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
FlatVector<AutoDiffDiff<1,NonZero>> values) const override;
|
|
222
|
+
// virtual void NonZeroPattern(const class ProxyUserData &ud,
|
|
223
|
+
// FlatVector<AutoDiffDiff<1,NonZero>> values) const override;
|
|
227
224
|
|
|
228
|
-
|
|
229
|
-
|
|
225
|
+
// virtual void NonZeroPattern(const class ProxyUserData &ud,
|
|
226
|
+
// FlatArray<FlatVector<AutoDiffDiff<1,NonZero>>> input,
|
|
227
|
+
// FlatVector<AutoDiffDiff<1,NonZero>> values) const override;
|
|
230
228
|
|
|
231
|
-
|
|
229
|
+
// using BASE::Evaluate;
|
|
230
|
+
// using typename BASE::T_DJC;
|
|
232
231
|
|
|
233
|
-
|
|
234
|
-
void T_Evaluate(const MIR &ir, BareSliceMatrix<T, ORD> values) const
|
|
235
|
-
{
|
|
236
|
-
auto val = T(0.0);
|
|
237
|
-
values.AddSize(Dimension(), ir.Size()) = val;
|
|
238
|
-
auto ir_size = ir.Size();
|
|
239
|
-
for (size_t I: Range(Dimension())) {
|
|
240
|
-
const auto I_array = split(I, mi);
|
|
241
|
-
if (is_even_iota_permutation(I_array.begin(), I_array.end()))
|
|
242
|
-
val = 1.0;
|
|
243
|
-
else if (is_odd_iota_permutation(I_array.begin(), I_array.end()))
|
|
244
|
-
val = -1.0;
|
|
245
|
-
else
|
|
246
|
-
continue;
|
|
247
|
-
for (auto q: Range(ir_size))
|
|
248
|
-
values(I, q) = val;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
232
|
+
// virtual double Evaluate(const BaseMappedIntegrationPoint &ip) const override;
|
|
251
233
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
234
|
+
// template<typename MIR, typename T, ORDERING ORD>
|
|
235
|
+
// void T_Evaluate(const MIR &ir, BareSliceMatrix<T, ORD> values) const
|
|
236
|
+
// {
|
|
237
|
+
// auto val = T(0.0);
|
|
238
|
+
// values.AddSize(Dimension(), ir.Size()) = val;
|
|
239
|
+
// auto ir_size = ir.Size();
|
|
240
|
+
// for (size_t I: Range(Dimension())) {
|
|
241
|
+
// const auto I_array = split(I, mi);
|
|
242
|
+
// cout << "check I: " << I_array << endl;
|
|
243
|
+
// if (is_even_iota_permutation(I_array.begin(), I_array.end()))
|
|
244
|
+
// val = 1.0;
|
|
245
|
+
// else if (is_odd_iota_permutation(I_array.begin(), I_array.end()))
|
|
246
|
+
// val = -1.0;
|
|
247
|
+
// else
|
|
248
|
+
// continue;
|
|
249
|
+
// for (auto q: Range(ir_size))
|
|
250
|
+
// values(I, q) = val;
|
|
251
|
+
// }
|
|
252
|
+
// }
|
|
258
253
|
|
|
254
|
+
// template<typename MIR, typename T, ORDERING ORD>
|
|
255
|
+
// void T_Evaluate(const MIR &ir, FlatArray<BareSliceMatrix<T, ORD>> input,
|
|
256
|
+
// BareSliceMatrix<T, ORD> values) const
|
|
257
|
+
// {
|
|
258
|
+
// T_Evaluate(ir, values);
|
|
259
|
+
// }
|
|
259
260
|
|
|
260
|
-
shared_ptr<CoefficientFunction> Diff(const CoefficientFunction *var,
|
|
261
|
-
shared_ptr<CoefficientFunction> dir) const override;
|
|
262
261
|
|
|
263
|
-
|
|
264
|
-
|
|
262
|
+
// shared_ptr<CoefficientFunction> Diff(const CoefficientFunction *var,
|
|
263
|
+
// shared_ptr<CoefficientFunction> dir) const override;
|
|
264
|
+
|
|
265
|
+
// shared_ptr<CoefficientFunction> DiffJacobi(const CoefficientFunction *var, T_DJC & cache) const override;
|
|
266
|
+
// };
|
|
265
267
|
|
|
266
268
|
class EinsumCoefficientFunction
|
|
267
269
|
: public T_CoefficientFunction<EinsumCoefficientFunction>
|
netgen/include/tpdiffop.hpp
CHANGED
|
@@ -25,6 +25,7 @@ namespace ngfem
|
|
|
25
25
|
virtual IntRange UsedDofs(const FiniteElement & fel) const override { return IntRange(0, fel.GetNDof()); }
|
|
26
26
|
|
|
27
27
|
virtual bool operator== (const TPDifferentialOperator & diffop2) const { return false; }
|
|
28
|
+
virtual bool operator== (const DifferentialOperator & diffop2) const override { return false; }
|
|
28
29
|
|
|
29
30
|
shared_ptr<DifferentialOperator> & GetEvaluators( int num)
|
|
30
31
|
{
|
netgen/include/tpintrule.hpp
CHANGED
|
@@ -46,6 +46,8 @@ namespace ngfem
|
|
|
46
46
|
{ throw Exception("TPMappedIntegrationRule::Range not implemented"); }
|
|
47
47
|
virtual SliceMatrix<> GetPoints() const
|
|
48
48
|
{ throw Exception("TPMappedIntegrationRule::GetPoints not implemented"); }
|
|
49
|
+
virtual SliceMatrix<> GetNormals() const
|
|
50
|
+
{ throw Exception("TPMappedIntegrationRule::GetNormals not implemented"); }
|
|
49
51
|
virtual void ComputeNormalsAndMeasure (ELEMENT_TYPE et, int facetnr)
|
|
50
52
|
{ throw Exception("TPMappedIntegrationRule::ComputeNormalsAndMeasure not implemented"); }
|
|
51
53
|
virtual bool IsComplex() const
|
|
@@ -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
|
|
26
|
-
class
|
|
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
|
|
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
|
-
|
|
56
|
-
|
|
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(
|
|
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
|
|
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
|
-
|
|
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
|
-
:
|
|
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
|
{
|
|
@@ -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;
|
netgen/include/vvector.hpp
CHANGED
|
@@ -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
|
-
|
|
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"))
|
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.
|
|
34
|
-
NGSOLVE_VERSION_GIT = "v6.2.
|
|
35
|
-
NGSOLVE_VERSION_PYTHON = "6.2.
|
|
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 = "
|
|
40
|
-
NGSOLVE_VERSION_PATCH = "
|
|
41
|
-
NGSOLVE_VERSION_HASH = "
|
|
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.
|
|
34
|
-
NGSOLVE_VERSION_GIT = "v6.2.
|
|
35
|
-
NGSOLVE_VERSION_PYTHON = "6.2.
|
|
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 = "
|
|
40
|
-
NGSOLVE_VERSION_PATCH = "
|
|
41
|
-
NGSOLVE_VERSION_HASH = "
|
|
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"])
|