xfem 2.1.2605.dev3__tar.gz → 2.1.2605.dev11__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.
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/.github/workflows/pypi.yml +1 -1
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/PKG-INFO +1 -1
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/straightcutrule.cpp +2 -1
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/xdecompose.hpp +2 -1
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/xintegration.cpp +2 -1
- xfem-2.1.2605.dev11/lsetcurving/shiftedevaluate.cpp +381 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/lsetcurving/shiftedevaluate.hpp +28 -2
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/python/_version.py +3 -3
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/CMakeLists.txt +3 -0
- xfem-2.1.2605.dev11/tests/pytests/test_shifteval_simd.py +125 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/p1interpol.cpp +2 -1
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/xprolongation.cpp +10 -10
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/aggregates.cpp +13 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/symboliccutbfi.cpp +10 -12
- xfem-2.1.2605.dev3/lsetcurving/shiftedevaluate.cpp +0 -288
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/.ci/build_pip.sh +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/.ci/build_pip_mac.sh +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/.ci/ci_ctests.sh +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/.ci/fix_auditwheel_policy.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/.github/workflows/extras-workflow.yml +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/.github/workflows/paper-workflow.yml +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/.gitignore +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/.gitlab-ci.yml +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/.gitmodules +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/CMakeLists.txt +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/Dockerfile +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/INSTALLATION.md +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/LICENSE +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/MANIFEST.in +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/README.md +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/_ngsolve_deps_provider.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cmake_modules/check_submodules.cmake +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cmake_modules/cmake_uninstall.cmake.in +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/config.h.cmake +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/CMakeLists.txt +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/cutintegral.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/cutintegral.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/fieldeval.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/fieldeval.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/lsetintdomain.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/lsetintdomain.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/mlsetintegration.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/mlsetintegration.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/python_cutint.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/spacetimecutrule.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/spacetimecutrule.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/straightcutrule.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/xdecompose.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/cutint/xintegration.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/CMakeLists.txt +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/README.md +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/aggregates/aggfem_shapetester.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/aggregates/fictdom_aggfem.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/aggregates/fictdom_dg_aggfem.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/fictdom.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/fictdom_dg.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/fictdom_mlset.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/compp1prolong-playground.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/cutint/area_of_a_circle_quads.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/cutint/integrate_one_big_quad2D.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/cutint/integrate_one_big_quad3D.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/fictdom_dg3d.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/lsetcurving/integrate.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/make_uniform3D_grid.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mg_cut_poisson_p1.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mg_cut_poisson_p1p2_skinny.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mg_cut_poisson_p2.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mg_cut_poisson_p2_skinny.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mg_p1_working.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/cube.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/cube2.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/cube_codim2_test.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/even_simpler.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/multiple_triangles.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/simple.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/simple_mlcutinfo.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/simple_with_convinience.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/square.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/tensor_functions.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/test_GetOuterBoundary.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/test_draw.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/triangle.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/zalesak_disk.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/mlset/zalesak_sphere.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/p1prolong-playground.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/p2prolong-playground.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/graveyard/stokesxfem.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/linelasticity.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/lsetgeoms.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/moving_domain.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/mpi/mpi_nxfem.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/IF_circle.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/IF_marking.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/IF_periodic.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/area_of_a_hypersphere_ST.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/area_of_a_hypersphere_ST_conv.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/area_of_a_hypersphere_ST_conv_higher_order.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/area_of_a_sphere_ST.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/area_of_a_sphere_ST_conv.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/area_of_a_sphere_ST_conv_higher_order.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/fictdomain_Neumann_quad_testing.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/kite3D_in_sympy.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/kite_in_sympy.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/spaceP1_timeDGP1_3D.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/spaceP1_timeDGP1_3D_static.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/spaceP1_timeDGP1_kite.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/spaceP1_timeDGP1_kite3D.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/spaceP2_timeDGP1.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/spaceP2_timeDGP1_new.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/graveyard/spacePX_timeDGP1_kite.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/spaceDGtimeDG_unfitted.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/spaceDGtimeDG_unfitted_3D.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/spacetimeCG_unfitted.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/spacetimeDG_fitted.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/spacetimeDG_fitted_Nitsche.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/spacetimeDG_unfitted.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/spacetime_geom_error.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spacetime/spacetime_vtk.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/spdes/surfstokestracefem.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/stokescutfem.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/tracefem.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/demos/unf_interf_prob.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/feature-details.md +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/bubble-coarse.pdf +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/cuttet-quadrature.png +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/graveyard/cut_quadrature.png +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/graveyard/cut_quadrature_mlset.png +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/graveyard/cuttet.jpg +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/graveyard/intpoints.jpg +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/graveyard/spacetime1.png +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/graveyard/spacetime2.png +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/graveyard/zdisc-cut-elements.png +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/lsetcurv.jpg +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/mlset.png +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/patches.png +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/spacetime.png +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/twophase.pdf +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/unfittedmesh.jpg +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/xfem.jpg +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/graphics/xfes.png +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/latex.template +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/lit-ngsxfem.bib +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/literature.md +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/sphinx/_static/custom.css +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/sphinx/bullets.css +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/sphinx/conf.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/sphinx/contents.rst +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/sphinx/index.rst +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/sphinx/jupyter/index.rst +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/sphinx/requirements.txt +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/sphinx/xfem_misc/demos.rst +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/sphinx/xfem_misc/feature-details.rst +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/sphinx/xfem_misc/installation.rst +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/doc/sphinx/xfem_misc/literature.rst +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/lsetcurving/CMakeLists.txt +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/lsetcurving/calcpointshift.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/lsetcurving/calcpointshift.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/lsetcurving/lsetrefine.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/lsetcurving/lsetrefine.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/lsetcurving/projshift.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/lsetcurving/projshift.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/lsetcurving/python_lsetcurving.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/lsetcurving/shiftintegrators.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/lsetcurving/shiftintegrators.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/ngsolve_addon.cmake +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/pyproject.toml +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/python/CMakeLists.txt +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/python/__init__.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/python/cutmg.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/python/lset_smoothblend.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/python/lset_spacetime.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/python/lsetcurv.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/python/mlset.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/python/ngs_check.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/python/python_ngsxfem.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/python/utils.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/CMakeLists.txt +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/SpaceTimeFE.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/SpaceTimeFE.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/SpaceTimeFESpace.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/SpaceTimeFESpace.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/diffopDt.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/diffopDt.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/diffopFixt.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/diffopFixt.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/python_spacetime.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/spacetime_vtk.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/spacetime_vtk.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/timecf.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/spacetime/timecf.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/ngsxfem_report.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_aggregates.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_backuprule.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_bndcut.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_calc_linearized.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_differential_symbol.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_elementlayers.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_intcurved.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_local_solve.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_localgeom.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_memory_usage.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_mlset_integration.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_mlset_module_functionality.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_mlset_poisson.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_navier_stokes_2d1.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_ngsolve_version.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_nonlin.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_num_nxfem.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_nxfem.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_quadchallenges.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_shifteval.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_simd_cutint.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_simd_lf_blf.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_spacetime_lsetcurv.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_spacetime_set.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_spacetime_vecH1.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_spacetime_vtk.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_spacetimecutrule.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_straightcutrule.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_utils.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/tests/pytests/test_xfes_ndof.py +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/CMakeLists.txt +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/bitarraycf.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/bitarraycf.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/ngsxstd.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/ngsxstd.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/p1interpol.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/python_utils.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/restrictedblf.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/restrictedblf.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/restrictedfespace.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/restrictedfespace.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/spacetimechecks.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/utils/xprolongation.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/CMakeLists.txt +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/aggregates.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/cutinfo.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/cutinfo.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/ghostpenalty.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/ghostpenalty.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/python_xfem.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/sFESpace.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/sFESpace.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/symboliccutbfi.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/symboliccutlfi.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/symboliccutlfi.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/xFESpace.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/xFESpace.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/xfemdiffops.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/xfemdiffops.hpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/xfiniteelement.cpp +0 -0
- {xfem-2.1.2605.dev3 → xfem-2.1.2605.dev11}/xfem/xfiniteelement.hpp +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: xfem
|
|
3
|
-
Version: 2.1.2605.
|
|
3
|
+
Version: 2.1.2605.dev11
|
|
4
4
|
Summary: (ngs)xfem is an Add-on library to Netgen/NGSolve for unfitted/cut FEM.
|
|
5
5
|
Author-Email: Christoph Lehrenfeld <lehrenfeld@math.uni-goettingen.de>
|
|
6
6
|
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
@@ -818,7 +818,8 @@ namespace xintegration
|
|
|
818
818
|
SWAP_DIMENSIONS_POLICY quad_dir_policy,
|
|
819
819
|
LocalHeap & lh)
|
|
820
820
|
{
|
|
821
|
-
static
|
|
821
|
+
static Timer timer("StraightCutIntegrationRuleUntransformed");
|
|
822
|
+
RegionTimer reg (timer);
|
|
822
823
|
// static Timer timercutgeom ("NewStraightCutIntegrationRule::CheckIfCutFast");
|
|
823
824
|
// static Timer timermakequadrule("NewStraightCutIntegrationRule::MakeQuadRule");
|
|
824
825
|
|
|
@@ -132,7 +132,8 @@ namespace xintegration
|
|
|
132
132
|
PointContainer<SD> & pc,
|
|
133
133
|
LocalHeap & lh)
|
|
134
134
|
{
|
|
135
|
-
static
|
|
135
|
+
static Timer timer ("DecomposePrismIntoSimplices");
|
|
136
|
+
RegionTimer reg (timer);
|
|
136
137
|
|
|
137
138
|
ret.SetSize(SD);
|
|
138
139
|
Array< const Vec<SD> * > tet(SD+1);
|
|
@@ -1630,7 +1630,8 @@ namespace xintegration
|
|
|
1630
1630
|
int subdivlvl,
|
|
1631
1631
|
LocalHeap & lh)
|
|
1632
1632
|
{
|
|
1633
|
-
static
|
|
1633
|
+
static Timer timer("OldCutIntegrationRule");
|
|
1634
|
+
RegionTimer reg (timer);
|
|
1634
1635
|
|
|
1635
1636
|
int DIM = trafo.SpaceDim();
|
|
1636
1637
|
auto lset_eval
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
#define FILE_SHIFTEDEVALUATE_CPP
|
|
2
|
+
#include "shiftedevaluate.hpp"
|
|
3
|
+
#include <diffop_impl.hpp>
|
|
4
|
+
#include "../utils/ngsxstd.hpp"
|
|
5
|
+
|
|
6
|
+
namespace ngfem
|
|
7
|
+
{
|
|
8
|
+
|
|
9
|
+
namespace
|
|
10
|
+
{
|
|
11
|
+
// Element-local data of a deformation grid function (back/forth), fetched
|
|
12
|
+
// once per element (independent of the integration point).
|
|
13
|
+
template <int SpaceD>
|
|
14
|
+
struct DeformationData
|
|
15
|
+
{
|
|
16
|
+
bool valid = false;
|
|
17
|
+
const ScalarFiniteElement<SpaceD> * scafe = nullptr;
|
|
18
|
+
FlatMatrixFixWidth<SpaceD> vector {0, (double*)nullptr};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
template <int SpaceD>
|
|
22
|
+
DeformationData<SpaceD>
|
|
23
|
+
GetDeformationData (const GridFunction * gf, ElementId elid, LocalHeap & lh)
|
|
24
|
+
{
|
|
25
|
+
DeformationData<SpaceD> data;
|
|
26
|
+
if (!gf) return data;
|
|
27
|
+
Array<int> dnums;
|
|
28
|
+
gf->GetFESpace()->GetDofNrs(elid, dnums);
|
|
29
|
+
FlatVector<> values(dnums.Size()*SpaceD, lh);
|
|
30
|
+
gf->GetVector().GetIndirect(dnums, values);
|
|
31
|
+
data.vector.Assign(FlatMatrixFixWidth<SpaceD> (dnums.Size(), &values(0)));
|
|
32
|
+
FiniteElement & fe = gf->GetFESpace()->GetFE(elid, lh);
|
|
33
|
+
data.scafe = &dynamic_cast<const ScalarFiniteElement<SpaceD> &> (fe);
|
|
34
|
+
data.valid = true;
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Solve Theta(Phi(x)) = z (with z = Phi_forth(ip)) for the reference point
|
|
39
|
+
// ipx via the fixed point iteration. This is shared between the scalar and
|
|
40
|
+
// the SIMD CalcMatrix/Apply/AddTrans so that both produce identical points.
|
|
41
|
+
template <int SpaceD>
|
|
42
|
+
IntegrationPoint
|
|
43
|
+
SolveShiftedRefPoint (const MappedIntegrationPoint<SpaceD,SpaceD> & mip,
|
|
44
|
+
const DeformationData<SpaceD> & back,
|
|
45
|
+
const DeformationData<SpaceD> & forth,
|
|
46
|
+
LocalHeap & lh)
|
|
47
|
+
{
|
|
48
|
+
HeapReset hr(lh);
|
|
49
|
+
IntegrationPoint ip(mip.IP());
|
|
50
|
+
|
|
51
|
+
Vec<SpaceD> z = mip.GetPoint();
|
|
52
|
+
|
|
53
|
+
if (forth.valid)
|
|
54
|
+
{
|
|
55
|
+
FlatVector<> shape_forth(forth.vector.Height(), lh);
|
|
56
|
+
forth.scafe->CalcShape(ip, shape_forth);
|
|
57
|
+
z += Trans(forth.vector) * shape_forth;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Solve the problem Theta(Phi(x)) = z
|
|
61
|
+
|
|
62
|
+
const double h = pow(abs(mip.GetJacobiDet()), 1./SpaceD);
|
|
63
|
+
Vec<SpaceD> diff;
|
|
64
|
+
IntegrationPoint ipx(ip);
|
|
65
|
+
IntegrationPoint ipx0(0,0,0);
|
|
66
|
+
MappedIntegrationPoint<SpaceD,SpaceD> mip_x0(ipx0, mip.GetTransformation());
|
|
67
|
+
Vec<SpaceD> zdiff = z - mip_x0.GetPoint();
|
|
68
|
+
int its = 0;
|
|
69
|
+
|
|
70
|
+
if (back.valid)
|
|
71
|
+
{
|
|
72
|
+
FlatVector<> shape_back(back.vector.Height(), lh);
|
|
73
|
+
Vec<SpaceD> dvec_back;
|
|
74
|
+
|
|
75
|
+
Vec<SpaceD> ipx_best_so_far;
|
|
76
|
+
double diff_best_so_far;
|
|
77
|
+
bool first = true; int idx_best = 0;
|
|
78
|
+
|
|
79
|
+
// Fixed point iteration
|
|
80
|
+
while (its < globxvar.FIXED_POINT_ITER_TRESHOLD)
|
|
81
|
+
{
|
|
82
|
+
back.scafe->CalcShape(ipx, shape_back);
|
|
83
|
+
dvec_back = Trans(back.vector) * shape_back;
|
|
84
|
+
|
|
85
|
+
FlatVector<double> fv(SpaceD, &(ipx.Point())(0));
|
|
86
|
+
|
|
87
|
+
diff = zdiff - dvec_back - mip.GetJacobian() * fv;
|
|
88
|
+
if(first) {
|
|
89
|
+
diff_best_so_far = L2Norm(diff);
|
|
90
|
+
ipx_best_so_far = ipx.Point();
|
|
91
|
+
idx_best = its;
|
|
92
|
+
first = false;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
if (L2Norm(diff) < diff_best_so_far){
|
|
96
|
+
diff_best_so_far = L2Norm(diff);
|
|
97
|
+
ipx_best_so_far = ipx.Point();
|
|
98
|
+
idx_best = its;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if ( L2Norm(diff) < globxvar.EPS_SHIFTED_EVAL*h ) break;
|
|
102
|
+
ipx.Point() = mip.GetJacobianInverse() * (zdiff - dvec_back);
|
|
103
|
+
|
|
104
|
+
its++;
|
|
105
|
+
}
|
|
106
|
+
if (its == globxvar.FIXED_POINT_ITER_TRESHOLD){
|
|
107
|
+
if(diff_best_so_far < 1e0) {
|
|
108
|
+
cout << IM(globxvar.NON_CONV_WARN_MSG_LVL) << "In Shifted_eval: Not converged, but the "+to_string(idx_best)+"th iteration seems a reasonable candidate" << endl;
|
|
109
|
+
ipx.Point() = ipx_best_so_far;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
cout << "Last diff: " << diff << endl;
|
|
113
|
+
cout << "Best diff: " << diff_best_so_far << endl;
|
|
114
|
+
throw Exception(" shifted eval took FIXED_POINT_ITER_TRESHOLD = "+to_string(globxvar.FIXED_POINT_ITER_TRESHOLD)+" iterations and didn't (yet?) converge! In addition, the best interation step is no good fallback candidate.");
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
else
|
|
119
|
+
{
|
|
120
|
+
// Fixed point iteration
|
|
121
|
+
while (its < globxvar.FIXED_POINT_ITER_TRESHOLD)
|
|
122
|
+
{
|
|
123
|
+
FlatVector<double> fv(SpaceD, &(ipx.Point())(0));
|
|
124
|
+
diff = zdiff - mip.GetJacobian() * fv;
|
|
125
|
+
if ( L2Norm(diff) < globxvar.EPS_SHIFTED_EVAL*h ) break;
|
|
126
|
+
ipx.Point() = mip.GetJacobianInverse() * zdiff;
|
|
127
|
+
its++;
|
|
128
|
+
}
|
|
129
|
+
if (its == globxvar.FIXED_POINT_ITER_TRESHOLD)
|
|
130
|
+
throw Exception(" shifted eval took FIXED_POINT_ITER_TRESHOLD iterations and didn't (yet?) converge! ");
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return ipx;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// SIMD version of the fixed point iteration: solves for the shifted
|
|
137
|
+
// reference coordinates of a whole SIMD<IntegrationPoint> group (all lanes
|
|
138
|
+
// at once), mathematically equivalent to the scalar SolveShiftedRefPoint.
|
|
139
|
+
//
|
|
140
|
+
// Like the scalar version, the geometry Jacobian (jac/jacinv) is FROZEN at
|
|
141
|
+
// the original integration point; only the back-deformation displacement
|
|
142
|
+
// dvec_back is recomputed at the current iterate. Lanes converge
|
|
143
|
+
// independently via a frozen-mask (incl. best-so-far fallback / throw).
|
|
144
|
+
template <int D>
|
|
145
|
+
Vec<D,SIMD<double>>
|
|
146
|
+
SolveShiftedRefPointSIMD (const SIMD<IntegrationPoint> & sip, // original ip group
|
|
147
|
+
const Vec<D,SIMD<double>> & point0, // Phi(ip0)
|
|
148
|
+
const Mat<D,D,SIMD<double>> & jac,
|
|
149
|
+
const Mat<D,D,SIMD<double>> & jacinv,
|
|
150
|
+
SIMD<double> jacdet,
|
|
151
|
+
const Vec<D,SIMD<double>> & phi0, // Phi(0)
|
|
152
|
+
const DeformationData<D> & back,
|
|
153
|
+
const DeformationData<D> & forth,
|
|
154
|
+
SIMD<double> done_init, // 1.0 for padding lanes
|
|
155
|
+
LocalHeap & lh)
|
|
156
|
+
{
|
|
157
|
+
constexpr size_t W = SIMD<double>::Size();
|
|
158
|
+
Vec<D,SIMD<double>> ip0ref = sip;
|
|
159
|
+
|
|
160
|
+
// evaluate a deformation (back/forth) at reference coords -> displacement
|
|
161
|
+
auto eval_dvec = [&] (const Vec<D,SIMD<double>> & ref,
|
|
162
|
+
const DeformationData<D> & dat) -> Vec<D,SIMD<double>>
|
|
163
|
+
{
|
|
164
|
+
HeapReset hr(lh);
|
|
165
|
+
SIMD<IntegrationPoint> cur = sip;
|
|
166
|
+
for (int d = 0; d < D; d++) cur(d) = ref(d);
|
|
167
|
+
SIMD_IntegrationRule ir1(1, &cur);
|
|
168
|
+
FlatMatrix<SIMD<double>> shape(dat.scafe->GetNDof(), 1, lh);
|
|
169
|
+
dat.scafe->CalcShape(ir1, shape);
|
|
170
|
+
Vec<D,SIMD<double>> dvec(SIMD<double>(0.0));
|
|
171
|
+
for (size_t k = 0; k < dat.vector.Height(); k++)
|
|
172
|
+
for (int d = 0; d < D; d++)
|
|
173
|
+
dvec(d) += dat.vector(k,d) * shape(k,0);
|
|
174
|
+
return dvec;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
Vec<D,SIMD<double>> z = point0;
|
|
178
|
+
if (forth.valid) z += eval_dvec(ip0ref, forth);
|
|
179
|
+
Vec<D,SIMD<double>> zdiff = z - phi0;
|
|
180
|
+
|
|
181
|
+
const SIMD<double> h = pow(fabs(jacdet), 1.0/D);
|
|
182
|
+
const SIMD<double> eps_h = globxvar.EPS_SHIFTED_EVAL * h;
|
|
183
|
+
const SIMD<double> eh2 = eps_h * eps_h;
|
|
184
|
+
|
|
185
|
+
Vec<D,SIMD<double>> ipx = ip0ref;
|
|
186
|
+
SIMD<double> done = done_init; // 1.0 => lane frozen
|
|
187
|
+
SIMD<double> best_nrm2 (1e99);
|
|
188
|
+
Vec<D,SIMD<double>> best_ipx = ipx;
|
|
189
|
+
int its = 0;
|
|
190
|
+
|
|
191
|
+
while (its < globxvar.FIXED_POINT_ITER_TRESHOLD)
|
|
192
|
+
{
|
|
193
|
+
Vec<D,SIMD<double>> dvec_back (SIMD<double>(0.0));
|
|
194
|
+
if (back.valid) dvec_back = eval_dvec(ipx, back);
|
|
195
|
+
|
|
196
|
+
Vec<D,SIMD<double>> rhs = zdiff - dvec_back;
|
|
197
|
+
Vec<D,SIMD<double>> diff = rhs - jac*ipx;
|
|
198
|
+
SIMD<double> nrm2 = diff(0)*diff(0);
|
|
199
|
+
for (int d = 1; d < D; d++) nrm2 += diff(d)*diff(d);
|
|
200
|
+
|
|
201
|
+
// best-so-far (used as fallback in the back-case)
|
|
202
|
+
SIMD<mask64> better = nrm2 < best_nrm2;
|
|
203
|
+
best_nrm2 = If(better, nrm2, best_nrm2);
|
|
204
|
+
for (int d = 0; d < D; d++) best_ipx(d) = If(better, ipx(d), best_ipx(d));
|
|
205
|
+
|
|
206
|
+
done = If(nrm2 < eh2, SIMD<double>(1.0), done);
|
|
207
|
+
if (HSum(done) >= double(W) - 0.5) break; // all lanes done
|
|
208
|
+
|
|
209
|
+
Vec<D,SIMD<double>> ipx_upd = jacinv * rhs;
|
|
210
|
+
SIMD<mask64> frozen = SIMD<double>(0.5) < done;
|
|
211
|
+
for (int d = 0; d < D; d++) ipx(d) = If(frozen, ipx(d), ipx_upd(d));
|
|
212
|
+
its++;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
SIMD<mask64> notdone = done < SIMD<double>(0.5);
|
|
216
|
+
if (HSum(If(notdone, SIMD<double>(1.0), SIMD<double>(0.0))) > 0.5)
|
|
217
|
+
{
|
|
218
|
+
if (back.valid)
|
|
219
|
+
{
|
|
220
|
+
// bad lane: not converged and best iterate is no good candidate (L2 >= 1)
|
|
221
|
+
SIMD<mask64> bad = notdone && (SIMD<double>(1.0) <= best_nrm2);
|
|
222
|
+
if (HSum(If(bad, SIMD<double>(1.0), SIMD<double>(0.0))) > 0.5)
|
|
223
|
+
throw Exception(" shifted eval took FIXED_POINT_ITER_TRESHOLD = "+to_string(globxvar.FIXED_POINT_ITER_TRESHOLD)+" iterations and didn't (yet?) converge! In addition, the best interation step is no good fallback candidate.");
|
|
224
|
+
cout << IM(globxvar.NON_CONV_WARN_MSG_LVL) << "In Shifted_eval (SIMD): Not converged, using best iterate as fallback candidate." << endl;
|
|
225
|
+
for (int d = 0; d < D; d++) ipx(d) = If(notdone, best_ipx(d), ipx(d));
|
|
226
|
+
}
|
|
227
|
+
else
|
|
228
|
+
throw Exception(" shifted eval took FIXED_POINT_ITER_TRESHOLD iterations and didn't (yet?) converge! ");
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return ipx;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
template <int SpaceD>
|
|
236
|
+
void DiffOpShiftedEval<SpaceD> ::
|
|
237
|
+
CalcMatrix (const FiniteElement & bfel,
|
|
238
|
+
const BaseMappedIntegrationPoint & bmip,
|
|
239
|
+
BareSliceMatrix<double,ColMajor> mat,
|
|
240
|
+
LocalHeap & lh) const
|
|
241
|
+
{
|
|
242
|
+
const MappedIntegrationPoint<SpaceD,SpaceD> & mip =
|
|
243
|
+
static_cast<const MappedIntegrationPoint<SpaceD,SpaceD>&> (bmip);
|
|
244
|
+
|
|
245
|
+
auto elid = mip.GetTransformation().GetElementId();
|
|
246
|
+
auto data_back = GetDeformationData<SpaceD> (back.get(), elid, lh);
|
|
247
|
+
auto data_forth = GetDeformationData<SpaceD> (forth.get(), elid, lh);
|
|
248
|
+
|
|
249
|
+
IntegrationPoint ipx = SolveShiftedRefPoint<SpaceD> (mip, data_back, data_forth, lh);
|
|
250
|
+
|
|
251
|
+
MappedIntegrationPoint<SpaceD, SpaceD> mipx(ipx, mip.GetTransformation());
|
|
252
|
+
evaluator->CalcMatrix(bfel, mipx, mat, lh);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
template <int SpaceD>
|
|
256
|
+
SIMD_BaseMappedIntegrationRule &
|
|
257
|
+
DiffOpShiftedEval<SpaceD> ::
|
|
258
|
+
CreateShiftedMIR (const SIMD_BaseMappedIntegrationRule & bmir,
|
|
259
|
+
LocalHeap & lh) const
|
|
260
|
+
{
|
|
261
|
+
const ElementTransformation & trafo = bmir.GetTransformation();
|
|
262
|
+
auto elid = trafo.GetElementId();
|
|
263
|
+
auto data_back = GetDeformationData<SpaceD> (back.get(), elid, lh);
|
|
264
|
+
auto data_forth = GetDeformationData<SpaceD> (forth.get(), elid, lh);
|
|
265
|
+
|
|
266
|
+
const SIMD_IntegrationRule & ir = bmir.IR();
|
|
267
|
+
const size_t n = ir.Size();
|
|
268
|
+
const size_t nip = ir.GetNIP();
|
|
269
|
+
constexpr size_t W = SIMD<IntegrationPoint>::Size();
|
|
270
|
+
|
|
271
|
+
// Phi(0): physical image of the reference origin (same for all lanes).
|
|
272
|
+
IntegrationPoint ip0(0,0,0);
|
|
273
|
+
MappedIntegrationPoint<SpaceD,SpaceD> mip0(ip0, trafo);
|
|
274
|
+
Vec<SpaceD,SIMD<double>> phi0;
|
|
275
|
+
for (int d = 0; d < SpaceD; d++) phi0(d) = SIMD<double>(mip0.GetPoint()(d));
|
|
276
|
+
|
|
277
|
+
const SIMD<double> lanes ([] (int l) { return double(l); });
|
|
278
|
+
|
|
279
|
+
SIMD<IntegrationPoint> * mem = new (lh) SIMD<IntegrationPoint>[n];
|
|
280
|
+
|
|
281
|
+
for (size_t i = 0; i < n; i++)
|
|
282
|
+
{
|
|
283
|
+
const SIMD<IntegrationPoint> & sip = ir[i];
|
|
284
|
+
const auto & smip =
|
|
285
|
+
static_cast<const SIMD<MappedIntegrationPoint<SpaceD,SpaceD>>&> (bmir[i]);
|
|
286
|
+
|
|
287
|
+
// padding lanes (index >= nip) are marked done so they neither block the
|
|
288
|
+
// iteration nor trigger spurious non-convergence.
|
|
289
|
+
const size_t remain = (i*W < nip) ? min(W, nip - i*W) : size_t(0);
|
|
290
|
+
SIMD<double> done_init = If(SIMD<double>(double(remain)) <= lanes,
|
|
291
|
+
SIMD<double>(1.0), SIMD<double>(0.0));
|
|
292
|
+
|
|
293
|
+
Vec<SpaceD,SIMD<double>> ipx =
|
|
294
|
+
SolveShiftedRefPointSIMD<SpaceD> (sip, smip.GetPoint(), smip.GetJacobian(),
|
|
295
|
+
smip.GetJacobianInverse(), smip.GetJacobiDet(),
|
|
296
|
+
phi0, data_back, data_forth, done_init, lh);
|
|
297
|
+
|
|
298
|
+
SIMD<IntegrationPoint> res = sip; // keep weight / facetnr / unused coord
|
|
299
|
+
for (int d = 0; d < SpaceD; d++) res(d) = ipx(d);
|
|
300
|
+
mem[i] = res;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
SIMD_IntegrationRule shifted_ir(n, mem);
|
|
304
|
+
shifted_ir.SetNIP(nip);
|
|
305
|
+
return trafo(shifted_ir, lh);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
template <int SpaceD>
|
|
309
|
+
void DiffOpShiftedEval<SpaceD> ::
|
|
310
|
+
CalcMatrix (const FiniteElement & bfel,
|
|
311
|
+
const SIMD_BaseMappedIntegrationRule & bmir,
|
|
312
|
+
BareSliceMatrix<SIMD<double>> mat) const
|
|
313
|
+
{
|
|
314
|
+
static thread_local LocalHeap lh(10*1000*1000, "shiftedeval_simd_calcmatrix", true);
|
|
315
|
+
HeapReset hr(lh);
|
|
316
|
+
auto & smir = CreateShiftedMIR(bmir, lh);
|
|
317
|
+
evaluator->CalcMatrix(bfel, smir, mat);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
template <int SpaceD>
|
|
322
|
+
void DiffOpShiftedEval<SpaceD> ::
|
|
323
|
+
Apply (const FiniteElement & fel,
|
|
324
|
+
const BaseMappedIntegrationPoint & mip,
|
|
325
|
+
BareSliceVector<double> x,
|
|
326
|
+
FlatVector<double> flux,
|
|
327
|
+
LocalHeap & lh) const
|
|
328
|
+
{
|
|
329
|
+
HeapReset hr(lh);
|
|
330
|
+
FlatMatrix<double,ColMajor> mat(Dim(), fel.GetNDof()*BlockDim(), lh);
|
|
331
|
+
CalcMatrix (fel, mip, mat, lh);
|
|
332
|
+
flux = mat * x;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
template <int SpaceD>
|
|
336
|
+
void DiffOpShiftedEval<SpaceD> ::
|
|
337
|
+
Apply (const FiniteElement & bfel,
|
|
338
|
+
const SIMD_BaseMappedIntegrationRule & bmir,
|
|
339
|
+
BareSliceVector<double> x,
|
|
340
|
+
BareSliceMatrix<SIMD<double>> flux) const
|
|
341
|
+
{
|
|
342
|
+
static thread_local LocalHeap lh(10*1000*1000, "shiftedeval_simd_apply", true);
|
|
343
|
+
HeapReset hr(lh);
|
|
344
|
+
auto & smir = CreateShiftedMIR(bmir, lh);
|
|
345
|
+
evaluator->Apply(bfel, smir, x, flux);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
template <int SpaceD>
|
|
349
|
+
void DiffOpShiftedEval<SpaceD> ::
|
|
350
|
+
ApplyTrans (const FiniteElement & fel,
|
|
351
|
+
const BaseMappedIntegrationPoint & mip,
|
|
352
|
+
FlatVector<double> flux,
|
|
353
|
+
BareSliceVector<double> x,
|
|
354
|
+
LocalHeap & lh) const
|
|
355
|
+
{
|
|
356
|
+
HeapReset hr(lh);
|
|
357
|
+
FlatMatrix<double,ColMajor> mat(Dim(), fel.GetNDof()*BlockDim(), lh);
|
|
358
|
+
CalcMatrix (fel, mip, mat, lh);
|
|
359
|
+
x.Range(0,fel.GetNDof()) = Trans(mat) * flux;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
template <int SpaceD>
|
|
363
|
+
void DiffOpShiftedEval<SpaceD> ::
|
|
364
|
+
AddTrans (const FiniteElement & bfel,
|
|
365
|
+
const SIMD_BaseMappedIntegrationRule & bmir,
|
|
366
|
+
BareSliceMatrix<SIMD<double>> flux,
|
|
367
|
+
BareSliceVector<double> x) const
|
|
368
|
+
{
|
|
369
|
+
static thread_local LocalHeap lh(10*1000*1000, "shiftedeval_simd_addtrans", true);
|
|
370
|
+
HeapReset hr(lh);
|
|
371
|
+
auto & smir = CreateShiftedMIR(bmir, lh);
|
|
372
|
+
evaluator->AddTrans(bfel, smir, flux, x);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
template class DiffOpShiftedEval<1>;
|
|
376
|
+
template class DiffOpShiftedEval<2>;
|
|
377
|
+
template class DiffOpShiftedEval<3>;
|
|
378
|
+
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
|
|
@@ -49,14 +49,27 @@ private:
|
|
|
49
49
|
BareSliceMatrix<double,ColMajor> mat,
|
|
50
50
|
LocalHeap & lh) const;
|
|
51
51
|
|
|
52
|
+
// SIMD variant: evaluate the (inner) evaluator at the shifted integration
|
|
53
|
+
// rule. Removes the need for the non-SIMD fallback (and its warnings).
|
|
54
|
+
virtual void
|
|
55
|
+
CalcMatrix (const FiniteElement & bfel,
|
|
56
|
+
const SIMD_BaseMappedIntegrationRule & bmir,
|
|
57
|
+
BareSliceMatrix<SIMD<double>> mat) const;
|
|
58
|
+
|
|
52
59
|
|
|
53
60
|
virtual void
|
|
54
61
|
Apply (const FiniteElement & fel,
|
|
55
62
|
const BaseMappedIntegrationPoint & mip,
|
|
56
|
-
BareSliceVector<double> x,
|
|
63
|
+
BareSliceVector<double> x,
|
|
57
64
|
FlatVector<double> flux,
|
|
58
65
|
LocalHeap & lh) const;
|
|
59
|
-
|
|
66
|
+
|
|
67
|
+
virtual void
|
|
68
|
+
Apply (const FiniteElement & bfel,
|
|
69
|
+
const SIMD_BaseMappedIntegrationRule & bmir,
|
|
70
|
+
BareSliceVector<double> x,
|
|
71
|
+
BareSliceMatrix<SIMD<double>> flux) const;
|
|
72
|
+
|
|
60
73
|
virtual void
|
|
61
74
|
ApplyTrans (const FiniteElement & fel,
|
|
62
75
|
const BaseMappedIntegrationPoint & mip,
|
|
@@ -64,6 +77,19 @@ private:
|
|
|
64
77
|
BareSliceVector<double> x,
|
|
65
78
|
LocalHeap & lh) const;
|
|
66
79
|
|
|
80
|
+
virtual void
|
|
81
|
+
AddTrans (const FiniteElement & bfel,
|
|
82
|
+
const SIMD_BaseMappedIntegrationRule & bmir,
|
|
83
|
+
BareSliceMatrix<SIMD<double>> flux,
|
|
84
|
+
BareSliceVector<double> x) const;
|
|
85
|
+
|
|
86
|
+
private:
|
|
87
|
+
// Build the shifted SIMD integration rule (the inner evaluator is then
|
|
88
|
+
// evaluated on this rule). Allocated on lh.
|
|
89
|
+
SIMD_BaseMappedIntegrationRule &
|
|
90
|
+
CreateShiftedMIR (const SIMD_BaseMappedIntegrationRule & bmir,
|
|
91
|
+
LocalHeap & lh) const;
|
|
92
|
+
|
|
67
93
|
};
|
|
68
94
|
|
|
69
95
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.1.2605.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 1, 2605, '
|
|
21
|
+
__version__ = version = '2.1.2605.dev11'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 1, 2605, 'dev11')
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g485efc1cf'
|
|
@@ -71,6 +71,9 @@ add_test(NAME pytests_nxfem COMMAND ${NETGEN_PYTHON_EXECUTABLE} -m pytest
|
|
|
71
71
|
add_test(NAME pytests_shifteval COMMAND ${NETGEN_PYTHON_EXECUTABLE} -m pytest
|
|
72
72
|
"${PROJECT_SOURCE_DIR}/tests/pytests/test_shifteval.py" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/tests")
|
|
73
73
|
|
|
74
|
+
add_test(NAME pytests_shifteval_simd COMMAND ${NETGEN_PYTHON_EXECUTABLE} -m pytest
|
|
75
|
+
"${PROJECT_SOURCE_DIR}/tests/pytests/test_shifteval_simd.py" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/tests")
|
|
76
|
+
|
|
74
77
|
add_test(NAME pytests_quadchallenges COMMAND ${NETGEN_PYTHON_EXECUTABLE} -m pytest
|
|
75
78
|
"${PROJECT_SOURCE_DIR}/tests/pytests/test_quadchallenges.py" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/tests")
|
|
76
79
|
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Compare the SIMD and the non-SIMD evaluation path of shifted_eval.
|
|
2
|
+
#
|
|
3
|
+
# shifted_eval is realized as a (Grid)function CoefficientFunction whose
|
|
4
|
+
# DifferentialOperator (DiffOpShiftedEval) now provides SIMD overloads.
|
|
5
|
+
# Evaluating the resulting CF (e.g. via GridFunction.Set) uses the SIMD
|
|
6
|
+
# Apply when use_simd=True and the scalar Apply otherwise. Both paths
|
|
7
|
+
# compute the same shifted reference points, hence the results must agree
|
|
8
|
+
# up to round-off.
|
|
9
|
+
|
|
10
|
+
import pytest
|
|
11
|
+
from ngsolve import *
|
|
12
|
+
from ngsolve.meshes import *
|
|
13
|
+
from xfem import *
|
|
14
|
+
|
|
15
|
+
ngsglobals.msg_level = 1
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _make_mesh(dimension):
|
|
19
|
+
if dimension == 2:
|
|
20
|
+
return MakeStructured2DMesh(quads=False, nx=8, ny=8)
|
|
21
|
+
return MakeStructured3DMesh(hexes=False, nx=8, ny=8, nz=8)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _make_deformations(mesh, dimension, fes_dfm, use_back, use_forth):
|
|
25
|
+
dfm_back = GridFunction(fes_dfm)
|
|
26
|
+
dfm_forth = GridFunction(fes_dfm)
|
|
27
|
+
if use_back:
|
|
28
|
+
if dimension == 2:
|
|
29
|
+
dfm_back.Set(CoefficientFunction((0.2 * sin(5 * y), 0.2 * cos(5 * x))))
|
|
30
|
+
else:
|
|
31
|
+
dfm_back.Set(CoefficientFunction((0.15 * sin(5 * y), 0.15 * cos(5 * z),
|
|
32
|
+
0.15 * sin(5 * x))))
|
|
33
|
+
# keep the deformation zero on the vertices (as in test_shifteval.py)
|
|
34
|
+
for i in range(dimension * mesh.nv):
|
|
35
|
+
dfm_back.vec[i] = 0.0
|
|
36
|
+
if use_forth:
|
|
37
|
+
if dimension == 2:
|
|
38
|
+
dfm_forth.Set(CoefficientFunction((0.1 * cos(4 * x), 0.1 * sin(4 * y))))
|
|
39
|
+
else:
|
|
40
|
+
dfm_forth.Set(CoefficientFunction((0.1 * cos(4 * x), 0.1 * sin(4 * y),
|
|
41
|
+
0.1 * cos(4 * z))))
|
|
42
|
+
for i in range(dimension * mesh.nv):
|
|
43
|
+
dfm_forth.vec[i] = 0.0
|
|
44
|
+
back = dfm_back if use_back else None
|
|
45
|
+
forth = dfm_forth if use_forth else None
|
|
46
|
+
return back, forth
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@pytest.mark.parametrize("dimension", [2, 3])
|
|
50
|
+
@pytest.mark.parametrize("use_back,use_forth", [(True, False), (False, True), (True, True)])
|
|
51
|
+
def test_shifteval_simd_vs_nosimd(dimension, use_back, use_forth):
|
|
52
|
+
mesh = _make_mesh(dimension)
|
|
53
|
+
|
|
54
|
+
fes = H1(mesh, order=3)
|
|
55
|
+
fes_dfm = H1(mesh, order=3, dim=dimension)
|
|
56
|
+
|
|
57
|
+
back, forth = _make_deformations(mesh, dimension, fes_dfm, use_back, use_forth)
|
|
58
|
+
|
|
59
|
+
gfu_old = GridFunction(fes)
|
|
60
|
+
gfu_old.Set(sin(10 * y) + cos(7 * x))
|
|
61
|
+
|
|
62
|
+
cf = shifted_eval(gfu_old, back, forth)
|
|
63
|
+
|
|
64
|
+
# --- Apply path: GridFunction.Set with and without SIMD ---
|
|
65
|
+
gf_simd = GridFunction(fes)
|
|
66
|
+
gf_nosimd = GridFunction(fes)
|
|
67
|
+
gf_simd.Set(cf, use_simd=True)
|
|
68
|
+
gf_nosimd.Set(cf, use_simd=False)
|
|
69
|
+
|
|
70
|
+
diff_set = sqrt(Integrate((gf_simd - gf_nosimd) ** 2, mesh, order=8))
|
|
71
|
+
ref = sqrt(Integrate(gf_nosimd ** 2, mesh, order=8))
|
|
72
|
+
print(f"dim={dimension} back={use_back} forth={use_forth} "
|
|
73
|
+
f"|set_simd - set_nosimd|_L2 = {diff_set:.3e} (ref {ref:.3e})")
|
|
74
|
+
assert diff_set < 1e-11 * max(ref, 1.0)
|
|
75
|
+
|
|
76
|
+
# --- AddTrans path: linear form assembly with and without SIMD ---
|
|
77
|
+
v = fes.TestFunction()
|
|
78
|
+
lf_simd = LinearForm(fes)
|
|
79
|
+
lf_simd += SymbolicLFI(cf * v, simd_evaluate=True)
|
|
80
|
+
lf_simd.Assemble()
|
|
81
|
+
lf_nosimd = LinearForm(fes)
|
|
82
|
+
lf_nosimd += SymbolicLFI(cf * v, simd_evaluate=False)
|
|
83
|
+
lf_nosimd.Assemble()
|
|
84
|
+
|
|
85
|
+
diffvec = lf_simd.vec.CreateVector()
|
|
86
|
+
diffvec.data = lf_simd.vec - lf_nosimd.vec
|
|
87
|
+
diff_lf = Norm(diffvec)
|
|
88
|
+
refn = Norm(lf_nosimd.vec)
|
|
89
|
+
print(f"dim={dimension} back={use_back} forth={use_forth} "
|
|
90
|
+
f"|lf_simd - lf_nosimd|_2 = {diff_lf:.3e} (ref {refn:.3e})")
|
|
91
|
+
assert diff_lf < 1e-11 * max(refn, 1.0)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
@pytest.mark.parametrize("order", [2, 3, 4])
|
|
95
|
+
def test_shifteval_simd_vs_nosimd_curved(order):
|
|
96
|
+
# On curved (non-affine) elements the geometry Jacobian varies within an
|
|
97
|
+
# element. Both the scalar and the SIMD fixed point iteration use the
|
|
98
|
+
# Jacobian *frozen at the original integration point*, so the two paths must
|
|
99
|
+
# still agree up to round-off (this case is what distinguishes the frozen
|
|
100
|
+
# Jacobian from a per-iteration update; an affine mesh cannot).
|
|
101
|
+
import ngsolve
|
|
102
|
+
from netgen.geom2d import SplineGeometry
|
|
103
|
+
geo = SplineGeometry()
|
|
104
|
+
geo.AddCircle((0, 0), 1, bc="circle")
|
|
105
|
+
mesh = ngsolve.Mesh(geo.GenerateMesh(maxh=0.3))
|
|
106
|
+
mesh.Curve(5)
|
|
107
|
+
|
|
108
|
+
fes = H1(mesh, order=order)
|
|
109
|
+
fes_dfm = H1(mesh, order=order, dim=2)
|
|
110
|
+
b = GridFunction(fes_dfm)
|
|
111
|
+
b.Set(CoefficientFunction((0.05 * sin(3 * y), 0.05 * cos(3 * x))))
|
|
112
|
+
|
|
113
|
+
gfu_old = GridFunction(fes)
|
|
114
|
+
gfu_old.Set(sin(4 * x) + cos(3 * y))
|
|
115
|
+
cf = shifted_eval(gfu_old, b, None)
|
|
116
|
+
|
|
117
|
+
gf_simd = GridFunction(fes)
|
|
118
|
+
gf_nosimd = GridFunction(fes)
|
|
119
|
+
gf_simd.Set(cf, use_simd=True)
|
|
120
|
+
gf_nosimd.Set(cf, use_simd=False)
|
|
121
|
+
|
|
122
|
+
diff = sqrt(Integrate((gf_simd - gf_nosimd) ** 2, mesh, order=2 * order))
|
|
123
|
+
ref = sqrt(Integrate(gf_nosimd ** 2, mesh, order=2 * order))
|
|
124
|
+
print(f"curved order={order} |simd - nosimd|_L2 = {diff:.3e} (ref {ref:.3e})")
|
|
125
|
+
assert diff < 1e-11 * max(ref, 1.0)
|
|
@@ -26,7 +26,8 @@ namespace ngcomp
|
|
|
26
26
|
|
|
27
27
|
void InterpolateP1::Do(LocalHeap & lh, double eps_perturbation, double tref_val)
|
|
28
28
|
{
|
|
29
|
-
static
|
|
29
|
+
static Timer timer ("LsetCurv::InterpolateP1::Do");
|
|
30
|
+
RegionTimer reg (timer);
|
|
30
31
|
|
|
31
32
|
int nv=ma->GetNV();
|
|
32
33
|
gf_p1->GetVector() = 0.0;
|