Add harmonic shift to McLachlan

Create issue
Issue #591 closed
Ian Hinder created an issue

The attached patch adds a harmonic shift condition to McLachlan. It does this by introducing a new real-valued parameter harmonicShift. This should be set to 0 for gamma-driver shift (the default, and the existing behaviour), and to 1 for harmonic shift. This is useful for code-correctness tests with the shifted gauge wave which is an exact solution of the Einstein equations in harmonic gauge. The harmonic shift equation has been tested with the shifted gauge wave exact solution and yields convergence to the exact solution.

The current way that gauge conditions is handled in McLachlan is not very elegant, and I don't think this patch should be applied as-is. I am putting it here for anyone who might find it useful.

Keyword: McLachlan

Comments (10)

  1. Erik Schnetter
    • removed comment

    Instead of a real parameter, I suggest an integer parameter, as is done e.g. for the conformal factor. We should also switch the other real parameters to integer.

    I suggest to wait until after the release to apply this.

  2. Ian Hinder reporter
    • removed comment

    It is actually an integer parameter - I was wrong in the original description. Certainly it should not be added until after the release. Even then, do you think it should be applied in its current form? What are your thoughts on splitting gauges into separate calculations? It's probably hard to tell before we have more systematic benchmarks.

  3. Erik Schnetter
    • removed comment

    I would not make any argument on performance without measuring it.

    I would keep all code combined in a single calculation, because this gives us the greatest flexibility. We know how to split calculations semi-automatically.

  4. Bruno Mundim
    • removed comment

    Hi Ian,

    would you mind to apply this patch? I have used it with the shifted gauge wave data and up to a few grid crossing time the solution is good.

    Thanks.

  5. Ian Hinder reporter
    • removed comment

    I have also tested it and am confident that it is correct. I would like to check performance of the gamma-driver shift before applying it. Erik: assuming I don't see a performance problem, is it OK to apply this patch in its current form?

  6. Erik Schnetter
    • removed comment

    This patch is ok to apply. Please also commit a test case for the harmonic shift.

  7. Erik Schnetter
    • changed status to resolved
    • removed comment

    I modified this patch to calculate admdtbeta correctly (this also depends on the shift condition), and added a test case for the harmonic shift as well. This is now committed.

  8. Bernard Kelly
    • changed version to ET_2012_11
    • marked as bug
    • changed status to open
    • marked as
    • removed comment

    The harmonicShift currently in the repository assumes that the code is in the "conformalMethod==CMW" branch (that is, using W == exp(-2 phi) in place of the original BSSN " phi"), but does not test for it.

    The attached patch (relative to the ET_2012_11 release) corrects this assumption, making a BSSN-phi version available also.

    The patch also splits off a particular term, Ddetgt[la] == gtu[uk,ul] PD[gt[lk,ll],la], that should vanish when det(gtil) == 1. By default, it is still calculated explicitly and inserted into the harmonicShift RHS, to pass the test suite.

  9. Log in to comment