Skip to content

Merge upstream master into master - #11

Closed
andrekuehne wants to merge 3 commits into
andrekuehne:masterfrom
tmolteno:master
Closed

andrekuehne wants to merge 3 commits into
andrekuehne:masterfrom
tmolteno:master

Conversation

@andrekuehne

Copy link
Copy Markdown
Owner

Bring the 3 commits from tmolteno/necpp:master into andrekuehne/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-tree using fork master af990460634682885051ad90ef595708aebc48ea and upstream master 9b6d00d591b42105d8e689e6414a724fbbe225d9. The branches have diverged (3 upstream-only commits and 84 fork-only commits), and the merge has content conflicts in:

  • CHANGELOG.md
  • src/c_geometry.cpp
  • src/c_geometry_tb.cpp
  • src/nec_context.cpp

These conflicts need resolution before merging. No build or tests were run because the merge is unresolved.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants