$RCWAcavityend required setting tag the layer number of the end of cavity, in oder to solve the Q-factor.. This layer number needs to be set in the beginning of input file.
Example
$RCWAcavityend
5
The $RCWAcavityend setting in GUI interface is here
1. Fill in the box for Cavity End as needed!