direct flexibility method