1 subroutine yshuffle(restmp, code) 2c 3c ... this subroutine is to shuffle the residual vector from the old format 4c ... of (P,u,v,w,P,T) to new format (u,v,w,T,P) 5c 6c input: is the residual in old format 7c output: is the residual in new format 8c 9 include "common.h" 10c 11 dimension restmp (nshg,nflow), tmp(nshg), tmp1(nshg,nflow) 12 character*8 code 13c 14 if (code .eq. 'old2new ') then 15 tmp(:)=restmp(:,1) ! copying the res of continuity 16 restmp(:, 1:3) = restmp(:, 2:4) 17 restmp(:, 4) = tmp(:) 18 return 19 endif 20c 21 if( code .eq. 'new2old ') then 22 tmp1(:,:) = restmp(:,:) 23 do i=1,nsd 24 restmp(:,i+1) = tmp1(:,i) 25 enddo 26 restmp(:,1) = tmp1(:,4) 27 return 28 endif 29 return 30 end 31c 32c 33 subroutine mshuffle(bdiagtmp) 34c 35c ... this subroutine is to shuffle the bdiag from new to old format 36c 37c input: is the bdiag in old format 38c output: is the bdiag in new format 39c 40 include "common.h" 41c 42 dimension bdiagtmp (nshg,nflow,nflow), tmp(nshg,nflow) 43c 44 tmp(:,:) = bdiagtmp(:,:,1) ! reshuffling 1st column with 45 bdiagtmp(:,:,1:3) = bdiagtmp(:,:,2:4) ! fourth column for all the nodes 46 bdiagtmp(:,:,4) = tmp(:,:) 47c 48 49 tmp(:,:) = bdiagtmp(:,1,:) ! reshuffling 1st row with 50 bdiagtmp(:,1:3,:)= bdiagtmp(:,2:4,:) ! fourth row for all the nodes 51 bdiagtmp(:,4,:) = tmp (:,:) 52c 53 return 54 end 55