thliebig / openEMS

openEMS is a free and open-source electromagnetic field solver using the EC-FDTD method.
http://openEMS.de
GNU General Public License v3.0
427 stars 150 forks source link

Handling cases when a script interpolates a location outside of the m… #52

Closed andypfau closed 5 years ago

andypfau commented 5 years ago

There were several cases under which the Octave script attempted to interpolate a coordinate that was outside of the mesh. The user got a meaningless error, e.g. "minimum of 2 points required in each dimension" or "subscripts must be either integers 1 to (2^31)-1 or logicals".

I wrapped all of the cases I could find in try-catch, and provide a (hopefully) more helpful message.