Skip to content
Snippets Groups Projects
Commit 9766e7c6 authored by Behrens, Prof. Dr. Jörn's avatar Behrens, Prof. Dr. Jörn
Browse files

small bug fixes

parent d4f6b0d1
No related branches found
No related tags found
No related merge requests found
...@@ -186,7 +186,7 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, & ...@@ -186,7 +186,7 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, &
#if defined VTU_OUTPUTSTC #if defined VTU_OUTPUTSTC
i_numberofvtucells = p_mesh%i_enumfine* (i_lay-1) i_numberofvtucells = p_mesh%i_enumfine* (i_lay-1)
i_numberoffvtuaces = p_mesh%i_gnumfine* i_lay + p_mesh%i_nnumber* (i_lay-1) i_numberofvtufaces = p_mesh%i_gnumfine* i_lay + p_mesh%i_nnumber* (i_lay-1)
#endif #endif
IF(l_continuous_data) THEN IF(l_continuous_data) THEN
...@@ -394,7 +394,7 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, & ...@@ -394,7 +394,7 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, &
END IF END IF
DO i_cnt = 1, i_nodedata DO i_cnt = 1, i_nodedata
IF (p_nodedata(i_cnt)%c_name(1:5) == 'layer') THEN IF (p_nodedata(i_cnt)%c_name(1:5) == 'layer') THEN
READ(i_hcnt,'I8') p_nodedata(i_cnt)%c_name(6:32) READ(i_hcnt,('I8')) p_nodedata(i_cnt)%c_name(6:32)
i_stcbeg = p_mesh%i_nnumber*(i_hcnt-1)+1 i_stcbeg = p_mesh%i_nnumber*(i_hcnt-1)+1
i_stcend = p_mesh%i_nnumber*i_hcnt i_stcend = p_mesh%i_nnumber*i_hcnt
r_stcval(1:1,i_stcbeg:i_stcend) = p_nodedata(i_cnt)%p_vdata(1:1,:) r_stcval(1:1,i_stcbeg:i_stcend) = p_nodedata(i_cnt)%p_vdata(1:1,:)
...@@ -404,6 +404,7 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, & ...@@ -404,6 +404,7 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, &
p_stcnodedata(1)%i_size = 1 p_stcnodedata(1)%i_size = 1
p_stcnodedata(1)%p_vdata=>r_stcval p_stcnodedata(1)%p_vdata=>r_stcval
CALL write_vtu_data(i_fhandle, p_stcnodedata(1)) CALL write_vtu_data(i_fhandle, p_stcnodedata(1))
DEALLOCATE(r_stcval)
#endif #endif
END IF END IF
...@@ -434,7 +435,6 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, & ...@@ -434,7 +435,6 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, &
END IF END IF
#elif defined VTU_OUTPUTSTC #elif defined VTU_OUTPUTSTC
! at this time we assign the same cell values to the whole column of stacked cells ! at this time we assign the same cell values to the whole column of stacked cells
IF(ALLOCATED(r_stcval)) DEALLOCATE(r_stcval)
ALLOCATE(r_stcval(1,i_numberofvtucells), stat=i_alct) ALLOCATE(r_stcval(1,i_numberofvtucells), stat=i_alct)
IF(i_alct /= 0) THEN IF(i_alct /= 0) THEN
CALL grid_error(c_error='[plot_vtu]: could not allocate aux. stc values arrays') CALL grid_error(c_error='[plot_vtu]: could not allocate aux. stc values arrays')
...@@ -443,13 +443,14 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, & ...@@ -443,13 +443,14 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, &
DO i_hcnt=1,i_numberofcells DO i_hcnt=1,i_numberofcells
i_stcbeg = (i_hcnt-1)*(i_lay-1)+1 i_stcbeg = (i_hcnt-1)*(i_lay-1)+1
i_stcend = i_hcnt*(i_lay-1) i_stcend = i_hcnt*(i_lay-1)
r_stcval(i_stcbeg:i_stcend) = p_celldata(i_cnt)%p_vdata(i_hct) r_stcval(i_stcbeg:i_stcend) = p_celldata(i_cnt)%p_vdata(i_hcnt)
END DO END DO
p_stcnodedata(1)%c_name = p_celldata(i_cnt)%c_name p_stcnodedata(1)%c_name = p_celldata(i_cnt)%c_name
p_stcnodedata(1)%i_size = p_celldata(i_cnt)%i_size p_stcnodedata(1)%i_size = p_celldata(i_cnt)%i_size
p_stcnodedata(1)%p_vdata=>r_stcval p_stcnodedata(1)%p_vdata=>r_stcval
CALL write_vtu_data(i_fhandle, p_celldata(i_cnt)) CALL write_vtu_data(i_fhandle, p_celldata(i_cnt))
END DO END DO
DEALLOCATE(r_stcval)
#endif #endif
! write the end of cell data and the footer. ! write the end of cell data and the footer.
...@@ -461,9 +462,6 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, & ...@@ -461,9 +462,6 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, &
! tidy up ! tidy up
CLOSE(i_fhandle) CLOSE(i_fhandle)
DEALLOCATE(r_nodecoor, i_cellnodes) DEALLOCATE(r_nodecoor, i_cellnodes)
#if defined VTU_OUTPUTSTC
IF(ALLOCATED(r_stcval)) DEALLOCATE(r_stcval)
#endif
END SUBROUTINE plot_vtu END SUBROUTINE plot_vtu
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment