systematic naming

This commit is contained in:
Martin Diehl 2020-09-13 12:43:49 +02:00
parent c14241a8e9
commit 22544d6978
5 changed files with 26 additions and 14 deletions

View File

@ -82,7 +82,7 @@ subroutine CPFEM_initAll
call math_init
call rotations_init
call YAML_types_init
call YAML_init
call YAML_parse_init
call HDF5_utilities_init
call results_init(.false.)
call discretization_marc_init

View File

@ -52,7 +52,7 @@ subroutine CPFEM_initAll
call math_init
call rotations_init
call YAML_types_init
call YAML_init
call YAML_parse_init
call lattice_init
call HDF5_utilities_init
call results_init(restart=interface_restartInc>0)

View File

@ -13,25 +13,37 @@ module YAML_parse
private
public :: &
YAML_init, &
parse_flow, &
to_flow
YAML_parse_init, &
YAML_parse_file
contains
!--------------------------------------------------------------------------------------------------
!> @brief do sanity checks
!> @brief Do sanity checks.
!--------------------------------------------------------------------------------------------------
subroutine YAML_init
subroutine YAML_parse_init
call selfTest
end subroutine YAML_init
end subroutine YAML_parse_init
!--------------------------------------------------------------------------------------------------
!> @brief Parse a YAML file into a a structure of nodes.
!--------------------------------------------------------------------------------------------------
function YAML_parse_file(fname) result(node)
character(len=*), intent(in) :: fname
class (tNode), pointer :: node
node => parse_flow(to_flow(IO_read(fname)))
end function YAML_parse_file
!--------------------------------------------------------------------------------------------------
!> @brief reads the flow style string and stores it in the form of dictionaries, lists and scalars.
!> @details A node type pointer can either point to a dictionary, list or scalar type entities.
!> @details A node type pointer can either point to a dictionary, list or scalar type entities.
!--------------------------------------------------------------------------------------------------
recursive function parse_flow(YAML_flow) result(node)

View File

@ -185,7 +185,7 @@ module YAML_types
contains
!--------------------------------------------------------------------------------------------------
!> @brief do sanity checks
!> @brief Do sanity checks.
!--------------------------------------------------------------------------------------------------
subroutine YAML_types_init
@ -197,7 +197,7 @@ end subroutine YAML_types_init
!--------------------------------------------------------------------------------------------------
!> @brief check correctness of some type bound procedures
!> @brief Check correctness of some type bound procedures.
!--------------------------------------------------------------------------------------------------
subroutine selfTest

View File

@ -60,7 +60,7 @@ subroutine parse_material
if(.not. fileExists) call IO_error(100,ext_msg=fname)
endif
write(6,*) 'reading '//fname; flush(6)
config_material => parse_flow(to_flow(IO_read(fname)))
config_material => YAML_parse_file(fname)
end subroutine parse_material
@ -77,7 +77,7 @@ subroutine parse_numerics
inquire(file='numerics.yaml', exist=fexist)
if (fexist) then
write(6,*) 'reading numerics.yaml'; flush(6)
config_numerics => parse_flow(to_flow(IO_read('numerics.yaml')))
config_numerics => YAML_parse_file('numerics.yaml')
endif
end subroutine parse_numerics
@ -94,7 +94,7 @@ subroutine parse_debug
inquire(file='debug.yaml', exist=fexist)
fileExists: if (fexist) then
write(6,*) 'reading debug.yaml'; flush(6)
config_debug => parse_flow(to_flow(IO_read('debug.yaml')))
config_debug => YAML_parse_file('debug.yaml')
endif fileExists
end subroutine parse_debug