testVtkIO_prg Program

program~~testvtkio_prg~~UsesGraph program~testvtkio_prg testVtkIO_prg module~kinds_mod kinds_mod module~kinds_mod->program~testvtkio_prg module~array_mod array_mod module~kinds_mod->module~array_mod module~vtkio_mod vtkIO_mod module~kinds_mod->module~vtkio_mod module~array_mod->program~testvtkio_prg module~vtkio_mod->program~testvtkio_prg
Help


Test program for vtkIO_mod

Calls

program~~testvtkio_prg~~CallsGraph program~testvtkio_prg testVtkIO_prg proc~testwritevtk testWriteVTK program~testvtkio_prg->proc~testwritevtk proc~linspace linspace proc~testwritevtk->proc~linspace proc~meshgridx meshGridX proc~testwritevtk->proc~meshgridx proc~writeheadervtk writeHeaderVTK proc~testwritevtk->proc~writeheadervtk interface~writescalarvtk writeScalarVTK proc~testwritevtk->interface~writescalarvtk interface~writegridvtk writeGridVTK proc~testwritevtk->interface~writegridvtk proc~meshgridy meshGridY proc~testwritevtk->proc~meshgridy interface~writevectorvtk writeVectorVTK proc~testwritevtk->interface~writevectorvtk
Help

Source Code


Subroutines

subroutine testWriteVTK()

Test writing VTK files

Arguments

None

Source Code

program testVtkIO_prg
	!! Test program for vtkIO_mod
	use kinds_mod
	use vtkIO_mod
	use array_mod
	implicit none
	
	call testWriteVTK
	
contains

	subroutine testWriteVTK
		!! Test writing VTK files
		
		real(wp),dimension(:),allocatable::x,y
		real(wp),dimension(:,:),allocatable::XX,YY
		real(wp),dimension(:,:),allocatable::F,U,V
		integer::N,M,iou
		
		N = 100
		M = 101
		
		x = linspace(0.0_wp,1.0_wp,N)
		y = linspace(0.0_wp,1.0_wp,M)
		
		XX = MeshGridX(x,y)
		YY = MeshGridY(x,y)
		
		F = XX*YY
		U = -YY
		V =  XX
		
		open(file='data.vtk',newunit=iou)
		call writeHeaderVTK(iou,'Test File')
		call writeGridVTK(iou,XX,YY)
		call writeScalarVTK(iou,'F',F)
		call writeVectorVTK(iou,'U',U,V)
		close(iou)
	end subroutine testWriteVTK

end program testVtkIO_prg