# Error message using custom material: Assertion !it->bi.conformal' failed.

Hi, I’m trying to do some simulations with a narrowband light source propagating through a user defined (n,k) material. The simulation works fine for k=0, but when I set k to be non-zero the simulation terminates with the message:

fdtd-engine-mpich2nem: emfields.cpp:2432: void EMFields::initializeElectricMaterials(GeometryParameters *, int, double, double, MeshData &): Assertion !it->bi.conformal’ failed.
APPLICATION TERMINATED WITH THE EXIT STRING: Hangup (signal 1)

I’ve tried making the mesh smaller, but this doesn’t help.

EDIT: I’m attaching a sample script that reproduces the error. This particular example works fine for some parameters (for example if I widen the end section to remove the taper), but otherwise the simulation terminates with the above message.

deleteall;

testblock=matrix(6,2);
testblock(1,1)=0;
testblock(1,2)=-width1/2;
testblock(2,1)=length1;
testblock(2,2)=-width2/2;
testblock(3,1)=length1+length2;
testblock(3,2)=-width3/2;
testblock(4,1)=testblock(3,1);
testblock(4,2)=-testblock(3,2);
testblock(5,1)=testblock(2,1);
testblock(5,2)=-testblock(2,2);
testblock(6,1)=testblock(1,1);
testblock(6,2)=-testblock(1,2);

addpoly;
set(‘name’,‘testblock’);
set(‘material’,‘test_material1’);
set(‘vertices’,testblock);
set(‘override mesh order from material database’,1);
set(‘mesh order’, 3);
set(‘z min’,0);
set(‘z max’,height);

# add the clad

addrect;
set(‘name’,‘clad’);
set(‘render type’,‘wireframe’);
set(‘material’,‘test_material2’);
set(“override mesh order from material database”,1);

setnamed(‘clad’,‘x min’, -2spill);
setnamed(‘clad’,‘x max’, 2
spill+length1+length2);
setnamed(‘clad’,‘y min’, -width1/2-2spill);
setnamed(‘clad’,‘y max’, width1/2+2
spill);
setnamed(‘clad’,‘z min’, -2spill);
setnamed(‘clad’,‘z max’, height+2
spill);
#setnamed(‘clad’,‘index’, clad_index);
setnamed(‘clad’,‘mesh order’, 8);

# add FDTD region

addfdtd;
setnamed(‘FDTD’,‘x min’, -spill);
setnamed(‘FDTD’,‘x max’, spill+length1+length2);
setnamed(‘FDTD’,‘y min’, -width1/2-spill);
setnamed(‘FDTD’,‘y max’, width1/2+spill);
setnamed(‘FDTD’,‘z min’, -spill);
setnamed(‘FDTD’,‘z max’, height+spill);
setnamed(‘FDTD’,‘mesh accuracy’, mesh_acc);
setnamed(‘FDTD’,‘simulation time’, 1000e-15);

# add source

addmode; set(‘name’,‘TE_in’);
setnamed(‘TE_in’,‘injection axis’,‘x-axis’);
setnamed(‘TE_in’,‘x’, 0.15e-6);
setnamed(‘TE_in’,‘y’, 0);
setnamed(‘TE_in’,‘y span’, width1+4spill);
setnamed(‘TE_in’,‘z’, height/2);
setnamed(‘TE_in’,‘z span’, height+4
spill);
setnamed(‘TE_in’,‘mode selection’,‘fundamental TE mode’);
setnamed(‘TE_in’,‘center wavelength’,wavelength);
setnamed(‘TE_in’,‘wavelength span’,0);

# add monitors

addtime; set(‘name’,‘time_mon’);
setnamed(‘time_mon’,‘x’,0);
setnamed(‘time_mon’,‘y’,0);
setnamed(‘time_mon’,‘z’,0);

# midplane

x_extent=length1+length2+spill/2;

addpower; set(‘name’,‘mid_plane’);
set(‘monitor type’,‘2D Z-normal’);
set(‘x min’, -spill/2);
set(‘x max’, x_extent);
set(‘y min’, -width1/2-spill/2);
set(‘y max’, width1/2+spill/2);
set(‘z’, height/2);

Hi @christopher.harvey,
Can you eventually give us the parameters that get the simulation to fail with the error message? It would help to reproduce the problem.

Parameters that result in the error are:

height 0.2 um
length1 4 um
length2 4 um
spill 1 um
wavelength 0.8 um
width1 0.6 um
width2 0.6 um
width3 0.3 um
mesh_acc 5

test_material1: n=2, k=0.001
test_material2: n=1, k=0

Ok, thanks. Can you also specify the (n,k) you used for your materials?

Yes, they are:
test_material1: n=2, k=0.001
test_material2: n=1, k=0

That is weird! I ran the simulation without getting any error. Not sure if it is related, but the only difference is that I run my simulations using MSMPI (I’m on a Windows laptop) and not MPICH2.
If you are on a Windows machine, you can try and switch to MSMPI to see if the error comes from there. Information on the resource configuration can be found here: https://kb.lumerical.com/en/index.html?installation_and_setup_resource_configuration.html.
You may have to install MSMPI first (it is included in the FDTD Solutions package).
Also, if you haven’t installed the latest version (v8.16.931), you can get it on the website.

Hi @gbaethge, thanks for your reply and sorry for the delay in getting back to you. I’ve tried the script on a windows laptop and it runs without error. The main machine I use is a linux cluster, so switching to MSMPI isn’t (?) an option. I don’t yet have the latest version of Lumerical installed, but I’ve tried with both version 8.11.422 and 8.15.786 (using the MPICH routines provided with them). I’ve also tried using a separate installation of MPICH2, which results in a similar (but slightly different) error:

fdtd-engine-mpich2nem: emfields.cpp:2432: void EMFields::initializeElectricMaterials(GeometryParameters *, int, double, double, MeshData &): Assertion `!it->bi.conformal’ failed.
Fatal error in PMPI_Reduce: Other MPI error

I will try to arrange for the latest version of Lumerical to be installed on the cluster. Do you happen to know if there were any changes between 8.15 and the latest version that might help with this problem?

I’ll run your test file with 8.15.786 (as well as the newest version) on one of our Linux machine to see if we’re able to reproduce the problem.

One more thing: What OS are you using (ie. RHEL 7)?

Thanks @ckopetski. I’m using CentOS release 6.6.

We are able to reproduce the problem on one of our Linux computers with version 8.15.786. Fortunately, there is an easy solution: The problem has already been fixed, so you just need to upgrade to the newest version of FDTD Solutions.

Thanks very much for your help! I will upgrade to the latest version.