parameters: (self, xi)
docstring: Return the state for a specified characteristic (xi=x/t).
docstring_summary: Return the state for a specified characteristic (xi=x/t).
docstring_tokens: Return the state for a specified characteristic ( xi = x / t ) .
function: def get_state(self, xi):
          """Return the state for a specified characteristic (xi=x/t)."""
          try:
              return [self.get_state(i) for i in xi]
          except TypeError:
              # use the wave info to determine the part of the Riemann fan xi is in
              if xi < self.waves[0]['speed'][0]:
                  return self.left
              if self.waves[0]['speed'][0] < xi < self.waves[0]['speed'][1]:
                  return self._rare_int_left.characteristic(xi)
              if self.waves[0]['speed'][1] < xi < self.waves[1]['speed'][0]:
                  return self.lmid
              if self.waves[1]['speed'][0] < xi < self.waves[1]['speed'][1]:
                  raise ValueError('Should never get here.')
              if self.waves[1]['speed'][1] < xi < self.waves[2]['speed'][0]:
                  return self.rmid
              if self.waves[2]['speed'][0] < xi < self.waves[2]['speed'][1]:
                  return self._rare_int_right.characteristic(xi)
              if self.waves[2]['speed'][1] < xi:
                  return self.right
              # If here we are at a discontinuity or wave edge
              args = ['p', 'u', 'rho']
              if self.waves[0]['speed'][0] == xi:
                  if self.waves[0]['kind'] == 'simple':
                      return self.left
                  tmp = {i: (self.left[i] if self.left[i]
                             == self.lmid[i] else np.nan) for i in args}
                  return StateVector(eos=self.eos, **tmp)
              if self.waves[0]['speed'][1] == xi:
                  return self.lmid
              if self.waves[1]['speed'][0] == xi:
                  tmp = {i: (self.lmid[i] if self.lmid[i]
                             == self.rmid[i] else np.nan) for i in args}
                  return StateVector(eos=self.eos, **tmp)
              if self.waves[2]['speed'][0] == xi:
                  if self.waves[2]['kind'] == 'simple':
                      return self.rmid
                  tmp = {i: (self.right[i] if self.rmid[i]
                             == self.right[i] else np.nan) for i in args}
                  return StateVector(eos=self.eos, **tmp)
              if self.waves[2]['speed'][1] == xi:
                  return self.right
              # Should not get here
              return None
function_tokens: def get_state ( self , xi ) : try : return [ self . get_state ( i ) for i in xi ] except TypeError : # use the wave info to determine the part of the Riemann fan xi is in if xi < self . waves [ 0 ] [ 'speed' ] [ 0 ] : return self . left if self . waves [ 0 ] [ 'speed' ] [ 0 ] < xi < self . waves [ 0 ] [ 'speed' ] [ 1 ] : return self . _rare_int_left . characteristic ( xi ) if self . waves [ 0 ] [ 'speed' ] [ 1 ] < xi < self . waves [ 1 ] [ 'speed' ] [ 0 ] : return self . lmid if self . waves [ 1 ] [ 'speed' ] [ 0 ] < xi < self . waves [ 1 ] [ 'speed' ] [ 1 ] : raise ValueError ( 'Should never get here.' ) if self . waves [ 1 ] [ 'speed' ] [ 1 ] < xi < self . waves [ 2 ] [ 'speed' ] [ 0 ] : return self . rmid if self . waves [ 2 ] [ 'speed' ] [ 0 ] < xi < self . waves [ 2 ] [ 'speed' ] [ 1 ] : return self . _rare_int_right . characteristic ( xi ) if self . waves [ 2 ] [ 'speed' ] [ 1 ] < xi : return self . right # If here we are at a discontinuity or wave edge args = [ 'p' , 'u' , 'rho' ] if self . waves [ 0 ] [ 'speed' ] [ 0 ] == xi : if self . waves [ 0 ] [ 'kind' ] == 'simple' : return self . left tmp = { i : ( self . left [ i ] if self . left [ i ] == self . lmid [ i ] else np . nan ) for i in args } return StateVector ( eos = self . eos , * * tmp ) if self . waves [ 0 ] [ 'speed' ] [ 1 ] == xi : return self . lmid if self . waves [ 1 ] [ 'speed' ] [ 0 ] == xi : tmp = { i : ( self . lmid [ i ] if self . lmid [ i ] == self . rmid [ i ] else np . nan ) for i in args } return StateVector ( eos = self . eos , * * tmp ) if self . waves [ 2 ] [ 'speed' ] [ 0 ] == xi : if self . waves [ 2 ] [ 'kind' ] == 'simple' : return self . rmid tmp = { i : ( self . right [ i ] if self . rmid [ i ] == self . right [ i ] else np . nan ) for i in args } return StateVector ( eos = self . eos , * * tmp ) if self . waves [ 2 ] [ 'speed' ] [ 1 ] == xi : return self . right # Should not get here return None