This routine runs over each tracking object and dump requested quantities if timeControl is active on current time
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_tracking_type), | intent(inout) | :: | track |
tracking object containing all tracking relevant information |
||
type(tem_simControl_type), | intent(in) | :: | simControl |
Simulation control contains current simulation time and status bits |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
global variable system |
||
type(treelmesh_type), | intent(in) | :: | tree |
global tree |
subroutine tem_tracker( track, simControl, varSys, tree ) ! -------------------------------------------------------------------- ! !> tracking object containing all tracking relevant information type(tem_tracking_type ), intent(inout) :: track !> Simulation control contains current simulation time and !! status bits type(tem_simControl_type), intent(in) :: simControl !> global variable system type(tem_varSys_type), intent(in) :: varSys !> global tree type(treelmesh_type ), intent(in) :: tree ! -------------------------------------------------------------------- ! integer :: iLog, iConfig ! -------------------------------------------------------------------- ! ! Run over all tracking objects do iLog = 1, track%control%nActive iConfig = track%instance(iLog)%pntConfig ! Skip this tracking object, if there are no entries in the ! variable system if (track%instance( iLog )%varMap%nScalars < 1) cycle ! dump tracking when at least one of following conditions is triggered: ! tracking timeControl is triggered ! simulation reached steady state ! stop file is defined ! simulation is terminated abruptly ! simulation reaches the maximum simulation time if ( tem_tracking_has_triggered( & & timeControl = track%config(iConfig)%timeControl, & & simControl = simControl, & & proc = track%instance(iLog)%output_file%proc ) ) then if( track%instance( iLog )%subTree%useGlobalMesh ) then ! Open the output files, this also generates the vertices for the ! mesh, and writes the mesh data to disk. Also writes header file ! depends on output vis_kind call hvs_output_open( & & out_file = track%instance(iLog)%output_file, & & use_iter = track%config(iConfig)%output_config & & %vtk%iter_filename, & & mesh = tree, & & varSys = varSys, & & time = simControl%now ) ! Evaluate and write results to disk call hvs_output_write( out_file = track%instance(iLog)%output_file, & & varSys = varSys, & & mesh = tree ) ! Close opened files call hvs_output_close( out_file = track%instance(iLog)%output_file, & & varSys = varSys, & & mesh = tree ) else ! Open the output files, this also generates the vertices for the ! mesh, and writes the mesh data to disk. Also writes header file ! depends on output vis_kind call hvs_output_open( & & out_file = track%instance(iLog)%output_file, & & use_iter = track%config(iConfig)%output_config & & %vtk%iter_filename, & & mesh = tree, & & varSys = varSys, & & subTree = track%instance(iLog)%subTree, & & time = simControl%now ) ! Evaluate and write results to disk call hvs_output_write( out_file = track%instance(iLog)%output_file, & & varSys = varSys, & & mesh = tree, & & subTree = track%instance(iLog)%subTree ) ! Close opened files call hvs_output_close( out_file = track%instance(iLog)%output_file, & & varSys = varSys, & & mesh = tree, & & subTree = track%instance(iLog)%subTree ) end if !Global mesh end if ! do tracking? interval, tmin, tmax check end do ! iLog end subroutine tem_tracker