read_formatted_kernel Subroutine

private subroutine read_formatted_kernel(gmsh_msh_format, unit, iostat, iomsg)

Read an $MshMeshFormat from a connected formatted unit.

Arguments

Type IntentOptional Attributes Name
class(gmsh_msh_format_type), intent(inout) :: gmsh_msh_format
integer, intent(in) :: unit
integer, intent(out) :: iostat
character(len=*), intent(inout) :: iomsg

Calls

proc~~read_formatted_kernel~~CallsGraph proc~read_formatted_kernel read_formatted_kernel proc~check_text_line check_text_line proc~read_formatted_kernel->proc~check_text_line

Called by

proc~~read_formatted_kernel~~CalledByGraph proc~read_formatted_kernel read_formatted_kernel proc~read_formatted read_formatted proc~read_formatted->proc~read_formatted_kernel interface~read(formatted) read(formatted) interface~read(formatted)->proc~read_formatted

Variables

Type Visibility Attributes Name Initial
character(len=32), private :: text_line

A string for reading a line of text.
The length of this string is provisional.


Source Code

    subroutine read_formatted_kernel(gmsh_msh_format, unit, iostat, iomsg)

        class(gmsh_msh_format_type), intent(inout) :: gmsh_msh_format

        integer, intent(in) :: unit

        integer, intent(out) :: iostat

        character(*), intent(inout) :: iomsg



        !> Version: experimental
        !> A string for reading a line of text.<br>
        !> The length of this string is provisional.
        character(32) :: text_line



        read( &!
        unit   = unit   , &!
        fmt    = '(A)'  , &!
        iostat = iostat , &!
        iomsg  = iomsg    &!
        ) &!
        text_line

        if ( is_iostat_eor(iostat) ) iostat = iostat_success
        if ( iostat .ne. iostat_success ) return

        call check_text_line( &!
        text_line = text_line , &!
        str       = header    , &!
        iostat    = iostat    , &!
        iomsg     = iomsg       &!
        )



        read( &!
        unit   = unit   , &!
        fmt    = *      , &!
        iostat = iostat , &!
        iomsg  = iomsg    &!
        ) &!
        gmsh_msh_format%version   , &!
        gmsh_msh_format%file_type , &!
        gmsh_msh_format%data_size

        if ( iostat .ne. iostat_success ) return



        read( &!
        unit   = unit   , &!
        fmt    = '(A)'  , &!
        iostat = iostat , &!
        iomsg  = iomsg    &!
        ) &!
        text_line

        if ( is_iostat_eor(iostat) ) iostat = iostat_success
        if ( iostat .ne. iostat_success ) return

        call check_text_line( &!
        text_line = text_line , &!
        str       = footer    , &!
        iostat    = iostat    , &!
        iomsg     = iomsg       &!
        )

    end subroutine read_formatted_kernel