Found while adding the linear-exact local RBF interpolator (feature/linear-rbf). Charter §5: no speculative generality, no dead branches.
1. MeshVariable.rbf_interpolate has two dead parameters
def rbf_interpolate(self, new_coords, meth=0, p=2, verbose=False, nnn=None, rubbish=None):
...
meth : int, optional
Interpolation method (reserved, currently unused).
meth and rubbish are never read. meth is documented as "reserved", which Charter §5 rules out; rubbish is not documented at all.
2. A live test is silently affected by (1)
tests/test_0505_rbf_swarm_mesh.py:
@pytest.mark.parametrize("dim,nnn,p", [(2, 1, 2), (2, 3, 2), (3, 4, 2)])
...
rvals = var.rbf_interpolate(rx, nnn, p)
The second positional argument is meth, not nnn. So the test's nnn lands in the dead parameter and is discarded, and every case actually runs at the default nnn (3 in 2D, 4 in 3D). The (2, 1, 2) case in particular believes it is testing the raw nearest-neighbour branch and is not.
Removing meth would fix the test by making the positional argument mean what it says — but it is an API break for anything passing positionally.
3. Dead proxy machinery
SwarmVariable._rbf_reduce_to_meshVar is the old scatter-form proxy update (each particle finds its nearest node, accumulates, normalises, fills zero-weight nodes from swarm._get_map). Nothing calls it. It is also the last place in swarm.py still using the deprecated with swarm.access(...) shim.
The _nn_proxy flag exists only to gate a branch inside it, and is plumbed all the way out to Swarm.add_variable(..., _nn_proxy=False).
Suggest deleting both under the Wave-A deletion protocol.
Found while adding the linear-exact local RBF interpolator (
feature/linear-rbf). Charter §5: no speculative generality, no dead branches.1.
MeshVariable.rbf_interpolatehas two dead parametersmethandrubbishare never read.methis documented as "reserved", which Charter §5 rules out;rubbishis not documented at all.2. A live test is silently affected by (1)
tests/test_0505_rbf_swarm_mesh.py:The second positional argument is
meth, notnnn. So the test'snnnlands in the dead parameter and is discarded, and every case actually runs at the defaultnnn(3 in 2D, 4 in 3D). The(2, 1, 2)case in particular believes it is testing the raw nearest-neighbour branch and is not.Removing
methwould fix the test by making the positional argument mean what it says — but it is an API break for anything passing positionally.3. Dead proxy machinery
SwarmVariable._rbf_reduce_to_meshVaris the old scatter-form proxy update (each particle finds its nearest node, accumulates, normalises, fills zero-weight nodes fromswarm._get_map). Nothing calls it. It is also the last place inswarm.pystill using the deprecatedwith swarm.access(...)shim.The
_nn_proxyflag exists only to gate a branch inside it, and is plumbed all the way out toSwarm.add_variable(..., _nn_proxy=False).Suggest deleting both under the Wave-A deletion protocol.