enforced boundary conditions in finite difference grid