A novel computational approach to detect isolated and continuous phase in structured materials