parameters: (self,
                                   element_block_ids,
                                   element_volume_field_name=None)
return_statement: return volume
docstring: Return the total volume of the given element blocks.
  
          Example:
          >>> model.get_element_block_volume('all')
docstring_summary: Return the total volume of the given element blocks.
docstring_tokens: Return the total volume of the given element blocks .
function: def get_element_block_volume(self,
                                   element_block_ids,
                                   element_volume_field_name=None):
          """Return the total volume of the given element blocks.
  
          Example:
          >>> model.get_element_block_volume('all')
  
          """
          element_block_ids = self._format_element_block_id_list(
              element_block_ids)
          # create a timestep if none exist
          created_timestep = False
          if not self.timesteps:
              created_timestep = True
              self.create_timestep(0.0)
          # calculate temporary field with element volumes
          created_volume_field = False
          if element_volume_field_name is None:
              created_volume_field = True
              element_volume_field_name = self._new_element_field_name()
              self.calculate_element_volumes(element_volume_field_name,
                                             element_block_ids)
          # add up the volumes
          volume = 0.0
          for id_ in element_block_ids:
              fields = self._get_element_block_fields(id_)
              volume += sum(fields[element_volume_field_name][0])
          # delete the temporary timestep
          if created_timestep:
              self.delete_timestep(0.0)
          # delete the temporary field
          if created_volume_field:
              self.delete_element_field(element_volume_field_name,
                                        element_block_ids)
          return volume
function_tokens: def get_element_block_volume ( self , element_block_ids , element_volume_field_name = None ) : element_block_ids = self . _format_element_block_id_list ( element_block_ids ) # create a timestep if none exist created_timestep = False if not self . timesteps : created_timestep = True self . create_timestep ( 0.0 ) # calculate temporary field with element volumes created_volume_field = False if element_volume_field_name is None : created_volume_field = True element_volume_field_name = self . _new_element_field_name ( ) self . calculate_element_volumes ( element_volume_field_name , element_block_ids ) # add up the volumes volume = 0.0 for id_ in element_block_ids : fields = self . _get_element_block_fields ( id_ ) volume += sum ( fields [ element_volume_field_name ] [ 0 ] ) # delete the temporary timestep if created_timestep : self . delete_timestep ( 0.0 ) # delete the temporary field if created_volume_field : self . delete_element_field ( element_volume_field_name , element_block_ids ) return volume