nest / nest-simulator

The NEST simulator
http://www.nest-simulator.org
GNU General Public License v2.0
531 stars 361 forks source link

Connecting nodes with spatial positions fails in corner case #3130

Open heplesser opened 6 months ago

heplesser commented 6 months ago

In NEST master (355e52d121ff) Connect() fails in the following situation

l = nest.Create('parrot_neuron', n=20,
                positions=nest.spatial.free(pos=[(j+1, 0) for j in range(20)], edge_wrap=True))
nest.Connect(l, l, {"rule": "pairwise_bernoulli", "p": 1.0, "mask": {"circular": {"radius": 1.2}}})

with

Assertion failed: (( pos - lower_left_ )[ i ] > -std::numeric_limits< double >::epsilon() and ( lower_left_ + extent_ - pos )[ i ] > -std::numeric_limits< double >::epsilon()), function insert, file ntree_impl.h, line 487.

All works fine if edge_wrap=False. This is likely a corner case of rounding coordinates. See also #2466.

github-actions[bot] commented 4 months ago

Issue automatically marked stale!