Hello Noam,
This is a bit tricky, yet common issue in topology. With topology you need to specify the params in python and have those exactly match the FDTD grid. It is often sufficient to ensure that the span and spacing of the opt_region and in python are the same; however, the meshing in FDTD can cause some variation.
The warning you are getting is a comparison of the size of the two objects, and I am not sure exactly why you approach to change the spatial interpolation worked. Since the check simply compares the sizes it may be that there is some discrepancy in the coordinates that FDTD (opt_fields, opt_fields_index ) and python (import object) are using.
I believe that your assesment is very good, but I am concerned that your interpolation approach isn't the best way to go about fixing it. Bringing the waveguide closer is causing some changes to auto mesh generation.
The reason it cannot simply be defined once, say in FDTD, is because you want to be able to provide initial design through the import object, which uses python's coordinates. So I would avoid the mesh interopolation options because I don't know how this will behave.
A couple things you can do to control the mesh is,
- Use mesh overide if you are not already
- Force symmetric in mesh in FDTD - advanced section
- Use smaller mesh. Auto non-uniform mesh generation does not always use the exact mesh contraints given in mesh override, but if you use a coarse background mesh with refined mesh in opt region it should work.
- If all else fails I simply use a uniform mesh. Easy to set-up, no surprises; although, it probably isn't the fastest or most accurate.
Best Regards,