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 ,

- 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, . - Zero the
**ith**row and column of**A**: . - Assign .
- Set the
**jth**member of the r.h.s. equal to . - Continue for each Dirichlet condition.
- Solve the augmented system, .