ngstrefftz 0.3.2406.dev89__tar.gz → 0.3.2502.dev2__tar.gz
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.
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/.github/workflows/build.yml +1 -1
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/Dockerfile +5 -6
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/PKG-INFO +1 -1
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/_version.py +2 -2
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/requirements.txt +2 -2
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/embtrefftz.cpp +223 -83
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/embtrefftz.hpp +33 -29
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/.clang-format +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/.github/workflows/fix_auditwheel_policy.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/.github/workflows/pyodide/Dockerfile +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/.github/workflows/pyodide/build_in_docker.sh +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/.github/workflows/pyodide/merge.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/.github/workflows/pyodide/requirements.txt +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/.gitignore +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/.gitmodules +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/CMakeLists.txt +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/CONTRIBUTING.md +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/LICENSE +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/README.md +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/Doxyfile.in +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/_static/breadcrumbs.html +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/_static/css/mytheme.css +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/conf.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/contrib.rst +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/docu.rst +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/index.rst +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/intro.rst +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/embTrefftz-adv.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/embTrefftz-helm.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/embTrefftz-poi.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/embTrefftz-stokes.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/embTrefftz-wave.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/embTrefftz.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/helmholtz.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/index.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/laplace.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/qtelliptic.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/qtwave.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/tunfitted.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/twave.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/notebooks/twavetents.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/paper/codemeta.json +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/paper/paper.bib +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/paper/paper.md +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/docs/readme.rst +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/.github/workflows/build.yml +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/.gitignore +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/README.md +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/advection/Advection_Periodic_Clipping.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/advection/advection2d.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/advection/advection2d_periodic.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/burgers/Burgers_Clipping.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/burgers/burgers1d.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/burgers/burgers2d.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/euler/Euler_Clipping.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/euler/euler2d.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/euler/mach3_windtunnel.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/maxwell/maxwell3d.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/symbolic/symbolic_advection2d.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/symbolic/symbolic_burgers.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/symbolic/symbolic_euler.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/symbolic/symbolic_wave.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/symbolic/symbolic_wave1d_interface.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/symbolic/wave_penetrable_cylinder.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/tents/draw3dtent.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/tents/draw3dvertex.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/wave/horn.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/wave/wave2d.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/wave/wave2d_timedepbc.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/demo/wave/wave3d.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/BurgersMTP.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/INDEX.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/StartPitching.ipynb +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/_config.yml +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/_toc.yml +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/conf.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/figs/CausalityCond.png +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/figs/dag.png +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/figs/map.png +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/figs/subtents.png +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/index.rst +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/intro.md +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/readme.rst +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/docs/requirements.txt +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/py/__init__.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/py/conslaw/__init__.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/py/utils/__init__.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/py/utils/_drawtents.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/py/utils/_drawtents2d.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/pyproject.toml +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/CMakeLists.txt +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/advection.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/burgers.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/concurrentqueue.h +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/conservationlaw.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/euler.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/maxwell.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/ngsolve_addon.cmake +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/paralleldepend.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/python_conslaw.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/python_tents.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/symbolic.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/tconservationlaw_tp_impl.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/tents.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/tents.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/tentsolver.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/tentsolver_impl.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/vis3d.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/vis3d.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/src/wave.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/tests/test_burgers_2D.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/tests/test_causal_tents.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/tests/test_conslaw.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/tests/test_tent_height_2D.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/external_dependencies/ngstents/tests/test_tentlayers.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/pyproject.toml +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/__init__.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/airy.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/boxintegral.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/boxintegral.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/condensedg.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/condensedg.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/diffopmapped.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/mesh1dtents.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/mesh1dtents.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/monomialfespace.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/monomialfespace.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/ngsttd.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/planewavefe.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/planewavefe.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/pufe.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/pufe.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/pufespace.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/pufespace.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/python_trefftz.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/scalarmappedfe.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/scalarmappedfe.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/specialcoefficientfunction.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/specialcoefficientfunction.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/specialintegrator.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/specialintegrator.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/trefftzfespace.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/trefftzfespace.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/twavetents.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/src/twavetents.hpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/test/boxint.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/test/conforming_trefftz.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/test/dg.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/test/embt.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/test/embtrefftz_gtest.cpp +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/test/tents.py +0 -0
- {ngstrefftz-0.3.2406.dev89 → ngstrefftz-0.3.2502.dev2}/test/trefftz.py +0 -0
|
@@ -8,8 +8,8 @@ WORKDIR /home/app
|
|
|
8
8
|
#RUN cd /home/app/ngstrefftz/docs && sphinx-build -M html . _build -vvv
|
|
9
9
|
|
|
10
10
|
RUN pip install ngstrefftz --pre
|
|
11
|
-
ENV PYTHONPATH
|
|
12
|
-
ENV LD_LIBRARY_PATH
|
|
11
|
+
ENV PYTHONPATH=/usr/local/lib/python3.10/site-packages/
|
|
12
|
+
ENV LD_LIBRARY_PATH=/usr/local/lib/
|
|
13
13
|
|
|
14
14
|
RUN pip3 install numpy webgui_jupyter_widgets notebook
|
|
15
15
|
#RUN pip3 install jupyter_contrib_nbextensions
|
|
@@ -18,10 +18,9 @@ RUN pip3 install numpy webgui_jupyter_widgets notebook
|
|
|
18
18
|
|
|
19
19
|
ARG NB_USER=jovyan
|
|
20
20
|
ARG NB_UID=1000
|
|
21
|
-
ENV USER
|
|
22
|
-
ENV NB_UID
|
|
23
|
-
ENV HOME
|
|
24
|
-
#ENV mv /home/app/ngstrefftz/* /home/${NB_USER}/
|
|
21
|
+
ENV USER=${NB_USER}
|
|
22
|
+
ENV NB_UID=${NB_UID}
|
|
23
|
+
ENV HOME=/home/${NB_USER}
|
|
25
24
|
|
|
26
25
|
RUN adduser --disabled-password \
|
|
27
26
|
--gecos "Default user" \
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: ngstrefftz
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2502.dev2
|
|
4
4
|
Summary: NGSTrefftz is an add-on to NGSolve for Trefftz methods.
|
|
5
5
|
Author-Email: Paul Stocker <paul.stocker@univie.ac.at>
|
|
6
6
|
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '0.3.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 3,
|
|
20
|
+
__version__ = version = '0.3.2502.dev2'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 3, 2502, 'dev2')
|
|
@@ -522,56 +522,77 @@ namespace ngbla
|
|
|
522
522
|
}
|
|
523
523
|
#endif
|
|
524
524
|
|
|
525
|
-
/// `A =
|
|
526
|
-
/// A gets overwritten with Sigma
|
|
525
|
+
/// `A^T = V * Sigma^T * U^T`
|
|
526
|
+
/// A gets overwritten with Sigma^T
|
|
527
527
|
/// @param A has dimension n * m
|
|
528
528
|
/// @param U has dimension n * n
|
|
529
529
|
/// @param V has dimension m * m
|
|
530
530
|
template <typename SCAL, typename TDIST>
|
|
531
|
-
void
|
|
532
|
-
|
|
531
|
+
void
|
|
532
|
+
getSVD (MatrixView<SCAL, ngbla::RowMajor, size_t, size_t, TDIST> A_to_sigmaT,
|
|
533
|
+
FlatMatrix<SCAL, ColMajor> UT, FlatMatrix<SCAL, ColMajor> V)
|
|
533
534
|
{
|
|
534
|
-
auto [
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
// Matrix<SCAL,ColMajor> AA(
|
|
539
|
-
//
|
|
540
|
-
|
|
541
|
-
// AA(i,j)= A(i,j);
|
|
535
|
+
auto [Aheight, Awidth] = A_to_sigmaT.Shape ();
|
|
536
|
+
FlatMatrix<SCAL, ColMajor> AT (Awidth, Aheight, &A_to_sigmaT (0, 0));
|
|
537
|
+
// FlatMatrix<SCAL, ColMajor> VT (Aheight, Aheight, &UT(0,0));
|
|
538
|
+
// FlatMatrix<SCAL, ColMajor> U (Awidth, Awidth, &V(0,0));
|
|
539
|
+
// Matrix<SCAL, ColMajor> AA (height, width);
|
|
540
|
+
// AA = A;
|
|
541
|
+
|
|
542
542
|
#ifdef NGSTREFFTZ_USE_LAPACK
|
|
543
|
-
LapackSVD (
|
|
543
|
+
LapackSVD (AT, V, UT);
|
|
544
544
|
#else
|
|
545
545
|
cout << "No Lapack, using CalcSVD" << endl;
|
|
546
|
-
CalcSVD (
|
|
546
|
+
CalcSVD (AT, V, UT);
|
|
547
547
|
#endif
|
|
548
|
-
|
|
549
|
-
// A
|
|
550
|
-
|
|
551
|
-
|
|
548
|
+
|
|
549
|
+
// A = static_cast<SCAL> (0.0);
|
|
550
|
+
// A.Diag(0)=AA.Diag();
|
|
551
|
+
// for (size_t i = 0; i < min (A.Width (), A.Height ()); i++)
|
|
552
|
+
// A (i, i) = AA (i, i);
|
|
552
553
|
}
|
|
553
554
|
}
|
|
554
555
|
|
|
555
556
|
/// @param num_zero number of singular values `sigma_i = 0` in the matrix Sigma
|
|
556
557
|
/// @return pseudoinverse of A (as some `ngbla::Expr` type to avoid
|
|
557
558
|
/// allocations)
|
|
558
|
-
template <typename SCAL, typename TDIST>
|
|
559
|
+
template <typename SCAL, typename TDIST, ORDERING SIG_ORD>
|
|
559
560
|
Matrix<SCAL>
|
|
560
|
-
invertSVD (const FlatMatrix<SCAL, ColMajor> &
|
|
561
|
-
const MatrixView<SCAL,
|
|
561
|
+
invertSVD (const FlatMatrix<SCAL, ColMajor> &UT,
|
|
562
|
+
const MatrixView<SCAL, SIG_ORD, size_t, size_t, TDIST> &Sigma,
|
|
562
563
|
const FlatMatrix<SCAL, ColMajor> &V, size_t num_zero, LocalHeap &lh)
|
|
563
564
|
{
|
|
564
565
|
const HeapReset hr (lh);
|
|
565
566
|
const auto [m, n] = Sigma.Shape ();
|
|
566
567
|
|
|
567
|
-
FlatMatrix<SCAL> sigma_inv_times_ut (n,
|
|
568
|
+
FlatMatrix<SCAL> sigma_inv_times_ut (n, UT.Width (), lh);
|
|
568
569
|
for (size_t i = 0; i < n; i++)
|
|
569
570
|
if (i < min (n - num_zero, m))
|
|
570
|
-
sigma_inv_times_ut.Row (i) = 1.0 / Sigma (i, i) *
|
|
571
|
+
sigma_inv_times_ut.Row (i) = 1.0 / Sigma (i, i) * UT.Row (i);
|
|
571
572
|
else
|
|
572
573
|
sigma_inv_times_ut.Row (i) = SCAL (0.);
|
|
573
574
|
|
|
574
|
-
return
|
|
575
|
+
return V * sigma_inv_times_ut;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/// @returns the pseudo-inverse of `mat`
|
|
579
|
+
/// @param num_zero number of (near) zero singular values in `mat`
|
|
580
|
+
template <typename SCAL>
|
|
581
|
+
Matrix<SCAL>
|
|
582
|
+
getPseudoInverse (const FlatMatrix<SCAL> mat, const size_t num_zero)
|
|
583
|
+
{
|
|
584
|
+
LocalHeap lh = LocalHeap (100 * 1000 * 1000, "embt");
|
|
585
|
+
const auto [n, m] = mat.Shape ();
|
|
586
|
+
FlatMatrix<SCAL> sigma (n, m, lh);
|
|
587
|
+
FlatMatrix<SCAL, ColMajor> UT (n, n, lh);
|
|
588
|
+
FlatMatrix<SCAL, ColMajor> V (m, m, lh);
|
|
589
|
+
|
|
590
|
+
Matrix<SCAL> elmat_inv (m, n);
|
|
591
|
+
|
|
592
|
+
sigma = mat;
|
|
593
|
+
getSVD (sigma, UT, V);
|
|
594
|
+
elmat_inv = invertSVD (UT, sigma, V, num_zero, lh);
|
|
595
|
+
return elmat_inv;
|
|
575
596
|
}
|
|
576
597
|
|
|
577
598
|
/// calculates from the given space and linear form integrators a particular
|
|
@@ -662,7 +683,7 @@ namespace ngcomp
|
|
|
662
683
|
}
|
|
663
684
|
|
|
664
685
|
Array<optional<Matrix<SCAL>>> etmats (num_elements);
|
|
665
|
-
Array<optional<Matrix<SCAL>>>
|
|
686
|
+
Array<optional<Matrix<SCAL>>> etmats_trefftz_inv (num_elements);
|
|
666
687
|
Array<size_t> local_ndofs_trefftz (num_elements);
|
|
667
688
|
|
|
668
689
|
const bool any_fes_has_inactive_dofs
|
|
@@ -765,9 +786,9 @@ namespace ngcomp
|
|
|
765
786
|
// #TODO: why is this necessary?
|
|
766
787
|
reorderMatrixColumns (elmat_Cr, dofs_conforming, lh);
|
|
767
788
|
|
|
768
|
-
FlatMatrix<SCAL, ColMajor>
|
|
789
|
+
FlatMatrix<SCAL, ColMajor> UT (elmat_A.Height (), lh),
|
|
769
790
|
V (elmat_A.Width (), lh);
|
|
770
|
-
getSVD<SCAL> (elmat_A,
|
|
791
|
+
getSVD<SCAL> (elmat_A, UT, V);
|
|
771
792
|
|
|
772
793
|
// # TODO: incorporate the double variant
|
|
773
794
|
const size_t ndof_trefftz_i
|
|
@@ -777,7 +798,7 @@ namespace ngcomp
|
|
|
777
798
|
throw std::invalid_argument ("zero trefftz dofs");
|
|
778
799
|
|
|
779
800
|
const auto elmat_A_inv_expr
|
|
780
|
-
= invertSVD (
|
|
801
|
+
= invertSVD (UT, elmat_A, V, ndof_trefftz_i, lh);
|
|
781
802
|
FlatMatrix<SCAL> elmat_A_inv (ndof, ndof_conforming + ndof_test, lh);
|
|
782
803
|
// Calculate the matrix entries and write them to memory.
|
|
783
804
|
elmat_A_inv = elmat_A_inv_expr;
|
|
@@ -791,16 +812,22 @@ namespace ngcomp
|
|
|
791
812
|
|
|
792
813
|
// if (get_range)
|
|
793
814
|
// elmat_Tt = U.Cols (0, dofs.Size () - ndof_trefftz_i);
|
|
794
|
-
elmat_Tt =
|
|
815
|
+
elmat_Tt = V.Cols (ndof - ndof_trefftz_i, ndof);
|
|
795
816
|
|
|
796
|
-
if (
|
|
817
|
+
if (compute_elmat_T_inv)
|
|
797
818
|
{
|
|
798
819
|
auto elmat_T_inv = elmat_A_inv.Cols (
|
|
799
820
|
ndof_conforming, ndof_conforming + ndof_test);
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
partsol
|
|
803
|
-
|
|
821
|
+
if (trhs)
|
|
822
|
+
{
|
|
823
|
+
FlatVector<SCAL> partsol (dofs.Size (), lh);
|
|
824
|
+
calculateParticularSolution<SCAL> (partsol, lfis, *fes_test,
|
|
825
|
+
element_id, *ma,
|
|
826
|
+
elmat_T_inv, lh);
|
|
827
|
+
particular_solution_vec->SetIndirect (dofs, partsol);
|
|
828
|
+
}
|
|
829
|
+
etmats_trefftz_inv[element_id.Nr ()]
|
|
830
|
+
= make_optional<Matrix<SCAL>> (elmat_A_inv);
|
|
804
831
|
}
|
|
805
832
|
|
|
806
833
|
if (ignoredofs)
|
|
@@ -808,8 +835,6 @@ namespace ngcomp
|
|
|
808
835
|
ignoredofs);
|
|
809
836
|
|
|
810
837
|
etmats[element_id.Nr ()] = make_optional<Matrix<SCAL>> (elmat_T);
|
|
811
|
-
etmats_inv[element_id.Nr ()]
|
|
812
|
-
= make_optional<Matrix<SCAL>> (elmat_A_inv);
|
|
813
838
|
local_ndofs_trefftz[element_id.Nr ()] = ndof_trefftz_i;
|
|
814
839
|
|
|
815
840
|
if (stats)
|
|
@@ -854,13 +879,13 @@ namespace ngcomp
|
|
|
854
879
|
|
|
855
880
|
if constexpr (std::is_same_v<double, SCAL>)
|
|
856
881
|
{
|
|
857
|
-
this->etmats = etmats;
|
|
858
|
-
this->
|
|
882
|
+
this->etmats = std::move (etmats);
|
|
883
|
+
this->etmats_trefftz_inv = std::move (etmats_trefftz_inv);
|
|
859
884
|
}
|
|
860
885
|
else
|
|
861
886
|
{
|
|
862
|
-
this->etmatsc = etmats;
|
|
863
|
-
this->
|
|
887
|
+
this->etmatsc = std::move (etmats);
|
|
888
|
+
this->etmatsc_trefftz_inv = std::move (etmats_trefftz_inv);
|
|
864
889
|
}
|
|
865
890
|
this->local_ndofs_trefftz = local_ndofs_trefftz;
|
|
866
891
|
this->psol = particular_solution_vec;
|
|
@@ -871,9 +896,10 @@ namespace ngcomp
|
|
|
871
896
|
shared_ptr<SumOfIntegrals> _cop, shared_ptr<SumOfIntegrals> _crhs,
|
|
872
897
|
size_t _ndof_trefftz, double _eps, shared_ptr<FESpace> _fes,
|
|
873
898
|
shared_ptr<FESpace> _fes_test, shared_ptr<FESpace> _fes_conformity,
|
|
874
|
-
shared_ptr<BitArray> _ignoredofs
|
|
899
|
+
shared_ptr<BitArray> _ignoredofs,
|
|
900
|
+
shared_ptr<std::map<std::string, Vector<double>>> _stats)
|
|
875
901
|
: top (_top), trhs (_trhs), cop (_cop), crhs (_crhs),
|
|
876
|
-
ignoredofs (_ignoredofs)
|
|
902
|
+
ignoredofs (_ignoredofs), stats (_stats)
|
|
877
903
|
{
|
|
878
904
|
if (_ndof_trefftz == 0)
|
|
879
905
|
ndof_trefftz = _eps;
|
|
@@ -944,9 +970,7 @@ namespace ngcomp
|
|
|
944
970
|
|
|
945
971
|
if (fes->IsComplex ())
|
|
946
972
|
{
|
|
947
|
-
|
|
948
|
-
auto elmat_T_inv = (*etmatsc_inv[element_id.Nr ()])
|
|
949
|
-
.Cols (width - dofs_test.Size (), width);
|
|
973
|
+
auto elmat_T_inv = (*etmatsc_trefftz_inv[element_id.Nr ()]);
|
|
950
974
|
FlatVector<Complex> partsol (dofs.Size (), lh);
|
|
951
975
|
calculateParticularSolution<Complex> (
|
|
952
976
|
partsol, lfis, *fes_test, element_id, *ma, elmat_T_inv, lh);
|
|
@@ -954,9 +978,7 @@ namespace ngcomp
|
|
|
954
978
|
}
|
|
955
979
|
else
|
|
956
980
|
{
|
|
957
|
-
|
|
958
|
-
auto elmat_T_inv = (*etmats_inv[element_id.Nr ()])
|
|
959
|
-
.Cols (width - dofs_test.Size (), width);
|
|
981
|
+
auto elmat_T_inv = *etmats_trefftz_inv[element_id.Nr ()];
|
|
960
982
|
FlatVector<double> partsol (dofs.Size (), lh);
|
|
961
983
|
calculateParticularSolution<double> (
|
|
962
984
|
partsol, lfis, *fes_test, element_id, *ma, elmat_T_inv, lh);
|
|
@@ -966,6 +988,57 @@ namespace ngcomp
|
|
|
966
988
|
return particular_solution_vec;
|
|
967
989
|
}
|
|
968
990
|
|
|
991
|
+
shared_ptr<const BaseVector> TrefftzEmbedding::GetParticularSolution (
|
|
992
|
+
shared_ptr<const BaseVector> _trhsvec) const
|
|
993
|
+
{
|
|
994
|
+
LocalHeap clh = LocalHeap (100 * 1000 * 1000, "embt_psol", true);
|
|
995
|
+
|
|
996
|
+
shared_ptr<BaseVector> particular_solution_vec;
|
|
997
|
+
if (fes->IsComplex ())
|
|
998
|
+
particular_solution_vec
|
|
999
|
+
= make_shared<VVector<Complex>> (fes->GetNDof ());
|
|
1000
|
+
else
|
|
1001
|
+
particular_solution_vec = make_shared<VVector<double>> (fes->GetNDof ());
|
|
1002
|
+
particular_solution_vec->operator= (0.0);
|
|
1003
|
+
|
|
1004
|
+
ma->IterateElements (
|
|
1005
|
+
VOL, clh, [&] (Ngs_Element mesh_element, LocalHeap &lh) {
|
|
1006
|
+
if (fes->IsComplex () && !etmatsc[mesh_element.Nr ()])
|
|
1007
|
+
return;
|
|
1008
|
+
if (!fes->IsComplex () && !etmats[mesh_element.Nr ()])
|
|
1009
|
+
return;
|
|
1010
|
+
const ElementId element_id = ElementId (mesh_element);
|
|
1011
|
+
|
|
1012
|
+
Array<DofId> dofs, dofs_test;
|
|
1013
|
+
fes->GetDofNrs (element_id, dofs, VISIBLE_DOF);
|
|
1014
|
+
if (ignoredofs)
|
|
1015
|
+
for (size_t i = 0; i < dofs.Size (); i++)
|
|
1016
|
+
if (ignoredofs->Test (dofs[i]))
|
|
1017
|
+
dofs.RemoveElement (i);
|
|
1018
|
+
fes_test->GetDofNrs (element_id, dofs_test, VISIBLE_DOF);
|
|
1019
|
+
|
|
1020
|
+
if (fes->IsComplex ())
|
|
1021
|
+
{
|
|
1022
|
+
auto elmat_T_inv = (*etmatsc_trefftz_inv[element_id.Nr ()]);
|
|
1023
|
+
FlatVector<Complex> partsol (dofs.Size (), lh);
|
|
1024
|
+
FlatVector<Complex> elvec (dofs_test.Size (), lh);
|
|
1025
|
+
_trhsvec->GetIndirect (dofs_test, elvec);
|
|
1026
|
+
partsol = elmat_T_inv * elvec;
|
|
1027
|
+
particular_solution_vec->SetIndirect (dofs, partsol);
|
|
1028
|
+
}
|
|
1029
|
+
else
|
|
1030
|
+
{
|
|
1031
|
+
auto elmat_T_inv = *etmats_trefftz_inv[element_id.Nr ()];
|
|
1032
|
+
FlatVector<double> partsol (dofs.Size (), lh);
|
|
1033
|
+
FlatVector<double> elvec (dofs_test.Size (), lh);
|
|
1034
|
+
_trhsvec->GetIndirect (dofs_test, elvec);
|
|
1035
|
+
partsol = elmat_T_inv * elvec;
|
|
1036
|
+
particular_solution_vec->SetIndirect (dofs, partsol);
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
return particular_solution_vec;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
969
1042
|
shared_ptr<const BaseMatrix> TrefftzEmbedding::GetEmbedding () const
|
|
970
1043
|
{
|
|
971
1044
|
if (fes->IsComplex ())
|
|
@@ -990,6 +1063,9 @@ namespace ngcomp
|
|
|
990
1063
|
createConformingTrefftzTables (table, table2, etmatsc,
|
|
991
1064
|
local_ndofs_trefftz, *fes,
|
|
992
1065
|
fes_conformity, ignoredofs);
|
|
1066
|
+
for (size_t i = 0; i < etmatsc.Size (); i++)
|
|
1067
|
+
if (etmatsc[i])
|
|
1068
|
+
QuickSort (table2[i]);
|
|
993
1069
|
}
|
|
994
1070
|
else
|
|
995
1071
|
{
|
|
@@ -997,6 +1073,9 @@ namespace ngcomp
|
|
|
997
1073
|
createConformingTrefftzTables (table, table2, etmats,
|
|
998
1074
|
local_ndofs_trefftz, *fes,
|
|
999
1075
|
fes_conformity, ignoredofs);
|
|
1076
|
+
for (size_t i = 0; i < etmats.Size (); i++)
|
|
1077
|
+
if (etmats[i])
|
|
1078
|
+
QuickSort (table2[i]);
|
|
1000
1079
|
}
|
|
1001
1080
|
if (fes_conformity)
|
|
1002
1081
|
vec->SetScalar (0.0);
|
|
@@ -1066,21 +1145,21 @@ namespace ngcomp
|
|
|
1066
1145
|
if (!this->IsComplex ())
|
|
1067
1146
|
{
|
|
1068
1147
|
Table<DofId> _table_dummy{};
|
|
1069
|
-
createConformingTrefftzTables (
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
for (size_t i = 0; i <
|
|
1073
|
-
if (
|
|
1148
|
+
createConformingTrefftzTables (
|
|
1149
|
+
_table_dummy, elnr_to_dofs, emb->GetEtmats (),
|
|
1150
|
+
emb->GetLocalNodfsTrefftz (), *fes, fes_conformity, ignoredofs);
|
|
1151
|
+
for (size_t i = 0; i < emb->GetEtmats ().Size (); i++)
|
|
1152
|
+
if (emb->GetEtmat (i))
|
|
1074
1153
|
QuickSort (elnr_to_dofs[i]);
|
|
1075
1154
|
}
|
|
1076
1155
|
else
|
|
1077
1156
|
{
|
|
1078
1157
|
Table<DofId> _table_dummy{};
|
|
1079
|
-
createConformingTrefftzTables (
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
for (size_t i = 0; i <
|
|
1083
|
-
if (
|
|
1158
|
+
createConformingTrefftzTables (
|
|
1159
|
+
_table_dummy, elnr_to_dofs, emb->GetEtmatsC (),
|
|
1160
|
+
emb->GetLocalNodfsTrefftz (), *fes, fes_conformity, ignoredofs);
|
|
1161
|
+
for (size_t i = 0; i < emb->GetEtmatsC ().Size (); i++)
|
|
1162
|
+
if (emb->GetEtmatC (i))
|
|
1084
1163
|
QuickSort (elnr_to_dofs[i]);
|
|
1085
1164
|
}
|
|
1086
1165
|
|
|
@@ -1093,8 +1172,8 @@ namespace ngcomp
|
|
|
1093
1172
|
for (auto ei : this->ma->Elements (VOL))
|
|
1094
1173
|
{
|
|
1095
1174
|
// skip this element, if there is no element matrix defined
|
|
1096
|
-
if ((this->IsComplex () && !
|
|
1097
|
-
|| (!this->IsComplex () && !
|
|
1175
|
+
if ((this->IsComplex () && !emb->GetEtmatC (ei.Nr ()))
|
|
1176
|
+
|| (!this->IsComplex () && !emb->GetEtmat (ei.Nr ())))
|
|
1098
1177
|
continue;
|
|
1099
1178
|
|
|
1100
1179
|
const size_t ndof_trefftz_local
|
|
@@ -1160,6 +1239,34 @@ namespace ngcomp
|
|
|
1160
1239
|
}
|
|
1161
1240
|
}
|
|
1162
1241
|
|
|
1242
|
+
template <typename T>
|
|
1243
|
+
optional<FlatMatrix<double>>
|
|
1244
|
+
EmbTrefftzFESpace<T>::GetEtmatInv (size_t idx) const
|
|
1245
|
+
{
|
|
1246
|
+
std::call_once (this->etmats_inv_computed, [&] () {
|
|
1247
|
+
this->fes->GetMeshAccess ()->IterateElements (VOL, [&] (ElementId ei) {
|
|
1248
|
+
optional<Matrix<double>> etmat = emb->GetEtmat (ei.Nr ());
|
|
1249
|
+
this->etmats_inv[ei.Nr ()]
|
|
1250
|
+
= (etmat) ? make_optional (getPseudoInverse (*etmat, 0)) : nullopt;
|
|
1251
|
+
});
|
|
1252
|
+
});
|
|
1253
|
+
return this->etmats_inv[idx];
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
template <typename T>
|
|
1257
|
+
optional<FlatMatrix<Complex>>
|
|
1258
|
+
EmbTrefftzFESpace<T>::GetEtmatCInv (size_t idx) const
|
|
1259
|
+
{
|
|
1260
|
+
std::call_once (this->etmats_inv_computed, [&] () {
|
|
1261
|
+
this->fes->GetMeshAccess ()->IterateElements (VOL, [&] (ElementId ei) {
|
|
1262
|
+
optional<Matrix<Complex>> etmat = emb->GetEtmatC (ei.Nr ());
|
|
1263
|
+
this->etmatsc_inv[ei.Nr ()]
|
|
1264
|
+
= (etmat) ? make_optional (getPseudoInverse (*etmat, 0)) : nullopt;
|
|
1265
|
+
});
|
|
1266
|
+
});
|
|
1267
|
+
return this->etmatsc_inv[idx];
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1163
1270
|
/// double/complex generic implementation for the methods VTransformM(R | C)
|
|
1164
1271
|
/// for the embedded Trefftz FESpace.
|
|
1165
1272
|
template <typename SCAL>
|
|
@@ -1204,7 +1311,7 @@ namespace ngcomp
|
|
|
1204
1311
|
EmbTrefftzFESpace<T>::VTransformMR (ElementId ei, SliceMatrix<double> mat,
|
|
1205
1312
|
TRANSFORM_TYPE type) const
|
|
1206
1313
|
{
|
|
1207
|
-
const auto elmat = *
|
|
1314
|
+
const auto elmat = *(emb->GetEtmat (ei.Nr ()));
|
|
1208
1315
|
etFesVTransformM (mat, type, elmat);
|
|
1209
1316
|
}
|
|
1210
1317
|
|
|
@@ -1213,16 +1320,16 @@ namespace ngcomp
|
|
|
1213
1320
|
EmbTrefftzFESpace<T>::VTransformMC (ElementId ei, SliceMatrix<Complex> mat,
|
|
1214
1321
|
TRANSFORM_TYPE type) const
|
|
1215
1322
|
{
|
|
1216
|
-
const auto elmat = *
|
|
1323
|
+
const auto elmat = *(emb->GetEtmatC (ei.Nr ()));
|
|
1217
1324
|
etFesVTransformM (mat, type, elmat);
|
|
1218
1325
|
}
|
|
1219
1326
|
|
|
1220
1327
|
/// double/complex generic implementation for the methods VTransformV(R | C)
|
|
1221
1328
|
/// for the embedded Trefftz FESpace.
|
|
1222
1329
|
template <typename SCAL>
|
|
1223
|
-
void
|
|
1224
|
-
|
|
1225
|
-
|
|
1330
|
+
void etFesVTransformV (SliceVector<SCAL> &vec, const TRANSFORM_TYPE type,
|
|
1331
|
+
const Matrix<SCAL> &elmat,
|
|
1332
|
+
optional<FlatMatrix<SCAL>> elmat_inv)
|
|
1226
1333
|
{
|
|
1227
1334
|
const size_t ndof = elmat.Width ();
|
|
1228
1335
|
|
|
@@ -1246,8 +1353,8 @@ namespace ngcomp
|
|
|
1246
1353
|
"given vec does not match the needed dimension.");
|
|
1247
1354
|
|
|
1248
1355
|
// const auto elmat_inv = getPseudoInverse (elmat, 0);
|
|
1249
|
-
Vector<SCAL> tmp_vec (elmat_inv.Height ());
|
|
1250
|
-
tmp_vec = elmat_inv * vec;
|
|
1356
|
+
Vector<SCAL> tmp_vec ((*elmat_inv).Height ());
|
|
1357
|
+
tmp_vec = (*elmat_inv) * vec;
|
|
1251
1358
|
vec = tmp_vec;
|
|
1252
1359
|
}
|
|
1253
1360
|
else
|
|
@@ -1266,8 +1373,10 @@ namespace ngcomp
|
|
|
1266
1373
|
static Timer timer ("EmbTrefftz: VTransform");
|
|
1267
1374
|
RegionTimer reg (timer);
|
|
1268
1375
|
|
|
1269
|
-
etFesVTransformV (vec, type, *
|
|
1270
|
-
|
|
1376
|
+
etFesVTransformV (vec, type, *(emb->GetEtmat (ei.Nr ())),
|
|
1377
|
+
(type == TRANSFORM_SOL_INVERSE)
|
|
1378
|
+
? this->GetEtmatInv (ei.Nr ())
|
|
1379
|
+
: nullopt);
|
|
1271
1380
|
}
|
|
1272
1381
|
|
|
1273
1382
|
template <typename T>
|
|
@@ -1278,8 +1387,10 @@ namespace ngcomp
|
|
|
1278
1387
|
static Timer timer ("EmbTrefftz: VTransform");
|
|
1279
1388
|
RegionTimer reg (timer);
|
|
1280
1389
|
|
|
1281
|
-
etFesVTransformV (vec, type, *
|
|
1282
|
-
|
|
1390
|
+
etFesVTransformV (vec, type, *(emb->GetEtmatC (ei.Nr ())),
|
|
1391
|
+
(type == TRANSFORM_SOL_INVERSE)
|
|
1392
|
+
? this->GetEtmatCInv (ei.Nr ())
|
|
1393
|
+
: nullopt);
|
|
1283
1394
|
}
|
|
1284
1395
|
|
|
1285
1396
|
// template class EmbTrefftzFESpace<L2HighOrderFESpace,
|
|
@@ -1307,6 +1418,9 @@ template <typename T> void ExportETSpace (py::module m, string label)
|
|
|
1307
1418
|
auto pyspace
|
|
1308
1419
|
= ngcomp::ExportFESpace<ngcomp::EmbTrefftzFESpace<T>> (m, label);
|
|
1309
1420
|
|
|
1421
|
+
pyspace.def ("GetEmbedding", &ngcomp::EmbTrefftzFESpace<T>::GetEmbedding,
|
|
1422
|
+
"Get the TrefftzEmbedding");
|
|
1423
|
+
|
|
1310
1424
|
// pyspace.def (py::init ([pyspace] (shared_ptr<T> fes) {
|
|
1311
1425
|
// py::list info;
|
|
1312
1426
|
// auto ma = fes->GetMeshAccess ();
|
|
@@ -1372,11 +1486,30 @@ void ExportEmbTrefftz (py::module m)
|
|
|
1372
1486
|
at best dim(fes)-dim(fes_test) and may increase by zero singular values of `top`
|
|
1373
1487
|
(with respect to the threshold `eps`).
|
|
1374
1488
|
)mydelimiter")
|
|
1375
|
-
.def (
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1489
|
+
.def (
|
|
1490
|
+
// could be py::init<..,optional<py::dict>>() but we translate to map
|
|
1491
|
+
py::init ([] (shared_ptr<SumOfIntegrals> top,
|
|
1492
|
+
shared_ptr<SumOfIntegrals> trhs,
|
|
1493
|
+
shared_ptr<SumOfIntegrals> cop,
|
|
1494
|
+
shared_ptr<SumOfIntegrals> crhs, size_t ndof_trefftz,
|
|
1495
|
+
double eps, shared_ptr<FESpace> fes,
|
|
1496
|
+
shared_ptr<FESpace> fes_test,
|
|
1497
|
+
shared_ptr<FESpace> fes_conformity,
|
|
1498
|
+
shared_ptr<BitArray> ignoredofs,
|
|
1499
|
+
optional<py::dict> pystats) {
|
|
1500
|
+
shared_ptr<std::map<std::string, Vector<double>>> stats = nullptr;
|
|
1501
|
+
if (pystats)
|
|
1502
|
+
stats = make_shared<std::map<std::string, Vector<double>>> ();
|
|
1503
|
+
std::shared_ptr<TrefftzEmbedding> emb
|
|
1504
|
+
= std::make_shared<TrefftzEmbedding> (
|
|
1505
|
+
top, trhs, cop, crhs, ndof_trefftz, eps, fes, fes_test,
|
|
1506
|
+
fes_conformity, ignoredofs, stats);
|
|
1507
|
+
if (pystats)
|
|
1508
|
+
for (auto const &x : *stats)
|
|
1509
|
+
(*pystats)[py::cast (x.first)] = py::cast (x.second);
|
|
1510
|
+
return emb;
|
|
1511
|
+
}),
|
|
1512
|
+
R"mydelimiter(
|
|
1380
1513
|
Constructs a new Trefftz embedding object.
|
|
1381
1514
|
|
|
1382
1515
|
:param top: the differential operation. Can be None
|
|
@@ -1397,12 +1530,13 @@ void ExportEmbTrefftz (py::module m)
|
|
|
1397
1530
|
:param fes_conformity: finite element space of the conformity operation (optional,
|
|
1398
1531
|
determined from `cop` if not given)
|
|
1399
1532
|
)mydelimiter",
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1533
|
+
py::arg ("top") = nullptr, py::arg ("trhs") = nullptr,
|
|
1534
|
+
py::arg ("cop") = nullptr, py::arg ("crhs") = nullptr,
|
|
1535
|
+
py::arg ("ndof_trefftz") = 0, py::arg ("eps") = 0.0,
|
|
1536
|
+
py::arg ("fes") = nullptr, py::arg ("fes_test") = nullptr,
|
|
1537
|
+
py::arg ("fes_conformity") = nullptr,
|
|
1538
|
+
py::arg ("ignoredofs") = nullptr,
|
|
1539
|
+
py::arg ("stats") = nullopt) // py::none ())
|
|
1406
1540
|
.def ("Embed", &ngcomp::TrefftzEmbedding::Embed,
|
|
1407
1541
|
"Embed a Trefftz GridFunction into the underlying FESpace")
|
|
1408
1542
|
.def ("GetEmbedding", &ngcomp::TrefftzEmbedding::GetEmbedding,
|
|
@@ -1418,7 +1552,13 @@ void ExportEmbTrefftz (py::module m)
|
|
|
1418
1552
|
shared_ptr<SumOfIntegrals>) const> (
|
|
1419
1553
|
&ngcomp::TrefftzEmbedding::GetParticularSolution),
|
|
1420
1554
|
"Particular solution as GridFunction vector of the underlying "
|
|
1421
|
-
"FESpace, given a trhs")
|
|
1555
|
+
"FESpace, given a trhs")
|
|
1556
|
+
.def ("GetParticularSolution",
|
|
1557
|
+
static_cast<shared_ptr<const BaseVector> (TrefftzEmbedding::*) (
|
|
1558
|
+
shared_ptr<const BaseVector>) const> (
|
|
1559
|
+
&ngcomp::TrefftzEmbedding::GetParticularSolution),
|
|
1560
|
+
"Particular solution as GridFunction vector of the underlying "
|
|
1561
|
+
"FESpace, given a trhs as vector");
|
|
1422
1562
|
}
|
|
1423
1563
|
|
|
1424
1564
|
#endif // NGS_PYTHON
|