A general discrete method approach for particulate materials