tidy3d icon indicating copy to clipboard operation
tidy3d copied to clipboard

Make sure at least one TFSF tangential dimension is nonzero

Open momchil-flex opened this issue 1 year ago • 2 comments

@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.

momchil-flex avatar Jul 22 '24 13:07 momchil-flex

I will look into it!

QimingFlex avatar Jul 22 '24 21:07 QimingFlex

@momchil-flex TFSF already has a _volume_validator that throws an error if any dimensions equal 0. Could you elaborate more on the problem?

QimingFlex avatar Jul 23 '24 20:07 QimingFlex

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.

momchil-flex avatar Mar 14 '25 09:03 momchil-flex