Skip to content

Add stop_when_flux_decayed termination criteria#3221

Open
oskooi wants to merge 1 commit into
NanoComp:masterfrom
oskooi:stop_when_flux_decayed
Open

Add stop_when_flux_decayed termination criteria#3221
oskooi wants to merge 1 commit into
NanoComp:masterfrom
oskooi:stop_when_flux_decayed

Conversation

@oskooi
Copy link
Copy Markdown
Collaborator

@oskooi oskooi commented May 24, 2026

Adds a new stop_when_flux_decayed termination criteria which is similar to the existing stop_when_dft_decayed. Also includes a unit test.

The new termination criteria is particularly useful in cases involving glancing-angle waves which are poorly absorbed by PML (and for which the existing termination criteria stop_when_fields_decayed and stop_when_dft_decayed tend to require long run times which can cause field instabilities).

As an example, a planewave incident at oblique angles on a binary grating produces high-angle diffraction orders which tend to be slowly decaying within the periodic unit cell. Tracking the convergence of the Poynting flux in the direction of the PML absorption (i.e., $z$ direction for a 3D unit cell periodic in $x$ and $y$) enables terminating the simulation within a reasonable time (although choosing the tol parameter based on empirical testing requires some care).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant