mdolab/idwarp

Implement the aExp and bExp options

sseraj opened this issue · 4 comments

Description of feature

The aExp and bExp values are currently hard-coded in most of the Fortran code. We should complete the partial implementation to allow users to set these values in Python.

Potential solution

This will mainly involve modifying how the interpolation weights are computed in kd_tree.F90. See here for one example.

I implemented this on my fork here. I will open a PR once I am confident that it's working.

Is there any noticeable performance hit?

Yes, here is an example from one of the tests:

Before changes:
(mpi) tests/test_usmesh.py:Test_USmesh_0.test_comesh ... OK (00:00:8.20, 120 MB)

After changes:
(mpi) tests/test_usmesh.py:Test_USmesh_0.test_comesh ... OK (00:00:19.65, 121 MB)

However, the tests exaggerate the difference because the increased cost is only in the computation of the weights, which is done once at the start of the optimization.

The increased cost could be annoying when running the same case repeatedly for debugging purposes but addressing #37 would help with that.

Ok thanks for the information.

I'm not really worried about 10 seconds every iteration. This feature is definitely very useful.