If the influence of the physical processes in the simulation region is large enough to reach boundary, then we have to consider the interaction of this influence and outer environment. At this time, the boundary will change according to the result of this interaction. A simple treatment of this case is to look on the boundary as a linear continuous boundary. Assuming that f(xb) is the boundary value, the value of the inner point adjacent to xb, the value of the outer point adjacent to xb. Then for a linear boundary condition we can have
Using the newly found we can easily continue our simulation on the boundary.