-
Notifications
You must be signed in to change notification settings - Fork 58
option for PMC boundary in mode solver #2472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dbochkov-flexcompute
wants to merge
1
commit into
develop
Choose a base branch
from
daniil/mode-pmc
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I don't think this is right, this will just impose PEC on the next-to-last grid boundary, right?
To impose PMC, this can be placed in the backward derivatives instead. However, it is still tricky: there it will impose it at the last grid center, not at the last grid boundary. I think it's not possible to impose it at the last boundary without expanding by one pixel, and then doing something like seetting a value of 2 for the derivative, like we do for pmc on the negative side (but there we can do without an extra pixel). I think this might have been the reason I only had it working on the negative side in the first place...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah, this is not quite correct. I believe what I did here is to impose PMC in the middle of the last cell: specifically here by setting this last coefficient to zero we effectively impose the normal derivative of tangential E field to be zero. I did forget to set tangential H to zero there (by setting
dxb[-1, -1] = 0.0
anddyb[-1, -1] = 0.0
), but somehow it did not matterThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you are right. I think probably both of those decouple that last dual location from the rest of the simulation, so the only thing is if you don't do both, you might get spurious modes that are purely localized to that location? In fact I see we do both of those for PEC yet we still had to add this to avoid such modes. And we don't do it for the right boundary, because there's no actual field there, but if the PMC right boundary is defined at the last dual location, then will probably be needed at least in the tensorial case where we solve for both E and H?