!CCX縺ｧ繧ｪ繝ｳ繧ｵ繧､繝域惠讖�(蟄皮┌縺嶺ｸ菴灘喧繝｢繝�Ν)縺ｮ1/4隗｣譫�
! 繝励Ξ繧ｹ繝医Ξ繧ｹ繧ょ�繧後ｉ繧後ｋ
! 3轤ｹ譖ｲ縺偵°縲�4轤ｹ譖ｲ縺偵°驕ｸ縺ｹ繧�
! 譁芽陸霈昴＆繧薙�onsi14.f90繧�3tenc3d4unv.f90繧�ｉ繧貞盾閠�↓縺励◆縲�
implicit none
!#---蜈･蜉�
real    :: b1=840.d-3/2       ! m   :譛ｨ譚仙�菴薙�蟷�(x)/2
real    :: h1=120.d-3         ! m   :譛ｨ譚舌�鬮倥＆(y)
real    :: h2=260.d-3         ! m   :荳贋ｸ区惠譚舌�髢馴囈(y)
real    :: b2=9.0d-3          ! m   :驪ｼ譚ｿ縺ｮ蜴壹＆(x)
real    :: ell=7300.d-3/2     ! m   :髟ｷ縺�(z)/2
real    :: koteiy=150.d-3     ! m   :遶ｯ縺九ｉ蠅�阜譚｡莉ｶ縺ｾ縺ｧ縺ｮ霍晞屬(z)
real    :: py=100.d-3/4       ! MN  :闕ｷ驥�/4(3轤ｹ譖ｲ縺�)
!real    :: py=70.d-3/2        ! MN  :闕ｷ驥�/2(4轤ｹ譖ｲ縺�)
real    :: px=70.d-3          ! MN  :繝励Ξ繧ｹ繝医Ξ繧ｹ蜉�
real    :: saikabanx=500d-3/2 ! m   :霈芽差譚ｿ縺ｮ髟ｷ縺�(x)
real    :: saikabanz=200d-3/2 ! m   :霈芽差譚ｿ縺ｮ讓ｪ蟷�(z)
real    :: henni=170d-3        ! m   :荳ｭ螟ｮ縺九ｉ螟我ｽ崎ｨ医∪縺ｧ縺ｮ霍晞屬(z)
real    :: anka=100.d-3       ! m   :繧｢繝ｳ繧ｫ繝ｼ繝励Ξ繝ｼ繝医�荳霎ｺ縺ｮ髟ｷ縺�
real    :: hazip=350.d-3      ! m   :遶ｯ縺九ｉPC驪ｼ譽偵∪縺ｧ縺ｮ霍晞屬(z)
real    :: ellp=700.d-3       ! m   :PC驪ｼ譽偵�髢馴囈
integer :: np=10              !     :PC驪ｼ譽偵�譛ｬ謨ｰ(荳贋ｸ句粋繧上○縺ｦ)
integer :: nx1=28             !     :譛ｨ譚舌�蟷�藤譁ｹ蜷�(x)蛻�牡謨ｰ
integer :: nx2=4              !     :驪ｼ譚ｿ縺ｮ蜴壹＆譁ｹ蜷�(x)蛻�牡謨ｰ
integer :: ny1=8              !     :荳贋ｸ区惠譚舌�鬮倥＆譁ｹ蜷�(y)蛻�牡謨ｰ
integer :: ny2=16             !     :荳贋ｸ区惠譚宣俣髫斐�鬮倥＆譁ｹ蜷�(y)蛻�牡謨ｰ
integer :: nz=128             !     :讖玖ｻｸ譁ｹ蜷�(z)蛻�牡謨ｰ
real    :: ezz=7.694d3!6.921d3        ! MPa :譛ｨ譚舌�z霆ｸ譁ｹ蜷代Ζ繝ｳ繧ｰ邇�
real    :: exx=7.694d3/25.0d0 ! MPa :譛ｨ譚舌�x霆ｸ譁ｹ蜷代Ζ繝ｳ繧ｰ邇�
real    :: eyy=7.694d3/25.0d0 ! MPa :譛ｨ譚舌�y霆ｸ譁ｹ蜷代Ζ繝ｳ繧ｰ邇�
real    :: poizx=0.4d0        !     :譛ｨ譚舌�繝昴い繧ｽ繝ｳ豈�
real    :: ekou=206.0d3       ! MPa :驪ｼ譚舌�繝､繝ｳ繧ｰ邇�
real    :: poikou=0.3         !     :驪ｼ譚舌�繝昴い繧ｽ繝ｳ豈�
!---
real    :: gxy,gxz,gyz,poizy,poixy,poixz,poiyx,poiyz
real    :: x(1000000),y(1000000),z(1000000),e66(6,6),b(3,3)
integer :: mesh1(300000,8),mesh2(300000,8)
real    :: dx1,dx2,dy1,dy2,dz,sakaix
integer :: i,j,k,l,nset,nset1,nset2,nyou1,nyou2,nsaika1,nsaika2,npre
!sakaix=b2+b1*2.d0/7! m :驪ｼ譚ｿ縺九ｉ蠅�阜縺ｾ縺ｧ縺ｮ霍晞屬(x)
!---縺帙ｓ譁ｭ蠑ｾ諤ｧ菫よ焚
gxy=ezz/15
gxz=gxy
gyz=gxy
!---繝昴い繧ｽ繝ｳ豈�
poizy=poizx
poixy=poizx*exx/ezz
poixz=poixy
poiyx=poixy
poiyz=poixy
!---隕∫ｴ�髟ｷ縺�
dx1=b1/nx1
dx2=b2/nx2
dy1=h1/ny1
dy2=h2/ny2
dz=ell/nz
!---驪ｼ譚ｿ縺ｮ遽轤ｹ蠎ｧ讓�
nset=0
do k=0,nz
   !---驪ｼ譚ｿ荳企Κ
   do j=0,ny1
      do i=0,nx2
         nset=nset+1
         x(nset)=dx2*i
         y(nset)=dy1*j
         z(nset)=dz*k
      enddo
   enddo
   !---驪ｼ譚ｿ荳ｭ驛ｨ
   do j=1,ny2
      do i=0,nx2
         nset=nset+1
         x(nset)=dx2*i
         y(nset)=h1+dy2*j
         z(nset)=dz*k
      enddo
   enddo
   !---驪ｼ譚ｿ荳矩Κ
   do j=1,ny1
      do i=0,nx2
         nset=nset+1
         x(nset)=dx2*i
         y(nset)=h1+h2+dy1*j
         z(nset)=dz*k
      enddo
   enddo
enddo
nset1=nset
!---譛ｨ譚舌�遽轤ｹ蠎ｧ讓�
do k=0,nz
   !---譛ｨ譚蝉ｸ企Κ
   do j=0,ny1
      do i=1,nx1
         nset=nset+1
         x(nset)=b2+dx1*i
         y(nset)=dy1*j
         z(nset)=dz*k
      enddo
   enddo
   !---譛ｨ譚蝉ｸ矩Κ
   do j=0,ny1
      do i=1,nx1
         nset=nset+1
         x(nset)=b2+dx1*i
         y(nset)=h1+h2+dy1*j
         z(nset)=dz*k
      enddo
   enddo
enddo
nset2=nset-nset1
!---驪ｼ譚ｿ縺ｮ隕∫ｴ�繧呈ｧ区�縺吶ｋ遽轤ｹ
nyou1=0
do k=0,nz-1
   do j=0,(ny1*2+ny2)-1
      do i=1,nx2
         nyou1=nyou1+1
         mesh1(nyou1,1)=(nx2+1)*(ny1*2+ny2+1)*k+(nx2+1)*j+i
         mesh1(nyou1,2)=mesh1(nyou1,1)+(nx2+1)
         mesh1(nyou1,3)=mesh1(nyou1,2)+(nx2+1)*(ny1*2+ny2+1)
         mesh1(nyou1,4)=mesh1(nyou1,1)+(nx2+1)*(ny1*2+ny2+1)
         mesh1(nyou1,5)=mesh1(nyou1,1)+1
         mesh1(nyou1,6)=mesh1(nyou1,5)+(nx2+1)
         mesh1(nyou1,7)=mesh1(nyou1,6)+(nx2+1)*(ny1*2+ny2+1)
         mesh1(nyou1,8)=mesh1(nyou1,5)+(nx2+1)*(ny1*2+ny2+1)
      enddo
   enddo
