Fills ghost cells by linear interpolation in space and time
Fills some fine level ghost cells by piecewise linear interpolation from the coarse level.This class fills the first a_interp_radius layers of fine level ghost cells that are not part of other fine level grids. It uses piecewise linear interpolation from the coarse level. The slopes are computed using van leer limiting if there is enough room for the stencil. It drops order and uses first-order one-sided differences otherwise.
Below is a picture of a fine level, with a_interp_radius = 1. The ghost cells of grid 1 are shown. Cells marked X are interpolated to from the coarse level. Cells marked ^ are not interpolated to because they are in the valid domain of another fine grid. Cells marked . are not interpolated to because they are outside the problem domain. All of this changes in the presence of periodic boundary conditions -- in periodic directions, all cells are considered to be within the domain.
+=======================================+ | | | | | | | | | + - - - - - - - - - - - - - - | + | X X X X X X X X X X X X X X X|. | | +===========================+ | | X| |. | | | | | | X| grid 1 |. | | | | | | X| |. | | | | | | X| |. | +=======+===+===============+=======+ | | | ^ ^ ^|X X X X X X X X|^ ^ ^ ^|. | | + - - | - - - - - - - | - - - | + | | | |grid 2 | | | grid 0 | +=======+ | | | | | | | | | | | | | +===========+ | | | | | | problem domain | +=======================================+the picture below shows the locations of the types of slopes. The coarse grid is shown, and the projection of the fine grid onto the coarse index space (on which slopes are computed). Coarse cells marked ^ and . do not need slopes. Van Leer slopes in both directions are used at coarse cells marked X. Coarse cells marked V and < have one-sided differencing: cells marked V have low-sided differencing in the y-direction (in this example, because the coarse grid doesn't exist on the high side of these cells), and cells marked < have low-sided differencing in the x-direction (because the problem domain doesn't exist on the high side of these cells). There can also be cells that have one-sided differences in both directions.
+-----------------------+===============+ | | coarse grid 1 | | | | | | | +=======================+ - - - - - - - | - + | \ / \ / \ / \ /|\ / \ / \ / \ /| | | V V V V | X X X < | . | | / \ / \ / \ / \|/ \ / \ / \ / \| | | +---------------------------+ | | \ /| | | | | X | | | . | | / \| | | | | | | | | | \ /| | | | | X | | | . | | / \| | | | +-------+---+---------------+-------+ | | | |\ / \ /|\ / \ /| | | | | ^ ^ | X X | X X | ^ ^ | . | | | |/ \ / \|/ \ / \| | | | + - - - | - - - - - - - +-------+ - + | | | | | | | | | | | | | | | | +-----------+ +===============+ | | | | | | | coarse grid 0 | | +=======================+---------------+
Arguments:
a_fine_domain (not modified): domain of fine level.
a_coarse_domain (not modified): domain of coarse level.
a_num_comps (not modified): number of components of state vector.
a_problem_domain (not modified): problem domain on the coarse level.
a_ref_ratio (not modified): refinement ratio.
a_interp_radius (not modified): number of layers of fine ghost cells to fill by interpolation.
Arguments:
a_fine_domain (not modified): domain of fine level.
a_coarse_domain (not modified): domain of coarse level.
a_num_comps (not modified): number of components of state vector.
a_problem_domain (not modified): problem domain on the coarse level.
a_ref_ratio (not modified): refinement ratio.
a_interp_radius (not modified): number of layers of fine ghost cells to fill by interpolation.
Arguments:
a_fine_domain (not modified): domain of fine level.
a_coarse_domain (not modified): domain of coarse level.
a_num_comps (not modified): number of components of state vector.
a_problem_domain (not modified): problem domain on the coarse level.
a_ref_ratio (not modified): refinement ratio.
a_interp_radius (not modified): number of layers of fine ghost cells to fill by interpolation.
This:
---This object is modified.---
Arguments:
a_fine_domain (not modified): domain of fine level.
a_coarse_domain (not modified): domain of coarse level.
a_num_comps (not modified): number of components of state vector.
a_problem_domain (not modified): problem domain on the coarse level.
a_ref_ratio (not modified): refinement ratio.
a_interp_radius (not modified): number of layers of fine ghost cells to fill by interpolation.
This:
---This object is modified.---
This:
This object is not modified.
Arguments:
a_fine_data (modified): fine-level data being interpolated to.
a_old_coarse_data (not modified): coarse level source data at the old time.
a_new_coarse_data (not modified): coarse level source data at the new time.
a_time_interp_coef (not modified): time interpolation coefficient, in the range [0:1]. 0=old time, 1=new time.
a_src_comp (not modifed): starting coarse data component.
a_dest_comp (not modifed): starting fine data component.
a_num_comp (not modified): number of data components to be
interpolated.
This:
Well, it's complicated. As far as the user is concerned, this object
is not modified. See the design document if you care for details.
This software is copyright (C) by the Lawrence Berkeley National Laboratory. Permission is granted to reproduce this software for non-commercial purposes provided that this notice is left intact.
It is acknowledged that the U.S. Government has rights to this software under Contract DE-AC03-765F00098 between the U.S. Department of Energy and the University of California.
This software is provided as a professional and academic contribution for joint exchange. Thus it is experimental, is provided ``as is'', with no warranties of any kind whatsoever, no support, no promise of updates, or printed documentation. By using this software, you acknowledge that the Lawrence Berkeley National Laboratory and Regents of the University of California shall have no liability with respect to the infringement of other copyrights by any part of this software.