I am trying to use pygem to deform a mesh with roughly 500,000 nodes and 256 control points with the RBF function of 'thin_plate_spline'. It took about 20GB of RAM at peak, which is nearly reaching the RAM capacity of my system. After testing each single part of my code (step by step), I found the memory usage reached the peak right during the running of the RBF functions.
Then I tried to use Copilot to write a single precision version of pygem rbf. After rerunning the test, which took about 12GB of RAM at peak. And the deformed mesh looks good enough to me.
The RBF with single precision option is attached to this request.
rbf.py