fdf Module



Contents


Variables

Type Visibility Attributes Name Initial
procedure(inquire_unit_p), public, pointer :: inquire_unit => null()
logical, private :: fdf_debug = .FALSE.
logical, private :: fdf_debug2 = .FALSE.
logical, private :: fdf_started = .FALSE.
logical, private :: fdf_output = .FALSE.
integer(kind=ip), private, parameter :: maxdepth = 7
integer(kind=ip), private, parameter :: maxFileNameLength = 300
integer(kind=ip), private :: ndepth
integer(kind=ip), private :: fdf_in(maxdepth)
integer(kind=ip), private :: fdf_out
integer(kind=ip), private :: fdf_err
integer(kind=ip), private :: fdf_log
type(fdf_file), private :: file_in

Interfaces

interface

  • public subroutine inquire_unit_p(unit_str, stat, phys_dim, unit_name, unit_value)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: unit_str
    integer, intent(out) :: stat
    character(len=*), intent(out) :: phys_dim
    character(len=*), intent(out) :: unit_name
    real(kind=dp), intent(out) :: unit_value

public interface fdf_bnintegers

  • public function nintegers(pline, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in), optional :: after

    Return Value integer(kind=ip)

public interface fdf_bnlists

  • public function nlists(pline, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in), optional :: after

    Return Value integer(kind=ip)

public interface fdf_bnilists

  • public function nintegerlists(pline, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in), optional :: after

    Return Value integer(kind=ip)

public interface fdf_bnrlists

  • public function nreallists(pline, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in), optional :: after

    Return Value integer(kind=ip)

public interface fdf_bnvlists

  • public function nlists(pline, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in), optional :: after

    Return Value integer(kind=ip)

public interface fdf_bnreals

  • public function nreals(pline, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in), optional :: after

    Return Value integer(kind=ip)

public interface fdf_bnvalues

  • public function nvalues(pline, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in), optional :: after

    Return Value integer(kind=ip)

public interface fdf_bnnames

  • public function nnames(pline, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in), optional :: after

    Return Value integer(kind=ip)

public interface fdf_bntokens

  • public function ntokens(pline, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in), optional :: after

    Return Value integer(kind=ip)

public interface fdf_bintegers

  • public function integers(pline, ind, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in) :: ind
    integer(kind=ip), intent(in), optional :: after

    Return Value integer(kind=ip)

public interface fdf_bilists

  • public subroutine integerlists(pline, ind, ni, list, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in) :: ind
    integer(kind=ip) :: ni
    integer(kind=ip) :: list(ni)
    integer(kind=ip), intent(in), optional :: after

public interface fdf_brlists

  • public subroutine reallists(pline, ind, nv, list, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in) :: ind
    integer(kind=ip) :: nv
    real(kind=dp) :: list(nv)
    integer(kind=ip), intent(in), optional :: after

public interface fdf_bvlists

  • public subroutine valuelists(pline, ind, nv, list, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in) :: ind
    integer(kind=ip) :: nv
    real(kind=dp) :: list(nv)
    integer(kind=ip), intent(in), optional :: after

public interface fdf_breals

  • public function reals(pline, ind, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in) :: ind
    integer(kind=ip), intent(in), optional :: after

    Return Value real(kind=dp)

public interface fdf_bvalues

  • public function values(pline, ind, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in) :: ind
    integer(kind=ip), intent(in), optional :: after

    Return Value real(kind=dp)

public interface fdf_bnames

  • public function names(pline, ind, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in) :: ind
    integer(kind=ip), intent(in), optional :: after

    Return Value character(len=MAX_LENGTH)

public interface fdf_btokens

  • public function tokens(pline, ind, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    integer(kind=ip), intent(in) :: ind
    integer(kind=ip), intent(in), optional :: after

    Return Value character(len=MAX_LENGTH)

public interface fdf_bmatch

  • public function match(pline, str, after)

    Arguments

    Type IntentOptional Attributes Name
    type(parsed_line), pointer :: pline
    character(len=*), intent(in) :: str
    integer(kind=ip), intent(in), optional :: after

    Return Value logical

public interface fdf_get

  • public function fdf_integer(label, default, line)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*) :: label
    integer(kind=ip) :: default
    type(line_dlist), optional, pointer :: line

    Return Value integer(kind=ip)

  • public function fdf_single(label, default, line)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*) :: label
    real(kind=sp) :: default
    type(line_dlist), optional, pointer :: line

    Return Value real(kind=sp)

  • public function fdf_double(label, default, line)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*) :: label
    real(kind=dp) :: default
    type(line_dlist), optional, pointer :: line

    Return Value real(kind=dp)

  • public function fdf_boolean(label, default, line)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*) :: label
    logical :: default
    type(line_dlist), optional, pointer :: line

    Return Value logical

  • public function fdf_string(label, default, line)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*) :: label
    character(len=*) :: default
    type(line_dlist), optional, pointer :: line

    Return Value character(len=80)

  • public function fdf_physical(label, default, defunit, line)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*) :: label
    real(kind=dp) :: default
    character(len=*) :: defunit
    type(line_dlist), optional, pointer :: line

    Return Value real(kind=dp)

public interface fdf_list

  • public subroutine fdf_linteger(label, ni, list, line)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*) :: label
    integer(kind=ip) :: ni
    integer(kind=ip) :: list(ni)
    type(line_dlist), optional, pointer :: line
  • public subroutine fdf_ldouble(label, nv, list, line)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*) :: label
    integer(kind=ip) :: nv
    real(kind=dp) :: list(nv)
    type(line_dlist), optional, pointer :: line

Derived Types

type, public ::  block_fdf

Components

Type Visibility Attributes Name Initial
character(len=MAX_LENGTH), public :: label
type(line_dlist), public, pointer :: mark => null()

type, public ::  line_dlist

Components

Type Visibility Attributes Name Initial
character(len=MAX_LENGTH), public :: str
type(parsed_line), public, pointer :: pline => null()
type(line_dlist), public, pointer :: next => null()
type(line_dlist), public, pointer :: prev => null()

type, private ::  fdf_file

Components

Type Visibility Attributes Name Initial
integer(kind=ip), public :: nlines
type(line_dlist), public, pointer :: first => null()
type(line_dlist), public, pointer :: last => null()

Functions

private recursive function fdf_readlabel(nelem, plabel, filein, found) result(readlabel)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip) :: nelem
type(parsed_line), pointer :: plabel
character(len=*) :: filein
logical :: found(nelem)

Return Value logical

private function fdf_searchlabel(found, nelem, label, plabel)

Arguments

Type IntentOptional Attributes Name
logical :: found(nelem)
integer(kind=ip) :: nelem
character(len=*) :: label
type(parsed_line), pointer :: plabel

Return Value integer(kind=ip)

private function fdf_readline(line)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: line

Return Value logical

public function fdf_getline(mark)

Arguments

Type IntentOptional Attributes Name
type(line_dlist), pointer :: mark

Return Value character(len=MAX_LENGTH)

public function fdf_integer(label, default, line)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
integer(kind=ip) :: default
type(line_dlist), optional, pointer :: line

Return Value integer(kind=ip)

public function fdf_isphysical(label)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label

Return Value logical

public function fdf_islist(label)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label

Return Value logical

public function fdf_islinteger(label)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label

Return Value logical

public function fdf_islreal(label)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label

Return Value logical

public function fdf_string(label, default, line)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
character(len=*) :: default
type(line_dlist), optional, pointer :: line

Return Value character(len=80)

public function fdf_boolean(label, default, line)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
logical :: default
type(line_dlist), optional, pointer :: line

Return Value logical

public function fdf_bboolean(pline, ind, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
integer(kind=ip), intent(in) :: ind
integer(kind=ip), intent(in), optional :: after

Return Value logical

public function fdf_single(label, default, line)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
real(kind=sp) :: default
type(line_dlist), optional, pointer :: line

Return Value real(kind=sp)

public function fdf_double(label, default, line)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
real(kind=dp) :: default
type(line_dlist), optional, pointer :: line

Return Value real(kind=dp)

public function fdf_physical(label, default, defunit, line)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
real(kind=dp) :: default
character(len=*) :: defunit
type(line_dlist), optional, pointer :: line

Return Value real(kind=dp)

public function fdf_bphysical(pline, defunit, after)

Arguments

Type IntentOptional Attributes Name
type(parsed_line), pointer :: pline
character(len=*) :: defunit
integer(kind=ip), intent(in), optional :: after

Return Value real(kind=dp)

public function fdf_convfac(from, to) result(factor)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: from
character(len=*), intent(in) :: to

Return Value real(kind=dp)

private function wrapper_convfac(from, to, stat, msg) result(factor)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: from
character(len=*), intent(in) :: to
integer, intent(out) :: stat
character(len=*), intent(out) :: msg

Return Value real(kind=dp)

private function fdf_locate(label, mark)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
type(line_dlist), pointer :: mark

Return Value logical

public function fdf_isblock(label)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label

Return Value logical

public function fdf_block(label, bfdf)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
type(block_fdf) :: bfdf

Return Value logical

public function fdf_bline(bfdf, pline)

Arguments

Type IntentOptional Attributes Name
type(block_fdf) :: bfdf
type(parsed_line), pointer :: pline

Return Value logical

public function fdf_bbackspace(bfdf, pline)

Arguments

Type IntentOptional Attributes Name
type(block_fdf) :: bfdf
type(parsed_line), optional, pointer :: pline

Return Value logical

public function fdf_block_linecount(label, morph)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
character(len=*), optional :: morph

Return Value integer(kind=ip)

public function fdf_defined(label)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label

Return Value logical


Subroutines

public subroutine fdf_init(fileInput, fileOutput, unitInput)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in), optional :: fileInput
character(len=*), intent(in), optional :: fileOutput
integer, intent(in), optional :: unitInput

private subroutine set_file_names(fileIn, fileOut, optFileIn, optFileOut, unitIn)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(out) :: fileIn
character(len=*), intent(out) :: fileOut
character(len=*), intent(in), optional :: optFileIn
character(len=*), intent(in), optional :: optFileOut
integer, intent(in), optional :: unitIn

private subroutine fdf_input(filein)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: filein

private recursive subroutine fdf_read(filein, blocklabel)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: filein
character(len=*), optional :: blocklabel

private subroutine fdf_dump(label)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label

private subroutine fdf_initdata()

Arguments

None

public subroutine fdf_addline(line)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: line

public subroutine fdf_removelabel(label)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label

public subroutine fdf_overwrite(line)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: line

private subroutine fdf_addtoken(line, pline)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: line
type(parsed_line), pointer :: pline

private subroutine fdf_open(filename)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: filename

private subroutine fdf_close()

Arguments

None

private subroutine fdf_set_output_file(fileout)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fileout

public subroutine fdf_shutdown()

Arguments

None

private subroutine fdf_destroy(fdfp)

Arguments

Type IntentOptional Attributes Name
type(fdf_file) :: fdfp

private recursive subroutine fdf_destroy_dl(dlp)

Arguments

Type IntentOptional Attributes Name
type(line_dlist), pointer :: dlp

public subroutine fdf_printfdf()

Arguments

None

public subroutine fdf_linteger(label, ni, list, line)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
integer(kind=ip) :: ni
integer(kind=ip) :: list(ni)
type(line_dlist), optional, pointer :: line

public subroutine fdf_ldouble(label, nv, list, line)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
integer(kind=ip) :: nv
real(kind=dp) :: list(nv)
type(line_dlist), optional, pointer :: line

public subroutine fdf_brewind(bfdf)

Arguments

Type IntentOptional Attributes Name
type(block_fdf) :: bfdf

public subroutine fdf_bclose(bfdf)

Arguments

Type IntentOptional Attributes Name
type(block_fdf) :: bfdf

public subroutine fdf_setoutput(level, fileout_in)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip) :: level
character(len=*), intent(in) :: fileout_in

public subroutine fdf_setdebug(level, filedebug)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip) :: level
character(len=*) :: filedebug

public subroutine fdf_deprecated(label, newlabel)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label
character(len=*) :: newlabel

public subroutine fdf_obsolete(label)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: label

public subroutine fdf_serialize_struct(buffer)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(inout), allocatable :: buffer(:)

public subroutine fdf_recreate_struct(bufferFDF)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: bufferFDF(:)

public subroutine fdf_set_started(status)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: status

public subroutine fdf_set_unit_handler(func)

Arguments

Type IntentOptional Attributes Name
procedure(inquire_unit_p) :: func

public subroutine fdf_get_unit_handler(func)

Arguments

Type IntentOptional Attributes Name
procedure(inquire_unit_p), pointer :: func