! \brief Perform forward substitution. * * Solves the system of equations A*b=a, ASSUMING that A is lower * triangular. If diag==1, then the diagonal elements are additionally * assumed to be 1. Note that the upper triangular elements are never * checked, so this function is valid to use after a LU-decomposition in * place. A is not modified, and the solution, b, is returned in a. */