parameters: (self, element_block_ids='all')
docstring: Delete duplicate elements.
  
          For this calculation, a duplicate element is an element which shares
          all of its nodes with another element.
docstring_summary: Delete duplicate elements.
docstring_tokens: Delete duplicate elements .
function: def delete_duplicate_elements(self, element_block_ids='all'):
          """
          Delete duplicate elements.
  
          For this calculation, a duplicate element is an element which shares
          all of its nodes with another element.
  
          """
          element_block_ids = self._format_element_block_id_list(
              element_block_ids)
          # go through each block and delete elements
          for id_ in element_block_ids:
              nodes_per_element = self.get_nodes_per_element(id_)
              element_count = self.get_element_count(id_)
              connectivity = self.get_connectivity(id_)
              assert len(connectivity) == nodes_per_element * element_count
              # sort elements into sets which contain
              elements = set()
              duplicates = []
              for x in xrange(0, element_count):
                  start = x * nodes_per_element
                  element = set(connectivity[start: start + nodes_per_element])
                  element = tuple(sorted(element))
                  if element in elements:
                      duplicates.append(x)
                  else:
                      elements.add(element)
              self._delete_elements(id_, duplicates)
function_tokens: def delete_duplicate_elements ( self , element_block_ids = 'all' ) : element_block_ids = self . _format_element_block_id_list ( element_block_ids ) # go through each block and delete elements for id_ in element_block_ids : nodes_per_element = self . get_nodes_per_element ( id_ ) element_count = self . get_element_count ( id_ ) connectivity = self . get_connectivity ( id_ ) assert len ( connectivity ) == nodes_per_element * element_count # sort elements into sets which contain elements = set ( ) duplicates = [ ] for x in xrange ( 0 , element_count ) : start = x * nodes_per_element element = set ( connectivity [ start : start + nodes_per_element ] ) element = tuple ( sorted ( element ) ) if element in elements : duplicates . append ( x ) else : elements . add ( element ) self . _delete_elements ( id_ , duplicates )