Both the eigenmode source and the mode decomposition should work as-is for a periodic structure, where instead of a plane you have a unit cell. However, it isn't documented clearly and hasn't been tested for a while. It would be good to add this to the manual (and test suite) explicitly.
(Basically, you just give the mode source/monitor region a finite size in the periodic direction corresponding to the unit-cell period. You then have to pass direction explicitly so that Meep knows in which direction you want to propagate.)
cc @sophiefisher, who just told me that she actually used this feature as part of the validation for her 2022 paper. From her experience, it sounds like it works as expected 🎉 !
Both the eigenmode source and the mode decomposition should work as-is for a periodic structure, where instead of a plane you have a unit cell. However, it isn't documented clearly and hasn't been tested for a while. It would be good to add this to the manual (and test suite) explicitly.
(Basically, you just give the mode source/monitor region a finite size in the periodic direction corresponding to the unit-cell period. You then have to pass
direction
explicitly so that Meep knows in which direction you want to propagate.)