tidy3d
tidy3d copied to clipboard
Make sure at least one TFSF tangential dimension is nonzero
@QimingFlex could you help add a validation for this since it led to a user error.
I think the nontrivial part is that you need to look at the intersection between the simuation domain and the TFSF box. Because otherwise you could have a source that is 1D and a simulation that is e.g. 2D but their intersection is 0D.
I will look into it!
@momchil-flex TFSF already has a _volume_validator that throws an error if any dimensions equal 0. Could you elaborate more on the problem?
I think the issue might then only arise if someone puts a TFSF in a 1D simulation, i.e. simulation size 0 along both of the TFSF tangential directions.