assemble and impose bcs