next up previous

4.3.2 Boundary Conditions     continued...

To apply the Dirichlet condition, we have to work a bit harder. To apply the Dirichlet boundary condition directly, one usually modifies the matrix and vector such that one can use standard linear system solvers. This is accomplished by implementing the following steps: Assuming we know the ith value of ,

  1. Subtract from the ith member of the r.h.s. the product of and the known value of (call it ; this yields the new right hand side, .
  2. Zero the ith row and column of A: .
  3. Assign .
  4. Set the jth member of the r.h.s. equal to .
  5. Continue for each Dirichlet condition.
  6. Solve the augmented system, .