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.
- netgen/include/arnoldi.hpp +3 -0
- netgen/include/basematrix.hpp +30 -19
- 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/integratorcf.hpp +14 -9
- 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 +30 -51
- netgen/include/mgpre.hpp +1 -1
- netgen/include/mptools.hpp +2145 -0
- 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/shapefunction_utils.hpp +40 -1
- netgen/include/sparsecholesky.hpp +4 -0
- netgen/include/sparsematrix.hpp +25 -43
- netgen/include/sparsematrix_dyn.hpp +2 -0
- netgen/include/sparsematrix_impl.hpp +66 -1
- netgen/include/special_matrix.hpp +7 -134
- 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 +8 -2
- 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 +5 -5
- 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/internal.py +5 -0
- ngsolve/ngslib.pyd +0 -0
- {ngsolve-6.2.2404.post109.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/METADATA +2 -2
- {ngsolve-6.2.2404.post109.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/RECORD +137 -104
- {ngsolve-6.2.2404.post109.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/WHEEL +1 -1
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/Scripts/ngsolve.tcl +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/beam.geo +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/beam.vol +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/chip.in2d +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/chip.vol +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coil.geo +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coil.vol +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coilshield.geo +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/coilshield.vol +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/cube.geo +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/cube.vol +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d10_DGdoubleglazing.pde +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d11_chip_nitsche.pde +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d1_square.pde +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d2_chip.pde +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d3_helmholtz.pde +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d4_cube.pde +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d5_beam.pde +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d6_shaft.pde +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d7_coil.pde +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d8_coilshield.pde +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/d9_hybridDG.pde +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/doubleglazing.in2d +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/doubleglazing.vol +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/shaft.geo +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/shaft.vol +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/square.in2d +0 -0
- {ngsolve-6.2.2404.post109.dev0.data → ngsolve-6.2.2406.post112.dev1.data}/data/share/ngsolve/square.vol +0 -0
- {ngsolve-6.2.2404.post109.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/LICENSE +0 -0
- {ngsolve-6.2.2404.post109.dev0.dist-info → ngsolve-6.2.2406.post112.dev1.dist-info}/top_level.txt +0 -0
netgen/include/arnoldi.hpp
CHANGED
netgen/include/basematrix.hpp
CHANGED
|
@@ -8,14 +8,21 @@
|
|
|
8
8
|
/* Date: 25. Mar. 2000 */
|
|
9
9
|
/*********************************************************************/
|
|
10
10
|
|
|
11
|
-
namespace ngla
|
|
12
|
-
{
|
|
13
11
|
|
|
12
|
+
#include "basevector.hpp"
|
|
13
|
+
#include "multivector.hpp"
|
|
14
|
+
// #include "paralleldofs.hpp"
|
|
14
15
|
|
|
16
|
+
namespace ngla
|
|
17
|
+
{
|
|
18
|
+
class ParallelDofs;
|
|
19
|
+
|
|
15
20
|
// sets the solver which is used for InverseMatrix
|
|
16
21
|
enum INVERSETYPE { PARDISO, PARDISOSPD, SPARSECHOLESKY, SUPERLU, SUPERLU_DIST, MUMPS, MASTERINVERSE, UMFPACK };
|
|
17
22
|
extern string GetInverseName (INVERSETYPE type);
|
|
18
23
|
|
|
24
|
+
class BaseSparseMatrix;
|
|
25
|
+
|
|
19
26
|
/**
|
|
20
27
|
The base for all matrices in the linalg.
|
|
21
28
|
*/
|
|
@@ -142,6 +149,16 @@ namespace ngla
|
|
|
142
149
|
virtual INVERSETYPE SetInverseType ( INVERSETYPE ainversetype ) const;
|
|
143
150
|
virtual INVERSETYPE SetInverseType ( string ainversetype ) const;
|
|
144
151
|
virtual INVERSETYPE GetInverseType () const;
|
|
152
|
+
|
|
153
|
+
typedef std::function<shared_ptr<BaseMatrix>(shared_ptr<BaseMatrix>,
|
|
154
|
+
shared_ptr<BitArray>,
|
|
155
|
+
shared_ptr<const Array<int>>)> T_INVCREATOR;
|
|
156
|
+
mutable T_INVCREATOR invcreator;
|
|
157
|
+
void SetInverseCreator(T_INVCREATOR ainvcreator) const { invcreator = ainvcreator; }
|
|
158
|
+
|
|
159
|
+
static SymbolTable<T_INVCREATOR> invcreators;
|
|
160
|
+
static void RegisterInverseCreator(string name, T_INVCREATOR creator);
|
|
161
|
+
|
|
145
162
|
virtual void SetInverseFlags (const Flags & flags) { ; }
|
|
146
163
|
virtual shared_ptr<BaseMatrix> DeleteZeroElements(double tol) const
|
|
147
164
|
{
|
|
@@ -155,6 +172,8 @@ namespace ngla
|
|
|
155
172
|
template <typename TSCAL>
|
|
156
173
|
Matrix<TSCAL> ToDense() const;
|
|
157
174
|
|
|
175
|
+
virtual shared_ptr<BaseSparseMatrix> CreateSparseMatrix() const;
|
|
176
|
+
|
|
158
177
|
// time per run
|
|
159
178
|
double Timing (int runs = 10) const;
|
|
160
179
|
|
|
@@ -254,14 +273,6 @@ namespace ngla
|
|
|
254
273
|
void AssignTo (TS s, BaseVector & v) const
|
|
255
274
|
{
|
|
256
275
|
CheckSize (v);
|
|
257
|
-
/*
|
|
258
|
-
if (m.Height() != v.Size() || m.Width() != x.Size())
|
|
259
|
-
throw Exception (ToString ("matrix-vector: size does not fit\n") +
|
|
260
|
-
"matrix-type = " + typeid(m).name() +
|
|
261
|
-
"Matrix: " + ToString(m.Height()) + " x " + ToString(m.Width()) + "\n"
|
|
262
|
-
"Vector in : " + ToString(x.Size()) + "\n"
|
|
263
|
-
"Vector res: " + ToString(v.Size()));
|
|
264
|
-
*/
|
|
265
276
|
m.Mult (x, v);
|
|
266
277
|
v *= s;
|
|
267
278
|
}
|
|
@@ -270,10 +281,6 @@ namespace ngla
|
|
|
270
281
|
void AddTo (TS s, BaseVector & v) const
|
|
271
282
|
{
|
|
272
283
|
CheckSize (v);
|
|
273
|
-
/*
|
|
274
|
-
if (m.Height() != v.Size() || m.Width() != x.Size())
|
|
275
|
-
throw Exception ("matrix-vector MultAdd: size does not fit");
|
|
276
|
-
*/
|
|
277
284
|
m.MultAdd (s, x, v);
|
|
278
285
|
}
|
|
279
286
|
|
|
@@ -344,6 +351,8 @@ namespace ngla
|
|
|
344
351
|
///
|
|
345
352
|
virtual bool IsComplex() const override { return bm.IsComplex(); }
|
|
346
353
|
virtual BaseMatrix::OperatorInfo GetOperatorInfo () const override;
|
|
354
|
+
|
|
355
|
+
virtual shared_ptr<BaseSparseMatrix> CreateSparseMatrix() const override;
|
|
347
356
|
|
|
348
357
|
virtual AutoVector CreateRowVector () const override { return bm.CreateColVector(); }
|
|
349
358
|
virtual AutoVector CreateColVector () const override { return bm.CreateRowVector(); }
|
|
@@ -568,6 +577,8 @@ namespace ngla
|
|
|
568
577
|
return ost;
|
|
569
578
|
}
|
|
570
579
|
|
|
580
|
+
virtual shared_ptr<BaseSparseMatrix> CreateSparseMatrix() const override;
|
|
581
|
+
|
|
571
582
|
virtual shared_ptr<BaseMatrix> CreateDeviceMatrix() const override
|
|
572
583
|
{
|
|
573
584
|
return make_shared<ProductMatrix>(bma.CreateDeviceMatrix(), bmb.CreateDeviceMatrix());
|
|
@@ -689,7 +700,7 @@ namespace ngla
|
|
|
689
700
|
bmb.MultAdd (Vector(b*alpha), x, y);
|
|
690
701
|
}
|
|
691
702
|
|
|
692
|
-
|
|
703
|
+
virtual shared_ptr<BaseSparseMatrix> CreateSparseMatrix() const override;
|
|
693
704
|
|
|
694
705
|
virtual int VHeight() const override
|
|
695
706
|
{
|
|
@@ -810,6 +821,8 @@ namespace ngla
|
|
|
810
821
|
info.childs += &bm;
|
|
811
822
|
return info;
|
|
812
823
|
}
|
|
824
|
+
|
|
825
|
+
virtual shared_ptr<BaseSparseMatrix> CreateSparseMatrix() const override;
|
|
813
826
|
|
|
814
827
|
virtual shared_ptr<BaseMatrix> CreateDeviceMatrix() const override
|
|
815
828
|
{
|
|
@@ -829,7 +842,6 @@ namespace ngla
|
|
|
829
842
|
{
|
|
830
843
|
bool has_format;
|
|
831
844
|
size_t size;
|
|
832
|
-
// bool is_complex;
|
|
833
845
|
public:
|
|
834
846
|
///
|
|
835
847
|
IdentityMatrix ()
|
|
@@ -837,7 +849,6 @@ namespace ngla
|
|
|
837
849
|
IdentityMatrix (size_t asize, bool ais_complex)
|
|
838
850
|
: has_format(true), size(asize) { is_complex=ais_complex; }
|
|
839
851
|
|
|
840
|
-
// virtual bool IsComplex() const override { return is_complex; }
|
|
841
852
|
virtual BaseMatrix::OperatorInfo GetOperatorInfo () const override;
|
|
842
853
|
|
|
843
854
|
///
|
|
@@ -908,7 +919,7 @@ namespace ngla
|
|
|
908
919
|
};
|
|
909
920
|
|
|
910
921
|
|
|
911
|
-
/* ***********************
|
|
922
|
+
/* *********************** operators ********************** */
|
|
912
923
|
|
|
913
924
|
// default is ProductMatrix, but optimizations for
|
|
914
925
|
// ParallelMatrices
|
|
@@ -934,8 +945,8 @@ namespace ngla
|
|
|
934
945
|
|
|
935
946
|
|
|
936
947
|
shared_ptr<BaseMatrix> TransposeOperator (shared_ptr<BaseMatrix> mat);
|
|
948
|
+
|
|
937
949
|
|
|
938
|
-
/// output operator for matrices
|
|
939
950
|
inline ostream & operator<< (ostream & ost, const BaseMatrix & m)
|
|
940
951
|
{
|
|
941
952
|
return m.Print(ost);
|
netgen/include/basevector.hpp
CHANGED
|
@@ -7,13 +7,34 @@
|
|
|
7
7
|
/* Date: 7. Feb. 2003 */
|
|
8
8
|
/*********************************************************************/
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
#include <bla.hpp>
|
|
11
|
+
#include <core/mpi_wrapper.hpp>
|
|
12
|
+
// #include "paralleldofs.hpp"
|
|
11
13
|
|
|
12
14
|
namespace ngla
|
|
13
15
|
{
|
|
16
|
+
using namespace ngbla;
|
|
17
|
+
|
|
14
18
|
class BaseVector;
|
|
15
19
|
class AutoVector;
|
|
16
20
|
class MultiVector;
|
|
21
|
+
|
|
22
|
+
class ParallelDofs;
|
|
23
|
+
|
|
24
|
+
class DofRange : public T_Range<size_t>
|
|
25
|
+
{
|
|
26
|
+
shared_ptr<ParallelDofs> pardofs;
|
|
27
|
+
public:
|
|
28
|
+
DofRange () { }
|
|
29
|
+
DofRange (T_Range<size_t> range, shared_ptr<ParallelDofs> apardofs)
|
|
30
|
+
: T_Range<size_t>(range), pardofs(apardofs) { ; }
|
|
31
|
+
DofRange (size_t end, shared_ptr<ParallelDofs> apardofs)
|
|
32
|
+
: T_Range<size_t>(0, end), pardofs(apardofs) { ; }
|
|
33
|
+
shared_ptr<ParallelDofs> GetParallelDofs() const { return pardofs; }
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
17
38
|
|
|
18
39
|
template <class SCAL> class S_BaseVector;
|
|
19
40
|
|
|
@@ -91,9 +112,6 @@ namespace ngla
|
|
|
91
112
|
size_t size;
|
|
92
113
|
/// number of doubles per entry
|
|
93
114
|
int entrysize = 1;
|
|
94
|
-
///
|
|
95
|
-
// shared_ptr<ParallelDofs> paralleldofs;
|
|
96
|
-
|
|
97
115
|
///
|
|
98
116
|
BaseVector () { ; }
|
|
99
117
|
|
|
@@ -265,6 +283,7 @@ namespace ngla
|
|
|
265
283
|
virtual void SetRandom ();
|
|
266
284
|
|
|
267
285
|
inline AutoVector Range (size_t begin, size_t end) const;
|
|
286
|
+
inline AutoVector Range (size_t end) const;
|
|
268
287
|
// { return Range(T_Range(begin, end)); }
|
|
269
288
|
virtual AutoVector Range (T_Range<size_t> range) const;
|
|
270
289
|
virtual AutoVector Range (DofRange range) const;
|
|
@@ -434,6 +453,7 @@ namespace ngla
|
|
|
434
453
|
operator const BaseVector & () const { return *vec; }
|
|
435
454
|
|
|
436
455
|
AutoVector Range (size_t begin, size_t end) const { return vec->Range(begin,end); }
|
|
456
|
+
AutoVector Range (size_t end) const { return vec->Range(0,end); }
|
|
437
457
|
AutoVector Range (T_Range<size_t> range) const { return vec->Range(range); }
|
|
438
458
|
|
|
439
459
|
template <typename T>
|
|
@@ -571,6 +591,11 @@ namespace ngla
|
|
|
571
591
|
return Range(T_Range(begin, end));
|
|
572
592
|
}
|
|
573
593
|
|
|
594
|
+
AutoVector BaseVector::Range (size_t end) const
|
|
595
|
+
{
|
|
596
|
+
return Range (0, end);
|
|
597
|
+
}
|
|
598
|
+
|
|
574
599
|
|
|
575
600
|
template <>
|
|
576
601
|
inline FlatVector<double> BaseVector::FV<double> () const
|
|
@@ -651,72 +676,6 @@ namespace ngla
|
|
|
651
676
|
extern template class S_BaseVector<Complex>;
|
|
652
677
|
#endif
|
|
653
678
|
|
|
654
|
-
/*
|
|
655
|
-
template <class SCAL>
|
|
656
|
-
class NGS_DLL_HEADER S_BaseVector;
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
template <>
|
|
660
|
-
class NGS_DLL_HEADER S_BaseVector<double> : virtual public BaseVector
|
|
661
|
-
{
|
|
662
|
-
public:
|
|
663
|
-
S_BaseVector () throw () { ; }
|
|
664
|
-
virtual ~S_BaseVector() { ; }
|
|
665
|
-
|
|
666
|
-
S_BaseVector & operator= (double s);
|
|
667
|
-
|
|
668
|
-
virtual double InnerProduct (const BaseVector & v2) const;
|
|
669
|
-
|
|
670
|
-
virtual FlatVector<double> FVDouble () const;
|
|
671
|
-
virtual FlatVector<Complex> FVComplex () const;
|
|
672
|
-
|
|
673
|
-
virtual FlatVector<double> FVScal () const
|
|
674
|
-
{
|
|
675
|
-
return FlatVector<double> (size * entrysize, Memory());
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
virtual void GetIndirect (const FlatArray<int> & ind,
|
|
680
|
-
const FlatVector<double> & v) const;
|
|
681
|
-
virtual void GetIndirect (const FlatArray<int> & ind,
|
|
682
|
-
const FlatVector<Complex> & v) const;
|
|
683
|
-
|
|
684
|
-
};
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
template <>
|
|
690
|
-
class NGS_DLL_HEADER S_BaseVector<Complex> : virtual public BaseVector
|
|
691
|
-
{
|
|
692
|
-
public:
|
|
693
|
-
S_BaseVector () throw() { ; }
|
|
694
|
-
~S_BaseVector () { ; }
|
|
695
|
-
|
|
696
|
-
virtual Complex InnerProduct (const BaseVector & v2) const;
|
|
697
|
-
|
|
698
|
-
virtual FlatVector<double> FVDouble () const throw();
|
|
699
|
-
virtual FlatVector<Complex> FVComplex () const throw();
|
|
700
|
-
virtual FlatVector<Complex> FVScal () const throw()
|
|
701
|
-
{
|
|
702
|
-
return FlatVector<Complex> (size * entrysize/2, Memory());
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
virtual void GetIndirect (const FlatArray<int> & ind,
|
|
706
|
-
const FlatVector<double> & v) const;
|
|
707
|
-
virtual void GetIndirect (const FlatArray<int> & ind,
|
|
708
|
-
const FlatVector<Complex> & v) const;
|
|
709
|
-
};
|
|
710
|
-
|
|
711
|
-
*/
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
679
|
|
|
721
680
|
|
|
722
681
|
|
|
@@ -821,14 +780,20 @@ namespace ngla
|
|
|
821
780
|
};
|
|
822
781
|
|
|
823
782
|
|
|
824
|
-
|
|
783
|
+
/*
|
|
825
784
|
inline VVecExpr<VSumExpr<VVecExpr<BaseVector>, VVecExpr<BaseVector> > >
|
|
826
785
|
operator+ (const BaseVector & a, const BaseVector & b)
|
|
827
786
|
{
|
|
828
787
|
typedef VSumExpr<VVecExpr<BaseVector>, VVecExpr<BaseVector> > TRES;
|
|
829
788
|
return TRES (a, b);
|
|
830
789
|
}
|
|
790
|
+
*/
|
|
791
|
+
inline auto operator+ (const BaseVector & a, const BaseVector & b)
|
|
792
|
+
{
|
|
793
|
+
return VVecExpr<VSumExpr<VVecExpr<BaseVector>,VVecExpr<BaseVector>>>{{a,b}};
|
|
794
|
+
}
|
|
831
795
|
|
|
796
|
+
/*
|
|
832
797
|
template <class TA>
|
|
833
798
|
inline VVecExpr<VSumExpr<VVecExpr<TA>, VVecExpr<BaseVector> > >
|
|
834
799
|
operator+ (const VVecExpr<TA> & a, const BaseVector & b)
|
|
@@ -836,6 +801,13 @@ namespace ngla
|
|
|
836
801
|
typedef VSumExpr<VVecExpr<TA>, VVecExpr<BaseVector> > TRES;
|
|
837
802
|
return TRES (a, b);
|
|
838
803
|
}
|
|
804
|
+
*/
|
|
805
|
+
template <class TA>
|
|
806
|
+
inline auto operator+ (const VVecExpr<TA> & a, const BaseVector & b)
|
|
807
|
+
{
|
|
808
|
+
return VSumExpr<VVecExpr<TA>,VVecExpr<BaseVector>> (a,b);
|
|
809
|
+
}
|
|
810
|
+
|
|
839
811
|
|
|
840
812
|
template <class TB>
|
|
841
813
|
inline VVecExpr<VSumExpr<VVecExpr<BaseVector>, VVecExpr<TB> > >
|
netgen/include/bdbequations.hpp
CHANGED
|
@@ -747,6 +747,11 @@ namespace ngfem
|
|
|
747
747
|
{
|
|
748
748
|
Cast(fel).CalcMappedDDShape(mip, Trans(mat));
|
|
749
749
|
}
|
|
750
|
+
|
|
751
|
+
static shared_ptr<CoefficientFunction>
|
|
752
|
+
DiffShape (shared_ptr<CoefficientFunction> proxy,
|
|
753
|
+
shared_ptr<CoefficientFunction> dir,
|
|
754
|
+
bool eulerian);
|
|
750
755
|
};
|
|
751
756
|
|
|
752
757
|
|
|
@@ -933,6 +938,11 @@ namespace ngfem
|
|
|
933
938
|
using DiffOp<DiffOpHesseBoundary<D,FEL>>::AddTransSIMDIR;
|
|
934
939
|
static void AddTransSIMDIR (const FiniteElement & fel, const SIMD_BaseMappedIntegrationRule & bmir,
|
|
935
940
|
BareSliceMatrix<SIMD<double>> x, BareSliceVector<double> y);
|
|
941
|
+
|
|
942
|
+
static shared_ptr<CoefficientFunction>
|
|
943
|
+
DiffShape (shared_ptr<CoefficientFunction> proxy,
|
|
944
|
+
shared_ptr<CoefficientFunction> dir,
|
|
945
|
+
bool eulerian);
|
|
936
946
|
};
|
|
937
947
|
|
|
938
948
|
|
|
@@ -1884,7 +1894,7 @@ namespace ngfem
|
|
|
1884
1894
|
|
|
1885
1895
|
|
|
1886
1896
|
template <int DIM_SPC, VorB VB = VOL>
|
|
1887
|
-
class DiffOpIdVectorH1 : public DiffOp<DiffOpIdVectorH1<DIM_SPC> >
|
|
1897
|
+
class DiffOpIdVectorH1 : public DiffOp<DiffOpIdVectorH1<DIM_SPC, VB> >
|
|
1888
1898
|
{
|
|
1889
1899
|
public:
|
|
1890
1900
|
enum { DIM = 1 };
|
|
@@ -1949,7 +1959,7 @@ namespace ngfem
|
|
|
1949
1959
|
}
|
|
1950
1960
|
}
|
|
1951
1961
|
|
|
1952
|
-
using DiffOp<DiffOpIdVectorH1<DIM_SPC>>::ApplySIMDIR;
|
|
1962
|
+
using DiffOp<DiffOpIdVectorH1<DIM_SPC, VB>>::ApplySIMDIR;
|
|
1953
1963
|
static void ApplySIMDIR (const FiniteElement & bfel, const SIMD_BaseMappedIntegrationRule & mir,
|
|
1954
1964
|
BareSliceVector<double> x, BareSliceMatrix<SIMD<double>> y)
|
|
1955
1965
|
{
|
|
@@ -1961,7 +1971,7 @@ namespace ngfem
|
|
|
1961
1971
|
}
|
|
1962
1972
|
}
|
|
1963
1973
|
|
|
1964
|
-
using DiffOp<DiffOpIdVectorH1<DIM_SPC>>::AddTransSIMDIR;
|
|
1974
|
+
using DiffOp<DiffOpIdVectorH1<DIM_SPC, VB>>::AddTransSIMDIR;
|
|
1965
1975
|
static void AddTransSIMDIR (const FiniteElement & bfel, const SIMD_BaseMappedIntegrationRule & mir,
|
|
1966
1976
|
BareSliceMatrix<SIMD<double>> y, BareSliceVector<double> x)
|
|
1967
1977
|
{
|
|
@@ -2703,6 +2713,7 @@ namespace ngfem
|
|
|
2703
2713
|
extern template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpIdVectorH1<1,BND> >;
|
|
2704
2714
|
extern template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpIdVectorH1<2,BND> >;
|
|
2705
2715
|
extern template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpIdVectorH1<3,BND> >;
|
|
2716
|
+
extern template class NGS_DLL_HEADER T_DifferentialOperator<DiffOpIdVectorH1<3,BBND> >;
|
|
2706
2717
|
|
|
2707
2718
|
|
|
2708
2719
|
|
netgen/include/bilinearform.hpp
CHANGED
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
#include "fespace.hpp"
|
|
12
12
|
#include <specialelement.hpp>
|
|
13
|
+
#include <sparsematrix.hpp>
|
|
14
|
+
#include <elementbyelement.hpp>
|
|
15
|
+
|
|
13
16
|
|
|
14
17
|
namespace ngcomp
|
|
15
18
|
{
|
|
@@ -746,40 +749,6 @@ namespace ngcomp
|
|
|
746
749
|
|
|
747
750
|
|
|
748
751
|
|
|
749
|
-
template <class TM>
|
|
750
|
-
class NGS_DLL_HEADER T_BilinearFormDiagonal : public S_BilinearForm<typename mat_traits<TM>::TSCAL>
|
|
751
|
-
{
|
|
752
|
-
|
|
753
|
-
public:
|
|
754
|
-
typedef typename mat_traits<TM>::TSCAL TSCAL;
|
|
755
|
-
typedef typename mat_traits<TM>::TV_COL TV_COL;
|
|
756
|
-
typedef DiagonalMatrix<TM> TMATRIX;
|
|
757
|
-
shared_ptr<TMATRIX> mymatrix;
|
|
758
|
-
|
|
759
|
-
protected:
|
|
760
|
-
|
|
761
|
-
public:
|
|
762
|
-
T_BilinearFormDiagonal (shared_ptr<FESpace> afespace, const string & aname,
|
|
763
|
-
const Flags & flags);
|
|
764
|
-
virtual ~T_BilinearFormDiagonal ();
|
|
765
|
-
|
|
766
|
-
virtual void AllocateMatrix () override;
|
|
767
|
-
|
|
768
|
-
virtual void AddElementMatrix (FlatArray<int> dnums1,
|
|
769
|
-
FlatArray<int> dnums2,
|
|
770
|
-
BareSliceMatrix<TSCAL> elmat,
|
|
771
|
-
ElementId id, bool addatomic,
|
|
772
|
-
LocalHeap & lh) override;
|
|
773
|
-
|
|
774
|
-
virtual void AddDiagElementMatrix (FlatArray<int> dnums1,
|
|
775
|
-
FlatVector<TSCAL> diag,
|
|
776
|
-
bool inner_element, int elnr,
|
|
777
|
-
LocalHeap & lh) override;
|
|
778
|
-
};
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
752
|
|
|
784
753
|
class ComponentBilinearForm : public BilinearForm
|
|
785
754
|
{
|
|
@@ -953,17 +922,21 @@ namespace ngcomp
|
|
|
953
922
|
Array<ProxyFunction*> trialproxies;
|
|
954
923
|
|
|
955
924
|
typedef void (*lib_function)(size_t nip, double * input, size_t dist_input,
|
|
956
|
-
double * output, size_t dist_output
|
|
925
|
+
double * output, size_t dist_output,
|
|
926
|
+
size_t dist, double * points, double * normals);
|
|
957
927
|
|
|
958
928
|
unique_ptr<SharedLibrary> library;
|
|
959
929
|
lib_function compiled_function = nullptr;
|
|
960
930
|
|
|
961
931
|
size_t dimx, dimy;
|
|
962
932
|
size_t nip;
|
|
933
|
+
Matrix<double> points;
|
|
934
|
+
Matrix<double> normals;
|
|
963
935
|
|
|
964
936
|
public:
|
|
965
937
|
ApplyIntegrationPoints (Array<shared_ptr<CoefficientFunction>> acoefs,
|
|
966
938
|
const Array<ProxyFunction*> & atrialproxies,
|
|
939
|
+
Matrix<double> apoints, Matrix<double> anormals,
|
|
967
940
|
size_t adimx, size_t adimy, size_t anip);
|
|
968
941
|
|
|
969
942
|
AutoVector CreateColVector() const override;
|
|
@@ -983,30 +956,6 @@ namespace ngcomp
|
|
|
983
956
|
|
|
984
957
|
|
|
985
958
|
|
|
986
|
-
|
|
987
|
-
/**
|
|
988
|
-
This bilinearform stores the element-matrices
|
|
989
|
-
*/
|
|
990
|
-
template<class SCAL>
|
|
991
|
-
class ElementByElement_BilinearForm : public S_BilinearForm<SCAL>
|
|
992
|
-
{
|
|
993
|
-
public:
|
|
994
|
-
ElementByElement_BilinearForm (shared_ptr<FESpace> afespace,
|
|
995
|
-
const string & aname,
|
|
996
|
-
const Flags & flags);
|
|
997
|
-
virtual ~ElementByElement_BilinearForm () override;
|
|
998
|
-
|
|
999
|
-
virtual void AllocateMatrix () override;
|
|
1000
|
-
// virtual AutoVector CreateRowVector() const override;
|
|
1001
|
-
// virtual AutoVector CreateColVector() const override;
|
|
1002
|
-
|
|
1003
|
-
virtual void AddElementMatrix (FlatArray<int> dnums1,
|
|
1004
|
-
FlatArray<int> dnums2,
|
|
1005
|
-
BareSliceMatrix<SCAL> elmat,
|
|
1006
|
-
ElementId id, bool addatomic,
|
|
1007
|
-
LocalHeap & lh) override;
|
|
1008
|
-
};
|
|
1009
|
-
|
|
1010
959
|
|
|
1011
960
|
|
|
1012
961
|
}
|
netgen/include/blockjacobi.hpp
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
/* Date: 06. Oct. 96 */
|
|
8
8
|
/* *************************************************************************/
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
#include "sparsematrix.hpp"
|
|
12
|
+
|
|
10
13
|
namespace ngla
|
|
11
14
|
{
|
|
12
15
|
|
|
@@ -172,6 +175,7 @@ namespace ngla
|
|
|
172
175
|
return { MemoryUsage ("BlockJac", nels*sizeof(TM), blocktable->Size()) };
|
|
173
176
|
}
|
|
174
177
|
|
|
178
|
+
virtual shared_ptr<BaseSparseMatrix> CreateSparseMatrix() const override;
|
|
175
179
|
const Array<FlatMatrix<TM>> & GetInverses() const { return invdiag; }
|
|
176
180
|
const Array<TM> & MatrixData() const { return bigmem; }
|
|
177
181
|
};
|
netgen/include/cg.hpp
CHANGED
netgen/include/chebyshev.hpp
CHANGED
netgen/include/coefficient.hpp
CHANGED
|
@@ -291,7 +291,9 @@ namespace ngfem
|
|
|
291
291
|
virtual shared_ptr<CoefficientFunction>
|
|
292
292
|
DiffJacobi (const CoefficientFunction * var, T_DJC & cache) const;
|
|
293
293
|
|
|
294
|
-
|
|
294
|
+
|
|
295
|
+
// returns primary operator
|
|
296
|
+
virtual shared_ptr<CoefficientFunction> Primary () const;
|
|
295
297
|
virtual shared_ptr<CoefficientFunction> Operator (const string & name) const;
|
|
296
298
|
virtual shared_ptr<CoefficientFunction> Operator (shared_ptr<class DifferentialOperator> diffop) const;
|
|
297
299
|
|
|
@@ -1186,6 +1188,7 @@ public:
|
|
|
1186
1188
|
if(transformation.replace.count(thisptr))
|
|
1187
1189
|
return transformation.replace[thisptr];
|
|
1188
1190
|
auto newcf = make_shared<cl_UnaryOpCF>(c1->Transform(transformation), lam, name);
|
|
1191
|
+
newcf->SetDimensions(BASE::Dimensions());
|
|
1189
1192
|
transformation.cache[thisptr] = newcf;
|
|
1190
1193
|
return newcf;
|
|
1191
1194
|
}
|
|
@@ -1782,7 +1785,8 @@ INLINE shared_ptr<CoefficientFunction> BinaryOpCF(shared_ptr<CoefficientFunction
|
|
|
1782
1785
|
|
|
1783
1786
|
|
|
1784
1787
|
NGS_DLL_HEADER shared_ptr<CoefficientFunction>
|
|
1785
|
-
MakeDomainWiseCoefficientFunction (Array<shared_ptr<CoefficientFunction>> aci
|
|
1788
|
+
MakeDomainWiseCoefficientFunction (Array<shared_ptr<CoefficientFunction>> aci,
|
|
1789
|
+
optional<VorB> vb=nullopt);
|
|
1786
1790
|
|
|
1787
1791
|
|
|
1788
1792
|
|