ngsolve 6.2.2502__cp310-cp310-win_amd64.whl → 6.2.2504__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.
- netgen/include/fespace.hpp +3 -2
- netgen/include/integrator.hpp +4 -16
- netgen/include/intrules_SauterSchwab.hpp +25 -0
- netgen/include/mp_coefficient.hpp +140 -0
- netgen/include/mptools.hpp +106 -161
- netgen/include/potentialtools.hpp +20 -0
- netgen/include/prolongation.hpp +126 -3
- netgen/include/sparsematrix_impl.hpp +71 -5
- netgen/include/symbolicintegrator.hpp +1 -0
- netgen/include/tangentialfacetfespace.hpp +7 -22
- netgen/lib/libngsolve.lib +0 -0
- netgen/libngsolve.dll +0 -0
- ngsolve/__init__.py +1 -0
- ngsolve/cmake/NGSolveConfig.cmake +5 -5
- ngsolve/cmake/ngsolve-targets.cmake +9 -2
- ngsolve/config/config.py +5 -5
- ngsolve/ngslib.pyd +0 -0
- ngsolve/solve_implementation.py +146 -0
- {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2504.dist-info}/METADATA +2 -2
- {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2504.dist-info}/RECORD +52 -48
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/Scripts/ngsolve.tcl +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/beam.geo +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/beam.vol +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/chip.in2d +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/chip.vol +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/coil.geo +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/coil.vol +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/coilshield.geo +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/coilshield.vol +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/cube.geo +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/cube.vol +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d11_chip_nitsche.pde +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d1_square.pde +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d2_chip.pde +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d3_helmholtz.pde +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d4_cube.pde +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d5_beam.pde +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d6_shaft.pde +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d7_coil.pde +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d8_coilshield.pde +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/d9_hybridDG.pde +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/doubleglazing.in2d +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/doubleglazing.vol +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/shaft.geo +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/shaft.vol +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/square.in2d +0 -0
- {ngsolve-6.2.2502.data → ngsolve-6.2.2504.data}/data/share/ngsolve/square.vol +0 -0
- {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2504.dist-info}/LICENSE +0 -0
- {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2504.dist-info}/WHEEL +0 -0
- {ngsolve-6.2.2502.dist-info → ngsolve-6.2.2504.dist-info}/top_level.txt +0 -0
netgen/include/fespace.hpp
CHANGED
|
@@ -256,7 +256,7 @@ ANY 1 1 1 1 | 15
|
|
|
256
256
|
|
|
257
257
|
virtual void UpdateDofTables() { ; }
|
|
258
258
|
virtual void UpdateCouplingDofArray() { ; }
|
|
259
|
-
|
|
259
|
+
virtual void UpdateFreeDofs();
|
|
260
260
|
/// update element coloring
|
|
261
261
|
virtual void FinalizeUpdate();
|
|
262
262
|
|
|
@@ -640,7 +640,7 @@ ANY 1 1 1 1 | 15
|
|
|
640
640
|
/// Set multigrid prolongation
|
|
641
641
|
// void SetProlongation (ngmg::Prolongation * aprol)
|
|
642
642
|
// { prol = aprol; }
|
|
643
|
-
virtual void SetHarmonicProlongation (shared_ptr<BilinearForm> bfa);
|
|
643
|
+
virtual void SetHarmonicProlongation (shared_ptr<BilinearForm> bfa, string inverse);
|
|
644
644
|
|
|
645
645
|
/// returns function-evaluator
|
|
646
646
|
shared_ptr<DifferentialOperator> GetEvaluator (VorB vb = VOL) const
|
|
@@ -1109,6 +1109,7 @@ ANY 1 1 1 1 | 15
|
|
|
1109
1109
|
|
|
1110
1110
|
/// copies dofcoupling from components
|
|
1111
1111
|
void UpdateCouplingDofArray() override;
|
|
1112
|
+
virtual void UpdateFreeDofs() override;
|
|
1112
1113
|
|
|
1113
1114
|
void SetDefinedOn (VorB vb, const BitArray& defon) override;
|
|
1114
1115
|
|
netgen/include/integrator.hpp
CHANGED
|
@@ -781,20 +781,14 @@ namespace ngfem
|
|
|
781
781
|
const FiniteElement & volumefel2, int LocalFacetNr2,
|
|
782
782
|
const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
|
|
783
783
|
FlatVector<double> elx, FlatVector<double> ely,
|
|
784
|
-
LocalHeap & lh) const
|
|
785
|
-
{
|
|
786
|
-
throw Exception ("FacetBilinearFormIntegrator::ApplyFacetMatrix for inner facets not implemented!");
|
|
787
|
-
}
|
|
784
|
+
LocalHeap & lh) const;
|
|
788
785
|
virtual void
|
|
789
786
|
ApplyFacetMatrix (const FiniteElement & volumefel1, int LocalFacetNr1,
|
|
790
787
|
const ElementTransformation & eltrans1, FlatArray<int> & ElVertices1,
|
|
791
788
|
const FiniteElement & volumefel2, int LocalFacetNr2,
|
|
792
789
|
const ElementTransformation & eltrans2, FlatArray<int> & ElVertices2,
|
|
793
790
|
FlatVector<Complex> elx, FlatVector<Complex> ely,
|
|
794
|
-
LocalHeap & lh) const
|
|
795
|
-
{
|
|
796
|
-
throw Exception ("FacetBilinearFormIntegrator::ApplyFacetMatrix for inner facets not implemented!");
|
|
797
|
-
}
|
|
791
|
+
LocalHeap & lh) const;
|
|
798
792
|
|
|
799
793
|
|
|
800
794
|
virtual void
|
|
@@ -841,19 +835,13 @@ namespace ngfem
|
|
|
841
835
|
const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
|
|
842
836
|
const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
|
|
843
837
|
FlatVector<double> elx, FlatVector<double> ely,
|
|
844
|
-
LocalHeap & lh) const
|
|
845
|
-
{
|
|
846
|
-
throw Exception ("FacetBilinearFormIntegrator::ApplyFacetMatrix for boundary facets not implemented!");
|
|
847
|
-
}
|
|
838
|
+
LocalHeap & lh) const;
|
|
848
839
|
virtual void
|
|
849
840
|
ApplyFacetMatrix (const FiniteElement & volumefel, int LocalFacetNr,
|
|
850
841
|
const ElementTransformation & eltrans, FlatArray<int> & ElVertices,
|
|
851
842
|
const ElementTransformation & seltrans, FlatArray<int> & SElVertices,
|
|
852
843
|
FlatVector<Complex> elx, FlatVector<Complex> ely,
|
|
853
|
-
LocalHeap & lh) const
|
|
854
|
-
{
|
|
855
|
-
throw Exception ("FacetBilinearFormIntegrator::ApplyFacetMatrix for boundary facets not implemented!");
|
|
856
|
-
}
|
|
844
|
+
LocalHeap & lh) const;
|
|
857
845
|
|
|
858
846
|
|
|
859
847
|
// calculate traces in integration points
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#ifndef INTRULES_HPP
|
|
2
|
+
#define INTRULES_HPP
|
|
3
|
+
|
|
4
|
+
#include <bla.hpp>
|
|
5
|
+
|
|
6
|
+
namespace ngsbem
|
|
7
|
+
{
|
|
8
|
+
using namespace ngbla;
|
|
9
|
+
|
|
10
|
+
// x, y in triangle [(0,0), (1,0), (0,1)]
|
|
11
|
+
tuple<Array<Vec<2>>, Array<Vec<2>>, Array<double>> IdenticPanelIntegrationRule (int order);
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
// x, y in triangle [(0,0), (1,0), (0,1)]
|
|
15
|
+
// x=(0,0) and y=(0,0) are common vertices
|
|
16
|
+
tuple<Array<Vec<2>>, Array<Vec<2>>, Array<double>> CommonVertexIntegrationRule (int order);
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
// x, y in triangle [(0,0), (1,0), (0,1)]
|
|
20
|
+
// x in [(0,0),(1,0)] and y in [(0,0),(1,0)] are common edges
|
|
21
|
+
tuple<Array<Vec<2>>, Array<Vec<2>>, Array<double>> CommonEdgeIntegrationRule (int order);
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#endif
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
#ifndef MP_COEFFICIENT
|
|
2
|
+
#define MP_COEFFICIENT
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
#include "mptools.hpp"
|
|
6
|
+
|
|
7
|
+
namespace ngsbem
|
|
8
|
+
{
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// ******************** Coefficient Functions *********************
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SphericalHarmonicsCF : public CoefficientFunction
|
|
15
|
+
{
|
|
16
|
+
SphericalHarmonics<Complex> sh;
|
|
17
|
+
public:
|
|
18
|
+
SphericalHarmonicsCF (int order)
|
|
19
|
+
: CoefficientFunction(1, true), sh(order) { }
|
|
20
|
+
Complex & Coef(int n, int m) { return sh.Coef(n,m); }
|
|
21
|
+
|
|
22
|
+
virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
|
|
23
|
+
{ throw Exception("real eval not available"); }
|
|
24
|
+
|
|
25
|
+
virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
|
|
26
|
+
{
|
|
27
|
+
values(0) = sh.Eval(mip.GetPoint());
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
virtual void Evaluate (const BaseMappedIntegrationRule & ir, BareSliceMatrix<Complex> values) const override
|
|
31
|
+
{
|
|
32
|
+
for (int i = 0; i < ir.Size(); i++)
|
|
33
|
+
{
|
|
34
|
+
auto & mip = ir[i];
|
|
35
|
+
values(i,0) = sh.Eval(mip.GetPoint());
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
auto & SH() { return sh; }
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
template <typename entry_type> class RegularMLMultiPoleCF;
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
template <typename RADIAL, typename entry_type=Complex>
|
|
48
|
+
class MultiPoleCF : public CoefficientFunction
|
|
49
|
+
{
|
|
50
|
+
MultiPole<RADIAL, entry_type> mp;
|
|
51
|
+
Vec<3> center;
|
|
52
|
+
public:
|
|
53
|
+
MultiPoleCF (int order, double kappa, Vec<3> acenter, double rtyp = 1)
|
|
54
|
+
: CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mp(order, kappa, rtyp), center(acenter) { }
|
|
55
|
+
|
|
56
|
+
entry_type & Coef(int n, int m) { return mp.Coef(n,m); }
|
|
57
|
+
auto & SH() { return mp.SH(); }
|
|
58
|
+
auto & MP() { return mp; }
|
|
59
|
+
Vec<3> Center() const { return center; }
|
|
60
|
+
|
|
61
|
+
virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
|
|
62
|
+
{ throw Exception("real eval not available"); }
|
|
63
|
+
|
|
64
|
+
virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
|
|
65
|
+
{
|
|
66
|
+
if constexpr (std::is_same<entry_type, Complex>())
|
|
67
|
+
values(0) = mp.Eval(mip.GetPoint()-center);
|
|
68
|
+
else
|
|
69
|
+
values = mp.Eval(mip.GetPoint()-center);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
template <typename TARGET>
|
|
73
|
+
void ShiftZ (double z, MultiPole<TARGET, entry_type> & target) { mp.ShiftZ(z, target); }
|
|
74
|
+
|
|
75
|
+
using CoefficientFunction::Transform;
|
|
76
|
+
template <typename TARGET>
|
|
77
|
+
void Transform (MultiPoleCF<TARGET, entry_type> & target)
|
|
78
|
+
{
|
|
79
|
+
mp.Transform (target.MP(), target.Center()-center);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
template <typename entry_type>
|
|
84
|
+
class SingularMLMultiPoleCF : public CoefficientFunction
|
|
85
|
+
{
|
|
86
|
+
shared_ptr<SingularMLMultiPole<entry_type>> mlmp;
|
|
87
|
+
public:
|
|
88
|
+
SingularMLMultiPoleCF (Vec<3> center, double r, double kappa)
|
|
89
|
+
: CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<SingularMLMultiPole<entry_type>>(center, r, kappa)} { }
|
|
90
|
+
|
|
91
|
+
virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
|
|
92
|
+
{ throw Exception("real eval not available"); }
|
|
93
|
+
|
|
94
|
+
virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
|
|
95
|
+
{
|
|
96
|
+
// values(0) = mlmp->Evaluate(mip.GetPoint());
|
|
97
|
+
|
|
98
|
+
if constexpr (std::is_same<entry_type, Complex>())
|
|
99
|
+
values(0) = mlmp->Evaluate(mip.GetPoint());
|
|
100
|
+
else
|
|
101
|
+
values = mlmp->Evaluate(mip.GetPoint());
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
shared_ptr<SingularMLMultiPole<entry_type>> MLMP() const { return mlmp; }
|
|
107
|
+
shared_ptr<RegularMLMultiPoleCF<entry_type>> CreateRegularExpansion(Vec<3> center, double r) const;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
template <typename entry_type>
|
|
112
|
+
class RegularMLMultiPoleCF : public CoefficientFunction
|
|
113
|
+
{
|
|
114
|
+
shared_ptr<RegularMLMultiPole<entry_type>> mlmp;
|
|
115
|
+
public:
|
|
116
|
+
RegularMLMultiPoleCF (shared_ptr<SingularMLMultiPoleCF<entry_type>> asingmp, Vec<3> center, double r)
|
|
117
|
+
: CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<RegularMLMultiPole<entry_type>>(asingmp->MLMP(), center, r)} { }
|
|
118
|
+
RegularMLMultiPoleCF (shared_ptr<SingularMLMultiPole<entry_type>> asingmp, Vec<3> center, double r)
|
|
119
|
+
: CoefficientFunction(sizeof(entry_type)/sizeof(Complex), true), mlmp{make_shared<RegularMLMultiPole<entry_type>>(asingmp, center, r)} { }
|
|
120
|
+
|
|
121
|
+
virtual double Evaluate (const BaseMappedIntegrationPoint & ip) const override
|
|
122
|
+
{ throw Exception("real eval not available"); }
|
|
123
|
+
|
|
124
|
+
virtual void Evaluate (const BaseMappedIntegrationPoint & mip, FlatVector<Complex> values) const override
|
|
125
|
+
{
|
|
126
|
+
// values(0) = mlmp->Evaluate(mip.GetPoint());
|
|
127
|
+
|
|
128
|
+
if constexpr (std::is_same<entry_type, Complex>())
|
|
129
|
+
values(0) = mlmp->Evaluate(mip.GetPoint());
|
|
130
|
+
else
|
|
131
|
+
values = mlmp->Evaluate(mip.GetPoint());
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
shared_ptr<RegularMLMultiPole<entry_type>> MLMP() { return mlmp; }
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
#endif
|