implicit real*8 (a-h, o-z)
dimension t(3000000),u(3000000),v(3000000),w(3000000),x(3000000),y(3000000),z(3000000),&
&         mesh(1000000,6),narabi(10000,10000)
integer :: t,u,v,w,x,y,z
n=8
!nの値は周方向分割数で何角形か入力する
m=20
!mの値は高さ方向分割数で何分割か入力する
!データ入力
print *,"節点数を入力して下さい"
read*, nset !節点数の読み込み
do i=1,nset
!print *,"それぞれの節点を入力して下さい"
read*, t(i),u(i),v(i),w(i),x(i),y(i),z(i)!各節点の座標値の読み込み
end do
print*,3,",","     ",u(3),",","     ",30*m*n-6*n*(m-1)+1,",","     ",30*m*n-6*n*(m-1)+2,",","     ",&
&x(3),",","     ",30*m*n-6*n*(m-1)+2+m*2,",","     ",z(3)
!kは1から"(24*k+6)*n=節点数"の式からkの値を算出する
!算出したkの値が小数点の場合、算出したkの値よりも大きい整数を入力する
do i=1,10
print*,24*n*i-18*n+1,",","     ",u(24*n*i-18*n+1),",","     ",30*m*n-6*n*(m-1)-2+4*i,",","     "&
&,30*m*n-6*n*(m-1)-1+4*i,",","     ",x(24*n*i-18*n+1),",","     ",30*m*n-6*n*(m-1)-1+m*2+4*i,",","     "&
&,z(24*n*i-18*n+1)
!
print*,24*n*i-6*n,",","     ",u(24*n*i-6*n),",","     ",30*m*n-6*n*(m-1)-1+4*i,",","     "&
&,30*m*n-6*n*(m-1)+4*i,",","     ",x(24*n*i-6*n),",","     ",30*m*n-6*n*(m-1)+m*2+4*i,",","     ",z(24*n*i-6*n)
!
print*,24*n*i,",","     ",u(24*n*i),",","     ",30*m*n-6*n*(m-1)+4*i,",","     ",30*m*n-6*n*(m-1)+1+4*i&
&,",","     ",x(24*n*i),",","     ",30*m*n-6*n*(m-1)+1+m*2+4*i,",","     ",z(24*n*i)
!
print*,24*n*i+1,",","     ",u(24*n*i+1),",","     ",30*m*n-6*n*(m-1)+1+4*i,",","     "&
&,30*m*n-6*n*(m-1)+2+4*i,",","     ",x(24*n*i+1),",","     ",30*m*n-6*n*(m-1)+2+m*2+4*i,",","     "&
&,z(24*n*i+1)
end do
end

