parameters: (self, p)
return_statement: return lmid, rmid, lf, rf
docstring: Determine the two middle states for a specified middle pressure (p*).
docstring_summary: Determine the two middle states for a specified middle pressure (p*).
docstring_tokens: Determine the two middle states for a specified middle pressure ( p * ) .
function: def _get_mids(self, p):
          """Determine the two middle states for a specified middle pressure (p*)."""
          lmid = StateVector(p=p, eos=self.eos)  # left middle state
          rmid = StateVector(p=p, eos=self.eos)  # right middle state
          # determine if the left/right waves are shock or rarefaction/simple waves
          if p > self.left.p:  # left wave is shock
              lmid, lf = self._shock_jump(self.left, lmid)
              lmid.u = self.left.u - lmid.u
          else:  # left wave is rarefaction/simple wave
              rho, u = self._rare_int_left(p)
              lmid.rho = rho
              lmid.u = self.left.u - u
              lf = np.nan
          if p > self.right.p:  # right wave is shock
              rmid, rf = self._shock_jump(self.right, rmid)
              rmid.u = self.right.u + rmid.u
          else:  # right wave is rarefaction/simple wave
              rho, u = self._rare_int_right(p)
              rmid.rho = rho
              rmid.u = self.right.u + u
              rf = np.nan
          return lmid, rmid, lf, rf
function_tokens: def _get_mids ( self , p ) : lmid = StateVector ( p = p , eos = self . eos ) # left middle state rmid = StateVector ( p = p , eos = self . eos ) # right middle state # determine if the left/right waves are shock or rarefaction/simple waves if p > self . left . p : # left wave is shock lmid , lf = self . _shock_jump ( self . left , lmid ) lmid . u = self . left . u - lmid . u else : # left wave is rarefaction/simple wave rho , u = self . _rare_int_left ( p ) lmid . rho = rho lmid . u = self . left . u - u lf = np . nan if p > self . right . p : # right wave is shock rmid , rf = self . _shock_jump ( self . right , rmid ) rmid . u = self . right . u + rmid . u else : # right wave is rarefaction/simple wave rho , u = self . _rare_int_right ( p ) rmid . rho = rho rmid . u = self . right . u + u rf = np . nan return lmid , rmid , lf , rf