function SOLV = auxvr(MSH,GAS,SOLV,iplot)
%----------------------------------------
%     Computes auxiliary flow variables.
%     Store in U,P,C arrays.
%----------------------------------------
SOLV.U = SOLV.RU./SOLV.RO;
SOLV.P = (GAS.GCNT-1.).*(SOLV.ET-.5*SOLV.RO.*SOLV.U.^2);
SOLV.C = sqrt(GAS.GCNT*SOLV.P./SOLV.RO);

ROMIN = min(SOLV.RO);
ROMAX = max(SOLV.RO);
UMIN  = min(SOLV.U);
UMAX  = max(SOLV.U);
PMIN  = min(SOLV.P);
PMAX  = max(SOLV.P);

if iplot == 1
    disp(['ROMIN,ROMAX = ' num2str(ROMIN) ', ' num2str(ROMAX)])
    disp([' UMIN, UMAX = ' num2str(UMIN)  ', ' num2str(UMAX) ])
    disp([' PMIN, PMAX = ' num2str(PMIN)  ', ' num2str(PMAX) ])
end

