From bef1078b4ee64bfd033b0f74e42183e69e52872a Mon Sep 17 00:00:00 2001 From: Joern Behrens <joern.behrens@uni-hamburg.de> Date: Sun, 6 Feb 2022 21:18:05 +0100 Subject: [PATCH] bug fixed in stacked VTU cell output --- flash2d/src/options-sphere/IO_vtu_stacked.F90 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/flash2d/src/options-sphere/IO_vtu_stacked.F90 b/flash2d/src/options-sphere/IO_vtu_stacked.F90 index 30612ad..8b102f7 100644 --- a/flash2d/src/options-sphere/IO_vtu_stacked.F90 +++ b/flash2d/src/options-sphere/IO_vtu_stacked.F90 @@ -441,18 +441,17 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, & END IF ! Write the variable belonging to the tetradra. -#if defined VTU_OUTPUT2D || defined VTU_OUTPUTSPH || defined VTU_OUTPUT2D IF(PRESENT(i_celldata) .AND. PRESENT(p_celldata)) THEN +#if defined VTU_OUTPUT2D || defined VTU_OUTPUTSPH || defined VTU_OUTPUT2D DO i_cnt = 1, i_celldata CALL write_vtu_data(i_fhandle, p_celldata(i_cnt)) END DO - END IF #elif defined VTU_OUTPUTSTC ! at this time we assign the same cell values to the whole column of stacked cells - ALLOCATE(r_stcval(1,i_numberofvtucells), stat=i_alct) - IF(i_alct /= 0) THEN - CALL grid_error(c_error='[plot_vtu]: could not allocate aux. stc values arrays') - END IF + ALLOCATE(r_stcval(1,i_numberofvtucells), stat=i_alct) + IF(i_alct /= 0) THEN + CALL grid_error(c_error='[plot_vtu]: could not allocate aux. stc values arrays') + END IF DO i_cnt = 1, i_celldata DO i_hcnt=1,i_numberofcells i_stcbeg = (i_hcnt-1)*(i_lay-1)+1 @@ -463,10 +462,11 @@ SUBROUTINE plot_vtu(p_mesh, c_filename, & 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)%p_vdata=>r_stcval - CALL write_vtu_data(i_fhandle, p_celldata(i_cnt)) + CALL write_vtu_data(i_fhandle, p_stcnodedata(1)) END DO DEALLOCATE(r_stcval) #endif + END IF ! write the end of cell data and the footer. WRITE(i_fhandle, *) '</CellData>' -- GitLab