parameters: (self)
docstring: Print the boundary forces to a file or into screen.
docstring_summary: Print the boundary forces to a file or into screen.
docstring_tokens: Print the boundary forces to a file or into screen .
function: def ExecuteFinalizeSolutionStep(self):
          '''Print the boundary forces to a file or into screen.'''
  
          current_time = self.model_part_wall.ProcessInfo[KM.TIME]
  
          if self.interval.IsInInterval(current_time):
              accelerations, forces = self._EvaluateGlobalForces()
  
              if self.model_part_wall.GetCommunicator().MyPID() == 0:
  
                  output_values = []
                  # not formatting time in order to not lead to problems with time recognition
                  # in the file writer when restarting
                  output_values.append(str(current_time))
                  for val in accelerations : output_values.append(format(val, self.print_format))
                  for val in forces : output_values.append(format(val, self.print_format))
  
                  if self.print_to_screen:
                      result_msg = 'Global force evaluation for model part ' + \
                          self.model_part_wall_name + '\n'
                      res_labels = ['time: ','acc_x: ','acc_y: ','acc_z: ','f_x: ', 'f_y: ', 'f_z: ']
                      result_msg += ', '.join([a+b for a,b in zip(res_labels, output_values)])
                      self._PrintToScreen(result_msg)
  
                  if self.write_output_file:
                      self.output_file.write(' '.join(output_values) + '\n')
function_tokens: def ExecuteFinalizeSolutionStep ( self ) : current_time = self . model_part_wall . ProcessInfo [ KM . TIME ] if self . interval . IsInInterval ( current_time ) : accelerations , forces = self . _EvaluateGlobalForces ( ) if self . model_part_wall . GetCommunicator ( ) . MyPID ( ) == 0 : output_values = [ ] # not formatting time in order to not lead to problems with time recognition # in the file writer when restarting output_values . append ( str ( current_time ) ) for val in accelerations : output_values . append ( format ( val , self . print_format ) ) for val in forces : output_values . append ( format ( val , self . print_format ) ) if self . print_to_screen : result_msg = 'Global force evaluation for model part ' + self . model_part_wall_name + '\n' res_labels = [ 'time: ' , 'acc_x: ' , 'acc_y: ' , 'acc_z: ' , 'f_x: ' , 'f_y: ' , 'f_z: ' ] result_msg += ', ' . join ( [ a + b for a , b in zip ( res_labels , output_values ) ] ) self . _PrintToScreen ( result_msg ) if self . write_output_file : self . output_file . write ( ' ' . join ( output_values ) + '\n' )