Slide 12
Slide 12 text
可視化(VTK)
!---------------------------------------------------------------------------------
--
!output of movie file
if ( mod(m,1000)==0 ) then
write(filename,"(a,i5.5,a)") "data/barsley_",int(m),".vtk"
open(10,file=filename)
write(10,"('# vtk DataFile Version 3.0')")
write(10,"('test')")
write(10,"('ASCII ')")
write(10,"('DATASET STRUCTURED_GRID')")
write(10,"('DIMENSIONS ',3(1x,i3))") Nx, Ny, 1
write(10,"('POINTS ',i9,' float')") Nx*Ny*1
do j=0,Ny-1
do i=0,Nx-1
write(10,"(3(f9.4,1x))") x_(i), y_(j), 0.d0
end do
end do
write(10,"('POINT_DATA ',i9)") Nx*Ny*1
!date input
write(10,"('SCALARS barsley float')")
write(10,"('LOOKUP_TABLE default')")
do j=0,Ny-1
do i=0,Nx-1
write(10,*) f(i,j)
end do
end do
close(10)
end if
end do
# vtk DataFile Version 3.0
test
ASCII
DATASET STRUCTURED_GRID
DIMENSIONS 512 512 1
POINTS 262144 float
-3.0000 -3.0000 0.0000
-2.9883 -3.0000 0.0000
-2.9766 -3.0000 0.0000
-2.9648 -3.0000 0.0000
-2.9531 -3.0000 0.0000
-2.9414 -3.0000 0.0000
-2.9297 -3.0000 0.0000
-2.9180 -3.0000 0.0000
-2.9062 -3.0000 0.0000
POINT_DATA 262144
0.0000000000000000
0.0000000000000000
0.0000000000000000
③
②
①
①
③
②
④
④
⑥
⑤
⑤
⑥
• https://vtk.org/wp-content/uploads/2015/04/file-formats.pdf
• https://itandcfd.com/vtk_file_format/241/
data/ファイル名_0001.vtk