update boundary-related things in gs_solver.cc