next up previous
Next: Evolving and reusing the Up: Algorithm Previous: Refinement

Boundary conditions

There are two types of boundaries in an AMR system: external boundaries and internal boundaries. External boundaries are given by the problem definition; internal boundaries are generated by refinement. Each patch in a 1D grid has two ends: the left and the right. They can be external or internal. In most of the AMR codes, the boundary values are collected only at the backward time tn just before the integration from tn to tn+1. This causes a problem when the time integration is performed by an implicit or higher order method of lines (MOL) approach, because the boundary values at tn+1 are usually required to compute the intermediate time derivatives of the boundary cells in an MOL approach. We solve this problem by collecting the values for the internal boundaries from the parent coarse grid at the forward time tn+1 before integrating the current level. The boundary values at tn are collected during the refinement. Since the values of the solution at the coarse level at the forward time are available before the current fine level is integrated, the collection is very simple. Linear interpolation in time and space is sufficient. An external boundary routine is called to compute the values for an external ghost boundary. A patch may have no or only one external boundary. Therefore, we test if the current patch reaches the external boundaries and treat them separately in the external boundary routine. Our AMR system can solve problems with four kinds of external boundaries: Dirichlet, periodic, symmetric, antisymmetric and extrapolated. If the Dirichlet boundary conditions are given only at the end points, an extrapolated boundary routine can be used to compute the values at a ghost boundary. All of these boundary routines are parts of our PDELIB.

Periodic boundary conditions are different from the others, because information is needed at both ends, while other boundary conditions need information at only one end. Since our patch may have only one external boundary, the periodic boundaries should be solved separately. There are two cases. If the patch has two external boundaries, a conventional periodic boundary routine is used to obtain the solutions at the ghost boundaries. If the patch has only one external boundary at some refinement level, we should check whether another patch in the same level has the other external boundary. One strategy is that when we have a patch at one end, we should have a patch at the other end so that we can copy the solution from one end to the other. This strategy affects the refinement routine. After clustering, we check if the external boundary is periodic or not; if it is periodic, we check whether there is a patch at each end or not. If there is a refining patch at only one end, we insert a patch at the other end and modify the grid structure appropriately. Through this method, we can always copy the solutions from one end to the other before performing the temporal integration. This method has been combined with our first approach (in which we perform the refinement only after the total grid has been integrated) and works very well. Numerical results in section 5 show that this effort is worthwhile. However, this approach involves much more overhead when implemented in higher dimensions. Another simple method to treat periodic boundary conditions is to perform the copying from one end to the other only when both ends have patches. This method does not need to alter the grid structure to accomodate periodic boundary conditions. It works well for our second approach, in which we perform the refinement during the integration of the finer grid. This is because for the second approach, the new patches of the finer level can be added during the integration. For a semi-discretized PDE solver and method of lines approach, the two patches should be combined together and integrated as one patch.


next up previous
Next: Evolving and reusing the Up: Algorithm Previous: Refinement
Shengtai Li
1998-03-05