enddo
!---譛ｨ譚舌�隕∫ｴ�繧呈ｧ区�縺吶ｋ遽轤ｹ
nyou2=0
do k=0,nz-1
   !---譛ｨ譚蝉ｸ企Κ
   do j=0,ny1-1
         !---驪ｼ譚ｿ縺ｨ遽轤ｹ繧貞�譛峨＠縺ｦ縺�ｋ隕∫ｴ�
         nyou2=nyou2+1
         mesh2(nyou2,1)=((nx2+1)*(ny1*2+ny2+1))*k+(nx2+1)*(j+1)
         mesh2(nyou2,2)=mesh2(nyou2,1)+nx2+1
         mesh2(nyou2,3)=mesh2(nyou2,2)+(nx2+1)*(ny1*2+ny2+1)
         mesh2(nyou2,4)=mesh2(nyou2,1)+(nx2+1)*(ny1*2+ny2+1)
         mesh2(nyou2,5)=nset1+(nx1*(ny1+1)*2)*k+nx1*j+1
         mesh2(nyou2,6)=mesh2(nyou2,5)+nx1
         mesh2(nyou2,7)=mesh2(nyou2,6)+nx1*(ny1+1)*2
         mesh2(nyou2,8)=mesh2(nyou2,5)+nx1*(ny1+1)*2
      do i=1,nx1-1
         !---譛ｨ譚舌□縺代�遽轤ｹ縺九ｉ謌舌ｋ隕∫ｴ�
         nyou2=nyou2+1
         mesh2(nyou2,1)=nset1+(nx1*(ny1+1)*2)*k+nx1*j+i
         mesh2(nyou2,2)=mesh2(nyou2,1)+nx1
         mesh2(nyou2,3)=mesh2(nyou2,2)+nx1*(ny1+1)*2
         mesh2(nyou2,4)=mesh2(nyou2,1)+nx1*(ny1+1)*2
         mesh2(nyou2,5)=mesh2(nyou2,1)+1
         mesh2(nyou2,6)=mesh2(nyou2,5)+nx1
         mesh2(nyou2,7)=mesh2(nyou2,6)+nx1*(ny1+1)*2
         mesh2(nyou2,8)=mesh2(nyou2,5)+nx1*(ny1+1)*2
      enddo
   enddo
   !---譛ｨ譚蝉ｸ矩Κ
   do j=0,ny1-1
         !---驪ｼ譚ｿ縺ｨ遽轤ｹ繧貞�譛峨＠縺ｦ縺�ｋ隕∫ｴ�
         nyou2=nyou2+1
         mesh2(nyou2,1)=(nx2+1)*(ny1+ny2+1)+((nx2+1)*(ny1*2+ny2+1))*k+(nx2+1)*j
         mesh2(nyou2,2)=mesh2(nyou2,1)+nx2+1
         mesh2(nyou2,3)=mesh2(nyou2,2)+(nx2+1)*(ny1*2+ny2+1)
         mesh2(nyou2,4)=mesh2(nyou2,1)+(nx2+1)*(ny1*2+ny2+1)
         mesh2(nyou2,5)=nset1+(nx1*(ny1+1))+(nx1*(ny1+1)*2)*k+nx1*j+1
         mesh2(nyou2,6)=mesh2(nyou2,5)+nx1
         mesh2(nyou2,7)=mesh2(nyou2,6)+nx1*(ny1+1)*2
         mesh2(nyou2,8)=mesh2(nyou2,5)+nx1*(ny1+1)*2
      do i=1,nx1-1
         !---譛ｨ譚舌□縺代�遽轤ｹ縺九ｉ謌舌ｋ隕∫ｴ�
         nyou2=nyou2+1
         mesh2(nyou2,1)=nset1+(nx1*(ny1+1))+(nx1*(ny1+1)*2)*k+nx1*j+i
         mesh2(nyou2,2)=mesh2(nyou2,1)+nx1
         mesh2(nyou2,3)=mesh2(nyou2,2)+nx1*(ny1+1)*2
         mesh2(nyou2,4)=mesh2(nyou2,1)+nx1*(ny1+1)*2
         mesh2(nyou2,5)=mesh2(nyou2,1)+1
         mesh2(nyou2,6)=mesh2(nyou2,5)+nx1
         mesh2(nyou2,7)=mesh2(nyou2,6)+nx1*(ny1+1)*2
         mesh2(nyou2,8)=mesh2(nyou2,5)+nx1*(ny1+1)*2
      enddo
   enddo
