public subroutine hvs_dump_debug_array(proc, tree, time, vrtx, debug_data)
Dumps the debug_data into a file.
This routine takes a one-dimensional array (one value per element, ordered
liek the treeIDs) and stores it into a vtk file. The name of the vtk-file
is debug_dump, the values are called debug_value.
The caller has to provide the vrtx, which can be created with the
tem_calc_vrtx_coord-routine.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
subroutine hvs_dump_debug_array(proc,tree,time,vrtx,debug_data)!---------------------------------------------------------------------------type(tem_comm_env_type),intent(in)::proctype(treelmesh_type),intent(in)::treetype(tem_time_type),intent(in)::timetype(tem_vrtx_type)::vrtxreal(kind=rk)::debug_data(tree%nElems)!---------------------------------------------------------------------------type(hvs_vtk_file_type)::vtk_filetype(hvs_vtk_config_type)::vtk_configcharacter::linebreakcharacter(len=PathLen)::headerline!---------------------------------------------------------------------------vtk_config%dataform='binary'vtk_config%write_pvd=.false.call hvs_vtk_init(vtk_file=vtk_file,&&vtk_config=vtk_config,&&basename='debug_dump',&&proc=proc)vtk_file%has_celldata=.true.call hvs_vtk_open(vtk_file=vtk_file,&&use_iter=.true.,&&proc=proc,&&time=time)call hvs_vtk_write_meshdata(vtk_file=vtk_file,&&vrtx=vrtx,&&nElems=tree%nElems)linebreak=new_line('x')write(vtk_file%outunit)'<CellData Scalars="debug_value">'//linebreakwrite(headerline,'(a,i0,a)')' <DataArray type="Float64" '&&//' Name="debug_value"'&&//' NumberOfComponents="',1,'"'&&//' format="'//trim(vtk_file%dataform)//'">'write(vtk_file%outunit)trim(headerline)//linebreakcall convert_to_base64(debug_data,tree%nElems,vtk_file%outunit)write(vtk_file%outunit)linebreak! Close the data array again.write(headerline,'(a)')' </DataArray>'write(vtk_file%outunit)trim(headerline)//linebreakcall hvs_vtk_close(vtk_file,proc)end subroutine hvs_dump_debug_array