Skip to content
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

MMI_splitter_3D_FDFD issue #24

Open
YUJING-HE opened this issue Dec 10, 2021 · 1 comment
Open

MMI_splitter_3D_FDFD issue #24

YUJING-HE opened this issue Dec 10, 2021 · 1 comment

Comments

@YUJING-HE
Copy link

YUJING-HE commented Dec 10, 2021

I have encountered a problem when running ~/emopt-master/examples/MMI_splitter_3D/mmi_1x2_splitter_3D_fdfd.py

[INFO] Building system matrices...
Traceback (most recent call last):
File "~/emopt-master/emopt/fdfd.py", line 2482, in buildA
A[i, jEx] = 1jeps.get_value(xh+0.5divl,yh,zh-0.5*divl) # todo: partial grid steps
File "PETSc/Mat.pyx", line 276, in petsc4py.PETSc.Mat.setitem
File "PETSc/petscmat.pxi", line 1072, in petsc4py.PETSc.mat_setitem
File "PETSc/petscmat.pxi", line 825, in petsc4py.PETSc.matsetvalues
File "PETSc/arraynpy.pxi", line 140, in petsc4py.PETSc.iarray_s
File "PETSc/arraynpy.pxi", line 121, in petsc4py.PETSc.iarray
TypeError: Cannot cast array data from dtype('complex128') to dtype('float64') according to the rule 'safe'

It seems that the data types of Maxwell operator and its elements are not consistent.

@YUJING-HE
Copy link
Author

I have already solve the problem by reconfiguring the installation of PETSc
PETSc configure option : --with-scalar-type=complex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant