ngsolve 6.2.2501.post47.dev1__cp312-cp312-macosx_10_15_universal2.whl → 6.2.2501.post48.dev1__cp312-cp312-macosx_10_15_universal2.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 +55 -0
- netgen/include/bandmatrix.hpp +334 -0
- netgen/include/basematrix.hpp +957 -0
- netgen/include/basevector.hpp +1268 -0
- netgen/include/bdbequations.hpp +2752 -0
- netgen/include/bdbintegrator.hpp +1660 -0
- netgen/include/bessel.hpp +1064 -0
- netgen/include/bilinearform.hpp +963 -0
- netgen/include/bla.hpp +29 -0
- netgen/include/blockalloc.hpp +95 -0
- netgen/include/blockjacobi.hpp +316 -0
- netgen/include/bspline.hpp +114 -0
- netgen/include/calcinverse.hpp +141 -0
- netgen/include/cg.hpp +368 -0
- netgen/include/chebyshev.hpp +44 -0
- netgen/include/cholesky.hpp +720 -0
- netgen/include/clapack.h +7254 -0
- netgen/include/code_generation.hpp +296 -0
- netgen/include/coefficient.hpp +2033 -0
- netgen/include/coefficient_impl.hpp +19 -0
- netgen/include/coefficient_stdmath.hpp +167 -0
- netgen/include/commutingAMG.hpp +106 -0
- netgen/include/comp.hpp +79 -0
- netgen/include/compatibility.hpp +41 -0
- netgen/include/complex_wrapper.hpp +73 -0
- netgen/include/compressedfespace.hpp +110 -0
- netgen/include/contact.hpp +231 -0
- netgen/include/diagonalmatrix.hpp +154 -0
- netgen/include/differentialoperator.hpp +276 -0
- netgen/include/diffop.hpp +1286 -0
- netgen/include/diffop_impl.hpp +326 -0
- netgen/include/discontinuous.hpp +84 -0
- netgen/include/dump.hpp +949 -0
- netgen/include/eigen.hpp +60 -0
- netgen/include/eigensystem.hpp +18 -0
- netgen/include/elasticity_equations.hpp +595 -0
- netgen/include/elementbyelement.hpp +195 -0
- netgen/include/elementtopology.hpp +1760 -0
- netgen/include/elementtransformation.hpp +339 -0
- netgen/include/evalfunc.hpp +405 -0
- netgen/include/expr.hpp +1655 -0
- netgen/include/facetfe.hpp +175 -0
- netgen/include/facetfespace.hpp +178 -0
- netgen/include/facethofe.hpp +111 -0
- netgen/include/facetsurffespace.hpp +112 -0
- netgen/include/fe_interfaces.hpp +32 -0
- netgen/include/fem.hpp +87 -0
- netgen/include/fesconvert.hpp +14 -0
- netgen/include/fespace.hpp +1445 -0
- netgen/include/finiteelement.hpp +286 -0
- netgen/include/globalinterfacespace.hpp +77 -0
- netgen/include/globalspace.hpp +115 -0
- netgen/include/gridfunction.hpp +525 -0
- netgen/include/h1amg.hpp +41 -0
- netgen/include/h1hofe.hpp +188 -0
- netgen/include/h1hofe_impl.hpp +1262 -0
- netgen/include/h1hofefo.hpp +148 -0
- netgen/include/h1hofefo_impl.hpp +185 -0
- netgen/include/h1hofespace.hpp +167 -0
- netgen/include/h1lofe.hpp +1237 -0
- netgen/include/h1lumping.hpp +35 -0
- netgen/include/hcurl_equations.hpp +1352 -0
- netgen/include/hcurlcurlfe.hpp +2221 -0
- netgen/include/hcurlcurlfespace.hpp +78 -0
- netgen/include/hcurlfe.hpp +259 -0
- netgen/include/hcurlfe_utils.hpp +107 -0
- netgen/include/hcurlhdiv_dshape.hpp +857 -0
- netgen/include/hcurlhdivfes.hpp +308 -0
- netgen/include/hcurlhofe.hpp +175 -0
- netgen/include/hcurlhofe_impl.hpp +1871 -0
- netgen/include/hcurlhofespace.hpp +193 -0
- netgen/include/hcurllofe.hpp +1146 -0
- netgen/include/hdiv_equations.hpp +865 -0
- netgen/include/hdivdivfe.hpp +2923 -0
- netgen/include/hdivdivsurfacespace.hpp +76 -0
- netgen/include/hdivfe.hpp +206 -0
- netgen/include/hdivfe_utils.hpp +716 -0
- netgen/include/hdivfes.hpp +75 -0
- netgen/include/hdivhofe.hpp +447 -0
- netgen/include/hdivhofe_impl.hpp +1107 -0
- netgen/include/hdivhofefo.hpp +229 -0
- netgen/include/hdivhofespace.hpp +175 -0
- netgen/include/hdivhosurfacefespace.hpp +106 -0
- netgen/include/hdivlofe.hpp +773 -0
- netgen/include/hidden.hpp +74 -0
- netgen/include/householder.hpp +181 -0
- netgen/include/hypre_ams_precond.hpp +123 -0
- netgen/include/hypre_precond.hpp +73 -0
- netgen/include/integrator.hpp +2024 -0
- netgen/include/integratorcf.hpp +253 -0
- netgen/include/interpolate.hpp +49 -0
- netgen/include/intrule.hpp +2541 -0
- netgen/include/irspace.hpp +49 -0
- netgen/include/jacobi.hpp +136 -0
- netgen/include/l2hofe.hpp +193 -0
- netgen/include/l2hofe_impl.hpp +564 -0
- netgen/include/l2hofefo.hpp +542 -0
- netgen/include/l2hofespace.hpp +344 -0
- netgen/include/la.hpp +38 -0
- netgen/include/linearform.hpp +266 -0
- netgen/include/matrix.hpp +2140 -0
- netgen/include/memusage.hpp +41 -0
- netgen/include/meshaccess.hpp +1358 -0
- netgen/include/mgpre.hpp +204 -0
- netgen/include/mptools.hpp +2145 -0
- netgen/include/multigrid.hpp +42 -0
- netgen/include/multivector.hpp +447 -0
- netgen/include/mumpsinverse.hpp +187 -0
- netgen/include/mycomplex.hpp +361 -0
- netgen/include/ng_lapack.hpp +1661 -0
- netgen/include/ngblas.hpp +1099 -0
- netgen/include/ngs_defines.hpp +30 -0
- netgen/include/ngs_stdcpp_include.hpp +106 -0
- netgen/include/ngs_utils.hpp +121 -0
- netgen/include/ngsobject.hpp +1019 -0
- netgen/include/ngsstream.hpp +113 -0
- netgen/include/ngstd.hpp +72 -0
- netgen/include/nodalhofe.hpp +96 -0
- netgen/include/nodalhofe_impl.hpp +141 -0
- netgen/include/normalfacetfe.hpp +223 -0
- netgen/include/normalfacetfespace.hpp +98 -0
- netgen/include/normalfacetsurfacefespace.hpp +84 -0
- netgen/include/order.hpp +251 -0
- netgen/include/parallel_matrices.hpp +222 -0
- netgen/include/paralleldofs.hpp +340 -0
- netgen/include/parallelngs.hpp +23 -0
- netgen/include/parallelvector.hpp +269 -0
- netgen/include/pardisoinverse.hpp +200 -0
- netgen/include/periodic.hpp +125 -0
- netgen/include/plateaufespace.hpp +25 -0
- netgen/include/pml.hpp +275 -0
- netgen/include/pmltrafo.hpp +631 -0
- netgen/include/postproc.hpp +142 -0
- netgen/include/precomp.hpp +60 -0
- netgen/include/preconditioner.hpp +602 -0
- netgen/include/prolongation.hpp +235 -0
- netgen/include/python_comp.hpp +107 -0
- netgen/include/python_fem.hpp +89 -0
- netgen/include/python_linalg.hpp +58 -0
- netgen/include/python_ngstd.hpp +385 -0
- netgen/include/recursive_pol.hpp +4844 -0
- netgen/include/recursive_pol_tet.hpp +395 -0
- netgen/include/recursive_pol_trig.hpp +492 -0
- netgen/include/reorderedfespace.hpp +81 -0
- netgen/include/sample_sort.hpp +105 -0
- netgen/include/scalarfe.hpp +335 -0
- netgen/include/shapefunction_utils.hpp +113 -0
- netgen/include/simd_complex.hpp +284 -0
- netgen/include/smoother.hpp +253 -0
- netgen/include/solve.hpp +89 -0
- netgen/include/sparsecholesky.hpp +313 -0
- netgen/include/sparsematrix.hpp +1038 -0
- netgen/include/sparsematrix_dyn.hpp +91 -0
- netgen/include/sparsematrix_impl.hpp +920 -0
- netgen/include/special_matrix.hpp +461 -0
- netgen/include/specialelement.hpp +125 -0
- netgen/include/statushandler.hpp +33 -0
- netgen/include/stringops.hpp +12 -0
- netgen/include/superluinverse.hpp +136 -0
- netgen/include/symbolicintegrator.hpp +849 -0
- netgen/include/symmetricmatrix.hpp +144 -0
- netgen/include/tangentialfacetfe.hpp +224 -0
- netgen/include/tangentialfacetfespace.hpp +106 -0
- netgen/include/tensor.hpp +522 -0
- netgen/include/tensorcoefficient.hpp +446 -0
- netgen/include/tensorproductintegrator.hpp +113 -0
- netgen/include/thcurlfe.hpp +128 -0
- netgen/include/thcurlfe_impl.hpp +380 -0
- netgen/include/thdivfe.hpp +80 -0
- netgen/include/thdivfe_impl.hpp +426 -0
- netgen/include/tpdiffop.hpp +461 -0
- netgen/include/tpfes.hpp +133 -0
- netgen/include/tpintrule.hpp +224 -0
- netgen/include/triangular.hpp +465 -0
- netgen/include/tscalarfe.hpp +245 -0
- netgen/include/tscalarfe_impl.hpp +1029 -0
- netgen/include/umfpackinverse.hpp +148 -0
- netgen/include/vector.hpp +1219 -0
- netgen/include/voxelcoefficientfunction.hpp +41 -0
- netgen/include/vtkoutput.hpp +198 -0
- netgen/include/vvector.hpp +208 -0
- netgen/include/webgui.hpp +92 -0
- netgen/libngbla.dylib +0 -0
- netgen/libngcomp.dylib +0 -0
- netgen/libngfem.dylib +0 -0
- netgen/libngla.dylib +0 -0
- netgen/libngsolve.dylib +0 -0
- netgen/libngstd.dylib +0 -0
- ngsolve/__init__.pyi +231 -0
- ngsolve/bla.pyi +1139 -0
- ngsolve/bvp.pyi +32 -0
- ngsolve/cmake/NGSolveConfig.cmake +102 -0
- ngsolve/cmake/ngsolve-targets-release.cmake +69 -0
- ngsolve/cmake/ngsolve-targets.cmake +163 -0
- ngsolve/comp/__init__.pyi +5382 -0
- ngsolve/comp/pml.pyi +89 -0
- ngsolve/config/__init__.py +1 -0
- ngsolve/config/__init__.pyi +43 -0
- ngsolve/config/__main__.py +4 -0
- ngsolve/config/config.py +60 -0
- ngsolve/config/config.pyi +45 -0
- 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/directsolvers.pyi +15 -0
- ngsolve/eigenvalues.pyi +30 -0
- ngsolve/fem.pyi +1707 -0
- ngsolve/krylovspace.pyi +301 -0
- ngsolve/la.pyi +1218 -0
- ngsolve/ngslib.so +0 -0
- ngsolve/ngstd.pyi +58 -0
- ngsolve/nonlinearsolvers.pyi +97 -0
- ngsolve/preconditioners.pyi +6 -0
- ngsolve/solve.pyi +108 -0
- ngsolve/solvers.pyi +14 -0
- ngsolve/timestepping.pyi +27 -0
- ngsolve/timing.pyi +54 -0
- ngsolve/utils.pyi +279 -0
- ngsolve-6.2.2501.post48.dev1.data/data/Netgen.icns +0 -0
- ngsolve-6.2.2501.post48.dev1.data/data/bin/ngscxx +17 -0
- ngsolve-6.2.2501.post48.dev1.data/data/bin/ngsld +13 -0
- ngsolve-6.2.2501.post48.dev1.data/data/bin/ngsolve.tcl +648 -0
- ngsolve-6.2.2501.post48.dev1.data/data/bin/ngspy +2 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/beam.geo +17 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/beam.vol +240 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/chip.in2d +41 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/chip.vol +614 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/coil.geo +12 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/coil.vol +2560 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/coilshield.geo +24 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/coilshield.vol +3179 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/cube.geo +19 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/cube.vol +1832 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/d10_DGdoubleglazing.pde +50 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/d11_chip_nitsche.pde +40 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/d1_square.pde +43 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/d2_chip.pde +35 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/d3_helmholtz.pde +22 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/d4_cube.pde +46 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/d5_beam.pde +74 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/d6_shaft.pde +73 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/d7_coil.pde +50 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/d8_coilshield.pde +49 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/d9_hybridDG.pde +72 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/doubleglazing.in2d +27 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/doubleglazing.vol +737 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/piezo2d40round4.vol.gz +0 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/shaft.geo +73 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/shaft.vol +4291 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/square.in2d +17 -0
- ngsolve-6.2.2501.post48.dev1.data/data/share/ngsolve/square.vol +149 -0
- {ngsolve-6.2.2501.post47.dev1.dist-info → ngsolve-6.2.2501.post48.dev1.dist-info}/METADATA +1 -1
- ngsolve-6.2.2501.post48.dev1.dist-info/RECORD +304 -0
- ngsolve-6.2.2501.post47.dev1.dist-info/RECORD +0 -25
- {ngsolve-6.2.2501.post47.dev1.dist-info → ngsolve-6.2.2501.post48.dev1.dist-info}/LICENSE +0 -0
- {ngsolve-6.2.2501.post47.dev1.dist-info → ngsolve-6.2.2501.post48.dev1.dist-info}/WHEEL +0 -0
- {ngsolve-6.2.2501.post47.dev1.dist-info → ngsolve-6.2.2501.post48.dev1.dist-info}/top_level.txt +0 -0
ngsolve/ngslib.so
ADDED
|
Binary file
|
ngsolve/ngstd.pyi
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
pybind ngstd
|
|
3
|
+
"""
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
import pyngcore.pyngcore
|
|
6
|
+
import typing
|
|
7
|
+
__all__ = ['Archive', 'DummyArgument', 'HeapReset', 'IntRange', 'LocalHeap', 'TestFlagsConversion']
|
|
8
|
+
class Archive:
|
|
9
|
+
def __and__(self, array: pyngcore.pyngcore.Array_I_S) -> Archive:
|
|
10
|
+
...
|
|
11
|
+
def __init__(self, filename: str, write: bool, binary: bool) -> None:
|
|
12
|
+
...
|
|
13
|
+
class DummyArgument:
|
|
14
|
+
def __bool__(self) -> bool:
|
|
15
|
+
...
|
|
16
|
+
def __repr__(self) -> str:
|
|
17
|
+
...
|
|
18
|
+
class HeapReset:
|
|
19
|
+
"""
|
|
20
|
+
stores heap-pointer on init, and resets it on exit
|
|
21
|
+
"""
|
|
22
|
+
def __init__(self, lh: LocalHeap) -> None:
|
|
23
|
+
...
|
|
24
|
+
class IntRange:
|
|
25
|
+
def __contains__(self, arg0: int) -> bool:
|
|
26
|
+
...
|
|
27
|
+
def __init__(self, arg0: int, arg1: int) -> None:
|
|
28
|
+
...
|
|
29
|
+
def __iter__(self) -> typing.Iterator[int]:
|
|
30
|
+
...
|
|
31
|
+
def __str__(self) -> str:
|
|
32
|
+
...
|
|
33
|
+
@property
|
|
34
|
+
def start(self) -> int:
|
|
35
|
+
...
|
|
36
|
+
@property
|
|
37
|
+
def step(self) -> int:
|
|
38
|
+
...
|
|
39
|
+
@property
|
|
40
|
+
def stop(self) -> int:
|
|
41
|
+
...
|
|
42
|
+
class LocalHeap:
|
|
43
|
+
"""
|
|
44
|
+
A heap for fast memory allocation
|
|
45
|
+
"""
|
|
46
|
+
def __init__(self, size: int = 1000000, name: str = 'PyLocalHeap') -> None:
|
|
47
|
+
...
|
|
48
|
+
class _MemoryView:
|
|
49
|
+
def __getstate__(self) -> tuple:
|
|
50
|
+
...
|
|
51
|
+
def __setstate__(self, arg0: tuple) -> None:
|
|
52
|
+
...
|
|
53
|
+
def TestFlagsConversion(flags: pyngcore.pyngcore.Flags) -> None:
|
|
54
|
+
...
|
|
55
|
+
def _PickleMemory(pickler: typing.Any, view: ...) -> None:
|
|
56
|
+
...
|
|
57
|
+
def _UnpickleMemory(unpickler: typing.Any) -> None:
|
|
58
|
+
...
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from math import sqrt
|
|
3
|
+
from netgen import TimeFunction
|
|
4
|
+
from ngsolve.bla import Norm
|
|
5
|
+
from ngsolve.la import InnerProduct
|
|
6
|
+
from ngsolve.la import Projector
|
|
7
|
+
__all__ = ['InnerProduct', 'Newton', 'NewtonMinimization', 'NewtonSolver', 'Norm', 'Projector', 'TimeFunction', 'sqrt']
|
|
8
|
+
class NewtonSolver:
|
|
9
|
+
@staticmethod
|
|
10
|
+
def Solve(*args, **kwargs):
|
|
11
|
+
...
|
|
12
|
+
def SetDirichlet(self, dirichletvalues):
|
|
13
|
+
...
|
|
14
|
+
def _UpdateInverse(self):
|
|
15
|
+
...
|
|
16
|
+
def __init__(self, a, u, rhs = None, freedofs = None, inverse = '', solver = None, lin_solver_cls = None, lin_solver_args = None):
|
|
17
|
+
...
|
|
18
|
+
def Newton(a, u, freedofs = None, maxit = 100, maxerr = 1e-11, inverse = '', dirichletvalues = None, dampfactor = 1, printing = True, callback = None):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
Newton's method for solving non-linear problems of the form A(u)=0.
|
|
22
|
+
|
|
23
|
+
Parameters
|
|
24
|
+
----------
|
|
25
|
+
a : BilinearForm
|
|
26
|
+
The BilinearForm of the non-linear variational problem. It does not have to be assembled.
|
|
27
|
+
|
|
28
|
+
u : GridFunction
|
|
29
|
+
The GridFunction where the solution is saved. The values are used as initial guess for Newton's method.
|
|
30
|
+
|
|
31
|
+
freedofs : BitArray
|
|
32
|
+
The FreeDofs on which the assembled matrix is inverted. If argument is 'None' then the FreeDofs of the underlying FESpace is used.
|
|
33
|
+
|
|
34
|
+
maxit : int
|
|
35
|
+
Number of maximal iteration for Newton. If the maximal number is reached before the maximal error Newton might no converge and a warning is displayed.
|
|
36
|
+
|
|
37
|
+
maxerr : float
|
|
38
|
+
The maximal error which Newton should reach before it stops. The error is computed by the square root of the inner product of the residuum and the correction.
|
|
39
|
+
|
|
40
|
+
inverse : string
|
|
41
|
+
A string of the sparse direct solver which should be solved for inverting the assembled Newton matrix.
|
|
42
|
+
|
|
43
|
+
dampfactor : float
|
|
44
|
+
Set the damping factor for Newton's method. If dampfactor is 1 then no damping is done. If value is < 1 then the damping is done by the formula 'min(1,dampfactor*numit)' for the correction, where 'numit' denotes the Newton iteration.
|
|
45
|
+
|
|
46
|
+
printing : bool
|
|
47
|
+
Set if Newton's method should print informations about the actual iteration like the error.
|
|
48
|
+
|
|
49
|
+
Returns
|
|
50
|
+
-------
|
|
51
|
+
(int, int)
|
|
52
|
+
List of two integers. The first one is 0 if Newton's method did converge, -1 otherwise. The second one gives the number of Newton iterations needed.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
"""
|
|
56
|
+
def NewtonMinimization(a, u, freedofs = None, maxit = 100, maxerr = 1e-11, inverse = '', dampfactor = 1, linesearch = False, printing = True, callback = None):
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
Newton's method for solving non-linear problems of the form A(u)=0 involving energy integrators.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
Parameters
|
|
63
|
+
----------
|
|
64
|
+
a : BilinearForm
|
|
65
|
+
The BilinearForm of the non-linear variational problem. It does not have to be assembled.
|
|
66
|
+
|
|
67
|
+
u : GridFunction
|
|
68
|
+
The GridFunction where the solution is saved. The values are used as initial guess for Newton's method.
|
|
69
|
+
|
|
70
|
+
freedofs : BitArray
|
|
71
|
+
The FreeDofs on which the assembled matrix is inverted. If argument is 'None' then the FreeDofs of the underlying FESpace is used.
|
|
72
|
+
|
|
73
|
+
maxit : int
|
|
74
|
+
Number of maximal iteration for Newton. If the maximal number is reached before the maximal error Newton might no converge and a warning is displayed.
|
|
75
|
+
|
|
76
|
+
maxerr : float
|
|
77
|
+
The maximal error which Newton should reach before it stops. The error is computed by the square root of the inner product of the residuum and the correction.
|
|
78
|
+
|
|
79
|
+
inverse : string
|
|
80
|
+
A string of the sparse direct solver which should be solved for inverting the assembled Newton matrix.
|
|
81
|
+
|
|
82
|
+
dampfactor : float
|
|
83
|
+
Set the damping factor for Newton's method. If dampfactor is 1 then no damping is done. If value is < 1 then the damping is done by the formula 'min(1,dampfactor*numit)' for the correction, where 'numit' denotes the Newton iteration.
|
|
84
|
+
|
|
85
|
+
linesearch : bool
|
|
86
|
+
If True then linesearch is used to guarantee that the energy decreases in every Newton iteration.
|
|
87
|
+
|
|
88
|
+
printing : bool
|
|
89
|
+
Set if Newton's method should print informations about the actual iteration like the error.
|
|
90
|
+
|
|
91
|
+
Returns
|
|
92
|
+
-------
|
|
93
|
+
(int, int)
|
|
94
|
+
List of two integers. The first one is 0 if Newton's method did converge, -1 otherwise. The second one gives the number of Newton iterations needed.
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from ngsolve.comp import BDDCPreconditioner as BDDC
|
|
3
|
+
from ngsolve.comp import HCurlAMG
|
|
4
|
+
from ngsolve.comp import LocalPreconditioner as Local
|
|
5
|
+
from ngsolve.comp import MultiGridPreconditioner as MultiGrid
|
|
6
|
+
__all__ = ['BDDC', 'HCurlAMG', 'Local', 'MultiGrid']
|
ngsolve/solve.pyi
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""
|
|
2
|
+
pybind solve
|
|
3
|
+
"""
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
import ngsolve.comp
|
|
6
|
+
import ngsolve.fem
|
|
7
|
+
import typing
|
|
8
|
+
__all__ = ['Draw', 'SetVisualization', 'Tcl_Eval']
|
|
9
|
+
@typing.overload
|
|
10
|
+
def Draw(cf: ngsolve.fem.CoefficientFunction, mesh: ngsolve.comp.Mesh, name: str, sd: int = 2, autoscale: bool = True, min: float = 0.0, max: float = 1.0, draw_vol: bool = True, draw_surf: bool = True, reset: bool = False, title: str = '', number_format: str = '%.3e', unit: str = '', **kwargs) -> None:
|
|
11
|
+
"""
|
|
12
|
+
Parameters:
|
|
13
|
+
|
|
14
|
+
cf : ngsolve.comp.CoefficientFunction
|
|
15
|
+
input CoefficientFunction to draw
|
|
16
|
+
|
|
17
|
+
mesh : ngsolve.comp.Mesh
|
|
18
|
+
input mesh
|
|
19
|
+
|
|
20
|
+
name : string
|
|
21
|
+
input name
|
|
22
|
+
|
|
23
|
+
sd : int
|
|
24
|
+
input subdivisions
|
|
25
|
+
|
|
26
|
+
autoscale : bool
|
|
27
|
+
input autscale
|
|
28
|
+
|
|
29
|
+
min : float
|
|
30
|
+
input minimum value. Need autoscale = false
|
|
31
|
+
|
|
32
|
+
max : float
|
|
33
|
+
input maximum value. Need autoscale = false
|
|
34
|
+
|
|
35
|
+
draw_vol : bool
|
|
36
|
+
input draw volume
|
|
37
|
+
|
|
38
|
+
draw_surf : bool
|
|
39
|
+
input draw surface
|
|
40
|
+
|
|
41
|
+
title : string
|
|
42
|
+
printed on top of colormap
|
|
43
|
+
|
|
44
|
+
number_format : string
|
|
45
|
+
printf-style format string for numbers under colormap
|
|
46
|
+
|
|
47
|
+
unit : string
|
|
48
|
+
string (ASCII only) to print after maximum value of colormap
|
|
49
|
+
"""
|
|
50
|
+
@typing.overload
|
|
51
|
+
def Draw(gf: ngsolve.comp.GridFunction, sd: int = 2, autoscale: bool = True, min: float = 0.0, max: float = 1.0, **kwargs) -> None:
|
|
52
|
+
"""
|
|
53
|
+
Parameters:
|
|
54
|
+
|
|
55
|
+
gf : ngsolve.comp.GridFunction
|
|
56
|
+
input GridFunction to draw
|
|
57
|
+
|
|
58
|
+
sd : int
|
|
59
|
+
input subdivisions
|
|
60
|
+
|
|
61
|
+
autoscale : bool
|
|
62
|
+
input autscale
|
|
63
|
+
|
|
64
|
+
min : float
|
|
65
|
+
input minimum value. Need autoscale = false
|
|
66
|
+
|
|
67
|
+
max : float
|
|
68
|
+
input maximum value. Need autoscale = false
|
|
69
|
+
"""
|
|
70
|
+
@typing.overload
|
|
71
|
+
def Draw(mesh: ngsolve.comp.Mesh, **kwargs) -> None:
|
|
72
|
+
...
|
|
73
|
+
@typing.overload
|
|
74
|
+
def Draw(arg0: typing.Any) -> None:
|
|
75
|
+
...
|
|
76
|
+
def SetVisualization(deformation: bool | None = None, min: float | None = None, max: float | None = None, clipnormal: tuple | None = None, clipping: bool | None = None) -> None:
|
|
77
|
+
"""
|
|
78
|
+
Set visualization options
|
|
79
|
+
|
|
80
|
+
Parameters:
|
|
81
|
+
|
|
82
|
+
deformation : object
|
|
83
|
+
input deformation
|
|
84
|
+
|
|
85
|
+
min : object
|
|
86
|
+
input min
|
|
87
|
+
|
|
88
|
+
max : object
|
|
89
|
+
input max
|
|
90
|
+
|
|
91
|
+
clipnormal : object
|
|
92
|
+
input clipnormal
|
|
93
|
+
|
|
94
|
+
clipping : object
|
|
95
|
+
input clipping
|
|
96
|
+
"""
|
|
97
|
+
def Tcl_Eval(arg0: str) -> None:
|
|
98
|
+
...
|
|
99
|
+
def _GetFacetValues(arg0: ngsolve.fem.CoefficientFunction, arg1: ngsolve.comp.Mesh, arg2: dict[ngsolve.fem.ET, ngsolve.fem.IntegrationRule]) -> dict:
|
|
100
|
+
...
|
|
101
|
+
def _GetValues(arg0: ngsolve.fem.CoefficientFunction, arg1: ngsolve.comp.Mesh, arg2: ngsolve.comp.VorB, arg3: dict[ngsolve.fem.ET, ngsolve.fem.IntegrationRule], arg4: bool) -> dict:
|
|
102
|
+
...
|
|
103
|
+
def _GetVisualizationData(arg0: ngsolve.comp.Mesh, arg1: dict[ngsolve.fem.ET, ngsolve.fem.IntegrationRule]) -> dict:
|
|
104
|
+
...
|
|
105
|
+
def _SetLocale() -> None:
|
|
106
|
+
...
|
|
107
|
+
def __Cleanup() -> None:
|
|
108
|
+
...
|
ngsolve/solvers.pyi
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from ngsolve.bvp import BVP
|
|
3
|
+
from ngsolve.directsolvers import SuperLU
|
|
4
|
+
from ngsolve.eigenvalues import LOBPCG
|
|
5
|
+
from ngsolve.eigenvalues import PINVIT
|
|
6
|
+
from ngsolve.krylovspace import CG
|
|
7
|
+
from ngsolve.krylovspace import CGSolver
|
|
8
|
+
from ngsolve.krylovspace import GMRes
|
|
9
|
+
from ngsolve.krylovspace import MinRes
|
|
10
|
+
from ngsolve.krylovspace import PreconditionedRichardson
|
|
11
|
+
from ngsolve.krylovspace import QMR
|
|
12
|
+
from ngsolve.nonlinearsolvers import Newton
|
|
13
|
+
from ngsolve.nonlinearsolvers import NewtonMinimization
|
|
14
|
+
__all__ = ['BVP', 'CG', 'CGSolver', 'GMRes', 'LOBPCG', 'MinRes', 'Newton', 'NewtonMinimization', 'PINVIT', 'PreconditionedRichardson', 'QMR', 'SuperLU']
|
ngsolve/timestepping.pyi
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
import ngsolve as ngs
|
|
3
|
+
import ngsolve.comp
|
|
4
|
+
import ngsolve.fem
|
|
5
|
+
import ngsolve.krylovspace
|
|
6
|
+
__all__ = ['CrankNicolson', 'ImplicitEuler', 'Newmark', 'ngs']
|
|
7
|
+
class CrankNicolson:
|
|
8
|
+
def Integrate(self, u_start: ngsolve.comp.GridFunction, end_time: float, start_time: typing.Optional[float] = None, newton_args: typing.Optional[dict] = None, callback: typing.Optional[typing.Callable] = None):
|
|
9
|
+
...
|
|
10
|
+
def Step(self, u: ngsolve.comp.GridFunction, dt: typing.Optional[float] = None, newton_args: typing.Optional[dict] = None):
|
|
11
|
+
...
|
|
12
|
+
def __init__(self, equation: ngsolve.comp.SumOfIntegrals, dt: typing.Union[float, ngsolve.fem.Parameter], time: ngsolve.fem.Parameter = ..., pc_cls: typing.Type = ngsolve.comp.MultiGridPreconditioner, pc_args: typing.Optional[dict] = None, lin_solver_cls: typing.Type = ngsolve.krylovspace.CGSolver, lin_solver_args: typing.Optional[dict] = None):
|
|
13
|
+
...
|
|
14
|
+
class ImplicitEuler:
|
|
15
|
+
def Integrate(self, u_start: ngsolve.comp.GridFunction, end_time: float, start_time: typing.Optional[float] = None, newton_args: typing.Optional[dict] = None, callback: typing.Optional[typing.Callable] = None):
|
|
16
|
+
...
|
|
17
|
+
def Step(self, u: ngsolve.comp.GridFunction, dt: typing.Optional[float] = None, newton_args: typing.Optional[dict] = None):
|
|
18
|
+
...
|
|
19
|
+
def __init__(self, equation: ngsolve.comp.SumOfIntegrals, dt: typing.Union[float, ngsolve.fem.Parameter], time: ngsolve.fem.Parameter = ..., pc_cls: typing.Type = ngsolve.comp.MultiGridPreconditioner, pc_args: typing.Optional[dict] = None, lin_solver_cls: typing.Type = ngsolve.krylovspace.CGSolver, lin_solver_args: typing.Optional[dict] = None):
|
|
20
|
+
...
|
|
21
|
+
class Newmark:
|
|
22
|
+
def Integrate(self, u: ngsolve.comp.GridFunction, end_time: float, v: typing.Optional[ngsolve.comp.GridFunction] = None, a: typing.Optional[ngsolve.comp.GridFunction] = None, start_time: typing.Optional[float] = None, newton_args: typing.Optional[dict] = None, callback: typing.Optional[typing.Callable] = None):
|
|
23
|
+
...
|
|
24
|
+
def Step(self, u: ngsolve.comp.GridFunction, v: ngsolve.comp.GridFunction, a: ngsolve.comp.GridFunction, dt: typing.Optional[float] = None, newton_args: typing.Optional[dict] = None):
|
|
25
|
+
...
|
|
26
|
+
def __init__(self, equation: ngsolve.comp.SumOfIntegrals, dt: typing.Union[float, ngsolve.fem.Parameter], time: ngsolve.fem.Parameter = ..., pc_cls: typing.Type = ngsolve.comp.MultiGridPreconditioner, pc_args: typing.Optional[dict] = None, lin_solver_cls: typing.Type = ngsolve.krylovspace.CGSolver, lin_solver_args: typing.Optional[dict] = None):
|
|
27
|
+
...
|
ngsolve/timing.pyi
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
import os as os
|
|
3
|
+
import pickle as pickle
|
|
4
|
+
from pyngcore.pyngcore import TaskManager
|
|
5
|
+
__all__: list = ['Timing']
|
|
6
|
+
class Timing:
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
Class for timing analysis of performance critical functions. Some
|
|
10
|
+
classes export a C++ function as __timing__, which returns a map
|
|
11
|
+
of performance critical parts with their timings. The class can save
|
|
12
|
+
these maps, load them and compare them. It can be saved as a benchmark
|
|
13
|
+
to be compared against.
|
|
14
|
+
|
|
15
|
+
2 overloaded __init__ functions:
|
|
16
|
+
|
|
17
|
+
1. __init__(name,obj,parallel=True,serial=True)
|
|
18
|
+
2. __init__(filename)
|
|
19
|
+
|
|
20
|
+
Parameters
|
|
21
|
+
----------
|
|
22
|
+
|
|
23
|
+
name (str): Name for the timed class (for output formatting and
|
|
24
|
+
saving/loading of results)
|
|
25
|
+
obj (NGSolve object): Some NGSolve class which has the __timing__
|
|
26
|
+
functionality implemented. Currently supported classes:
|
|
27
|
+
FESpace
|
|
28
|
+
filename (str): Filename to load a previously saved Timing
|
|
29
|
+
parallel (bool=True): Time in parallel (using TaskManager)
|
|
30
|
+
serial (bool=True): Time not in parallel (not using TaskManager)
|
|
31
|
+
|
|
32
|
+
"""
|
|
33
|
+
def CompareTo(self, folder):
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
Compares the timing with the one saved in folder 'folder' with filename
|
|
37
|
+
'name.dat'.
|
|
38
|
+
"""
|
|
39
|
+
def CompareToBenchmark(self):
|
|
40
|
+
"""
|
|
41
|
+
Compares the timing with the one stored as benchmark
|
|
42
|
+
"""
|
|
43
|
+
def Save(self, folder):
|
|
44
|
+
"""
|
|
45
|
+
Saves the pickled results in folder 'folder'
|
|
46
|
+
"""
|
|
47
|
+
def SaveBenchmark(self):
|
|
48
|
+
"""
|
|
49
|
+
Makes the timing the new benchmark for that object.
|
|
50
|
+
"""
|
|
51
|
+
def __init__(self, name = None, obj = None, filename = None, parallel = True, serial = True):
|
|
52
|
+
...
|
|
53
|
+
def __str__(self):
|
|
54
|
+
...
|
ngsolve/utils.pyi
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from netgen import TimeFunction
|
|
3
|
+
from ngsolve.bla import Norm
|
|
4
|
+
import ngsolve.comp
|
|
5
|
+
from ngsolve.comp import APhiHCurlAMG
|
|
6
|
+
from ngsolve.comp import Array_N6ngcomp13COUPLING_TYPEE_S
|
|
7
|
+
from ngsolve.comp import BDDCPreconditioner
|
|
8
|
+
from ngsolve.comp import BDDCPreconditioner_complex
|
|
9
|
+
from ngsolve.comp import BDDCPreconditioner_double
|
|
10
|
+
from ngsolve.comp import BilinearForm
|
|
11
|
+
from ngsolve.comp import BndElementId
|
|
12
|
+
from ngsolve.comp import BoundaryFromVolumeCF
|
|
13
|
+
from ngsolve.comp import COUPLING_TYPE
|
|
14
|
+
from ngsolve.comp import ComponentGridFunction
|
|
15
|
+
from ngsolve.comp import Compress
|
|
16
|
+
from ngsolve.comp import CompressCompound
|
|
17
|
+
from ngsolve.comp import ContactBoundary
|
|
18
|
+
from ngsolve.comp import ConvertOperator
|
|
19
|
+
from ngsolve.comp import DifferentialSymbol
|
|
20
|
+
from ngsolve.comp import Discontinuous
|
|
21
|
+
from ngsolve.comp import DualProxyFunction
|
|
22
|
+
from ngsolve.comp import ElementId
|
|
23
|
+
from ngsolve.comp import ElementRange
|
|
24
|
+
from ngsolve.comp import FESpace
|
|
25
|
+
from ngsolve.comp import FESpaceElement
|
|
26
|
+
from ngsolve.comp import FESpaceElementRange
|
|
27
|
+
from ngsolve.comp import FacetFESpace
|
|
28
|
+
from ngsolve.comp import FacetSurface
|
|
29
|
+
from ngsolve.comp import FlatArray_N6ngcomp13COUPLING_TYPEE_S
|
|
30
|
+
from ngsolve.comp import FromArchiveCF
|
|
31
|
+
from ngsolve.comp import FromArchiveFESpace
|
|
32
|
+
from ngsolve.comp import FromArchiveMesh
|
|
33
|
+
from ngsolve.comp import GlobalInterfaceSpace
|
|
34
|
+
from ngsolve.comp import GlobalSpace
|
|
35
|
+
from ngsolve.comp import GlobalVariables
|
|
36
|
+
from ngsolve.comp import GridFunction
|
|
37
|
+
from ngsolve.comp import GridFunctionC
|
|
38
|
+
from ngsolve.comp import GridFunctionCoefficientFunction
|
|
39
|
+
from ngsolve.comp import GridFunctionD
|
|
40
|
+
from ngsolve.comp import H1
|
|
41
|
+
from ngsolve.comp import H1LumpingFESpace
|
|
42
|
+
from ngsolve.comp import HCurl
|
|
43
|
+
from ngsolve.comp import HCurlAMG
|
|
44
|
+
from ngsolve.comp import HCurlCurl
|
|
45
|
+
from ngsolve.comp import HCurlDiv
|
|
46
|
+
from ngsolve.comp import HDiv
|
|
47
|
+
from ngsolve.comp import HDivDiv
|
|
48
|
+
from ngsolve.comp import HDivDivSurface
|
|
49
|
+
from ngsolve.comp import HDivSurface
|
|
50
|
+
from ngsolve.comp import Hidden
|
|
51
|
+
from ngsolve.comp import Hidden as PrivateSpace
|
|
52
|
+
from ngsolve.comp import Integral
|
|
53
|
+
from ngsolve.comp import Integrate
|
|
54
|
+
from ngsolve.comp import IntegrationRuleSpace
|
|
55
|
+
from ngsolve.comp import IntegrationRuleSpaceSurface
|
|
56
|
+
from ngsolve.comp import Interpolate
|
|
57
|
+
from ngsolve.comp import InterpolateProxy
|
|
58
|
+
from ngsolve.comp import KSpaceCoeffs
|
|
59
|
+
from ngsolve.comp import L2
|
|
60
|
+
from ngsolve.comp import LinearForm
|
|
61
|
+
from ngsolve.comp import LocalPreconditioner
|
|
62
|
+
from ngsolve.comp import MatrixFreeOperator
|
|
63
|
+
from ngsolve.comp import MatrixValued
|
|
64
|
+
from ngsolve.comp import Mesh
|
|
65
|
+
from ngsolve.comp import MeshNode
|
|
66
|
+
from ngsolve.comp import MeshNodeRange
|
|
67
|
+
from ngsolve.comp import MultiGridPreconditioner
|
|
68
|
+
from ngsolve.comp import NGS_Object
|
|
69
|
+
from ngsolve.comp import Ngs_Element
|
|
70
|
+
from ngsolve.comp import NodalFESpace
|
|
71
|
+
from ngsolve.comp import NodeId
|
|
72
|
+
from ngsolve.comp import NodeRange
|
|
73
|
+
from ngsolve.comp import NormalFacetFESpace
|
|
74
|
+
from ngsolve.comp import NormalFacetSurface
|
|
75
|
+
from ngsolve.comp import NumberSpace
|
|
76
|
+
from ngsolve.comp import ORDER_POLICY
|
|
77
|
+
from ngsolve.comp import PatchwiseSolve
|
|
78
|
+
from ngsolve.comp import Periodic
|
|
79
|
+
from ngsolve.comp import PlateauFESpace
|
|
80
|
+
from ngsolve.comp import Preconditioner
|
|
81
|
+
from ngsolve.comp import ProductSpace
|
|
82
|
+
from ngsolve.comp import Prolongate
|
|
83
|
+
from ngsolve.comp import ProlongateCoefficientFunction
|
|
84
|
+
from ngsolve.comp import Prolongation
|
|
85
|
+
from ngsolve.comp import ProxyFunction
|
|
86
|
+
from ngsolve.comp import QuasiPeriodicC
|
|
87
|
+
from ngsolve.comp import QuasiPeriodicD
|
|
88
|
+
from ngsolve.comp import Region
|
|
89
|
+
from ngsolve.comp import RegisterPreconditioner
|
|
90
|
+
from ngsolve.comp import Reorder
|
|
91
|
+
from ngsolve.comp import SetHeapSize
|
|
92
|
+
from ngsolve.comp import SetTestoutFile
|
|
93
|
+
from ngsolve.comp import SumOfIntegrals
|
|
94
|
+
from ngsolve.comp import SurfaceL2
|
|
95
|
+
from ngsolve.comp import SymbolTable_D
|
|
96
|
+
from ngsolve.comp import SymbolTable_sp_D
|
|
97
|
+
from ngsolve.comp import SymbolTable_sp_N5ngfem19CoefficientFunctionE
|
|
98
|
+
from ngsolve.comp import SymbolTable_sp_N6ngcomp10LinearFormE
|
|
99
|
+
from ngsolve.comp import SymbolTable_sp_N6ngcomp12BilinearFormE
|
|
100
|
+
from ngsolve.comp import SymbolTable_sp_N6ngcomp12GridFunctionE
|
|
101
|
+
from ngsolve.comp import SymbolTable_sp_N6ngcomp14PreconditionerE
|
|
102
|
+
from ngsolve.comp import SymbolTable_sp_N6ngcomp7FESpaceE
|
|
103
|
+
from ngsolve.comp import SymbolicBFI
|
|
104
|
+
from ngsolve.comp import SymbolicEnergy
|
|
105
|
+
from ngsolve.comp import SymbolicLFI
|
|
106
|
+
from ngsolve.comp import SymbolicTPBFI
|
|
107
|
+
from ngsolve.comp import TangentialFacetFESpace
|
|
108
|
+
from ngsolve.comp import TangentialSurfaceL2
|
|
109
|
+
from ngsolve.comp import TensorProductFESpace
|
|
110
|
+
from ngsolve.comp import TensorProductIntegrate
|
|
111
|
+
from ngsolve.comp import ToArchive
|
|
112
|
+
from ngsolve.comp import Transfer2StdMesh
|
|
113
|
+
from ngsolve.comp import VTKOutput
|
|
114
|
+
from ngsolve.comp import Variation
|
|
115
|
+
from ngsolve.comp import VectorFacetFESpace
|
|
116
|
+
from ngsolve.comp import VectorFacetSurface
|
|
117
|
+
from ngsolve.comp import VectorH1
|
|
118
|
+
from ngsolve.comp import VectorL2
|
|
119
|
+
from ngsolve.comp import VectorNodalFESpace
|
|
120
|
+
from ngsolve.comp import VectorSurfaceL2
|
|
121
|
+
from ngsolve.comp import VectorValued
|
|
122
|
+
from ngsolve.comp import VorB
|
|
123
|
+
from ngsolve.comp import pml
|
|
124
|
+
import ngsolve.fem
|
|
125
|
+
from ngsolve.fem import BFI
|
|
126
|
+
from ngsolve.fem import BSpline
|
|
127
|
+
from ngsolve.fem import BSpline2D
|
|
128
|
+
from ngsolve.fem import BaseMappedIntegrationPoint
|
|
129
|
+
from ngsolve.fem import BlockBFI
|
|
130
|
+
from ngsolve.fem import BlockLFI
|
|
131
|
+
from ngsolve.fem import CacheCF
|
|
132
|
+
from ngsolve.fem import CoefficientFunction
|
|
133
|
+
from ngsolve.fem import Cof
|
|
134
|
+
from ngsolve.fem import CompilePythonModule
|
|
135
|
+
from ngsolve.fem import CompoundBFI
|
|
136
|
+
from ngsolve.fem import CompoundLFI
|
|
137
|
+
from ngsolve.fem import Conj
|
|
138
|
+
from ngsolve.fem import CoordCF
|
|
139
|
+
from ngsolve.fem import CoordinateTrafo
|
|
140
|
+
from ngsolve.fem import Cross
|
|
141
|
+
from ngsolve.fem import Det
|
|
142
|
+
from ngsolve.fem import DifferentialOperator
|
|
143
|
+
from ngsolve.fem import ET
|
|
144
|
+
from ngsolve.fem import Einsum
|
|
145
|
+
from ngsolve.fem import ElementTopology
|
|
146
|
+
from ngsolve.fem import ElementTransformation
|
|
147
|
+
from ngsolve.fem import FiniteElement
|
|
148
|
+
from ngsolve.fem import GenerateL2ElementCode
|
|
149
|
+
from ngsolve.fem import H1FE
|
|
150
|
+
from ngsolve.fem import HCurlFE
|
|
151
|
+
from ngsolve.fem import HDivDivFE
|
|
152
|
+
from ngsolve.fem import HDivFE
|
|
153
|
+
from ngsolve.fem import Id
|
|
154
|
+
from ngsolve.fem import IfPos
|
|
155
|
+
from ngsolve.fem import IntegrationPoint
|
|
156
|
+
from ngsolve.fem import IntegrationRule
|
|
157
|
+
from ngsolve.fem import Inv
|
|
158
|
+
from ngsolve.fem import L2FE
|
|
159
|
+
from ngsolve.fem import LFI
|
|
160
|
+
from ngsolve.fem import LeviCivitaSymbol
|
|
161
|
+
from ngsolve.fem import LoggingCF
|
|
162
|
+
from ngsolve.fem import MeshPoint
|
|
163
|
+
from ngsolve.fem import MinimizationCF
|
|
164
|
+
from ngsolve.fem import MixedFE
|
|
165
|
+
from ngsolve.fem import NODE_TYPE
|
|
166
|
+
from ngsolve.fem import NewtonCF
|
|
167
|
+
from ngsolve.fem import Parameter
|
|
168
|
+
from ngsolve.fem import ParameterC
|
|
169
|
+
from ngsolve.fem import PlaceholderCF
|
|
170
|
+
from ngsolve.fem import PointEvaluationFunctional
|
|
171
|
+
from ngsolve.fem import RegularMLMultiPoleCF
|
|
172
|
+
from ngsolve.fem import RegularMultiPoleCF
|
|
173
|
+
from ngsolve.fem import ScalarFE
|
|
174
|
+
from ngsolve.fem import SetPMLParameters
|
|
175
|
+
from ngsolve.fem import SingularMLMP
|
|
176
|
+
from ngsolve.fem import SingularMLMultiPoleCF
|
|
177
|
+
from ngsolve.fem import SingularMultiPoleCF
|
|
178
|
+
from ngsolve.fem import Skew
|
|
179
|
+
from ngsolve.fem import SpecialCFCreator
|
|
180
|
+
from ngsolve.fem import SphericalHarmonicsCF
|
|
181
|
+
from ngsolve.fem import Sphericalharmonics
|
|
182
|
+
from ngsolve.fem import Sym
|
|
183
|
+
from ngsolve.fem import Trace
|
|
184
|
+
from ngsolve.fem import VoxelCoefficient
|
|
185
|
+
from ngsolve.fem import Zero
|
|
186
|
+
from ngsolve.fem import acos
|
|
187
|
+
from ngsolve.fem import asin
|
|
188
|
+
from ngsolve.fem import atan
|
|
189
|
+
from ngsolve.fem import atan2
|
|
190
|
+
from ngsolve.fem import ceil
|
|
191
|
+
from ngsolve.fem import cos
|
|
192
|
+
from ngsolve.fem import cosh
|
|
193
|
+
from ngsolve.fem import erf
|
|
194
|
+
from ngsolve.fem import exp
|
|
195
|
+
from ngsolve.fem import floor
|
|
196
|
+
from ngsolve.fem import log
|
|
197
|
+
from ngsolve.fem import pow
|
|
198
|
+
from ngsolve.fem import sin
|
|
199
|
+
from ngsolve.fem import sinh
|
|
200
|
+
from ngsolve.fem import sqrt
|
|
201
|
+
from ngsolve.fem import tan
|
|
202
|
+
from ngsolve.ngstd import IntRange
|
|
203
|
+
from pyngcore.pyngcore import Timer
|
|
204
|
+
__all__ = ['APhiHCurlAMG', 'Array_N6ngcomp13COUPLING_TYPEE_S', 'BBBND', 'BBND', 'BDDCPreconditioner', 'BDDCPreconditioner_complex', 'BDDCPreconditioner_double', 'BFI', 'BND', 'BSpline', 'BSpline2D', 'BaseMappedIntegrationPoint', 'BilinearForm', 'BlockBFI', 'BlockLFI', 'BndElementId', 'BoundaryFromVolumeCF', 'CELL', 'COUPLING_TYPE', 'CacheCF', 'CoefficientFunction', 'Cof', 'CompilePythonModule', 'ComponentGridFunction', 'CompoundBFI', 'CompoundLFI', 'Compress', 'CompressCompound', 'Conj', 'ConstantCF', 'ContactBoundary', 'ConvertOperator', 'CoordCF', 'CoordinateTrafo', 'Cross', 'Det', 'Deviator', 'DifferentialOperator', 'DifferentialSymbol', 'Discontinuous', 'DomainConstantCF', 'DualProxyFunction', 'EDGE', 'ELEMENT', 'ET', 'Einsum', 'ElementId', 'ElementRange', 'ElementTopology', 'ElementTransformation', 'FACE', 'FACET', 'FESpace', 'FESpaceElement', 'FESpaceElementRange', 'FacetFESpace', 'FacetSurface', 'FiniteElement', 'FlatArray_N6ngcomp13COUPLING_TYPEE_S', 'FromArchiveCF', 'FromArchiveFESpace', 'FromArchiveMesh', 'GenerateL2ElementCode', 'GlobalInterfaceSpace', 'GlobalSpace', 'GlobalVariables', 'Grad', 'GridFunction', 'GridFunctionC', 'GridFunctionCoefficientFunction', 'GridFunctionD', 'H1', 'H1FE', 'H1LumpingFESpace', 'HCurl', 'HCurlAMG', 'HCurlCurl', 'HCurlDiv', 'HCurlFE', 'HDiv', 'HDivDiv', 'HDivDivFE', 'HDivDivSurface', 'HDivFE', 'HDivSurface', 'HEX', 'Hidden', 'Id', 'IfPos', 'IntRange', 'Integral', 'Integrate', 'IntegrationPoint', 'IntegrationRule', 'IntegrationRuleSpace', 'IntegrationRuleSpaceSurface', 'Interpolate', 'InterpolateProxy', 'Inv', 'KSpaceCoeffs', 'L2', 'L2FE', 'LFI', 'Laplace', 'LeviCivitaSymbol', 'LinearForm', 'LocalPreconditioner', 'LoggingCF', 'Mass', 'MatrixFreeOperator', 'MatrixValued', 'Mesh', 'MeshNode', 'MeshNodeRange', 'MeshPoint', 'MinimizationCF', 'MixedFE', 'MultiGridPreconditioner', 'NGS_Object', 'NODE_TYPE', 'Neumann', 'NewtonCF', 'Ngs_Element', 'NodalFESpace', 'NodeId', 'NodeRange', 'Norm', 'NormalFacetFESpace', 'NormalFacetSurface', 'Normalize', 'NumberSpace', 'ORDER_POLICY', 'OuterProduct', 'POINT', 'PRISM', 'PYRAMID', 'Parameter', 'ParameterC', 'PatchwiseSolve', 'Periodic', 'PlaceholderCF', 'PlateauFESpace', 'PointEvaluationFunctional', 'Preconditioner', 'PrivateSpace', 'ProductSpace', 'Prolongate', 'ProlongateCoefficientFunction', 'Prolongation', 'ProxyFunction', 'PyCof', 'PyCross', 'PyDet', 'PyId', 'PyInv', 'PySkew', 'PySym', 'PyTrace', 'QUAD', 'QuasiPeriodicC', 'QuasiPeriodicD', 'Region', 'RegisterPreconditioner', 'RegularMLMultiPoleCF', 'RegularMultiPoleCF', 'Reorder', 'SEGM', 'ScalarFE', 'SetHeapSize', 'SetPMLParameters', 'SetTestoutFile', 'SingularMLMP', 'SingularMLMultiPoleCF', 'SingularMultiPoleCF', 'Skew', 'Source', 'SpecialCFCreator', 'SphericalHarmonicsCF', 'Sphericalharmonics', 'SumOfIntegrals', 'SurfaceL2', 'Sym', 'SymbolTable_D', 'SymbolTable_sp_D', 'SymbolTable_sp_N5ngfem19CoefficientFunctionE', 'SymbolTable_sp_N6ngcomp10LinearFormE', 'SymbolTable_sp_N6ngcomp12BilinearFormE', 'SymbolTable_sp_N6ngcomp12GridFunctionE', 'SymbolTable_sp_N6ngcomp14PreconditionerE', 'SymbolTable_sp_N6ngcomp7FESpaceE', 'SymbolicBFI', 'SymbolicEnergy', 'SymbolicLFI', 'SymbolicTPBFI', 'TET', 'TRIG', 'TangentialFacetFESpace', 'TangentialSurfaceL2', 'TensorProductFESpace', 'TensorProductIntegrate', 'TimeFunction', 'Timer', 'ToArchive', 'Trace', 'Transfer2StdMesh', 'VERTEX', 'VOL', 'VTKOutput', 'Variation', 'VectorFacet', 'VectorFacetFESpace', 'VectorFacetSurface', 'VectorH1', 'VectorL2', 'VectorNodalFESpace', 'VectorSurfaceL2', 'VectorValued', 'VorB', 'VoxelCoefficient', 'Zero', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'curl', 'div', 'ds', 'dt', 'dx', 'erf', 'exp', 'floor', 'grad', 'log', 'ngsglobals', 'pml', 'pow', 'printonce', 'sin', 'sinh', 'specialcf', 'sqrt', 'tan', 'x', 'y', 'z']
|
|
205
|
+
def ConstantCF(val):
|
|
206
|
+
...
|
|
207
|
+
def Deviator(mat):
|
|
208
|
+
...
|
|
209
|
+
def DomainConstantCF(values):
|
|
210
|
+
...
|
|
211
|
+
def Grad(func):
|
|
212
|
+
"""
|
|
213
|
+
Jacobi-matrix
|
|
214
|
+
"""
|
|
215
|
+
def Laplace(coef):
|
|
216
|
+
...
|
|
217
|
+
def Mass(coef):
|
|
218
|
+
...
|
|
219
|
+
def Neumann(coef):
|
|
220
|
+
...
|
|
221
|
+
def Normalize(v):
|
|
222
|
+
...
|
|
223
|
+
def OuterProduct(a, b):
|
|
224
|
+
...
|
|
225
|
+
def PyCof(m):
|
|
226
|
+
...
|
|
227
|
+
def PyCross(a, b):
|
|
228
|
+
...
|
|
229
|
+
def PyDet(mat):
|
|
230
|
+
...
|
|
231
|
+
def PyId(dim):
|
|
232
|
+
...
|
|
233
|
+
def PyInv(m):
|
|
234
|
+
...
|
|
235
|
+
def PySkew(m):
|
|
236
|
+
...
|
|
237
|
+
def PySym(m):
|
|
238
|
+
...
|
|
239
|
+
def PyTrace(mat):
|
|
240
|
+
...
|
|
241
|
+
def Source(coef):
|
|
242
|
+
...
|
|
243
|
+
def VectorFacet(mesh, **args):
|
|
244
|
+
...
|
|
245
|
+
def curl(func):
|
|
246
|
+
...
|
|
247
|
+
def div(func):
|
|
248
|
+
...
|
|
249
|
+
def dt(u):
|
|
250
|
+
...
|
|
251
|
+
def grad(func):
|
|
252
|
+
...
|
|
253
|
+
def printonce(*args):
|
|
254
|
+
...
|
|
255
|
+
BBBND: ngsolve.comp.VorB # value = <VorB.BBBND: 3>
|
|
256
|
+
BBND: ngsolve.comp.VorB # value = <VorB.BBND: 2>
|
|
257
|
+
BND: ngsolve.comp.VorB # value = <VorB.BND: 1>
|
|
258
|
+
CELL: ngsolve.fem.NODE_TYPE # value = <NODE_TYPE.CELL: 3>
|
|
259
|
+
EDGE: ngsolve.fem.NODE_TYPE # value = <NODE_TYPE.EDGE: 1>
|
|
260
|
+
ELEMENT: ngsolve.fem.NODE_TYPE # value = <NODE_TYPE.ELEMENT: 4>
|
|
261
|
+
FACE: ngsolve.fem.NODE_TYPE # value = <NODE_TYPE.FACE: 2>
|
|
262
|
+
FACET: ngsolve.fem.NODE_TYPE # value = <NODE_TYPE.FACET: 5>
|
|
263
|
+
HEX: ngsolve.fem.ET # value = <ET.HEX: 24>
|
|
264
|
+
POINT: ngsolve.fem.ET # value = <ET.POINT: 0>
|
|
265
|
+
PRISM: ngsolve.fem.ET # value = <ET.PRISM: 22>
|
|
266
|
+
PYRAMID: ngsolve.fem.ET # value = <ET.PYRAMID: 21>
|
|
267
|
+
QUAD: ngsolve.fem.ET # value = <ET.QUAD: 11>
|
|
268
|
+
SEGM: ngsolve.fem.ET # value = <ET.SEGM: 1>
|
|
269
|
+
TET: ngsolve.fem.ET # value = <ET.TET: 20>
|
|
270
|
+
TRIG: ngsolve.fem.ET # value = <ET.TRIG: 10>
|
|
271
|
+
VERTEX: ngsolve.fem.NODE_TYPE # value = <NODE_TYPE.VERTEX: 0>
|
|
272
|
+
VOL: ngsolve.comp.VorB # value = <VorB.VOL: 0>
|
|
273
|
+
ds: ngsolve.comp.DifferentialSymbol # value = <ngsolve.comp.DifferentialSymbol object>
|
|
274
|
+
dx: ngsolve.comp.DifferentialSymbol # value = <ngsolve.comp.DifferentialSymbol object>
|
|
275
|
+
ngsglobals: ngsolve.comp.GlobalVariables # value = <ngsolve.comp.GlobalVariables object>
|
|
276
|
+
specialcf: ngsolve.fem.SpecialCFCreator # value = <ngsolve.fem.SpecialCFCreator object>
|
|
277
|
+
x: ngsolve.fem.CoefficientFunction # value = <ngsolve.fem.CoefficientFunction object>
|
|
278
|
+
y: ngsolve.fem.CoefficientFunction # value = <ngsolve.fem.CoefficientFunction object>
|
|
279
|
+
z: ngsolve.fem.CoefficientFunction # value = <ngsolve.fem.CoefficientFunction object>
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
NGSCXX_DIR=$( cd $(dirname $0); pwd )
|
|
3
|
+
PY_INCLUDE_FLAGS=-I$(python3 -c"import sysconfig;print(sysconfig.get_path('include'))")
|
|
4
|
+
if [ -f /Library/Developer/CommandLineTools/usr/bin/c++ ]
|
|
5
|
+
then NGSCXX=/Library/Developer/CommandLineTools/usr/bin/c++
|
|
6
|
+
else NGSCXX=c++
|
|
7
|
+
fi
|
|
8
|
+
export CCACHE_NOHASHDIR=1
|
|
9
|
+
|
|
10
|
+
Netgen_BUNDLE="`echo "$0" | sed -e 's/\/Contents\/MacOS\/ngscxx//'`"
|
|
11
|
+
Netgen_MACOS="$Netgen_BUNDLE/Contents/MacOS"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
if [ -f /usr/local/bin/ccache ]
|
|
15
|
+
then /usr/local/bin/ccache $NGSCXX -O3 -DNDEBUG -DHAVE_NETGEN_SOURCES -DHAVE_DLFCN_H -DHAVE_CXA_DEMANGLE -DUSE_TIMEOFDAY -DMSG_NOSIGNAL=0 -DTCL -DLAPACK -DNGS_PYTHON -DUSE_UMFPACK -DNETGEN_PYTHON -DNG_PYTHON -DPYBIND11_SIMPLE_GIL_MANAGEMENT -DPARALLEL -DNG_MPI_WRAPPER -std=c++17 -Wno-undefined-var-template -Wno-vla-extension -DMAX_SYS_DIM=3 -Xarch_x86_64 -march=core-avx2 -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.2.sdk -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -I$NGSCXX_DIR/../netgen/include -I$NGSCXX_DIR/../netgen/include/include $PY_INCLUDE_FLAGS -I$Netgen_BUNDLE/Contents/Resources/include $*
|
|
16
|
+
else $NGSCXX -O3 -DNDEBUG -DHAVE_NETGEN_SOURCES -DHAVE_DLFCN_H -DHAVE_CXA_DEMANGLE -DUSE_TIMEOFDAY -DMSG_NOSIGNAL=0 -DTCL -DLAPACK -DNGS_PYTHON -DUSE_UMFPACK -DNETGEN_PYTHON -DNG_PYTHON -DPYBIND11_SIMPLE_GIL_MANAGEMENT -DPARALLEL -DNG_MPI_WRAPPER -std=c++17 -Wno-undefined-var-template -Wno-vla-extension -DMAX_SYS_DIM=3 -Xarch_x86_64 -march=core-avx2 -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.2.sdk -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -I$NGSCXX_DIR/../netgen/include -I$NGSCXX_DIR/../netgen/include/include $PY_INCLUDE_FLAGS -I$Netgen_BUNDLE/Contents/Resources/include $*
|
|
17
|
+
fi
|