Support for Real and Complex Numbers ------------------------------------ DOLFINX provides builds with both real and complex number support making use of PETSc with real or complex number support. python3-dolfinx will bring in python3-dolfinx-real (real number support) by default. Complex number support is provided by python3-dolfinx-complex. In the C++ components, libdolfinx-dev brings in libdolfinx-real-dev (real number support) by default. Complex number support is provided by libdolfinx-complex-dev. libdolfinx-real-dev provides dolfinx_real.pc for pkg-config. libdolfinx-complex-dev provides dolfinx_complex.pc. Both real and complex packages can be installed at the same time. If not otherwise specified, the selected version of dolfinx is the one built against the preferred version of PETSc in /usr/lib/petsc. By default this is petsc-real, but can be controlled by update-alternatives --config petsc The alternative build of DOLFINX can be accessed by setting PETSC_DIR as an environment variable where needed, e.g. PETSC_DIR=/usr/lib/petscdir/petsc-complex python3 -c "import dolfinx; print(dolfinx.__path__); print('supports complex numbers: ', dolfinx.has_petsc_complex)" Depending on your application, you might also need to set the SLEPC_DIR environment variable, e.g. SLEPC_DIR=/usr/lib/slepcdir/slepc-complex or SLEPC_DIR=$( echo $PETSC_DIR | sed "s/petsc/slepc/g" ) Conditional Support for SuperLU-Dist ------------------------------------ In principle dolfin supports SuperLU-Dist. However the superlu-dist package distributed by Debian is mostly useless since mc64, one of its core functions, cannot legally be redistributed and so has been removed from the Debian package. For this reason, we have given preference to mumps over superlu_dist. You may specify superlu_dist if desired (or if you have a local build of superlu_dist that includes mc64), for instance with solve(a == L, u, bc, solver_parameters={'linear_solver': 'superlu_dist'}) You may also successfully use superlu_dist without mc64 by specifying C++: PETScOptions::set("-mat_superlu_dist_rowperm", "NATURAL"); Python: PETScOptions.set('-mat_superlu_dist_rowperm', 'NATURAL') Performance will likely be reduced. The same problem applies to superlu, from which mc64 has also been removed. superlu still functions successfully however (mc64 is not core for the serial version of SuperLU). Internet availability for pusimp integration tests -------------------------------------------------- The goal of some pusimp integration tests is to create a dirty virtualenv in which some of dolfinx dependecies are replaced with a manually installed package from PyPI, and verify that pusimp actually triggers an error while trying to import dolfinx. However, to create such virtualenv environment the build needs to be allowed to download packages from pypi.org. To build locally with full internet access: - if building with dpkg-buildpackage export http_proxy="" https_proxy="" before running dpkg-buildpackage - if building with pdebuild, in addition to exporting the two environment variables as above the maintainer may want to add USENETWORK=yes to their $HOME/.pbuilderrc. The pdebuild log with default USENETWORK=no contains I: pbuilder: network access will be disabled during build while the pdebuild log with customized USENETWORK=yes contains W: pbuilder: network will not be disabled during build! The file test/debian-only/test_pusimp.py gracefully handles a missing network by checking for internet availability trying to fetch www.debian.org via python3-requests. If networks is unreachable, all tests in the file will be skipped, and pusimp integration will only be partially tested.