enddo
!---遽轤ｹ蠎ｧ讓吶�蜃ｺ蜉�
print'("*NODE, NSET=Nall")'
do i=1,nset
   print'(i6,a,f9.6,a,f9.6,a,f9.6)',&
   &i,',',x(i),',',y(i),',',z(i)
enddo
!---驪ｼ譚ｿ縺ｮ隕∫ｴ�縺ｮ蜃ｺ蜉�
print'("*ELEMENT, TYPE=C3D8, ELSET=Ekou")'
do i=1,nyou1
   print'(i6,a,i6,a,i6,a,i6,a,i6,a,i6,a,i6,a,i6,a,i6)',&
   &i,',',&
   &mesh1(i,1),',',&
   &mesh1(i,2),',',&
   &mesh1(i,3),',',&
   &mesh1(i,4),',',&
   &mesh1(i,5),',',&
   &mesh1(i,6),',',&
   &mesh1(i,7),',',&
   &mesh1(i,8)
end do
!---譛ｨ譚舌�隕∫ｴ�縺ｮ蜃ｺ蜉�
print'("*ELEMENT, TYPE=C3D8, ELSET=Emoku")'
do i=1,nyou2
   print'(i6,a,i6,a,i6,a,i6,a,i6,a,i6,a,i6,a,i6,a,i6)',&
   &nyou1+i,',',&
   &mesh2(i,1),',',&
   &mesh2(i,2),',',&
   &mesh2(i,3),',',&
   &mesh2(i,4),',',&
   &mesh2(i,5),',',&
   &mesh2(i,6),',',&
   &mesh2(i,7),',',&
   &mesh2(i,8)
end do
!---蠅�阜譚｡莉ｶ縺ｮ遽轤ｹ鄒､
print'("*NSET,NSET=koteiy")'!謾ｯ謖�Κ
do i=1,nset
   if (y(i)>h1*2+h2-dy1/3.and.y(i)<h1*2+h2+dy1/3.and.&
       &z(i)>koteiy-dz/2.and.z(i)<koteiy+dz/2) then
      print'(i6,a)',i,','
   endif
end do
print'("*NSET,NSET=koteix")'!x霆ｸ蟇ｾ遘ｰ髱｢
do i=1,nset
   if (x(i)>b1+b2-dx1/3.and.x(i)<b1+b2+dy1/3) then
      print'(i6,a)',i,','
   endif
end do
print'("*NSET,NSET=koteiz")'!z霆ｸ蟇ｾ遘ｰ髱｢
do i=1,nset
   if (z(i)>ell-dz/3.and.x(i)<ell+dz/3) then
      print'(i6,a)',i,','
   endif
