Hi everyone.
I’m not sure if I have a bug or just need help, so I’m not sure if I should be posting on GitHub/issues or this discourse — apologies if I’m posting in the wrong place.
I want to solve an electromagnetic scattering problem. It’s a simple problem (one object, simple shape, low resolution OK, etc.). My only computer is an aging laptop running Windows 10 (64 bit). I’ve installed bempp-cl-0.2.2 and made a `bempp’ environment. I’ve listed the packages in the environment at the end of this post (exafmm is not included because I didn’t think it was essential and I couldn’t make it work!).
I’ve tried running your `Bistatic RCS generated by dielectric spheres’ tutorial/example. It runs to completion with no error messages but the graphs are blank and, when I dig deeper, I find sol[i].grid_coefficients is almost entirely nan+nanj (for i=0,1,2,3).
So I go back to the very beginning:
`Solving your first problem with Bempp’ (Solving your first problem with Bempp | Bempp):
Works fine.
Laplace:
`Solving a Laplace problem with Dirichlet boundary conditions’ (Tutorials & example applications | Bempp):
Works fine.
`Solving a mixed Neumann-Dirichlet problem’
Works fine.
`Computing the capacity of a cube with a re-entrant corner’
sol.grid_coefficients does have numbers. I’m not sure if they’re correct because the final instruction fails with an error (pasted at the end of this post).
``Weakly imposing a Dirichlet boundary condition’
This doesn’t work and it might all be OK because it gives the error message `No compatible FMM library found. Please install Exafmm from github.com/exafmm/exafmm-t.’ and, as noted above, I’ve not installed ExaFMM.
Helmholtz:
‘Scattering from a sphere using a combined direct formulation’
As with ``Bistatic RCS generated by dielectric spheres’, it runs to completion with no error messages but the graph is blank and, when you dig, you find ‘info’ (which is supposed to be zero) is 5120 and neumann_fun.grid_coefficients is an array of 512 `nan+nanj’.
It seems the Laplace examples are working OK, but the Helmholtz and Maxwell are not. Could it be relevant that, in Laplace, the quantities are real, while in Helmholtz and Maxwell the quantities are complex? Maybe I’m missing some package that’s important for complex numbers? To be honest, I’m stuck and would really appreciate any help from anyone.
# packages in environment at C:\Users\dward\anaconda3\envs\bempp:
#
# Name Version Build Channel
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
atomicwrites 1.4.0 pyh9f0ad1d_0 conda-forge
attrs 20.3.0 pyhd3deb0d_0 conda-forge
bempp-cl 0.2.2 pypi_0 pypi
bzip2 1.0.8 h8ffe710_4 conda-forge
ca-certificates 2020.12.5 h5b45459_0 conda-forge
cached-property 1.5.1 py_0 conda-forge
certifi 2020.12.5 py38haa244fe_1 conda-forge
cftime 1.3.0 py38h347fdf6_0 conda-forge
colorama 0.4.4 pyh9f0ad1d_0 conda-forge
curl 7.71.1 h4b64cdc_8 conda-forge
cycler 0.10.0 py_2 conda-forge
decorator 4.4.2 py_0 conda-forge
fontconfig 2.13.1 h8289fb6_1003 conda-forge
freetype 2.10.4 h546665d_0 conda-forge
gmsh 4.6.0 h8ea2318_0 conda-forge
h5py 3.1.0 nompi_py38h022eade_100 conda-forge
hdf4 4.2.13 h0e5069d_1004 conda-forge
hdf5 1.10.6 nompi_h5268f04_1113 conda-forge
icu 68.1 h0e60522_0 conda-forge
iniconfig 1.1.1 pyh9f0ad1d_0 conda-forge
intel-openmp 2020.3 h57928b3_311 conda-forge
jpeg 9d h8ffe710_0 conda-forge
khronos-opencl-icd-loader 2020.12.18 h8d14728_0 conda-forge
kiwisolver 1.3.1 py38hbd9d945_1 conda-forge
krb5 1.17.2 hbae68bd_0 conda-forge
libblas 3.9.0 4_mkl conda-forge
libcblas 3.9.0 4_mkl conda-forge
libclang 11.0.1 default_h5c34c98_1 conda-forge
libcurl 7.71.1 h4b64cdc_8 conda-forge
libiconv 1.16 he774522_0 conda-forge
liblapack 3.9.0 4_mkl conda-forge
libnetcdf 4.7.4 nompi_h3a9aa94_107 conda-forge
libpng 1.6.37 h1d00b33_2 conda-forge
libssh2 1.9.0 hb06d900_5 conda-forge
libtiff 4.2.0 hc10be44_0 conda-forge
libxml2 2.9.10 hf5bbc77_3 conda-forge
llvmlite 0.35.0 py38h57a6900_0 conda-forge
lz4-c 1.9.3 h8ffe710_0 conda-forge
m2w64-gcc-libgfortran 5.3.0 6 conda-forge
m2w64-gcc-libs 5.3.0 7 conda-forge
m2w64-gcc-libs-core 5.3.0 7 conda-forge
m2w64-gmp 6.1.0 2 conda-forge
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge
mako 1.1.3 pyh9f0ad1d_0 conda-forge
markupsafe 1.1.1 py38hab1e662_2 conda-forge
matplotlib 3.3.4 py38haa244fe_0 conda-forge
matplotlib-base 3.3.4 py38h34ddff4_0 conda-forge
meshio 4.3.8 pyhd8ed1ab_0 conda-forge
mkl 2020.4 hb70f87d_311 conda-forge
more-itertools 8.6.0 pyhd8ed1ab_0 conda-forge
msys2-conda-epoch 20160418 1 conda-forge
netcdf4 1.5.5.1 nompi_py38h5338a22_100 conda-forge
numba 0.52.0 py38h4c96930_0 conda-forge
numpy 1.19.4 py38h0cc643e_1 conda-forge
occt 7.4.0 h823b557_3 conda-forge
olefile 0.46 pyh9f0ad1d_1 conda-forge
openssl 1.1.1i h8ffe710_0 conda-forge
packaging 20.8 pyhd3deb0d_0 conda-forge
pillow 8.1.0 py38hf7ce48b_1 conda-forge
pip 20.3.3 pyhd8ed1ab_0 conda-forge
plotly 4.14.1 pyhd3deb0d_0 conda-forge
pluggy 0.13.1 py38h9bdc248_3 conda-forge
py 1.10.0 pyhd3deb0d_0 conda-forge
pyopencl 2020.3.1 py38h3867ce7_0 conda-forge
pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge
pyqt 5.12.3 py38haa244fe_7 conda-forge
pyqt-impl 5.12.3 py38h885f38d_7 conda-forge
pyqt5-sip 4.19.18 py38h885f38d_7 conda-forge
pyqtchart 5.12 py38h885f38d_7 conda-forge
pyqtwebengine 5.12.1 py38h885f38d_7 conda-forge
pyreadline 2.1 py38h32f6830_1002 conda-forge
pytest 6.2.1 py38haa244fe_0 conda-forge
python 3.8.6 h7840368_4_cpython conda-forge
python-dateutil 2.8.1 py_0 conda-forge
python_abi 3.8 1_cp38 conda-forge
pytools 2020.4.4 pyhd3deb0d_0 conda-forge
qt 5.12.9 h5909a2a_3 conda-forge
retrying 1.3.3 py_2 conda-forge
scipy 1.6.0 py38h5f893b4_0 conda-forge
setuptools 49.6.0 py38h9bdc248_2 conda-forge
six 1.15.0 pyh9f0ad1d_0 conda-forge
sqlite 3.34.0 h8ffe710_0 conda-forge
tbb 2020.2 h2d74725_1 conda-forge
tk 8.6.10 h8ffe710_1 conda-forge
toml 0.10.2 pyhd8ed1ab_0 conda-forge
tornado 6.1 py38h294d835_1 conda-forge
vc 14.2 hb210afc_2 conda-forge
vs2015_runtime 14.28.29325 h5e1d092_0 conda-forge
wheel 0.36.2 pyhd3deb0d_0 conda-forge
wincertstore 0.2 py38h32f6830_1005 conda-forge
xz 5.2.5 h62dcd97_1 conda-forge
zlib 1.2.11 h62dcd97_1010 conda-forge
zstd 1.4.8 h4e2f164_1 conda-forge
Error in `Computing the capacity of a cube with a re-entrant corner’:
>>> normalized_capacity = 1./ ( 4 * np.pi) * sol.integrate()[0]
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\dward\anaconda3\envs\bempp\lib\site-packages\bempp_cl-0.2.2-py3.8.egg\bempp\api\assembly\grid_function.py”, line 560, in integrate
return _integrate(
File “C:\Users\dward\anaconda3\envs\bempp\lib\site-packages\numba\core\dispatcher.py”, line 414, in _compile_for_args
error_rewrite(e, ‘typing’)
File “C:\Users\dward\anaconda3\envs\bempp\lib\site-packages\numba\core\dispatcher.py”, line 357, in error_rewrite
raise e.with_traceback(None)
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
←[1m←[1mnon-precise type pyobject←[0m
←[0m←[1mDuring: typing of argument at C:\Users\dward\anaconda3\envs\bempp\lib\site-packages\bempp_cl-0.2.2-py3.8.egg\bempp\api\assembly\grid_function.py (729)←[0m
←[1m
File “…\anaconda3\envs\bempp\lib\site-packages\bempp_cl-0.2.2-py3.8.egg\bempp\api\assembly\grid_function.py”, line 729:←[0m
←[1mdef _integrate(
This error may have been caused by the following argument(s):
- argument 1: ←[1mCannot determine Numba type of <class ‘method’>←[0m