mdolab / idwarp

IDWarp is a mesh warping package for the MACH framework.
Other
17 stars 29 forks source link

Implement the aExp and bExp options #40

Closed sseraj closed 2 years ago

sseraj commented 3 years ago

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.

sseraj commented 2 years ago

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

joanibal commented 2 years ago

Is there any noticeable performance hit?

sseraj commented 2 years ago

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.

joanibal commented 2 years ago

Ok thanks for the information.

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