nest / nest-simulator

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

Create a more robust solution to spatial round-off errors #2057

Open hakonsbm opened 3 years ago

hakonsbm commented 3 years ago

Follow-up issue from #2037. #2037 adds epsilon values to some comparisons to avoid issues from round-off errors. We should find a more robust way to handle these errors.

@heplesser Wrote for the following lines:

https://github.com/nest/nest-simulator/blob/66592444caddc0acea5f00439d7ac281f9fc815a/nestkernel/ntree_impl.h#L399-L400 My main concern is that this test will work as long as coordinates are close to 1, but of they are much smaller or larger, we need to consider relative error. I would feel more comfortable with an approach where we explicitly pad boundaries in some consistent way.

@heplesser also suggested the following (see https://github.com/nest/nest-simulator/pull/2037#issuecomment-855588420):

The rounding problems result from the fact that we do arithmetic on corners, extents and positions (and anchors) in various places in a way that leads to internal inconsistencies. I believe now that by creating definite (canonical) values and then only using comparison operations between them, we can avoid any internal inconsistencies.

github-actions[bot] commented 3 years ago

Issue automatically marked stale!