2D AMRCLAW
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | bc2amr (val, aux, nrow, ncol, meqn, naux, |
Take a grid patch with mesh widths hx,hy, of dimensions nrow by ncol, and set the values of any piece of of the patch which extends outside the physical domain using the boundary conditions. More... | |
subroutine bc2amr | ( | real*8, dimension(meqn,nrow,ncol) | val, |
real*8, dimension(naux,nrow,ncol) | aux, | ||
integer | nrow, | ||
integer | ncol, | ||
integer | meqn, | ||
integer | naux | ||
) |
Take a grid patch with mesh widths hx,hy, of dimensions nrow by ncol, and set the values of any piece of of the patch which extends outside the physical domain using the boundary conditions.
At each boundary k = 1 (left), 2 (right), 3 (bottom), 4 (top):
mthbc(k) =
The corners of the grid patch are at (xlo_patch,ylo_patch) – lower left corner (xhi_patch,yhi_patch) – upper right corner
The physical domain itself is a rectangle bounded by (xlower,ylower) – lower left corner (xupper,yupper) – upper right corner Any cells that lie outside the physical domain are ghost cells whose values should be set in this routine. This is tested for by comparing xlo_patch with xlower to see if values need to be set at the left and similarly at the other boundaries. Patches are guaranteed to have at least 1 row of cells filled with interior values so it is possible to extrapolate. Fix trimbd() if you want more than 1 row pre-set.
Make sure the order the boundaries are specified is correct so that diagonal corner cells are also properly taken care of.
Periodic boundaries are set before calling this routine, so if the domain is periodic in one direction only you can safely extrapolate in the other direction.
Don't overwrite ghost cells in periodic directions!
val | data array for solution (cover the whole grid msrc) |
aux | data array for auxiliary variables |
nrow | number of cells in i direction on this grid |
ncol | number of cells in j direction on this grid |
meqn | number of equations for the system |
naux | number of auxiliary variables |
hx | spacing (mesh size) in i direction |
hy | spacing (mesh size) in j direction |
level | AMR level of this grid |
time | setting ghost cell values at time time |
xlo_patch | left bound of the input grid |
xhi_patch | right bound of the input grid |
ylo_patch | lower bound of the input grid |
yhi_patch | upper bound of the input grid |
Definition at line 88 of file bc2amr.f.
References amr_module::mthbc, amr_module::spheredom, amr_module::xlower, amr_module::xperdom, amr_module::xupper, amr_module::ylower, amr_module::yperdom, and amr_module::yupper.
Referenced by bound(), filrecur(), filval(), and saveqc().