petsc4py 3.26.1__tar.gz → 3.26.2__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.
- {petsc4py-3.26.1/src/petsc4py.egg-info → petsc4py-3.26.2}/PKG-INFO +2 -2
- {petsc4py-3.26.1 → petsc4py-3.26.2}/conf/stubgen.py +2 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/DM.pyx +85 -7
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdm.pxi +41 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/typing.pxi +2 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc.pyi +5 -1
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/__init__.py +1 -1
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/typing.py +8 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2/src/petsc4py.egg-info}/PKG-INFO +2 -2
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_dmda.py +27 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_gc.py +21 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/.cython-lint.toml +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/.ruff.toml +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/CHANGES.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/DESCRIPTION.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/LICENSE.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/MANIFEST.in +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/README.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/conf/__init__.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/conf/confpetsc.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/conf/cyautodoc.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/conf/cythonize.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/conf/cythonize.sh +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/conf/epydoc.cfg +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/conf/epydocify.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/hpddm/hpddm.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/hpddm/saddle_point.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/htool/htool.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/binary-io/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/binary-io/matvecio.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/bratu2d/bratu2d.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/bratu2d/bratu2df90.f90 +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/bratu2d/bratu2dnpy.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/bratu2d/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/bratu3d/bratu3d.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/bratu3d/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/dmplex/anisotropic_adaptation.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/dmplex/distribute_field.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/dmplex/isotropic_adaptation.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/kspsolve/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/kspsolve/petsc-cg.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/kspsolve/petsc-ksp.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/kspsolve/petsc-mat.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/kspsolve/test_mat_cg.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/kspsolve/test_mat_ksp.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/ode/bouncing_ball.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/ode/ce.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/ode/fastslowsplit.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/ode/heat.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/ode/orego.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/ode/rober.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/ode/vanderpol.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/perftest/App.f90 +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/perftest/App.pyf +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/perftest/driver.c +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/perftest/driver.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/perftest/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/perftest/makefile.f2py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/perftest/makefile.petsc +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/petsc-examples/ksp/ex2.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/petsc-examples/ksp/ex23.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/petsc-examples/ksp/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/petsc-examples/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/poisson2d/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/poisson2d/poisson2d.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/poisson3d/del2lib.f90 +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/poisson3d/del2mat.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/poisson3d/del2mat.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/poisson3d/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/poisson3d/makefile.petsc +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/poisson3d/poisson3d.c +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/poisson3d/poisson3d.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/taosolve/chwirut.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/taosolve/rosenbrock.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-cython/Bratu3D.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-cython/Bratu3Dimpl.c +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-cython/Bratu3Dimpl.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-cython/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-cython/run_demo.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-cython/setup.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-f2py/.f2py_f2cmap +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-f2py/Bratu2D.F90 +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-f2py/Bratu2D.pyf +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-f2py/Bratu2Dmodule.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-f2py/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-f2py/run_demo.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-f2py/setup.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-swig/Bratu3D.c +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-swig/Bratu3D.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-swig/Bratu3D.i +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-swig/makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-swig/run_demo.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/legacy/wrap-swig/setup.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/poisson2d/poisson2d.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/ksp.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/ksppython_protocol.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/mat.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/matpython_protocol.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/pc.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/pcpython_protocol.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/petscviewerpython_protocol.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/snes.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/snespython_protocol.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/tao.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/taopython_protocol.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/ts.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/python_types/tspython_protocol.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/regressor/test_regressor.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/demo/regressor/test_regressor_synthetic.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/index.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/.gitignore +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/Makefile +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/_templates/autosummary/class.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/_templates/autosummary/module.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/_templates/layout.html +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/apidoc.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/citing.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/conf.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/contributing.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/documentation_standards.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/index.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/install.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/links.txt +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/overview.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/petsc_options.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/petsc_python_types.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/docs/source/reference.rst +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/pyproject.toml +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/setup.cfg +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/setup.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/cython.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/compat/cuda.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/compat/h2opus.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/compat/hip.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/compat/hpddm.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/compat/mpi.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/compat/plexexodusii.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/compat/regressor.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/compat/tao.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/compat/viennacl.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/compat.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/custom.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/lib-petsc/initpkg.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/AO.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/CAPI.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Comm.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Const.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/DMComposite.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/DMDA.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/DMLabel.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/DMPlex.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/DMShell.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/DMStag.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/DMSwarm.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/DMUtils.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/DS.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/DT.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Device.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Error.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/FE.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/IS.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/KSP.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Log.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Mat.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/MatPartitioning.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Object.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Options.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/PC.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/PETSc.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Partitioner.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Random.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Regressor.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/SF.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/SNES.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Scatter.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Section.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Space.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Sys.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/TAO.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/TS.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Vec.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/Viewer.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/arraynpy.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/cyclicgc.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/dlpack.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/libpetsc4py.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscao.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdef.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdevice.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdmcomposite.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdmda.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdmlabel.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdmplex.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdmshell.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdmstag.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdmswarm.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdmutils.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscds.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscdt.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscfe.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscis.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscksp.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petsclayout.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petsclog.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscmat.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscmatpartitioning.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscmem.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscmpi.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscobj.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscopt.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscpartitioner.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscpc.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscpyappctx.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscrand.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscregressor.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscsct.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscsec.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscsf.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscsnes.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscspace.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscsys.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petsctao.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscts.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscvec.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc/petscvwr.pxi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc.pxd +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/PETSc.pyx +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/__init__.pxd +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/__init__.pyi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/__main__.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/__main__.pyi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/include/petsc4py/numpy.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/include/petsc4py/petsc4py.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/include/petsc4py/petsc4py.i +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/include/petsc4py/pybuffer.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/include/petsc4py/pyscalar.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/lib/__init__.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/lib/__init__.pyi +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/lib/_pytypes/__init__.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/lib/_pytypes/viewer/__init__.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/lib/_pytypes/viewer/petscpyvista.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/lib/petsc.cfg +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py/py.typed +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py.egg-info/SOURCES.txt +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py.egg-info/dependency_links.txt +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py.egg-info/not-zip-safe +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py.egg-info/requires.txt +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/petsc4py.egg-info/top_level.txt +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/src/pyapicompat.h +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/runtests.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_comm.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_device.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_dmcomposite.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_dmplex.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_dmshell.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_dmstag.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_dmswarm.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_is.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_ksp.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_ksp_py.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_lgmap.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_log.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_mat_aij.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_mat_dense.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_mat_fact.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_mat_py.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_mat_schur.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_matpartitioning.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_nsp.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_object.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_optdb.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_pc.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_pc_py.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_section.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_sf.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_snes.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_snes_py.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_stdout.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_sys.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_tao.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_tao_py.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_tao_with_taoterm.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_taoterm.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_ts.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_ts_py.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_vec.py +0 -0
- {petsc4py-3.26.1 → petsc4py-3.26.2}/test/test_viewer_py.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: petsc4py
|
|
3
|
-
Version: 3.26.
|
|
3
|
+
Version: 3.26.2
|
|
4
4
|
Summary: PETSc for Python
|
|
5
5
|
Home-page: https://gitlab.com/petsc/petsc
|
|
6
|
-
Download-URL: https://pypi.io/packages/source/p/petsc4py/petsc4py-3.26.
|
|
6
|
+
Download-URL: https://pypi.io/packages/source/p/petsc4py/petsc4py-3.26.2.tar.gz
|
|
7
7
|
Author: Lisandro Dalcin
|
|
8
8
|
Author-email: dalcinl@gmail.com
|
|
9
9
|
Maintainer: PETSc Team
|
|
@@ -1697,6 +1697,25 @@ cdef class DM(Object):
|
|
|
1697
1697
|
dm.dm = newdm
|
|
1698
1698
|
return dm
|
|
1699
1699
|
|
|
1700
|
+
def interpolateHooks(self, Mat interp, DM fine) -> None:
|
|
1701
|
+
"""Run the interpolation hooks registered on a finer `DM`.
|
|
1702
|
+
|
|
1703
|
+
Collective.
|
|
1704
|
+
|
|
1705
|
+
Parameters
|
|
1706
|
+
----------
|
|
1707
|
+
interp
|
|
1708
|
+
The matrix interpolating from this `DM` to ``fine``.
|
|
1709
|
+
fine
|
|
1710
|
+
The finer `DM`.
|
|
1711
|
+
|
|
1712
|
+
See Also
|
|
1713
|
+
--------
|
|
1714
|
+
addRefineHook, petsc.DMInterpolate
|
|
1715
|
+
|
|
1716
|
+
"""
|
|
1717
|
+
CHKERR(DMInterpolate(self.dm, interp.mat, fine.dm))
|
|
1718
|
+
|
|
1700
1719
|
def coarsen(self, comm: Comm | None = None) -> DM:
|
|
1701
1720
|
"""Return a coarsened `DM` object.
|
|
1702
1721
|
|
|
@@ -2538,24 +2557,24 @@ cdef class DM(Object):
|
|
|
2538
2557
|
|
|
2539
2558
|
def addCoarsenHook(
|
|
2540
2559
|
self,
|
|
2541
|
-
coarsenhook: DMCoarsenHookFunction,
|
|
2542
|
-
restricthook: DMRestrictHookFunction,
|
|
2560
|
+
coarsenhook: DMCoarsenHookFunction | None,
|
|
2561
|
+
restricthook: DMRestrictHookFunction | None,
|
|
2543
2562
|
args: tuple[Any, ...] | None = None,
|
|
2544
2563
|
kargs: dict[str, Any] | None = None) -> None:
|
|
2545
|
-
"""Add
|
|
2564
|
+
"""Add callbacks to set up and update user-defined data on coarser ``DM`` objects.
|
|
2546
2565
|
|
|
2547
2566
|
Logically collective.
|
|
2548
2567
|
|
|
2549
2568
|
Parameters
|
|
2550
2569
|
----------
|
|
2551
2570
|
coarsenhook
|
|
2552
|
-
The coarsen hook function.
|
|
2571
|
+
The coarsen hook function. Set to `None` to omit this hook.
|
|
2553
2572
|
restricthook
|
|
2554
|
-
The restrict hook function.
|
|
2573
|
+
The restrict hook function. Set to `None` to omit this hook.
|
|
2555
2574
|
args
|
|
2556
|
-
Positional arguments for the
|
|
2575
|
+
Positional arguments for the hook.
|
|
2557
2576
|
kargs
|
|
2558
|
-
Keyword arguments for the
|
|
2577
|
+
Keyword arguments for the hook.
|
|
2559
2578
|
|
|
2560
2579
|
See Also
|
|
2561
2580
|
--------
|
|
@@ -2587,6 +2606,65 @@ cdef class DM(Object):
|
|
|
2587
2606
|
restricthooks.append(restrictcontext)
|
|
2588
2607
|
self.set_attr('__restricthooks__', restricthooks)
|
|
2589
2608
|
|
|
2609
|
+
def addRefineHook(
|
|
2610
|
+
self,
|
|
2611
|
+
refinehook: DMRefineHookFunction | None,
|
|
2612
|
+
interphook: DMInterpolateHookFunction | None,
|
|
2613
|
+
args: tuple[Any, ...] | None = None,
|
|
2614
|
+
kargs: dict[str, Any] | None = None) -> None:
|
|
2615
|
+
"""Add callbacks to set up and update user-defined data on finer ``DM`` objects.
|
|
2616
|
+
|
|
2617
|
+
Logically collective.
|
|
2618
|
+
|
|
2619
|
+
Parameters
|
|
2620
|
+
----------
|
|
2621
|
+
refinehook
|
|
2622
|
+
The refine hook function, called by `refine` with the
|
|
2623
|
+
coarse and the fine `DM`. Set to `None` to omit this hook.
|
|
2624
|
+
interphook
|
|
2625
|
+
The interpolate hook function, called by `interpolateHooks` with
|
|
2626
|
+
the coarse `DM`, the interpolation matrix and the fine `DM`. Set to
|
|
2627
|
+
`None` to omit this hook.
|
|
2628
|
+
args
|
|
2629
|
+
Positional arguments for the hook.
|
|
2630
|
+
kargs
|
|
2631
|
+
Keyword arguments for the hook.
|
|
2632
|
+
|
|
2633
|
+
Notes
|
|
2634
|
+
-----
|
|
2635
|
+
`refine` calls the refine hooks of the coarse `DM`, while
|
|
2636
|
+
`interpolateHooks` calls the interpolate hooks of the fine `DM`.
|
|
2637
|
+
|
|
2638
|
+
See Also
|
|
2639
|
+
--------
|
|
2640
|
+
interpolateHooks, refine, petsc.DMRefineHookAdd
|
|
2641
|
+
|
|
2642
|
+
"""
|
|
2643
|
+
if args is None: args = ()
|
|
2644
|
+
if kargs is None: kargs = {}
|
|
2645
|
+
|
|
2646
|
+
if refinehook is not None:
|
|
2647
|
+
refinecontext = (refinehook, args, kargs)
|
|
2648
|
+
|
|
2649
|
+
refinehooks = self.get_attr('__refinehooks__')
|
|
2650
|
+
if refinehooks is None:
|
|
2651
|
+
refinehooks = [refinecontext]
|
|
2652
|
+
CHKERR(DMRefineHookAdd(self.dm, DM_PyRefineHook, NULL, <void*>NULL))
|
|
2653
|
+
else:
|
|
2654
|
+
refinehooks.append(refinecontext)
|
|
2655
|
+
self.set_attr('__refinehooks__', refinehooks)
|
|
2656
|
+
|
|
2657
|
+
if interphook is not None:
|
|
2658
|
+
interpcontext = (interphook, args, kargs)
|
|
2659
|
+
|
|
2660
|
+
interphooks = self.get_attr('__interpolatehooks__')
|
|
2661
|
+
if interphooks is None:
|
|
2662
|
+
interphooks = [interpcontext]
|
|
2663
|
+
CHKERR(DMRefineHookAdd(self.dm, NULL, DM_PyInterpolateHook, <void*>NULL))
|
|
2664
|
+
else:
|
|
2665
|
+
interphooks.append(interpcontext)
|
|
2666
|
+
self.set_attr('__interpolatehooks__', interphooks)
|
|
2667
|
+
|
|
2590
2668
|
# --- application context ---
|
|
2591
2669
|
|
|
2592
2670
|
property appctx:
|
|
@@ -60,6 +60,13 @@ cdef extern from * nogil:
|
|
|
60
60
|
PetscMat,
|
|
61
61
|
PetscDM,
|
|
62
62
|
void*) except PETSC_ERR_PYTHON
|
|
63
|
+
ctypedef PetscErrorCode (*PetscDMRefineHook)(PetscDM,
|
|
64
|
+
PetscDM,
|
|
65
|
+
void*) except PETSC_ERR_PYTHON
|
|
66
|
+
ctypedef PetscErrorCode (*PetscDMInterpolateHook)(PetscDM,
|
|
67
|
+
PetscMat,
|
|
68
|
+
PetscDM,
|
|
69
|
+
void*) except PETSC_ERR_PYTHON
|
|
63
70
|
|
|
64
71
|
PetscErrorCode DMCreate(MPI_Comm, PetscDM*)
|
|
65
72
|
PetscErrorCode DMClone(PetscDM, PetscDM*)
|
|
@@ -142,6 +149,7 @@ cdef extern from * nogil:
|
|
|
142
149
|
PetscErrorCode DMConvert(PetscDM, PetscDMType, PetscDM*)
|
|
143
150
|
PetscErrorCode DMRefine(PetscDM, MPI_Comm, PetscDM*)
|
|
144
151
|
PetscErrorCode DMCoarsen(PetscDM, MPI_Comm, PetscDM*)
|
|
152
|
+
PetscErrorCode DMInterpolate(PetscDM, PetscMat, PetscDM)
|
|
145
153
|
PetscErrorCode DMRefineHierarchy(PetscDM, PetscInt, PetscDM[])
|
|
146
154
|
PetscErrorCode DMCoarsenHierarchy(PetscDM, PetscInt, PetscDM[])
|
|
147
155
|
PetscErrorCode DMGetRefineLevel(PetscDM, PetscInt*)
|
|
@@ -210,6 +218,7 @@ cdef extern from * nogil:
|
|
|
210
218
|
PetscErrorCode DMSNESSetJacobian(PetscDM, PetscSNESJacobianFunction, void*)
|
|
211
219
|
|
|
212
220
|
PetscErrorCode DMCoarsenHookAdd(PetscDM, PetscDMCoarsenHook, PetscDMRestrictHook, void*)
|
|
221
|
+
PetscErrorCode DMRefineHookAdd(PetscDM, PetscDMRefineHook, PetscDMInterpolateHook, void*)
|
|
213
222
|
|
|
214
223
|
# --------------------------------------------------------------------
|
|
215
224
|
|
|
@@ -316,4 +325,36 @@ cdef PetscErrorCode DM_PyRestrictHook(
|
|
|
316
325
|
(hookop, args, kargs) = hook
|
|
317
326
|
hookop(Fine, Mrestrict, Rscale, Inject, Coarse, *args, **kargs)
|
|
318
327
|
return PETSC_SUCCESS
|
|
328
|
+
|
|
329
|
+
cdef PetscErrorCode DM_PyRefineHook(
|
|
330
|
+
PetscDM coarse,
|
|
331
|
+
PetscDM fine,
|
|
332
|
+
void *ctx,
|
|
333
|
+
) except PETSC_ERR_PYTHON with gil:
|
|
334
|
+
|
|
335
|
+
cdef DM Coarse = ref_DM(coarse)
|
|
336
|
+
cdef DM Fine = ref_DM(fine)
|
|
337
|
+
cdef object hooks = Coarse.get_attr('__refinehooks__')
|
|
338
|
+
assert hooks is not None and type(hooks) is list
|
|
339
|
+
for hook in hooks:
|
|
340
|
+
(hookop, args, kargs) = hook
|
|
341
|
+
hookop(Coarse, Fine, *args, **kargs)
|
|
342
|
+
return PETSC_SUCCESS
|
|
343
|
+
|
|
344
|
+
cdef PetscErrorCode DM_PyInterpolateHook(
|
|
345
|
+
PetscDM coarse,
|
|
346
|
+
PetscMat minterp,
|
|
347
|
+
PetscDM fine,
|
|
348
|
+
void *ctx,
|
|
349
|
+
) except PETSC_ERR_PYTHON with gil:
|
|
350
|
+
|
|
351
|
+
cdef DM Coarse = ref_DM(coarse)
|
|
352
|
+
cdef Mat Minterp = ref_Mat(minterp)
|
|
353
|
+
cdef DM Fine = ref_DM(fine)
|
|
354
|
+
cdef object hooks = Fine.get_attr('__interpolatehooks__')
|
|
355
|
+
assert hooks is not None and type(hooks) is list
|
|
356
|
+
for hook in hooks:
|
|
357
|
+
(hookop, args, kargs) = hook
|
|
358
|
+
hookop(Coarse, Minterp, Fine, *args, **kargs)
|
|
359
|
+
return PETSC_SUCCESS
|
|
319
360
|
# -----------------------------------------------------------------------------
|
|
@@ -69,6 +69,8 @@ from petsc4py.typing import (
|
|
|
69
69
|
CSRSpec,
|
|
70
70
|
DMCoarsenHookFunction,
|
|
71
71
|
DMRestrictHookFunction,
|
|
72
|
+
DMRefineHookFunction,
|
|
73
|
+
DMInterpolateHookFunction,
|
|
72
74
|
DimsSpec,
|
|
73
75
|
KSPConvergenceTestFunction,
|
|
74
76
|
KSPMonitorFunction,
|
|
@@ -2849,6 +2851,7 @@ class DM(Object):
|
|
|
2849
2851
|
def createRestriction(self, dm: DM) -> Mat: ...
|
|
2850
2852
|
def convert(self, dm_type: DM.Type | str) -> DM: ...
|
|
2851
2853
|
def refine(self, comm: Comm | None = None) -> DM: ...
|
|
2854
|
+
def interpolateHooks(self, interp: Mat, fine: DM) -> None: ...
|
|
2852
2855
|
def coarsen(self, comm: Comm | None = None) -> DM: ...
|
|
2853
2856
|
def refineHierarchy(self, nlevels: int) -> list: ...
|
|
2854
2857
|
def coarsenHierarchy(self, nlevels: int) -> list: ...
|
|
@@ -2887,7 +2890,8 @@ class DM(Object):
|
|
|
2887
2890
|
def createFieldDecomposition(self) -> tuple[list, list, list]: ...
|
|
2888
2891
|
def setSNESFunction(self, function: SNESFunction, args: tuple[Any, ...] | None = None, kargs: dict[str, Any] | None = None) -> None: ...
|
|
2889
2892
|
def setSNESJacobian(self, jacobian: SNESJacobianFunction, args: tuple[Any, ...] | None = None, kargs: dict[str, Any] | None = None) -> None: ...
|
|
2890
|
-
def addCoarsenHook(self, coarsenhook: DMCoarsenHookFunction, restricthook: DMRestrictHookFunction, args: tuple[Any, ...] | None = None, kargs: dict[str, Any] | None = None) -> None: ...
|
|
2893
|
+
def addCoarsenHook(self, coarsenhook: DMCoarsenHookFunction | None, restricthook: DMRestrictHookFunction | None, args: tuple[Any, ...] | None = None, kargs: dict[str, Any] | None = None) -> None: ...
|
|
2894
|
+
def addRefineHook(self, refinehook: DMRefineHookFunction | None, interphook: DMInterpolateHookFunction | None, args: tuple[Any, ...] | None = None, kargs: dict[str, Any] | None = None) -> None: ...
|
|
2891
2895
|
appctx: object
|
|
2892
2896
|
ds: DS
|
|
2893
2897
|
|
|
@@ -55,6 +55,8 @@ __all__ = [
|
|
|
55
55
|
'MatHtoolKernelFunction',
|
|
56
56
|
'DMCoarsenHookFunction',
|
|
57
57
|
'DMRestrictHookFunction',
|
|
58
|
+
'DMRefineHookFunction',
|
|
59
|
+
'DMInterpolateHookFunction',
|
|
58
60
|
'KSPRHSFunction',
|
|
59
61
|
'KSPCreateOperatorsFunction',
|
|
60
62
|
'KSPComputeOperatorsFunction',
|
|
@@ -337,6 +339,12 @@ DMCoarsenHookFunction = Callable[[DM, DM], None]
|
|
|
337
339
|
DMRestrictHookFunction = Callable[[DM, Mat, Vec, Mat, DM], None]
|
|
338
340
|
"""`PETSc.DM` restriction hook callback."""
|
|
339
341
|
|
|
342
|
+
DMRefineHookFunction = Callable[[DM, DM], None]
|
|
343
|
+
"""`PETSc.DM` refinement hook callback."""
|
|
344
|
+
|
|
345
|
+
DMInterpolateHookFunction = Callable[[DM, Mat, DM], None]
|
|
346
|
+
"""`PETSc.DM` interpolation hook callback."""
|
|
347
|
+
|
|
340
348
|
# --- KSP ---
|
|
341
349
|
|
|
342
350
|
KSPRHSFunction = Callable[[KSP, Vec], None]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: petsc4py
|
|
3
|
-
Version: 3.26.
|
|
3
|
+
Version: 3.26.2
|
|
4
4
|
Summary: PETSc for Python
|
|
5
5
|
Home-page: https://gitlab.com/petsc/petsc
|
|
6
|
-
Download-URL: https://pypi.io/packages/source/p/petsc4py/petsc4py-3.26.
|
|
6
|
+
Download-URL: https://pypi.io/packages/source/p/petsc4py/petsc4py-3.26.2.tar.gz
|
|
7
7
|
Author: Lisandro Dalcin
|
|
8
8
|
Author-email: dalcinl@gmail.com
|
|
9
9
|
Maintainer: PETSc Team
|
|
@@ -269,6 +269,33 @@ class BaseTestDA:
|
|
|
269
269
|
for item in levels:
|
|
270
270
|
self.assertTrue(isinstance(item, PETSc.DM))
|
|
271
271
|
|
|
272
|
+
def testRefineHook(self):
|
|
273
|
+
calls = []
|
|
274
|
+
|
|
275
|
+
def refinehook(coarse, fine, a, c=0):
|
|
276
|
+
calls.append((coarse, fine, a, c))
|
|
277
|
+
|
|
278
|
+
self.da.addRefineHook(refinehook, None, args=('a',), kargs={'c': 1})
|
|
279
|
+
fine = self.da.refine()
|
|
280
|
+
self.assertEqual(calls, [(self.da, fine, 'a', 1)])
|
|
281
|
+
calls.clear()
|
|
282
|
+
fine.destroy()
|
|
283
|
+
|
|
284
|
+
def testInterpolateHook(self):
|
|
285
|
+
calls = []
|
|
286
|
+
|
|
287
|
+
def interphook(coarse, interp, fine, a, c=0):
|
|
288
|
+
calls.append((coarse, interp, fine, a, c))
|
|
289
|
+
|
|
290
|
+
fine = self.da.refine()
|
|
291
|
+
fine.addRefineHook(None, interphook, args=('a',), kargs={'c': 1})
|
|
292
|
+
interp, _ = self.da.createInterpolation(fine)
|
|
293
|
+
self.da.interpolateHooks(interp, fine)
|
|
294
|
+
self.assertEqual(calls, [(self.da, interp, fine, 'a', 1)])
|
|
295
|
+
calls.clear()
|
|
296
|
+
interp.destroy()
|
|
297
|
+
fine.destroy()
|
|
298
|
+
|
|
272
299
|
def testCreateInterpolation(self):
|
|
273
300
|
da = self.da
|
|
274
301
|
if da.dim == 1:
|
|
@@ -119,6 +119,27 @@ class TestGCTSSubType(TestGCTS):
|
|
|
119
119
|
self.obj.setAppCtx(self.obj)
|
|
120
120
|
|
|
121
121
|
|
|
122
|
+
class Context:
|
|
123
|
+
def __init__(self, obj):
|
|
124
|
+
self.obj = obj
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class TestGarbageCleanupCycle(unittest.TestCase):
|
|
128
|
+
def testNestedContexts(self):
|
|
129
|
+
contexts = []
|
|
130
|
+
obj = PETSc.Vec().create(comm=PETSc.COMM_WORLD)
|
|
131
|
+
for _ in range(3):
|
|
132
|
+
context = Context(obj)
|
|
133
|
+
contexts.append(weakref.ref(context))
|
|
134
|
+
obj = PETSc.Mat().createPython(
|
|
135
|
+
(1, 1), context=context, comm=PETSc.COMM_WORLD
|
|
136
|
+
)
|
|
137
|
+
del context
|
|
138
|
+
del obj
|
|
139
|
+
PETSc.garbage_cleanup(PETSc.COMM_WORLD)
|
|
140
|
+
self.assertTrue(all(context() is None for context in contexts))
|
|
141
|
+
|
|
142
|
+
|
|
122
143
|
# --------------------------------------------------------------------
|
|
123
144
|
|
|
124
145
|
if __name__ == '__main__':
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|