Modeling lasers and saturable absorbers via multilevel atomic media in the Meep FDTD software: Theory and implementation.