nec2++ 2.1.1
nec_node_partition Class Reference

The partition of every segment end into the node it belongs to. More...

Public Member Functions

 nec_node_partition (std::vector< segment_endpoint > &endpoints, int64_t segment_count)
 Class the ends of every final segment into the nodes they meet at.
bool shares_one_node (int64_t segment_a, int64_t segment_b) const
 Report whether two segments meet at exactly one node.

Detailed Description

The partition of every segment end into the node it belongs to.

build_connections() records at most one contact per segment end, so a node where three or more ends meet is recorded as a cycle rather than as a clique and pairs that are not adjacent in that cycle look unconnected. Classing the ends geometrically recovers the clique: every end in contact with any other end of its class belongs to that class, whatever order the connection record happened to link them in.

Constructor & Destructor Documentation

◆ nec_node_partition()

nec_node_partition::nec_node_partition ( std::vector< segment_endpoint > & endpoints,
int64_t segment_count )

Class the ends of every final segment into the nodes they meet at.

Parameters
endpointsBoth ends of every segment, reordered by the sweep.
segment_countThe number of final segments the ends belong to.

Member Function Documentation

◆ shares_one_node()

bool nec_node_partition::shares_one_node ( int64_t segment_a,
int64_t segment_b ) const

Report whether two segments meet at exactly one node.

Parameters
segment_aOne segment index.
segment_bThe other segment index.
Returns
true when the two segments have one node class in common.

One node in common is a junction: the currents of both segments are continuous through it, which bounds the error a center inside the joined wire introduces. Two segments holding both nodes in common are not joined end to end but laid one along the other, so their volumes coincide over their whole length and the pair carries no such continuity.


The documentation for this class was generated from the following file: