Occasionally, I detect errors in the unit test python/tests/test_refl_angular.py which is traced to line 190 of fields::process_incoming_chunk_data involving the multiplication of two complex numbers:
The problem, I suspect, is actually in the call to reinterpret_cast which is supposed to convert const realnum to const std::complex<realnum> and then use the result in the multiplication on line 190:
Occasionally, I detect errors in the unit test
python/tests/test_refl_angular.py
which is traced to line 190 offields::process_incoming_chunk_data
involving the multiplication of two complex numbers:https://github.com/NanoComp/meep/blob/dad3e5273e92f45f66991397e05e65c821cee55a/src/step.cpp#L172-L196
The problem, I suspect, is actually in the call to
reinterpret_cast
which is supposed to convertconst realnum
toconst std::complex<realnum>
and then use the result in the multiplication on line 190:https://github.com/NanoComp/meep/blob/dad3e5273e92f45f66991397e05e65c821cee55a/src/step.cpp#L182-L183
A snippet of the stack trace shows where the error is triggered: