Documentation for module input_section_types

objects that represent the structure of input sections and the data contained in an input section

source: input_section_types.F
Loading...

public Types:

section_vals_type
stores the values of a section
section_type
represent a section of the input file

public Subroutines/Functions:

adds a keyword to the given section
adds a subsection to the given section
creates a list of keywords
prints a description of the given section
...
...
...
...
returns the requested keyword
returns the index of the requested keyword (or -2 if not found)
...
...
returns the requested subsection
returns the index of requested subsection (-1 if not found)
SUBROUTINE RECURSIVE
section_release (section)
releases the given keyword list (see doc/ReferenceCounting.html)
...
adds the place to store the values of a repetition of the section
SUBROUTINE RECURSIVE
section_vals_create (section_vals, section)
creates a object where to store the values of a section
creates a deep copy from section_vals_in to section_vals_out
returns various attributes about the section_vals
returns the values of the requested subsection
returns the values of the n-th non default subsection (null if no such section exists (not so many non default section))
returns the values of the n-th non default subsection (null if no such section exists (not so many non default section))
returns the requested list
SUBROUTINE RECURSIVE
section_vals_release (section_vals)
releases the given object
removes the values of a repetition of the section
retains the given section values (see doc/ReferenceCounting.html)
replaces of the requested subsection with the one given
returns the requested value
sets the requested value
unsets (removes) the requested value (if it is a keyword repetitions removes the repetition, so be careful: the repetition indices bigger than the actual change.
writes the values in the given section in a way that is suitable to the automatic parsing
SUBROUTINE RECURSIVE
write_section_xml (section, level, unit_number)
writes the values in the given section in xml

Module variables:

POINTER :: typo_match_section = >null()

Other:

:: typo_matching_line(N_TYPO_MATCHES) = ""
INTEGER
:: typo_matching_rank(N_TYPO_MATCHES) = 0

public Types:

TYPE :: section_type

represent a section of the input file


LOGICAL
:: frozen ...
LOGICAL
:: repeats ...
INTEGER
:: id_nr ...
INTEGER
:: ref_count ...
INTEGER
:: n_keywords ...
INTEGER
:: n_subsections ...
:: name ...
CHARACTER,
DIMENSION(:), POINTER :: description => NULL() ...
INTEGER,
POINTER, DIMENSION(:) :: citations ...
DIMENSION(:), POINTER :: keywords ...
POINTER, DIMENSION(:) :: subsections ...

TYPE :: section_vals_type

stores the values of a section


INTEGER
:: ref_count ...
INTEGER
:: id_nr ...
INTEGER,
POINTER, DIMENSION(:) :: ibackup ...
POINTER :: section ...
DIMENSION(:,:), POINTER :: values ...
DIMENSION(:,:), POINTER :: subs_vals ...

SUBROUTINEsection_add_keyword(section, keyword)

adds a keyword to the given section

Arguments:
POINTER
:: section the section to which the keyword should be added
POINTER
:: keyword the keyword to add

SUBROUTINEsection_add_subsection(section, subsection)

adds a subsection to the given section

Arguments:
POINTER
:: section to section to which you want to add a subsection
POINTER
:: subsection the subsection to add

SUBROUTINEsection_create(section, name, description, n_keywords, n_subsections, repeats, citations)

creates a list of keywords

Arguments:
POINTER
:: section the list to be created
CHARACTER(*),
INTENT(in)
:: name ...
CHARACTER(*),
INTENT(in)
:: description ...
INTEGER,
INTENT(in),
OPTIONAL
:: n_keywords hint about the number of keywords, defaults to 10
INTEGER,
INTENT(in),
OPTIONAL
:: n_subsections a hint about how many sections will be added to this structure, defaults to 0
LOGICAL,
INTENT(in),
OPTIONAL
:: repeats if this section can repeat (defaults to false)
INTEGER,
INTENT(in),
OPTIONAL
:: citations(:) ...

RECURSIVE SUBROUTINEsection_describe(section, unit_nr, level, hide_root, recurse)

prints a description of the given section

Arguments:
POINTER
:: section the section to describe
INTEGER,
INTENT(in)
:: unit_nr the unit to write to
INTEGER,
INTENT(in)
:: level the level of output: 0: just section name, 1:keywords, then see keyword_describe :-)
LOGICAL,
INTENT(in),
OPTIONAL
:: hide_root if the name of the first section should be hidden (defaults to false).
INTEGER,
INTENT(in),
OPTIONAL
:: recurse ...

RECURSIVE SUBROUTINEsection_describe_html(section, prefix, depth, unit_number)

...

Arguments:
POINTER
:: section ...
CHARACTER(*),
INTENT(in)
:: prefix ...
INTEGER,
INTENT(in)
:: depth ...
INTEGER,
INTENT(in)
:: unit_number ...

RECURSIVE SUBROUTINEsection_describe_index_html(section, prefix, unit_nr)

...

Arguments:
POINTER
:: section ...
CHARACTER(*),
INTENT(in)
:: prefix ...
INTEGER,
INTENT(in)
:: unit_nr ...

FUNCTIONsection_get_ival(section_vals, keyword_name)

...

Return Value ::
INTEGER
Arguments:
POINTER
:: section_vals ...
CHARACTER(*),
INTENT(in)
:: keyword_name ...

FUNCTIONsection_get_ivals(section_vals, keyword_name)

...

Return Value ::
INTEGER
Arguments:
POINTER
:: section_vals ...
CHARACTER(*),
INTENT(in)
:: keyword_name ...

RECURSIVE FUNCTIONsection_get_keyword(section, keyword_name)

returns the requested keyword

Return Value ::
Arguments:
POINTER
:: section the section the keyword is in
CHARACTER(*),
INTENT(in)
:: keyword_name the keyword you are interested in

FUNCTIONsection_get_keyword_index(section, keyword_name)

returns the index of the requested keyword (or -2 if not found)

Return Value ::
INTEGER
Arguments:
POINTER
:: section the section the keyword is in
CHARACTER(*),
INTENT(in)
:: keyword_name the keyword you are interested in

FUNCTIONsection_get_lval(section_vals, keyword_name)

...

Return Value ::
LOGICAL
Arguments:
POINTER
:: section_vals ...
CHARACTER(*),
INTENT(in)
:: keyword_name ...

FUNCTIONsection_get_rval(section_vals, keyword_name)

...

Return Value ::
REAL(dp)
Arguments:
POINTER
:: section_vals ...
CHARACTER(*),
INTENT(in)
:: keyword_name ...

FUNCTIONsection_get_subsection(section, subsection_name)

returns the requested subsection

Return Value ::
Arguments:
POINTER
:: section the root section
CHARACTER(*),
INTENT(in)
:: subsection_name the name of the subsection you want to get

FUNCTIONsection_get_subsection_index(section, subsection_name)

returns the index of requested subsection (-1 if not found)

Return Value ::
INTEGER
Arguments:
POINTER
:: section the root section
CHARACTER(*),
INTENT(in)
:: subsection_name the name of the subsection you want to get

RECURSIVE SUBROUTINEsection_release(section)

releases the given keyword list (see doc/ReferenceCounting.html)

Arguments:
POINTER
:: section the list to release

RECURSIVE SUBROUTINEsection_typo_match(section, section_name, unknown_string, location_string, matching_rank, matching_string, bonus)

...

Arguments:
POINTER
:: section ...
CHARACTER(*)
:: section_name ...
CHARACTER(*)
:: unknown_string ...
CHARACTER(*)
:: location_string ...
INTEGER,
INTENT(inout)
:: matching_rank(:) ...
CHARACTER(*),
INTENT(inout)
:: matching_string(:) ...
INTEGER,
INTENT(in)
:: bonus ...

SUBROUTINEsection_vals_add_values(section_vals)

adds the place to store the values of a repetition of the section

Arguments:
POINTER
:: section_vals the section you want to extend

RECURSIVE SUBROUTINEsection_vals_create(section_vals, section)

creates a object where to store the values of a section

Arguments:
POINTER
:: section_vals the parsed section that will be created
POINTER
:: section the structure of the section that you want to parse

SUBROUTINEsection_vals_duplicate(section_vals_in, section_vals_out, i_rep_start, i_rep_end)

creates a deep copy from section_vals_in to section_vals_out

Arguments:
POINTER
:: section_vals_in the section_vals to copy
POINTER
:: section_vals_out the section_vals to create
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_start ...
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_end ...

SUBROUTINEsection_vals_get(section_vals, ref_count, id_nr, n_repetition, n_subs_vals_rep, section, explicit)

returns various attributes about the section_vals

Arguments:
POINTER
:: section_vals the section vals you want information from
INTEGER,
INTENT(out),
OPTIONAL
:: ref_count ...
INTEGER,
INTENT(out),
OPTIONAL
:: id_nr ...
INTEGER,
INTENT(out),
OPTIONAL
:: n_repetition number of repetitions of the section
INTEGER,
INTENT(out),
OPTIONAL
:: n_subs_vals_rep number of repetitions of the subsections values (max(1,n_repetition))
OPTIONAL, POINTER
:: section ...
LOGICAL,
INTENT(out),
OPTIONAL
:: explicit if the section was explicitly present in

RECURSIVE FUNCTIONsection_vals_get_subs_vals(section_vals, subsection_name, i_rep_section, can_return_null)

returns the values of the requested subsection

Return Value ::
Arguments:
POINTER
:: section_vals the root section
CHARACTER(*),
INTENT(in)
:: subsection_name the name of the requested subsection
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_section index of the repetition of section_vals from which you want to extract the subsection (defaults to 1)
LOGICAL,
INTENT(in),
OPTIONAL
:: can_return_null if the results can be null (defaults to false)

FUNCTIONsection_vals_get_subs_vals2(section_vals, i_section, i_rep_section)

returns the values of the n-th non default subsection (null if no such section exists (not so many non default section))

Return Value ::
Arguments:
POINTER
:: section_vals the root section
INTEGER,
INTENT(in)
:: i_section index of the section
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_section index of the repetition of section_vals from which you want to extract the subsection (defaults to 1)

FUNCTIONsection_vals_get_subs_vals3(section_vals, subsection_name, i_rep_section)

returns the values of the n-th non default subsection (null if no such section exists (not so many non default section))

Return Value ::
Arguments:
POINTER
:: section_vals the root section
CHARACTER(*),
INTENT(in)
:: subsection_name ...
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_section index of the repetition of section_vals from which you want to extract the subsection (defaults to 1)

SUBROUTINEsection_vals_list_get(section_vals, keyword_name, i_rep_section, list)

returns the requested list

Arguments:
POINTER
:: section_vals ...
CHARACTER(*),
INTENT(in)
:: keyword_name the name of the keyword you want
INTEGER,
OPTIONAL
:: i_rep_section which repetition of the section you are interested in (defaults to 1)
POINTER
:: list ...

RECURSIVE SUBROUTINEsection_vals_release(section_vals)

releases the given object

Arguments:
POINTER
:: section_vals the section_vals to release

SUBROUTINEsection_vals_remove_values(section_vals)

removes the values of a repetition of the section

Arguments:
POINTER
:: section_vals the section you want to extend

SUBROUTINEsection_vals_retain(section_vals)

retains the given section values (see doc/ReferenceCounting.html)

Arguments:
POINTER
:: section_vals the object to retain

SUBROUTINEsection_vals_set_subs_vals(section_vals, subsection_name, new_section_vals, i_rep_section)

replaces of the requested subsection with the one given

Arguments:
POINTER
:: section_vals the root section
CHARACTER(*),
INTENT(in)
:: subsection_name the name of the subsection to replace
POINTER
:: new_section_vals the new section_vals to use
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_section index of the repetition of section_vals of which you want to replace the subsection (defaults to 1)

SUBROUTINEsection_vals_val_get(section_vals, keyword_name, i_rep_section, i_rep_val, n_rep_val, val, l_val, i_val, r_val, c_val, l_vals, i_vals, r_vals, c_vals, explicit)

returns the requested value

Arguments:
POINTER
:: section_vals ...
CHARACTER(*),
INTENT(in)
:: keyword_name the name of the keyword you want
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_section which repetition of the section you are interested in (defaults to 1)
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_val which repetition of the keyword/val you are interested in (defaults to 1)
INTEGER,
INTENT(out),
OPTIONAL
:: n_rep_val returns number of val available
TYPE(val_type),
OPTIONAL, POINTER
:: val ...
LOGICAL,
INTENT(out),
OPTIONAL
:: l_val returns the logical,integer,real or character value
INTEGER,
INTENT(out),
OPTIONAL
:: i_val returns the logical,integer,real or character value
REAL(dp),
INTENT(out),
OPTIONAL
:: r_val returns the logical,integer,real or character value
CHARACTER(*),
INTENT(out),
OPTIONAL
:: c_val returns the logical,integer,real or character value
LOGICAL,
OPTIONAL, POINTER
:: l_vals(:) returns the logical,integer,real or character arrays. The val reamins the owner of the array
INTEGER,
OPTIONAL, POINTER
:: i_vals(:) returns the logical,integer,real or character arrays. The val reamins the owner of the array
REAL(dp),
OPTIONAL, POINTER
:: r_vals(:) returns the logical,integer,real or character arrays. The val reamins the owner of the array
OPTIONAL, POINTER
:: c_vals(:) returns the logical,integer,real or character arrays. The val reamins the owner of the array
LOGICAL,
INTENT(out),
OPTIONAL
:: explicit ...

SUBROUTINEsection_vals_val_set(section_vals, keyword_name, i_rep_section, i_rep_val, val, l_val, i_val, r_val, c_val, l_vals_ptr, i_vals_ptr, r_vals_ptr, c_vals_ptr)

sets the requested value

Arguments:
POINTER
:: section_vals ...
CHARACTER(*),
INTENT(in)
:: keyword_name the name of the keyword you want (can be a path separated by '%')
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_section isection which repetition of the section you are nterested in (defaults to 1)
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_val which repetition of the keyword/val you are interested in (defaults to 1)
TYPE(val_type),
OPTIONAL, POINTER
:: val ...
LOGICAL,
INTENT(in),
OPTIONAL
:: l_val sets the logical,integer,real or character value
INTEGER,
INTENT(in),
OPTIONAL
:: i_val sets the logical,integer,real or character value
REAL(dp),
INTENT(in),
OPTIONAL
:: r_val sets the logical,integer,real or character value
CHARACTER(*),
INTENT(in),
OPTIONAL
:: c_val sets the logical,integer,real or character value
LOGICAL,
OPTIONAL, POINTER
:: l_vals_ptr(:) ...
INTEGER,
OPTIONAL, POINTER
:: i_vals_ptr(:) ...
REAL(dp),
OPTIONAL, POINTER
:: r_vals_ptr(:) ...
OPTIONAL, POINTER
:: c_vals_ptr(:) ...

SUBROUTINEsection_vals_val_unset(section_vals, keyword_name, i_rep_section, i_rep_val)

unsets (removes) the requested value (if it is a keyword repetitions removes the repetition, so be careful: the repetition indices bigger than the actual change.

Arguments:
POINTER
:: section_vals ...
CHARACTER(*),
INTENT(in)
:: keyword_name the name of the keyword you want (can be a path separated by '%')
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_section which repetition of the section you are interested in (defaults to 1)
INTEGER,
INTENT(in),
OPTIONAL
:: i_rep_val which repetition of the keyword/val you are interested in (defaults to 1)

RECURSIVE SUBROUTINEsection_vals_write(section_vals, unit_nr, hide_root, hide_defaults)

writes the values in the given section in a way that is suitable to the automatic parsing

Arguments:
POINTER
:: section_vals the section to write out
INTEGER,
INTENT(in)
:: unit_nr the unit where to write to
LOGICAL,
INTENT(in),
OPTIONAL
:: hide_root ...
LOGICAL,
INTENT(in),
OPTIONAL
:: hide_defaults ...

RECURSIVE SUBROUTINEwrite_section_xml(section, level, unit_number)

writes the values in the given section in xml

Arguments:
POINTER
:: section ...
INTEGER,
INTENT(in)
:: level ...
INTEGER,
INTENT(in)
:: unit_number ...

private Parameters/Types:

private Types:

TYPE :: section_p_type

represent a pointer to a section (to make arrays of pointers)


POINTER :: section the pointer to the section

TYPE :: section_vals_p_type

repesents a pointer to a parsed section (to make arrays of pointers)


POINTER :: section_vals the pointer to the parsed section