Changes between Version 6 and Version 7 of AstroBearAmr


Ignore:
Timestamp:
05/20/11 11:49:15 (14 years ago)
Author:
Brandon Shroyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • AstroBearAmr

    v6 v7  
    9595== Round 2:  Refined Bookkeeping and Elliptic Solvers ==
    9696
    97 Now that we have constructed a simple AMR routine, we will add a few routines to improve MHD calculations and simplify AMR tree management.  We will also add sink particles and the elliptic solver step to the code, expanding the capabilities of our AMR routine.
     97Now that we have constructed a simple AMR routine, we will add a few routines to improve MHD calculations and simplify AMR tree management.  We will also add sink particles and the elliptic solver step to the code, expanding the capabilities of our AMR algorithm.
    9898
    9999{{{
     
    148148
    149149[[BR]]
    150 == Dealing with !MaxLevel ==
    151 Up to this point we've assumed we are on an intermediate level of the AMR tree. What is different if we are on the highest level !MaxLevel?
     150== Round 3:  The Maximum Level of Refinement ==
     151Up to this point we've assumed we are on an intermediate level of the AMR tree, with a level above us and a level below us. What is different if we are on the highest level {{{MaxLevel}}}?
    152152
    153153{{{
     
    194194END SUBROUTINE AMR
    195195}}}
    196 We've basically wrapped the following routines that deal with child nodes inside of conditionals that prevent their execution on the !MaxLevel
    197  * !SetErrFlags - We won't be refining any regions so no need to set error flags
    198  * !AgeNodesChildren - We have no children to age
    199  * !BackupNodes - There are no level !MaxLevel+1 nodes to backup
    200  * !CreateChildrens - We don't create level MaxLevel+1 grids
    201  * !InheritOverlaps - Since level !MaxLevel nodes have no children there is no inheritting that needs to be done
    202  * AMR - We are on the !MaxLevel
    203  * !ApplyChildrenData - No child data to apply
    204  * !UpdateChildMask - No children to modify the childmask
    205 
    206 
    207 
    208 = Dealing with Lower Levels =
     196
     197Nodes on {{{MaxLevel}}} will not have any children, and thus {{{MaxLevel}}} is the stopping case for our recursive AMR algorithm.  {{{AMR()}}} should therefore not call itself on {{{MaxLevel + 1}}}.  Similarly, none of the functions that only apply to creating, initializing, or responding to child nodes should be on {{{MaxLevel}}}.  This means no error flags, no child grid creation, and no restriction operations.
     198
     199In the code block above, we've applied the conditional
     200{{{
     201If (n < MaxLevel)
     202}}}
     203to the following routines that deal with child nodes.  This prevents these routines from being executed on the highest allowable level of refinement:
     204 * {{{SetErrFlags(n)}}}
     205 * {{{AgeNodesChildren(n)}}}
     206 * {{{BackupNodes(n)}}}
     207 * {{{CreateChildrens(n)}}}
     208 * {{{Inherit*Overlaps(n)}}} (all the different permutations of the {{{InheritOverlaps}}} functionality.
     209 * {{{AMR(n)}}}
     210 * {{{ApplyChildrenData(n)}}}
     211 * {{{UpdateChildMask(n)}}}
     212
     213[[BR]]
     214= Round 4: Behavior on the Lower Levels =
    209215
    210216{{{