parameters: (self, element_block_ids)
docstring: Invert all elements within one or more element blocks.
docstring_summary: Invert all elements within one or more element blocks.
docstring_tokens: Invert all elements within one or more element blocks .
function: def _invert_element_blocks(self, element_block_ids):
          """Invert all elements within one or more element blocks."""
          element_block_ids = self._format_element_block_id_list(
              element_block_ids)
          for id_ in element_block_ids:
              element_count = self.get_element_count(id_)
              nodes_per_element = self.get_nodes_per_element(id_)
              # invert the connectivity
              inverted_mapping = self._get_inverted_connectivity(
                  self._get_element_type(id_))
              connectivity = self.get_connectivity(id_)
              new_connectivity = [
                  connectivity[element_index * nodes_per_element + x]
                  for element_index in range(element_count)
                  for x in inverted_mapping
              ]
              connectivity[:] = new_connectivity
              # adjust side set members
              new_face_indices = self._get_inverted_face_mapping(
                  self._get_element_type(id_))
              for side_set_id in self.get_side_set_ids():
                  members = self.get_side_set_members(side_set_id)
                  for index, member in enumerate(members):
                      if member[0] == id_:
                          members[index] = (id_, member[1],
                                            new_face_indices[member[2]])
function_tokens: def _invert_element_blocks ( self , element_block_ids ) : element_block_ids = self . _format_element_block_id_list ( element_block_ids ) for id_ in element_block_ids : element_count = self . get_element_count ( id_ ) nodes_per_element = self . get_nodes_per_element ( id_ ) # invert the connectivity inverted_mapping = self . _get_inverted_connectivity ( self . _get_element_type ( id_ ) ) connectivity = self . get_connectivity ( id_ ) new_connectivity = [ connectivity [ element_index * nodes_per_element + x ] for element_index in range ( element_count ) for x in inverted_mapping ] connectivity [ : ] = new_connectivity # adjust side set members new_face_indices = self . _get_inverted_face_mapping ( self . _get_element_type ( id_ ) ) for side_set_id in self . get_side_set_ids ( ) : members = self . get_side_set_members ( side_set_id ) for index , member in enumerate ( members ) : if member [ 0 ] == id_ : members [ index ] = ( id_ , member [ 1 ] , new_face_indices [ member [ 2 ] ] )