1 subroutine bc3global (globMas, iBC) 2c 3c---------------------------------------------------------------------- 4c 5c This routine satisfies the BC of LHS mass matrix for a single 6c element. 7c 8c input: 9c iBC (nshg) : boundary condition code 10c BC (nshg,11) : Dirichlet BC constraint parameters 11c ien (npro,nshl) : ien array for this element 12c EGmass(npro,nedof,nedof) : element consistent mass matrix before BC 13c 14c output: 15c EGmass(npro,nedof,nedof): LHS mass matrix after BC is satisfied 16c 17c 18c Farzin Shakib, Winter 1987. 19c Zdenek Johan, Spring 1990. (Modified for general divariant gas) 20c---------------------------------------------------------------------- 21c 22 include "common.h" 23c 24 dimension iBC(nshg), 25 & globMas(4*nshg,4*nshg) 26 27 28 do in=1,nshg 29 i0 = (in-1)*4 30c 31c.... pressure 32c 33 if ( btest(iBC(in),2) ) then 34 globMas(i0+1,:) = zero 35 globMas(:,i0+1) = zero 36 globMas(i0+1,i0+1) = one 37 endif 38c 39c.... velocities 40c 41c 42c.... x1-velocity 43c 44 if ( ibits(iBC(in),3,3) .eq. 1 ) then 45 globMas(i0+2,:) = zero 46 globMas(:,i0+2) = zero 47 globMas(i0+2,i0+2) = one 48 endif 49c 50c.... x2-velocity 51c 52 if ( ibits(iBC(in),3,3) .eq. 2 ) then 53 globMas(i0+3,:) = zero 54 globMas(:,i0+3) = zero 55 globMas(i0+3,i0+3) = one 56 57 endif 58c 59c.... x1-velocity and x2-velocity 60c 61 if ( ibits(iBC(in),3,3) .eq. 3 ) then 62 globMas(i0+2,:) = zero 63 globMas(:,i0+2) = zero 64 globMas(i0+2,i0+2) = one 65 globMas(i0+3,:) = zero 66 globMas(:,i0+3) = zero 67 globMas(i0+3,i0+3) = one 68 endif 69c 70c.... x3-velocity 71c 72 if ( ibits(iBC(in),3,3) .eq. 4 ) then 73 globMas(i0+4,:) = zero 74 globMas(:,i0+4) = zero 75 globMas(i0+4,i0+4) = one 76 77 endif 78c 79c.... x1-velocity and x3-velocity 80c 81 if ( ibits(iBC(in),3,3) .eq. 5 ) then 82 globMas(i0+2,:) = zero 83 globMas(:,i0+2) = zero 84 globMas(i0+2,i0+2) = one 85 globMas(i0+4,:) = zero 86 globMas(:,i0+4) = zero 87 globMas(i0+4,i0+4) = one 88 89 endif 90c 91c.... x2-velocity and x3-velocity 92c 93 if ( ibits(iBC(in),3,3) .eq. 6 ) then 94 globMas(i0+3,:) = zero 95 globMas(:,i0+3) = zero 96 globMas(i0+3,i0+3) = one 97 globMas(i0+4,:) = zero 98 globMas(:,i0+4) = zero 99 globMas(i0+4,i0+4) = one 100 101 endif 102c 103c.... x1-velocity, x2-velocity, and x3-velocity 104c 105 if ( ibits(iBC(in),3,3) .eq. 7 ) then 106 globMas(i0+2,:) = zero 107 globMas(:,i0+2) = zero 108 globMas(i0+2,i0+2) = one 109 globMas(i0+3,:) = zero 110 globMas(:,i0+3) = zero 111 globMas(i0+3,i0+3) = one 112 globMas(i0+4,:) = zero 113 globMas(:,i0+4) = zero 114 globMas(i0+4,i0+4) = one 115 endif 116 enddo 117 118 119c 120c.... return 121c 122 return 123 end 124