tem_write_debugMesh Subroutine

public subroutine tem_write_debugMesh(globtree, levelDesc, debug, myPart)

Write the complete mesh including fluid, ghosts and halo elements to disk

Define in the tem_load_debug table as

   debug = { debugMode = true,
             debugMesh = true }

Arguments

Type IntentOptional Attributes Name
type(treelmesh_type), intent(in) :: globtree

mesh to locate the point in

type(tem_levelDesc_type), intent(in) :: levelDesc(:)

current level descriptor

type(tem_debug_type), intent(inout), optional :: debug

debug info

integer, intent(in) :: myPart

Partition to use on the calling process (= MPI Rank in comm)


Calls

proc~~tem_write_debugmesh~~CallsGraph proc~tem_write_debugmesh tem_write_debugMesh proc~tem_create_subtree_of tem_create_subTree_of proc~tem_write_debugmesh->proc~tem_create_subtree_of proc~tem_dump_subtree tem_dump_subTree proc~tem_write_debugmesh->proc~tem_dump_subtree interface~destroy~25 destroy proc~tem_create_subtree_of->interface~destroy~25 interface~init~24 init proc~tem_create_subtree_of->interface~init~24 interface~tem_copypropertybits tem_copyPropertyBits proc~tem_create_subtree_of->interface~tem_copypropertybits interface~tem_seteffboundingbox tem_setEffBoundingBox proc~tem_create_subtree_of->interface~tem_seteffboundingbox mpi_allreduce mpi_allreduce proc~tem_create_subtree_of->mpi_allreduce mpi_comm_rank mpi_comm_rank proc~tem_create_subtree_of->mpi_comm_rank mpi_comm_size mpi_comm_size proc~tem_create_subtree_of->mpi_comm_size mpi_comm_split mpi_comm_split proc~tem_create_subtree_of->mpi_comm_split proc~tem_abort tem_abort proc~tem_create_subtree_of->proc~tem_abort proc~tem_horizontalspacer tem_horizontalSpacer proc~tem_create_subtree_of->proc~tem_horizontalspacer proc~tem_shape2subtree tem_shape2subTree proc~tem_create_subtree_of->proc~tem_shape2subtree proc~tem_shape_initlocal tem_shape_initLocal proc~tem_create_subtree_of->proc~tem_shape_initlocal proc~tem_subtree_from tem_subTree_from proc~tem_create_subtree_of->proc~tem_subtree_from proc~dump_treelmesh dump_treelmesh proc~tem_dump_subtree->proc~dump_treelmesh

Source Code

  subroutine tem_write_debugMesh( globtree, levelDesc, debug, myPart )
    ! ---------------------------------------------------------------------------
    !> mesh to locate the point in
    type(treelmesh_type), intent(in) :: globtree
    !> current level descriptor
    type(tem_levelDesc_type ),intent(in) :: levelDesc(:)
    !> debug info
    type(tem_debug_type ), optional, intent(inout) :: debug
    !> Partition to use on the calling process (= MPI Rank in comm)
    integer, intent(in) :: myPart
    ! ---------------------------------------------------------------------------
    type( tem_shape_type ) :: inShape(1)
    character(len=pathLen) :: dirname
    type( tem_debug_type ) :: local_debug
    ! local subTree that is dumped to disc
    type( tem_subTree_type ) :: subTree
    ! dummy variable which is required by tem_create_subTree_of but indeed not used
    type( tem_bc_prop_type ) :: bc_prop
    ! dummy variable which is required by tem_create_subTree_of but indeed not used
    type( tem_stencilHeader_type ) :: stencil
    ! ---------------------------------------------------------------------------

    if( present( debug ))then
      local_debug = debug
    else
      local_debug = main_debug
    end if

    if( trim( local_debug%debugMesh ) .ne. '')then
      write(logUnit(1),*)' Writing debug mesh to disk '
      inShape(1)%shapeID = tem_local_shape
      write(dirname ,'(a,i6.6,a)')trim( local_debug%debugMesh ),myPart,'_'

      call tem_create_subTree_of( inTree    = globtree,                        &
        &                         subTree   = subTree,                         &
        &                         inShape   = inShape,                         &
        &                         levelDesc = levelDesc,                       &
        &                         bc_prop   = bc_prop,                         &
        &                         stencil   = stencil,                         &
        &                         prefix    = trim( dirname ))

      call tem_dump_subTree( subTree, globtree, root_only = .false. )

      write(logUnit(1),*) 'Done writing debugMesh'

    endif ! output debugmesh

  end subroutine tem_write_debugMesh