xfem 2.1.2604.dev2__tar.gz → 2.1.2604.dev10__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.
Files changed (250) hide show
  1. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/PKG-INFO +1 -1
  2. xfem-2.1.2604.dev10/_ngsolve_deps_provider.py +33 -0
  3. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/cutintegral.cpp +1 -1
  4. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/pyproject.toml +6 -2
  5. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/python/__init__.py +19 -3
  6. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/python/_version.py +3 -3
  7. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/CMakeLists.txt +6 -0
  8. xfem-2.1.2604.dev10/tests/pytests/test_bndcut.py +186 -0
  9. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/.ci/build_pip.sh +0 -0
  10. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/.ci/build_pip_mac.sh +0 -0
  11. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/.ci/ci_ctests.sh +0 -0
  12. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/.ci/fix_auditwheel_policy.py +0 -0
  13. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/.github/workflows/extras-workflow.yml +0 -0
  14. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/.github/workflows/paper-workflow.yml +0 -0
  15. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/.github/workflows/pypi.yml +0 -0
  16. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/.gitignore +0 -0
  17. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/.gitlab-ci.yml +0 -0
  18. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/.gitmodules +0 -0
  19. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/CMakeLists.txt +0 -0
  20. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/Dockerfile +0 -0
  21. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/INSTALLATION.md +0 -0
  22. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/LICENSE +0 -0
  23. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/MANIFEST.in +0 -0
  24. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/README.md +0 -0
  25. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cmake_modules/check_submodules.cmake +0 -0
  26. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cmake_modules/cmake_uninstall.cmake.in +0 -0
  27. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/config.h.cmake +0 -0
  28. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/CMakeLists.txt +0 -0
  29. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/cutintegral.hpp +0 -0
  30. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/fieldeval.cpp +0 -0
  31. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/fieldeval.hpp +0 -0
  32. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/lsetintdomain.cpp +0 -0
  33. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/lsetintdomain.hpp +0 -0
  34. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/mlsetintegration.cpp +0 -0
  35. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/mlsetintegration.hpp +0 -0
  36. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/python_cutint.cpp +0 -0
  37. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/spacetimecutrule.cpp +0 -0
  38. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/spacetimecutrule.hpp +0 -0
  39. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/straightcutrule.cpp +0 -0
  40. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/straightcutrule.hpp +0 -0
  41. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/xdecompose.cpp +0 -0
  42. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/xdecompose.hpp +0 -0
  43. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/xintegration.cpp +0 -0
  44. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/cutint/xintegration.hpp +0 -0
  45. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/CMakeLists.txt +0 -0
  46. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/README.md +0 -0
  47. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/aggregates/aggfem_shapetester.py +0 -0
  48. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/aggregates/fictdom_aggfem.py +0 -0
  49. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/aggregates/fictdom_dg_aggfem.py +0 -0
  50. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/fictdom.py +0 -0
  51. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/fictdom_dg.py +0 -0
  52. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/fictdom_mlset.py +0 -0
  53. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/compp1prolong-playground.py +0 -0
  54. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/cutint/area_of_a_circle_quads.py +0 -0
  55. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/cutint/integrate_one_big_quad2D.py +0 -0
  56. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/cutint/integrate_one_big_quad3D.py +0 -0
  57. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/fictdom_dg3d.py +0 -0
  58. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/lsetcurving/integrate.py +0 -0
  59. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/make_uniform3D_grid.py +0 -0
  60. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mg_cut_poisson_p1.py +0 -0
  61. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mg_cut_poisson_p1p2_skinny.py +0 -0
  62. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mg_cut_poisson_p2.py +0 -0
  63. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mg_cut_poisson_p2_skinny.py +0 -0
  64. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mg_p1_working.py +0 -0
  65. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/cube.py +0 -0
  66. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/cube2.py +0 -0
  67. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/cube_codim2_test.py +0 -0
  68. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/even_simpler.py +0 -0
  69. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/multiple_triangles.py +0 -0
  70. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/simple.py +0 -0
  71. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/simple_mlcutinfo.py +0 -0
  72. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/simple_with_convinience.py +0 -0
  73. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/square.py +0 -0
  74. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/tensor_functions.py +0 -0
  75. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/test_GetOuterBoundary.py +0 -0
  76. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/test_draw.py +0 -0
  77. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/triangle.py +0 -0
  78. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/zalesak_disk.py +0 -0
  79. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/mlset/zalesak_sphere.py +0 -0
  80. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/p1prolong-playground.py +0 -0
  81. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/p2prolong-playground.py +0 -0
  82. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/graveyard/stokesxfem.py +0 -0
  83. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/linelasticity.py +0 -0
  84. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/lsetgeoms.py +0 -0
  85. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/moving_domain.py +0 -0
  86. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/mpi/mpi_nxfem.py +0 -0
  87. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/IF_circle.py +0 -0
  88. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/IF_marking.py +0 -0
  89. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/IF_periodic.py +0 -0
  90. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/area_of_a_hypersphere_ST.py +0 -0
  91. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/area_of_a_hypersphere_ST_conv.py +0 -0
  92. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/area_of_a_hypersphere_ST_conv_higher_order.py +0 -0
  93. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/area_of_a_sphere_ST.py +0 -0
  94. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/area_of_a_sphere_ST_conv.py +0 -0
  95. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/area_of_a_sphere_ST_conv_higher_order.py +0 -0
  96. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/fictdomain_Neumann_quad_testing.py +0 -0
  97. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/kite3D_in_sympy.py +0 -0
  98. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/kite_in_sympy.py +0 -0
  99. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/spaceP1_timeDGP1_3D.py +0 -0
  100. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/spaceP1_timeDGP1_3D_static.py +0 -0
  101. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/spaceP1_timeDGP1_kite.py +0 -0
  102. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/spaceP1_timeDGP1_kite3D.py +0 -0
  103. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/spaceP2_timeDGP1.py +0 -0
  104. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/spaceP2_timeDGP1_new.py +0 -0
  105. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/graveyard/spacePX_timeDGP1_kite.py +0 -0
  106. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/spaceDGtimeDG_unfitted.py +0 -0
  107. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/spaceDGtimeDG_unfitted_3D.py +0 -0
  108. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/spacetimeCG_unfitted.py +0 -0
  109. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/spacetimeDG_fitted.py +0 -0
  110. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/spacetimeDG_fitted_Nitsche.py +0 -0
  111. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/spacetimeDG_unfitted.py +0 -0
  112. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/spacetime_geom_error.py +0 -0
  113. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spacetime/spacetime_vtk.py +0 -0
  114. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/spdes/surfstokestracefem.py +0 -0
  115. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/stokescutfem.py +0 -0
  116. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/tracefem.py +0 -0
  117. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/demos/unf_interf_prob.py +0 -0
  118. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/feature-details.md +0 -0
  119. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/bubble-coarse.pdf +0 -0
  120. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/cuttet-quadrature.png +0 -0
  121. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/graveyard/cut_quadrature.png +0 -0
  122. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/graveyard/cut_quadrature_mlset.png +0 -0
  123. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/graveyard/cuttet.jpg +0 -0
  124. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/graveyard/intpoints.jpg +0 -0
  125. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/graveyard/spacetime1.png +0 -0
  126. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/graveyard/spacetime2.png +0 -0
  127. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/graveyard/zdisc-cut-elements.png +0 -0
  128. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/lsetcurv.jpg +0 -0
  129. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/mlset.png +0 -0
  130. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/patches.png +0 -0
  131. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/spacetime.png +0 -0
  132. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/twophase.pdf +0 -0
  133. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/unfittedmesh.jpg +0 -0
  134. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/xfem.jpg +0 -0
  135. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/graphics/xfes.png +0 -0
  136. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/latex.template +0 -0
  137. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/lit-ngsxfem.bib +0 -0
  138. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/literature.md +0 -0
  139. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/sphinx/_static/custom.css +0 -0
  140. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/sphinx/bullets.css +0 -0
  141. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/sphinx/conf.py +0 -0
  142. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/sphinx/contents.rst +0 -0
  143. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/sphinx/index.rst +0 -0
  144. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/sphinx/jupyter/index.rst +0 -0
  145. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/sphinx/requirements.txt +0 -0
  146. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/sphinx/xfem_misc/demos.rst +0 -0
  147. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/sphinx/xfem_misc/feature-details.rst +0 -0
  148. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/sphinx/xfem_misc/installation.rst +0 -0
  149. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/doc/sphinx/xfem_misc/literature.rst +0 -0
  150. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/CMakeLists.txt +0 -0
  151. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/calcpointshift.cpp +0 -0
  152. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/calcpointshift.hpp +0 -0
  153. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/lsetrefine.cpp +0 -0
  154. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/lsetrefine.hpp +0 -0
  155. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/projshift.cpp +0 -0
  156. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/projshift.hpp +0 -0
  157. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/python_lsetcurving.cpp +0 -0
  158. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/shiftedevaluate.cpp +0 -0
  159. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/shiftedevaluate.hpp +0 -0
  160. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/shiftintegrators.cpp +0 -0
  161. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/lsetcurving/shiftintegrators.hpp +0 -0
  162. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/ngsolve_addon.cmake +0 -0
  163. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/python/CMakeLists.txt +0 -0
  164. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/python/cutmg.py +0 -0
  165. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/python/lset_smoothblend.py +0 -0
  166. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/python/lset_spacetime.py +0 -0
  167. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/python/lsetcurv.py +0 -0
  168. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/python/mlset.py +0 -0
  169. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/python/ngs_check.py +0 -0
  170. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/python/python_ngsxfem.cpp +0 -0
  171. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/python/utils.py +0 -0
  172. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/CMakeLists.txt +0 -0
  173. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/SpaceTimeFE.cpp +0 -0
  174. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/SpaceTimeFE.hpp +0 -0
  175. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/SpaceTimeFESpace.cpp +0 -0
  176. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/SpaceTimeFESpace.hpp +0 -0
  177. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/diffopDt.cpp +0 -0
  178. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/diffopDt.hpp +0 -0
  179. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/diffopFixt.cpp +0 -0
  180. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/diffopFixt.hpp +0 -0
  181. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/python_spacetime.cpp +0 -0
  182. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/spacetime_vtk.cpp +0 -0
  183. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/spacetime_vtk.hpp +0 -0
  184. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/timecf.cpp +0 -0
  185. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/spacetime/timecf.hpp +0 -0
  186. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/ngsxfem_report.py +0 -0
  187. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_aggregates.py +0 -0
  188. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_backuprule.py +0 -0
  189. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_calc_linearized.py +0 -0
  190. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_differential_symbol.py +0 -0
  191. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_elementlayers.py +0 -0
  192. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_intcurved.py +0 -0
  193. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_local_solve.py +0 -0
  194. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_localgeom.py +0 -0
  195. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_memory_usage.py +0 -0
  196. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_mlset_integration.py +0 -0
  197. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_mlset_module_functionality.py +0 -0
  198. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_mlset_poisson.py +0 -0
  199. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_navier_stokes_2d1.py +0 -0
  200. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_ngsolve_version.py +0 -0
  201. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_nonlin.py +0 -0
  202. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_num_nxfem.py +0 -0
  203. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_nxfem.py +0 -0
  204. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_quadchallenges.py +0 -0
  205. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_shifteval.py +0 -0
  206. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_simd_cutint.py +0 -0
  207. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_simd_lf_blf.py +0 -0
  208. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_spacetime_lsetcurv.py +0 -0
  209. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_spacetime_set.py +0 -0
  210. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_spacetime_vecH1.py +0 -0
  211. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_spacetime_vtk.py +0 -0
  212. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_spacetimecutrule.py +0 -0
  213. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_straightcutrule.py +0 -0
  214. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_utils.py +0 -0
  215. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/tests/pytests/test_xfes_ndof.py +0 -0
  216. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/CMakeLists.txt +0 -0
  217. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/bitarraycf.cpp +0 -0
  218. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/bitarraycf.hpp +0 -0
  219. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/ngsxstd.cpp +0 -0
  220. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/ngsxstd.hpp +0 -0
  221. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/p1interpol.cpp +0 -0
  222. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/p1interpol.hpp +0 -0
  223. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/python_utils.cpp +0 -0
  224. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/restrictedblf.cpp +0 -0
  225. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/restrictedblf.hpp +0 -0
  226. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/restrictedfespace.cpp +0 -0
  227. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/restrictedfespace.hpp +0 -0
  228. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/spacetimechecks.hpp +0 -0
  229. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/xprolongation.cpp +0 -0
  230. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/utils/xprolongation.hpp +0 -0
  231. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/CMakeLists.txt +0 -0
  232. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/aggregates.cpp +0 -0
  233. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/aggregates.hpp +0 -0
  234. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/cutinfo.cpp +0 -0
  235. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/cutinfo.hpp +0 -0
  236. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/ghostpenalty.cpp +0 -0
  237. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/ghostpenalty.hpp +0 -0
  238. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/python_xfem.cpp +0 -0
  239. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/sFESpace.cpp +0 -0
  240. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/sFESpace.hpp +0 -0
  241. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/symboliccutbfi.cpp +0 -0
  242. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/symboliccutbfi.hpp +0 -0
  243. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/symboliccutlfi.cpp +0 -0
  244. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/symboliccutlfi.hpp +0 -0
  245. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/xFESpace.cpp +0 -0
  246. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/xFESpace.hpp +0 -0
  247. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/xfemdiffops.cpp +0 -0
  248. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/xfemdiffops.hpp +0 -0
  249. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/xfiniteelement.cpp +0 -0
  250. {xfem-2.1.2604.dev2 → xfem-2.1.2604.dev10}/xfem/xfiniteelement.hpp +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: xfem
3
- Version: 2.1.2604.dev2
3
+ Version: 2.1.2604.dev10
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)
@@ -0,0 +1,33 @@
1
+ """
2
+ Custom scikit-build-core metadata provider for the ngsolve dependency.
3
+
4
+ This module is used instead of ``ngsolve._scikit_build_core_dependencies``
5
+ so that the ngsolve *native* extension module is never imported during the
6
+ build-metadata phase. The native module requires shared libraries (e.g.
7
+ ``libmkl_rt.so.2``) that are not present in standard manylinux build
8
+ containers or in isolated Windows build environments, causing the build to
9
+ fail.
10
+
11
+ By reading the installed-package metadata via :mod:`importlib.metadata` we
12
+ obtain the exact ngsolve version without loading any C extension.
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ from importlib.metadata import version
18
+
19
+
20
+ def dynamic_metadata(
21
+ field: str,
22
+ settings: dict | None = None,
23
+ ) -> list[str]:
24
+ if field == "dependencies":
25
+ ngsolve_version = version("ngsolve")
26
+ return [f"ngsolve=={ngsolve_version}"]
27
+ raise ValueError(f"Unknown metadata field: {field!r}")
28
+
29
+
30
+ def get_requires_for_dynamic_metadata(
31
+ settings: dict | None = None,
32
+ ) -> list[str]:
33
+ return ["ngsolve"]
@@ -154,7 +154,7 @@ TSCAL CutIntegral :: T_CutIntegrate (const ngcomp::MeshAccess & ma,
154
154
  throw Exception("only implemented for 1 dimensional coefficientfunctions");
155
155
 
156
156
  TSCAL sum = 0.0;
157
- ma.IterateElements(VOL, glh, [&] (Ngs_Element el, LocalHeap & lh)
157
+ ma.IterateElements(dx.vb, glh, [&] (Ngs_Element el, LocalHeap & lh)
158
158
  {
159
159
  if (defon.Size() && !defon.Test(el.GetIndex()))
160
160
  return;
@@ -34,8 +34,11 @@ sdist.include = ["python/_version.py"]
34
34
  #build-dir = "./build_py/{wheel_tag}" # local build directory - for debugging
35
35
 
36
36
  experimental = true
37
- # This adds ngsolve (with exact build-time version) to the dependencies
38
- metadata.dependencies.provider="ngsolve._scikit_build_core_dependencies"
37
+ # This adds ngsolve (with exact build-time version) to the dependencies.
38
+ # Uses a local provider to avoid importing ngsolve's native module (which
39
+ # requires libmkl_rt / platform DLLs not present in all build environments).
40
+ metadata.dependencies.provider = "_ngsolve_deps_provider"
41
+ metadata.dependencies.provider-path = "."
39
42
 
40
43
  [tool.setuptools_scm] # Section required
41
44
  write_to = "python/_version.py"
@@ -51,6 +54,7 @@ testpaths = ["tests"]
51
54
  #build-verbosity = 1
52
55
  manylinux-x86_64-image = "cerbsim/manylinux_2_28_x86_64_cuda_12.8"
53
56
  build = "cp310-* cp311-* cp312-* cp313-* cp314-*"
57
+ enable = ["cpython-prerelease"]
54
58
  skip = """
55
59
  pp*
56
60
  *_i686
@@ -791,10 +791,24 @@ def dCut(levelset, domain_type, order=None, subdivlvl=None, time_order=-1,
791
791
  and no isoparametric mapping is used.
792
792
  definedon : Region
793
793
  Domain description on where the integrator is defined.
794
+ When vb=BND, pass mesh.Boundaries("name") to restrict to a
795
+ specific boundary label.
794
796
  vb : {VOL, BND, BBND}
795
- Integration on mesh volume or its (B)boundary. Default: VOL
796
- (if combined with skeleton=True VOL refers to interior facets
797
- BND refers to boundary facets)
797
+ Integration on mesh volume or its (B)boundary. Default: VOL.
798
+ Use vb=BND to integrate over the portion of the mesh boundary
799
+ where the level set satisfies the given domain_type condition.
800
+ This enables imposing different BCs on parts of the same boundary
801
+ label separated by the level set interface (Nitsche approach).
802
+ Example::
803
+
804
+ # Integrate over the NEG part of the bottom boundary
805
+ ds_neg = dCut(lset_p1, NEG, vb=BND,
806
+ definedon=mesh.Boundaries("bottom"))
807
+ a += -grad(u).Trace()*n*v*ds_neg - u*grad(v).Trace()*n*ds_neg
808
+ a += (lam/h) * u*v * ds_neg
809
+
810
+ (if combined with skeleton=True, VOL refers to interior facets
811
+ BND refers to boundary facets)
798
812
  element_boundary : bool
799
813
  Integration on each element boundary. Default: False
800
814
  element_vb : {VOL, BND, BBND}
@@ -808,6 +822,8 @@ def dCut(levelset, domain_type, order=None, subdivlvl=None, time_order=-1,
808
822
  definedonelements : ngsolve.BitArray
809
823
  Allows integration only on elements or facets (if skeleton=True)
810
824
  that are marked True. Default: None.
825
+ For vb=BND, a BitArray of cut boundary elements can be obtained via
826
+ CutInfo(mesh, lset).GetElementsOfType(HASNEG, BND).
811
827
  time_order : int
812
828
  Order in time that is used in the space-time integration.
813
829
  Default: time_order=-1 means that no space-time rule will be
@@ -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.2604.dev2'
22
- __version_tuple__ = version_tuple = (2, 1, 2604, 'dev2')
21
+ __version__ = version = '2.1.2604.dev10'
22
+ __version_tuple__ = version_tuple = (2, 1, 2604, 'dev10')
23
23
 
24
- __commit_id__ = commit_id = 'gf016cdefe'
24
+ __commit_id__ = commit_id = 'g881a82a53'
@@ -35,6 +35,9 @@ add_test(NAME py_demo_unfitted_poisson COMMAND ${NETGEN_PYTHON_EXECUTABLE}
35
35
  add_test(NAME py_demo_spacetime_unfitted_DG COMMAND ${NETGEN_PYTHON_EXECUTABLE}
36
36
  "${PROJECT_SOURCE_DIR}/demos/spacetime/spacetimeDG_unfitted.py" "testmode")
37
37
 
38
+ add_test(NAME py_demo_bnd_cut COMMAND ${NETGEN_PYTHON_EXECUTABLE}
39
+ "${PROJECT_SOURCE_DIR}/demos/bnd_cut.py" "testmode")
40
+
38
41
  add_test(NAME pytests_simd_lfblf COMMAND ${NETGEN_PYTHON_EXECUTABLE} -m pytest
39
42
  "${PROJECT_SOURCE_DIR}/tests/pytests/test_simd_lf_blf.py" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/tests")
40
43
 
@@ -107,6 +110,9 @@ add_test(NAME pytests_utils COMMAND ${NETGEN_PYTHON_EXECUTABLE} -m pytest
107
110
  add_test(NAME pytests_memory COMMAND ${NETGEN_PYTHON_EXECUTABLE} -m pytest
108
111
  "${PROJECT_SOURCE_DIR}/tests/pytests/test_memory_usage.py" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/tests")
109
112
 
113
+ add_test(NAME pytests_bndcut COMMAND ${NETGEN_PYTHON_EXECUTABLE} -m pytest
114
+ "${PROJECT_SOURCE_DIR}/tests/pytests/test_bndcut.py" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/tests")
115
+
110
116
  add_test(NAME pytests_aggregates COMMAND ${NETGEN_PYTHON_EXECUTABLE} -m pytest
111
117
  "${PROJECT_SOURCE_DIR}/tests/pytests/test_aggregates.py" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/tests")
112
118
 
@@ -0,0 +1,186 @@
1
+ """Tests for boundary cut integration: dCut(lset, NEG/POS/IF, vb=BND).
2
+
3
+ Issue #8: integrate over the part of the boundary defined by a level set.
4
+ """
5
+ import pytest
6
+ import numpy as np
7
+ from ngsolve import *
8
+ from xfem import *
9
+ ngsglobals.msg_level = 0
10
+
11
+
12
+ # ---------------------------------------------------------------------------
13
+ # 2-D helpers
14
+ # ---------------------------------------------------------------------------
15
+
16
+ def make_2d_mesh(maxh=0.15):
17
+ from netgen.geom2d import unit_square
18
+ return Mesh(unit_square.GenerateMesh(maxh=maxh))
19
+
20
+
21
+ def make_3d_mesh(maxh=0.3):
22
+ from netgen.csg import unit_cube
23
+ return Mesh(unit_cube.GenerateMesh(maxh=maxh))
24
+
25
+
26
+ # ---------------------------------------------------------------------------
27
+ # Scalar Integrate tests
28
+ # ---------------------------------------------------------------------------
29
+
30
+ @pytest.mark.parametrize("cut", [0.3, 0.5, 0.7])
31
+ def test_integrate_bnd_2d(cut):
32
+ """Integrate(1 * dCut(lset, NEG, vb=BND)) over the unit-square boundary.
33
+
34
+ With lset = x - cut the NEG region is the left part (x < cut).
35
+ The boundary of the unit square has four edges:
36
+ bottom (y=0, x in [0,1]), top (y=1, x in [0,1])
37
+ left (x=0, y in [0,1]), right (x=1, y in [0,1])
38
+ NEG portion lengths:
39
+ bottom: cut, top: cut, left: 1, right: 0 → total = 2*cut + 1
40
+ """
41
+ mesh = make_2d_mesh()
42
+ lset = GridFunction(H1(mesh, order=1))
43
+ InterpolateToP1(x - cut, lset)
44
+
45
+ val = Integrate(CoefficientFunction(1) * dCut(lset, NEG, vb=BND), mesh)
46
+ expected = 2 * cut + 1.0
47
+ assert abs(val - expected) < 1e-10, f"Expected {expected}, got {val}"
48
+
49
+
50
+ @pytest.mark.parametrize("cut", [0.3, 0.7])
51
+ def test_integrate_bnd_2d_definedon(cut):
52
+ """dCut with definedon=mesh.Boundaries restricts to a single edge."""
53
+ mesh = make_2d_mesh()
54
+ lset = GridFunction(H1(mesh, order=1))
55
+ InterpolateToP1(x - cut, lset)
56
+
57
+ val = Integrate(CoefficientFunction(1) * dCut(lset, NEG, vb=BND,
58
+ definedon=mesh.Boundaries("bottom")), mesh)
59
+ assert abs(val - cut) < 1e-10, f"Expected {cut}, got {val}"
60
+
61
+
62
+ def test_integrate_bnd_2d_pos():
63
+ """Integrate over POS part of boundary."""
64
+ cut = 0.4
65
+ mesh = make_2d_mesh()
66
+ lset = GridFunction(H1(mesh, order=1))
67
+ InterpolateToP1(x - cut, lset)
68
+
69
+ neg = Integrate(CoefficientFunction(1) * dCut(lset, NEG, vb=BND), mesh)
70
+ pos = Integrate(CoefficientFunction(1) * dCut(lset, POS, vb=BND), mesh)
71
+ total = Integrate(CoefficientFunction(1), mesh, BND)
72
+ assert abs(neg + pos - total) < 1e-10, "NEG + POS should equal full boundary"
73
+
74
+
75
+ def test_integrate_bnd_3d(cut=0.3):
76
+ """3-D: integrate over BND faces of unit cube where x < cut."""
77
+ mesh = make_3d_mesh()
78
+ lset = GridFunction(H1(mesh, order=1))
79
+ InterpolateToP1(x - cut, lset)
80
+
81
+ val = Integrate(CoefficientFunction(1) * dCut(lset, NEG, vb=BND), mesh)
82
+ # NEG faces: left (x=0, area 1), bottom (z=0) * cut portion, top, front, back
83
+ # left face (x=0): area = 1 (fully NEG)
84
+ # right face (x=1): area = 0 (fully POS)
85
+ # four side faces (y=0, y=1, z=0, z=1): each has NEG area = cut * 1 = cut → 4*cut
86
+ expected = 1.0 + 4.0 * cut
87
+ assert abs(val - expected) < 1e-10, f"Expected {expected}, got {val}"
88
+
89
+
90
+ # ---------------------------------------------------------------------------
91
+ # BFI assembly tests
92
+ # ---------------------------------------------------------------------------
93
+
94
+ def test_bfi_assembly_2d():
95
+ """Bilinear form on boundary cut domain equals NGSolve's ds on the same region."""
96
+ cut = 0.4
97
+ mesh = make_2d_mesh()
98
+ lset = GridFunction(H1(mesh, order=1))
99
+ InterpolateToP1(x - cut, lset)
100
+
101
+ V = H1(mesh, order=1)
102
+ u, v = V.TnT()
103
+
104
+ gfu = GridFunction(V)
105
+ gfu.Set(sin(x) * cos(y))
106
+
107
+ # Pure-NEG boundary (left edge) using dCut
108
+ a_cut = BilinearForm(V, check_unused=False)
109
+ a_cut += u * v * dCut(lset, NEG, vb=BND, definedon=mesh.Boundaries("left"))
110
+ a_cut.Assemble()
111
+
112
+ # Reference: left edge is fully NEG, so dCut == ds("left")
113
+ a_ref = BilinearForm(V, check_unused=False)
114
+ a_ref += u * v * ds("left")
115
+ a_ref.Assemble()
116
+
117
+ w_cut = a_cut.mat * gfu.vec
118
+ w_ref = a_ref.mat * gfu.vec
119
+ diff = Norm(w_cut - w_ref)
120
+ assert diff < 1e-10, f"Matrix-vector product difference too large: {diff}"
121
+
122
+
123
+ def test_lfi_assembly_2d():
124
+ """Linear form on boundary cut domain."""
125
+ cut = 0.4
126
+ mesh = make_2d_mesh()
127
+ lset = GridFunction(H1(mesh, order=1))
128
+ InterpolateToP1(x - cut, lset)
129
+
130
+ V = H1(mesh, order=1)
131
+ v = V.TestFunction()
132
+
133
+ f_cut = LinearForm(V)
134
+ f_cut += v * dCut(lset, NEG, vb=BND, definedon=mesh.Boundaries("left"))
135
+ f_cut.Assemble()
136
+
137
+ f_ref = LinearForm(V)
138
+ f_ref += v * ds("left")
139
+ f_ref.Assemble()
140
+
141
+ diff = Norm(f_cut.vec - f_ref.vec)
142
+ assert diff < 1e-10, f"Vector difference too large: {diff}"
143
+
144
+
145
+ def test_bfi_assembly_2d_partial():
146
+ """On bottom edge with cut at 0.4: dCut(NEG) captures only the left portion."""
147
+ cut = 0.4
148
+ mesh = make_2d_mesh()
149
+ lset = GridFunction(H1(mesh, order=1))
150
+ InterpolateToP1(x - cut, lset)
151
+
152
+ V = H1(mesh, order=1)
153
+ v = V.TestFunction()
154
+
155
+ f_cut = LinearForm(V)
156
+ f_cut += CoefficientFunction(1) * v * dCut(lset, NEG, vb=BND,
157
+ definedon=mesh.Boundaries("bottom"))
158
+ f_cut.Assemble()
159
+
160
+ # Sum of assembled vector == integral of test function (=1 * v_j) ≈ cut length
161
+ val = sum(f_cut.vec)
162
+ assert abs(val - cut) < 1e-2, f"Expected ~{cut}, got {val}"
163
+
164
+
165
+ def test_bfi_definedon_bitarray():
166
+ """definedon can be supplied as a BitArray of boundary elements."""
167
+ cut = 0.4
168
+ mesh = make_2d_mesh()
169
+ lset = GridFunction(H1(mesh, order=1))
170
+ InterpolateToP1(x - cut, lset)
171
+
172
+ ci = CutInfo(mesh, lset)
173
+ hasneg_bnd = ci.GetElementsOfType(HASNEG, BND)
174
+
175
+ V = H1(mesh, order=1)
176
+ v = V.TestFunction()
177
+
178
+ f_cut = LinearForm(V)
179
+ f_cut += CoefficientFunction(1) * v * dCut(lset, NEG, vb=BND,
180
+ definedonelements=hasneg_bnd)
181
+ f_cut.Assemble()
182
+
183
+ val = Integrate(CoefficientFunction(1) * dCut(lset, NEG, vb=BND), mesh)
184
+ # Both should give the same total; assert consistent
185
+ val2 = sum(f_cut.vec)
186
+ assert abs(val2 - val) < 1e-2, f"definedonelements mismatch: {val2} vs {val}"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes