tem_dump_subTree Subroutine

public subroutine tem_dump_subTree(me, globalTree, root_only)

This subroutine creates a new mesh in treelmesh format from a global and a sub tree and dumps it to disc in treelmesh format (needed for tracking in harvester format where the mesh has to be dumped to disc)

Arguments

Type IntentOptional Attributes Name
type(tem_subTree_type), intent(in) :: me

subTree to dump to disk

type(treelmesh_type), intent(in) :: globalTree

the global tree

logical, intent(in), optional :: root_only

root dump global mesh when true and all process dump its own mesh when false


Calls

proc~~tem_dump_subtree~~CallsGraph proc~tem_dump_subtree tem_dump_subTree proc~dump_treelmesh dump_treelmesh proc~tem_dump_subtree->proc~dump_treelmesh proc~tem_create_endiansuffix tem_create_EndianSuffix proc~dump_treelmesh->proc~tem_create_endiansuffix mpi_type_contiguous mpi_type_contiguous proc~dump_treelmesh->mpi_type_contiguous proc~dump_tem_global dump_tem_global proc~dump_treelmesh->proc~dump_tem_global mpi_type_size mpi_type_size proc~dump_treelmesh->mpi_type_size mpi_type_commit mpi_type_commit proc~dump_treelmesh->mpi_type_commit mpi_file_write_all mpi_file_write_all proc~dump_treelmesh->mpi_file_write_all mpi_file_close mpi_file_close proc~dump_treelmesh->mpi_file_close proc~check_mpi_error check_mpi_error proc~dump_treelmesh->proc~check_mpi_error mpi_file_open mpi_file_open proc~dump_treelmesh->mpi_file_open mpi_exscan mpi_exscan proc~dump_treelmesh->mpi_exscan mpi_file_set_view mpi_file_set_view proc~dump_treelmesh->mpi_file_set_view mpi_type_free mpi_type_free proc~dump_treelmesh->mpi_type_free proc~aot_out_open_table aot_out_open_table proc~dump_tem_global->proc~aot_out_open_table proc~aot_out_close aot_out_close proc~dump_tem_global->proc~aot_out_close proc~aot_out_close_table aot_out_close_table proc~dump_tem_global->proc~aot_out_close_table proc~aot_out_val aot_out_val proc~dump_tem_global->proc~aot_out_val proc~aot_out_open aot_out_open proc~dump_tem_global->proc~aot_out_open proc~dump_tem_prophead dump_tem_prophead proc~dump_tem_global->proc~dump_tem_prophead mpi_error_string mpi_error_string proc~check_mpi_error->mpi_error_string proc~tem_abort tem_abort proc~check_mpi_error->proc~tem_abort proc~dump_tem_prophead->proc~aot_out_open_table proc~dump_tem_prophead->proc~aot_out_close_table proc~dump_tem_prophead->proc~aot_out_val mpi_abort mpi_abort proc~tem_abort->mpi_abort

Called by

proc~~tem_dump_subtree~~CalledByGraph proc~tem_dump_subtree tem_dump_subTree proc~tem_restart_openwrite tem_restart_openWrite proc~tem_restart_openwrite->proc~tem_dump_subtree proc~tem_write_debugmesh tem_write_debugMesh proc~tem_write_debugmesh->proc~tem_dump_subtree proc~hvs_output_init hvs_output_init proc~hvs_output_init->proc~tem_dump_subtree proc~hvs_output_open hvs_output_open proc~hvs_output_open->proc~tem_restart_openwrite proc~tem_init_tracker tem_init_tracker proc~tem_init_tracker->proc~hvs_output_init proc~tem_tracker tem_tracker proc~tem_tracker->proc~hvs_output_open

Contents

Source Code


Source Code

  subroutine tem_dump_subTree( me, globalTree, root_only )
    ! ---------------------------------------------------------------------------
    !> subTree to dump to disk
    type(tem_subTree_type), intent(in) :: me
    !> the global tree
    type(treelmesh_type), intent(in) :: globalTree
    !> root dump global mesh when true and
    !! all process dump its own mesh when false
    logical, intent(in), optional :: root_only
    ! ---------------------------------------------------------------------------
    type(treelmesh_type) :: local_tree
    integer :: iElem
    ! ---------------------------------------------------------------------------
    local_tree%global     = me%global
    local_tree%nElems     = me%nElems
    local_tree%elemOffset = me%elemOffset
    allocate(local_tree%treeID( me%nElems ))
    if (me%useLocalMesh) then
      local_tree%treeID = me%treeID
    else if (me%useGlobalMesh) then
      local_tree%treeID = globalTree%treeID
    else
      do iElem = 1, me%nElems
        local_tree%treeID( iElem ) = globalTree%treeID( me%map2global( iElem ))
      end do
    endif

    allocate( local_tree%ElemPropertyBits( size( me%ElemPropertyBits )))
    local_tree%ElemPropertyBits = me%ElemPropertyBits
    if (associated(me%property)) then
      allocate( local_tree%Property( size( me%Property )))
      local_tree%Property = me%Property
    end if

    call dump_treelmesh( me = local_tree, root_only = root_only )

  end subroutine tem_dump_subTree