Merge upstream master into master - #11
Closed
andrekuehne wants to merge 3 commits into
Closed
andrekuehne wants to merge 3 commits into
andrekuehne wants to merge 3 commits into
Conversation
The zero-current ground mode (NEC GE -1) was documented but effectively treated as no ground: build_connections() guarded every plane check with ignd > 0, so below-plane and in-plane segments were silently accepted and no ground model was required. Per NEC-2 Part 3, when I1 is nonzero no segment may extend below the ground plane or lie in it, and the ground parameters must be specified on a GN card. - Add nec_ground_connection to the C API: ZERO_CURRENT stays the stable public ABI value 2 while the native geometry receives -1. - Validate both signed ground modes in build_connections(); GE -1 keeps the Fortran connection semantics (a ground-touching end stays a free end, so current goes to zero there) and the low-horizontal-wire escape hatch (only a segment with both ends exactly on the plane is rejected as lying in it). - Fail at simulate() when a non-none connection has no ground model instead of silently running free space. - discone.nec gains the missing GN 1; test_example1 completes the geometry with 0, matching its free-space deck. - Unit tests cover the plane checks for both signed modes, the ABI mapping, and the ground-model requirement (closes #133).
The zero-current fix makes a non-none ground connection without a GN card fail at simulate(), so test_example1 (a free-space dipole whose deck comment shows plain "GE") must complete the geometry with flag 0. Add a comment so the change is not mistaken for a typo.
fix: implement GE -1 zero-current ground mode and signed-mode validation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bring the 3 commits from
tmolteno/necpp:masterintoandrekuehne/necpp:master. Upstream adds the zero-current ground-mode fix from tmolteno#134, its tests, and an explanatory test comment.Mergeability checked with
git merge-tree --write-treeusing fork masteraf990460634682885051ad90ef595708aebc48eaand upstream master9b6d00d591b42105d8e689e6414a724fbbe225d9. The branches have diverged (3 upstream-only commits and 84 fork-only commits), and the merge has content conflicts in:CHANGELOG.mdsrc/c_geometry.cppsrc/c_geometry_tb.cppsrc/nec_context.cppThese conflicts need resolution before merging. No build or tests were run because the merge is unresolved.