end do
!#--闕ｷ驥肴擅莉ｶ縺ｮ遽轤ｹ鄒､
print'("*NSET,NSET=saika1")'!逶ｴ邱壻ｸ翫↓霈芽差(荳ｭ螟ｮ縺ｮ遽轤ｹ)
nsaika1=0
do i=1,nset
   if (x(i)>b2+b1-saikabanx+dx1/3.and.x(i)<b1+b2-dx1/3.and.&!隗呈攝縺ｮ縺ｿ縺ｫ霈芽差
       &y(i)>-dy1/3.and.y(i)<dy1/3.and.&
       &z(i)>ell-saikabanz-dz/3.and.z(i)<ell+dz/3) then!3轤ｹ譖ｲ縺�
       !&z(i)>(ell-koteiy)/2+koteiy-saikabanz-dz/3.and.z(i)<(ell-koteiy)/2+koteiy+saikabanz+dz/3) then!4轤ｹ譖ｲ縺�
      nsaika1=nsaika1+1
      print'(i6,a)',i,','
   end if
end do
print'("*NSET,NSET=saika2")'!逶ｴ邱壻ｸ翫↓霈芽差(遶ｯ縺ｮ遽轤ｹ)
nsaika2=0
do i=1,nset
   if  (x(i)>b1+b2-saikabanx-dx1/2.and.x(i)<b1+b2-saikabanx+dx1/2.and.&!隗呈攝縺ｮ縺ｿ縺ｫ霈芽差
       &y(i)>-dy1/3.and.y(i)<dy1/3.and.&
       &z(i)>ell-saikabanz-dz/3.and.z(i)<ell+dz/3) then!3轤ｹ譖ｲ縺�
       !&z(i)>(ell-koteiy)/2+koteiy-saikabanz-dz/3.and.z(i)<(ell-koteiy)/2+koteiy+saikabanz+dz/3) then!4轤ｹ譖ｲ縺�
      nsaika2=nsaika2+1
      print'(i6,a)',i,','
   elseif (x(i)>b1+b2-dx1/3.and.x(i)<b1+b2+dx1/3.and.&
       &y(i)>-dy1/3.and.y(i)<dy1/3.and.&
       &z(i)>ell-saikabanz-dz/3.and.z(i)<ell+dz/3) then!3轤ｹ譖ｲ縺�
       !&z(i)>(ell-koteiy)/2+koteiy-saikabanz-dz/3.and.z(i)<(ell-koteiy)/2+koteiy+saikabanz+dz/3) then!4轤ｹ譖ｲ縺�
      nsaika2=nsaika2+1
      print'(i6,a)',i,','
   end if
end do
print'(A)',"*NSET,NSET=pre"!繝励Ξ繧ｹ繝医Ξ繧ｹ
npre=0
do i=1,nset
   if (x(i)>-dx2/3.and.x(i)<dx2/3.and.&!荳翫�繝励Ξ繧ｹ繝医Ξ繧ｹ
       &y(i)>h1/2-anka/2-dy1/3.and.y(i)<h1/2+anka/2+dy1/3.and.&
       &z(i)>anka/2.and.z(i)<ell-anka/2) then
      npre=npre+1
      print'(i6,a)',i,','
   end if
   if (x(i)>-dx2/3.and.x(i)<dx2/3.and.&!荳九�繝励Ξ繧ｹ繝医Ξ繧ｹ
       &y(i)>h1+h2+h1/2-anka/2-dy1/3.and.y(i)<h1+h2+h1/2+anka/2+dy1/3.and.&
       &z(i)>anka/2.and.z(i)<ell-anka/2) then
      npre=npre+1
      print'(i6,a)',i,','
   end if
end do
print'("*NSET,NSET=henni")'!螟我ｽ崎ｨ医�譁ｭ髱｢
do i=1,nset1!驪ｼ譚ｿ
   if (x(i)>-dx2/3.and.x(i)<b2+dx1/3.and.&
       &y(i)>-dy1/3.and.y(i)<dy1/3.and.&
       &z(i)>ell-dz/3.and.z(i)<ell+dz/3) then!驪ｼ譚ｿ縺ｯ譴∽ｸｭ螟ｮ縺ｫ螟我ｽ崎ｨ�
      print'(i6,a)',i,','
   end if
