HomerReid / scuff-em

A comprehensive and full-featured computational physics suite for boundary-element analysis of electromagnetic scattering, fluctuation-induced phenomena (Casimir forces and radiative heat transfer), nanophotonics, RF device engineering, electrostatics, and more. Includes a core library with C++ and python APIs as well as many command-line applications.
http://www.homerreid.com/scuff-em
GNU General Public License v2.0
125 stars 50 forks source link

Interpolation errors: Avoid undefined behaviour and issue warnings. #201

Open texnokrates opened 5 years ago

texnokrates commented 5 years ago

When attempting to use interpolated material properties at frequencies that are not covered by a data file, scuff-em just silently uses some initialized values. This PR explicitly introduces a warning and sets the material properties to NAN in such cases. Also, scuff-tmatrix now skips the invalid material properties early.

texnokrates commented 5 years ago

I noticed the Travis build fails. It seems that it's a bug in the gcc version used by Travis, cf. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60407 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48891 It compiles fine with gcc 5.4.0.