Prolongation/Notes

From Einstein Toolkit Documentation
Revision as of 16:52, 9 August 2017 by Hinder (talk | contribs)
Jump to: navigation, search

2017-08-08: Algorithm notes

Have three sets of equations:

1. RK4 2. ys in ks 3. ks in ys

Algorithm for unigrid evolution of existing data at t_n:

  • Use RK4 to set y_{n+1}
  • Repeat

Algorithm for 2-level evolution of existing data at t_n:

  • Evolve coarse grid using RK4. Keeps the ks in gridfunctions and y_n and y_{n+1}.
  • Spatially prolongate the coarse ks to the fine ks in the RB
  • Save y_{n+1} on the RB using "ys in ks" and the prolongated coarse grid ks
  • Compute fine ks from coarse ks on the RB using "ys in ks" at th=0 then "ks in ys"
  • Compute f(Y1) using the RHS function on the interior
  • Set k1 using RK4 on the interior
  • k1 is now set everywhere
  • Set Y2 using RK4
  • Set k2 using RK4 on the interior
  • Already have fine k2 on RB
  • Set Y3 using RK4
  • Set k3 using RK4 on the interior
  • Already have fine k3 on RB
  • Set Y4 from RK4
  • Set k4 from RK4 on the interior
  • Do not have k4 on the RB
  • Set y_{n+1} using RK4 on the interior
  • Restore the saved y_{n+1} on the RB
  • Now have y_{n+1} everywhere
  • Spatially prolongate the coarse ks to the fine ks in the RB (either do this again, or don't overwrite the ks. if we are using efficient RK4, we might not be setting the same k variables directly * anyway, so this isn't an issue?)
  • Compute the fine grid ks from the coarse ks in the RB using "ys in ks" at th=1 then "ks in ys"
  • Repeat RK4 steps to advance fine grid to t_{n+2}

Current Carpet/MoL algorithm:

  • t_n, t_{n-1} and t_{n-2} initialised by ID
  • Compute f in interior
  • MoL_Add to compute Y2
  • Prolongate Y2 from coarse grid
  • Compute f in interior
  • MoL_Add to compute Y3
  • Prolongate Y2 from coarse grid
  • Compute f in interior
  • MoL_Add to compute Y4
  • Prolongate Y2 from coarse grid
  • Compute f in interior
  • Accumulate vars into y_{n+1}
  • Prolongate Y2 from coarse grid

How can we implement the new algorithm?

Suppose we only prolongate the ks once, at t_n. RHSs computed as normal on the interior. Schedule a new function before MoL_Add to set the rhs variables to 1/dt k_i where these k_i are computed using the prolongated k variables using ks in ys and ys in ks.


2017-08-09: Schedule

Schedule
CCTK_INITIAL State vector set at t=0
CCTK_EVOL Time and iteration variables advanced. Time and iteration variables advanced
MoL_InitialCopy Copy tl1 into tl0 (reverting Cactus tl rotation)