Difference between revisions of "Prolongation/Notes"

From Einstein Toolkit Documentation
Jump to: navigation, search
(2017-08-09: Schedule)
(2017-08-09: Schedule)
Line 71: Line 71:
 
|CCTK_EVOL
 
|CCTK_EVOL
 
|Time and iteration variables advanced. Time and iteration variables advanced
 
|Time and iteration variables advanced. Time and iteration variables advanced
 +
|
 
|-
 
|-
 
|MoL_InitialCopy
 
|MoL_InitialCopy
 
|Copy tl1 into tl0 (reverting Cactus tl rotation)
 
|Copy tl1 into tl0 (reverting Cactus tl rotation)
 +
|
 
|-
 
|-
 
|MoL_ProlongateKs
 
|MoL_ProlongateKs
Line 84: Line 86:
 
|MoL_CalcRHS
 
|MoL_CalcRHS
 
|Physics thorns compute RHSs on the grid interior
 
|Physics thorns compute RHSs on the grid interior
 +
|
 
|-
 
|-
 
| MoL_RHSBoundaries
 
| MoL_RHSBoundaries
Line 98: Line 101:
 
| MoL_PostStep
 
| MoL_PostStep
 
| Sync state vector ghost zones, prolongate state vector refinement boundaries , apply physical BCs
 
| Sync state vector ghost zones, prolongate state vector refinement boundaries , apply physical BCs
 +
| ''Don't'' prolongate state vector, probably only sync on apply BCs
 
|-
 
|-
 
|}
 
|}

Revision as of 17:00, 9 August 2017

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

When Old New
CCTK_INITIAL State vector set at t=0 ks undefined (they are set during evolution)
CCTK_EVOL Time and iteration variables advanced. Time and iteration variables advanced
MoL_InitialCopy Copy tl1 into tl0 (reverting Cactus tl rotation)
MoL_ProlongateKs Prolongate ks into RBs
Loop over steps:
MoL_CalcRHS Physics thorns compute RHSs on the grid interior
MoL_RHSBoundaries Set boundaries of RHSs (ML_BSSN uses CalcRHS instead) Compute RHS in RB using prolongated coarse grid ks
MoL_StoreKs Compute and store the current level k variables from the RHS variables
MoL_Add MoL performs one update step
MoL_PostStep Sync state vector ghost zones, prolongate state vector refinement boundaries , apply physical BCs Don't prolongate state vector, probably only sync on apply BCs