wiki:AMR

Version 8 (modified by trac, 12 years ago) ( diff )

Back to BearEZ

RECURSIVE SUBROUTINE AMR (INTEGER level, REAL tstart, REAL tend)


Click here to view the v166 source.

Description

The main subroutine of the AMR algorithm, this subroutine is responsible for building the Forest of nodes that BearCLAW uses to run simulations. AMR() is applied to one Forest level at a time using a time interval of [tstart, tend]. A high-level view is as follows:

For n = 1 to CoarsenRatio(level):

  1. Set the timestep for each node of level level.
  1. Set up ghost cells for each level-level grid.
  1. If running in a multi-processor mode:

3a. Redistribute level's computation duties across CPUs. 3b. Wait for each processor to become available before proceeding.

  1. If level+1 is not the maximum level, then:

4a. Perform error estimation across level. 4b. Create new child nodes (and accompanying sub-grids) based on error estimations for level.

  1. Find new maximum CFL and flag all nodes on level level for a timestep.
  1. If any new nodes have been created for level+1, then call AMR() on level+1.
  1. Perform finer-resolution calculations on children of level-level nodes and replace coarse estimates on level-level nodes with averaged results.

END FOR

Note that AMR() does not directly perform a timestep advancement on the system, but is instead called within the BEARstep() subroutine prior to advancing the problem's time.

For a PowerPoint presentation of this algorithm with pictures, click here.


INCLUDES:

None.

USES:

Note: See TracWiki for help on using the wiki.