-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for complex numbers #94
Comments
I have been working on this, and it appears that adding the following simple line of code to the if scalar_type[] == PETSC_DOUBLE && scalar_size[] == 8
PetscScalar = Float64
elseif scalar_type[] == PETSC_DOUBLE && scalar_size[] == 4
PetscScalar = Float32
elseif scalar_type[] == PETSC_COMPLEX && scalar_size[] == 16
PetscScalar = ComplexF64
else
@error scalar_msg
end A the same time, you have to compile PETSc locally using the flag # Configure PETSc
python3 ./configure \
--PETSC_ARCH=linux-gnu-complex-64 \
--with-cc=mpicc \
--with-cxx=mpicxx \
--with-fc=mpif90 \
--with-scalar-type=complex \
--with-pic=1 \
--with-shared-libraries=1 \
--with-debugging=no \
--download-fblaslapack=1 \
--download-metis=1 \
--download-parmetis=1 \
--download-superlu_dist=1 \
--download-mumps=1 \
--download-scalapack=1 \
--download-hypre=1 \
--download-elemental=1 \
--download-cmake
# Compile PETSc
make PETSC_DIR=/home/pablo/software/petsc PETSC_ARCH=linux-gnu-complex-64 all
# Check PETSc build
make PETSC_DIR=/home/pablo/software/petsc PETSC_ARCH=linux-gnu-complex-64 check Could you check this @JordiManyer @fverdugo ? |
Hi @pablorubial thanks for the work! That seems right to me. Would you be able to open a PR with the changes? |
Done in pull request #106. Thanks to you @JordiManyer! |
Thanks for the great library!
Would it be possible to add support for complex numbers?
The text was updated successfully, but these errors were encountered: