MoL updates

Issue #1218 closed
Erik Schnetter created an issue

The enclosed patches update MoL in three respects:

(1) Introduce a function LinearCombination that calculates a linear combination of several grid functions. Use this throughout several (but not yet all) integrators, simplifying the code substantially. This function can also be overloaded to execute on devices if OpenCL or CUDA is used, thus making MoL device aware. (2) Introduce a new integrator "Euler", providing an explicit first-order integrator. This is very handy for debugging. (3) Use cctk_ash instead of cctk_lsh where necessary.

Since we use svn, these changed are intermingled in my working directory. I created the patches above manually.

Keyword:

Comments (7)

  1. Roland Haas
    • removed comment

    Patches look ok, but I have not yet compiled/tested them. There seem to be files missing however. There is no file that provides MoL_LinearCombination, there is no file that provides the euler timestepping it seems.

  2. Ian Hinder
    • removed comment

    The LinearCombination function sounds like the work we did on the device branch for CUDA. Did you merge that work in? Are there going to be horrendous conflicts when we try to merge trunk into device in future? Would it be a better strategy to merge the device branch into trunk now, before adding this functionality?

  3. Erik Schnetter reporter
    • removed comment

    I added the files providing LinearCombination. The file Euler.c is already attached.

    Yes, I merged some of the changes from the device branch into the trunk. I did not merge all of them because some of the code needs to be cleaned up first. Since LinearCombination simplifies MoL so much, and since the device branch has been inactive for half a year, I would now rather merge the trunk into the device branch before continuing to develop it. The functionality should not conflict.

    The changes introducing LinearCombination are also necessary to make OpenCL work. We included several OpenCL thorns as well as thorn Accelerator, but without these MoL changes, OpenCL is not really supported.

  4. Roland Haas
    • removed comment

    Was this all applied in MoL rev 190? If so, please close the ticket. If not: please apply.

  5. Log in to comment