end do
do i=nset1,nset!譛ｨ譚�
   if (x(i)>b2-dx2/3.and.x(i)<b1+b2+dx1/3.and.&
       &y(i)>-dy1/3.and.y(i)<dy1/3.and.&
       &z(i)>ell-henni-dz/3.and.z(i)<ell-henni+dz/3) then!驪ｼ譚ｿ縺ｯ譴∽ｸｭ螟ｮ縺ｫ螟我ｽ崎ｨ�
      print'(i6,a)',i,','
   end if
end do
print'("*NSET,NSET=jouen")'!譴∽ｸｭ螟ｮ縺ｮ譁ｭ髱｢縺ｮ荳顔ｸ�
do i=1,nset
   if (x(i)>-dx2/3.and.x(i)<b1+b2+dx1/3.and.&
       &y(i)>-dy1/3.and.y(i)<dy1/3.and.&
       &z(i)>ell-dz/3.and.z(i)<ell+dz/3) then
      print'(i6,a)',i,','
   end if
end do
print'("*NSET,NSET=kaen")'!譴∽ｸｭ螟ｮ縺ｮ譁ｭ髱｢縺ｮ荳狗ｸ�(譛ｨ譚舌�縺ｿ)
do i=1,nset
   if (x(i)>b2-dx2/3.and.x(i)<b1+b2+dx1/3.and.&
       &y(i)>h1*2.d0+h2-dy1/3.and.y(i)<h1*2.d0+h2+dy1/3.and.&
       &z(i)>ell-dz/3.and.z(i)<ell+dz/3) then
      print'(i6,a)',i,','
   end if
end do
!---蠅�阜譚｡莉ｶ
print'("*BOUNDARY")'
print'("koteiy,2")'
print'("koteix,1")'
print'("koteiz,3")'
!---譛ｨ譚舌�譚先侭險ｭ螳�
print'("*MATERIAL,NAME=ELmoku")'
print'("*ELASTIC,TYPE=ORTHOROPIC")'
call ortho(e66,exx,eyy,ezz,poixy,poixz,poiyz,gyz,&
& gxz,gxy,poiyx,poizx,poizy)
print'(f12.4,a,f12.4,a,f12.4,a,&
&f12.4,a,f12.4,a,f12.4,a,f12.4,&
& a ,f12.4,a)',&
&e66(1,1),',',e66(1,2),',',e66(2,2),',',e66(1,3),','&
&,e66(2,3),',',e66(3,3),',',e66(6,6),',',e66(5,5),','
print'(f12.4,a)',e66(4,4)
!---驪ｼ譚舌�譚先侭險ｭ螳�
print'("*MATERIAL,NAME=ELkou")'
print'("*ELASTIC")'
print'(f12.4,a,f12.4)',ekou,',',poikou
print'("*SOLID SECTION,ELSET=Emoku,MATERIAL=ELmoku")'
print'("*SOLID SECTION,ELSET=Ekou,MATERIAL=ELkou")'
!---霈芽差譚｡莉ｶ
print'("*STEP")'
print'("*STATIC,SOLVER=SPOOLES")'
print'("*CLOAD")'
print'(A,a,i6,a,1pe13.5)','pre',',',1,',',px*np/npre
print'(A,a,i6,a,1pe13.5)','saika1',',',2,',',py/(nsaika1+nsaika2/2)
print'(A,a,i6,a,1pe13.5)','saika2',',',2,',',py/2/(nsaika1+nsaika2/2)
!#--蜃ｺ蜉帙�險ｭ螳�
print'("*NODE PRINT,NSET=henni")'!螟我ｽ崎ｨ�
print'("U")'
print'("*NODE PRINT,NSET=jouen")'!譴∽ｸｭ螟ｮ荳顔ｸ√�縺溘ｏ縺ｿ
print'("U")'
print'("*NODE PRINT,NSET=kaen")'!譴∽ｸｭ螟ｮ荳狗ｸ√�縺溘ｏ縺ｿ
print'("U")'
print'("*NODE PRINT,NSET=koteiz")'!譴∽ｸｭ螟ｮ縺ｮ譁ｭ髱｢縺ｮ縺溘ｏ縺ｿ
print'("U")'
print'("*NODE FILE")'
print'("U")'
print'("*EL FILE")'
print'("S")'
print'("*END STEP")'

