Guilin Sun
Ansys Employee

This post involves several different concepts.

1: inverse design uses binary permittivity/refractive index. However it does not need users to import binary material. 

2:importnk2 imports refractive index varying with space. As for what part is used will depend on FDTD region.

3: Refractive index monitor: 

in the preview before simulation, it is not recalculated at the material interace. It simply uses staircase depending on which material takes more than 50% of a Yee cell.

After simulation, it will show what exactly is used i simulation, from the "Mesh refinement" method:

Therefore, it is normal to have a gap in index preview. If you use finer mesh it will reduce the gap. No worry about the gap as this is a preview. Please note that for this discrete method, everyting must be discretized, and the geometry/material is no exception. of couse the finer the mesh and the better the accuracy.