Paraview data format conversion from vtk to parallel prog data format.
hi
I have to change the current data format which is written to save the data in vtk format to parallel prog format I have seen the data format but i couldnot change it. i am using fortran language. here are the subroutines ================================================== =================== !------------------------------------------------------------------------------------------------- subroutine print_fronts2(my_Fronts,my_NumFront,nf,grank,time) use module_grid use module_IO use front_lib implicit none type(Front), dimension(:), pointer, intent(in) :: my_Fronts integer :: my_NumFront integer :: nf,iunit, i,grank real(8) :: time iunit=7 OPEN(UNIT=iunit,FILE=trim(out_path)//'/front'//int2text(grank,4)//int2text(nf,4)//'.vtk') do i = 1, myNumFronts write(iunit,10) write(iunit,11)time write(iunit,12) write(iunit,13) 10 format('# vtk DataFile Version 2.0') 11 format('grid, time ',F16.8) 12 format('ASCII') 13 format('DATASET POLYDATA') call print_2(my_Fronts(myFronts_IDs(i)),iunit,xh,yh,zh, dx,dy,dz,Nx,Ny,Nz,Ng,Nxt,Nyt,Nzt,xLength,yLength,z Length) enddo close(iunit) end subroutine print_fronts2 ================================================== =====================subroutine print_2(this,iunit,xh,yh,zh,dx,dy,dz,Nx,Ny,Nz,Ng,N xt,Nyt,Nzt,xLength,yLength,zLength) ! use module_grid ! use module_IO implicit none type(Front), intent(in) :: this integer, intent(in) :: Nxt, Nyt, Nzt ! total number of cells integer, intent(in) :: Nx, Ny, Nz, Ng real(8), intent(in) :: xLength, yLength, zLength real(8), dimension(Nxt), intent(in) :: xh, dx real(8), dimension(Nyt), intent(in) :: yh, dy real(8), dimension(Nzt), intent(in) :: zh, dz integer :: iunit, elem, point real(8) :: xp(3) write(iunit,15)this%PointLength 15 format('POINTS ',I17,' float' ) do point = 1, this%PointLength call GetCoords(this,xp,point,xh,yh,zh,dx,dy,dz,Nx,Ny,Nz ,Ng,Nxt,Nyt,Nzt,xLength,yLength,zLength) WRITE (iunit,255) xp 255 FORMAT (' ',3E13.5) enddo write(iunit,16) this%ElemLength,4*this%ElemLength 16 format('POLYGONS ',2I17) do elem = 1, this%ElemLength call write_integer(iunit,3,this%ElemCorner(1,elem),this %ElemCorner(2,elem),this%ElemCorner(3,elem)) 266 FORMAT (' 3',3I6) enddo end subroutine print_2 ================================================== =================== |
All times are GMT -4. The time now is 19:16. |