end
!-------- 逶ｴ莠､逡ｰ譁ｹ諤ｧ縺ｮ螳壽焚繧貞�縺吶�繝ｭ繧ｰ繝ｩ繝� --------
subroutine ortho(e66,exx,eyy,ezz,poixy,poixz,poiyz,gyz,&
&gxz,gxy,poiyx,poizx,poizy)
implicit none
real :: e66(6,6),b(3,3)
real exx,eyy,ezz,poixy,poixz,poiyz,gyz,gxz,gxy,poiyx,poizx,poizy
real det
integer i,j
!implicit real*8(a-h,o-z)
!dimension e66(6,6),b(3,3)
!蠢懷鴨�阪�縺壹∩陦悟��啼66
!do i=1,6
!do j=1,6
!e66(i,j)=0.d0
!end do
!end do
!
e66=0.d0
e66(1,1)=1.d0/exx
e66(1,2)=-poixy/exx
e66(1,3)=-poixz/exx
e66(2,1)=-poiyx/eyy
e66(2,2)=1.d0/eyy
e66(2,3)=-poiyz/eyy
e66(3,1)=-poizx/ezz
e66(3,2)=-poizy/ezz
e66(3,3)=1.d0/ezz
!
!****** 騾�｡悟�繧貞叙縺｣縺ｦ縲∝ｿ懷鴨�阪�縺壹∩陦悟�縺ｫ螟画鋤縺吶ｋ******
det=e66(1,1)*e66(2,2)*e66(3,3)+e66(2,1)*e66(3,2)*e66(1,3)&
&+e66(3,1)*e66(1,2)*e66(2,3)-e66(2,1)*e66(1,2)*e66(3,3)&
&-e66(3,1)*e66(2,2)*e66(1,3)-e66(1,1)*e66(3,2)*e66(2,3)
b(1,1)=(-1.d0)**(1+1)*(e66(2,2)*e66(3,3)-e66(3,2)*e66(2,3))
b(1,2)=(-1.d0)**(1+2)*(e66(2,1)*e66(3,3)-e66(3,1)*e66(2,3))
b(1,3)=(-1.d0)**(1+3)*(e66(2,1)*e66(3,2)-e66(3,1)*e66(2,2))
b(2,1)=(-1.d0)**(2+1)*(e66(1,2)*e66(3,3)-e66(3,2)*e66(1,3))
b(2,2)=(-1.d0)**(2+2)*(e66(1,1)*e66(3,3)-e66(3,1)*e66(1,3))
b(2,3)=(-1.d0)**(2+3)*(e66(1,1)*e66(3,2)-e66(3,1)*e66(1,2))
b(3,1)=(-1.d0)**(3+1)*(e66(1,2)*e66(2,3)-e66(2,2)*e66(1,3))
b(3,2)=(-1.d0)**(3+2)*(e66(1,1)*e66(2,3)-e66(2,1)*e66(1,3))
b(3,3)=(-1.d0)**(3+3)*(e66(1,1)*e66(2,2)-e66(2,1)*e66(1,2))
do i=1,3
do j=1,3
e66(i,j)=b(j,i)/det
end do
end do
!
!****** 縺帙ｓ譁ｭ陬懈ｭ｣菫よ焚繧貞�蜉� ******
!print*,'xy髱｢縺ｮ縺帙ｓ譁ｭ蠑ｾ諤ｧ菫よ焚繧貞�繧後※荳九＆縺�'
!read*, gxy
e66(4,4)=gyz
!print*,'xz髱｢縺ｮ縺帙ｓ譁ｭ蠑ｾ諤ｧ菫よ焚繧貞�繧後※荳九＆縺�'
!read*, gxz
e66(5,5)=gxz
!print*,'yz髱｢縺ｮ縺帙ｓ譁ｭ蠑ｾ諤ｧ菫よ焚繧貞�繧後※荳九＆縺�'
!read*, gyz
e66(6,6)=gxy
!
!
return
end