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
126 stars 50 forks source link

Floating point exceptions in multi-material junction simulation #139

Open jordangomit opened 7 years ago

jordangomit commented 7 years ago

Hello,

I'm having trouble running a fairly simple scattering simulation involving multimaterial junctions. The simulations return all NaN's and break in the middle when I turn on the exit-on-FPE environment variable. I've tried dumbing down the materials (all dielectric), playing with the mesh size, playing with the geometry, etc. but no dice.

Here's a zip of all the simulation files. There's a lot of info in the logs. The .geo file is generated by pygmsh. Simulation files

The scuff-scatter command line call is:

scuff-scatter --geometry antenna.scuffgeo --OmegaFile OmegaValues.dat --PFTFile antenna.PFT --Cache antenna.cache --pwDirection 0 0 -1 --pwPolarization 1 0 0

Thanks much. ---Jordan

HomerReid commented 7 years ago

I had a look, and I'm not seeing anything obvious to indicate where the NaN might be coming from. Your geometry looks reasonable to me.

If you displace all 5 surfaces from each other so that nobody is touching anybody else, do you still get this error? If not, can you pinpoint which two surfaces don't want to be coming into contact?

Also, is anything affected by setting the environment variable SCUFF_HALF_RWG=1?

jordangomit commented 7 years ago

Unfortunately, neither of these modifications seem to change anything, whether I use one, or the other, or both.

With both modifications:

05/02/17::18:09:33: scuff-scatter running on qp-07.localdomain:11194 (05/02/17::18:09:33) 
05/02/17::18:09:33: Assigning half-RWG basis functions to exterior edges. 
05/02/17::18:09:33: Enabling abort-on-floating-point-exception. 
05/02/17::18:09:33: Promoted 27 exterior edges for surface A to half-RWG basis functions. 
05/02/17::18:09:33: Promoted 16 exterior edges for surface B to half-RWG basis functions. 
05/02/17::18:09:33: Promoted 32 exterior edges for surface C to half-RWG basis functions. 
05/02/17::18:09:33: Promoted 16 exterior edges for surface D to half-RWG basis functions. 
05/02/17::18:09:33: Promoted 27 exterior edges for surface E to half-RWG basis functions. 
05/02/17::18:09:33: Flipped 5794 panel normals to comport with region definitions. 
05/02/17::18:09:33: Noting that surface 3 (D) is a duplicate of surface 1 (B)... 
05/02/17::18:09:33: Noting that surface 4 (E) is a duplicate of surface 0 (A)... 
05/02/17::18:09:33: Detected 0 multi-material junctions. 
05/02/17::18:09:33: FC::P could not open file antenna.scuffcache (skipping cache preload) 
05/02/17::18:09:33: FC::P could not open file antenna.scuffcache (skipping cache preload) 
05/02/17::18:09:33: FC::P could not open file antenna.scuffcache (skipping cache preload) 
05/02/17::18:09:35: Using a single (empty) geometrical transformation with label DEFAULT. 
05/02/17::18:09:35: Could not open FIPPI cache file antenna.cache... 
05/02/17::18:09:35: Working at frequency 0.785398... 
05/02/17::18:09:35: Assembling BEM matrix at Omega=0.785398 
/usr/local/scuffem/lib/libscuff.so.0(+0x7996a)[0x7ff651a0c96a]
/lib64/libpthread.so.0(+0xf370)[0x7ff64f2b1370]
/lib64/libm.so.6(log+0x24)[0x7ff64f920144]
/usr/local/scuffem/lib/libscuff.so.0(_ZN5scuff14CFDIntegrand3DEjPKdPvjPd+0x23c)[0x7ff6519d549c]
/usr/local/scuffem/lib/libscuff.so.0(MyNewIntegrand+0xd)[0x7ff651a1e66d]
/usr/local/scuffem/lib/libscuff.so.0(+0x88cc6)[0x7ff651a1bcc6]
/usr/local/scuffem/lib/libscuff.so.0(+0x8a677)[0x7ff651a1d677]
/usr/local/scuffem/lib/libscuff.so.0(+0x8992d)[0x7ff651a1c92d]
/usr/local/scuffem/lib/libscuff.so.0(+0x8b413)[0x7ff651a1e413]
/usr/local/scuffem/lib/libscuff.so.0(hcubature+0x5c)[0x7ff651a1e64c]
/usr/local/scuffem/lib/libscuff.so.0(adapt_integrate+0x43)[0x7ff651a1e6c3]
/usr/local/scuffem/lib/libscuff.so.0(_ZN5scuff27ComputeQIFIPPIData_CubatureEPPdS1_PNS_11QIFIPPIDataE+0x133)[0x7ff6519d5e13]
/usr/local/scuffem/lib/libscuff.so.0(_ZN5scuff18ComputeQIFIPPIDataEPPdS1_iPNS_11QIFIPPIDataE+0xb8)[0x7ff6519d6378]
/usr/local/scuffem/lib/libscuff.so.0(_ZN5scuff10FIPPICache14GetQIFIPPIDataEPPdS2_i+0x26e)[0x7ff6519de68e]
/usr/local/scuffem/lib/libscuff.so.0(_ZN5scuff14GetQDFIPPIDataEPPdS0_S1_S0_iPvPNS_11QDFIPPIDataE+0x95)[0x7ff6519d46a5]
/usr/local/scuffem/lib/libscuff.so.0(_ZN5scuff25GetPanelPanelInteractionsEPNS_15GetPPIArgStructE+0x3fc)[0x7ff6519cc6ac]
/usr/local/scuffem/lib/libscuff.so.0(_ZN5scuff25GetPanelPanelInteractionsEPNS_15GetPPIArgStructEPSt7complexIdES4_S4_+0x1b)[0x7ff6519ccf9b]
/usr/local/scuffem/lib/libscuff.so.0(_ZN5scuff23GetEdgeEdgeInteractionsEPNS_15GetEEIArgStructE+0x501)[0x7ff6519c66c1]
/usr/local/scuffem/lib/libscuff.so.0(_ZN5scuff10GSSIThreadEPv+0x858)[0x7ff6519c4a28]
/usr/local/scuffem/lib/libscuff.so.0(+0x3280d)[0x7ff6519c580d]

**<><> received signal 8