Skip to content

Issue on page /chapter1/complex_mode.html #129

@OsbertWang

Description

@OsbertWang

After reading the tutorial, I understand that Docker has the ability to switch between float64 and complex128. However, I am unsure of how to do this on Ubuntu 22.04.
To begin, I ran the command dpkg -l | grep petsc and obtained a list of packages.

ii  libpetsc-complex3.15:amd64             3.15.5+dfsg1-1build2                    amd64        Shared libraries for version 3.15 of PETSc with Complex Numbers
ii  libpetsc-real3.15:amd64                3.15.5+dfsg1-1build2                    amd64        Shared libraries for version 3.15 of PETSc
ii  libpetsc-real3.15-dev:amd64            3.15.5+dfsg1-1build2                    amd64        Static libraries, shared links, header files for PETSc
ii  libpetsc3.15-dev-common                3.15.5+dfsg1-1build2                    all          Common header and support dev files for PETSc
ii  libpetsc3.15-dev-examples              3.15.5+dfsg1-1build2                    all          Static libraries, shared links, header files for PETSc
ii  python-petsc4py-doc                    3.15.1-2build1                          all          Python bindings for PETSc libraries: documentation and examples
ii  python3-petsc4py                       3.15.1-2build1                          all          Python 3 bindings for PETSc libraries
ii  python3-petsc4py-complex               3.15.1-2build1                          all          Python 3 bindings for PETSc libraries (complex numbers)
ii  python3-petsc4py-complex3.15           3.15.1-2build1                          amd64        Python 3 bindings for PETSc 3.15 libraries (complex numbers)
ii  python3-petsc4py-real                  3.15.1-2build1                          all          Python 3 bindings for PETSc libraries (real numbers)
ii  python3-petsc4py-real3.15              3.15.1-2build1                          amd64

From this list, I can see that pyhon3-petsc4py-complex is already installed. But the current scalar type in python3 is still <class 'numpy.float64'>.
What steps should I take next to switch between float64 and complex128?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions