-
Notifications
You must be signed in to change notification settings - Fork 44
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
Fix: port computations for coarse grids #1558
Conversation
added grid size check to TerminalComponentModeler and improved test coverage of smatrix plugin
425ddf1
to
bdb9420
Compare
BTW, keep in mind that the current and voltage computations are about to be changed in #1542, so they will be much simpler. |
@@ -263,13 +276,21 @@ def port_current(port: LumpedPort, sim_data: SimulationData) -> xr.DataArray: | |||
h1_field = h_field.isel({orth_component: orth_index - 1}) | |||
h2_field = h_field.isel({orth_component: orth_index}) | |||
h_field = h1_field - h2_field | |||
|
|||
# Find exact bounds of port taking into consideration the Yee grid |
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.
a bit more explanation?
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.
I need to modify this computation anyways in #1542, and it should be much simpler.
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.
Is this PR closed in favor of #1542. It seems the same change happening there already?
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.
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.
sounds good. feel free to merge.
While testing a new example I found some issues with the way LumpedPorts are handled.
I did not modify the changelog, since these are all changes that could be considered within the original LumpedPorts PR.