better readable
This commit is contained in:
parent
b56176d670
commit
dbf5ee84cb
|
@ -111,6 +111,10 @@ subroutine parse()
|
|||
phases => config_material%get('phase')
|
||||
homogenizations => config_material%get('homogenization')
|
||||
|
||||
|
||||
if (maxval(discretization_materialAt) > materials%length) &
|
||||
call IO_error(155,ext_msg='More materials requested than found in material.yaml')
|
||||
|
||||
#if defined (__GFORTRAN__)
|
||||
material_name_phase = getKeys(phases)
|
||||
material_name_homogenization = getKeys(homogenizations)
|
||||
|
@ -126,31 +130,20 @@ subroutine parse()
|
|||
end do
|
||||
homogenization_maxNconstituents = maxval(homogenization_Nconstituents)
|
||||
|
||||
allocate(counterPhase(phases%length),source=0)
|
||||
allocate(counterHomogenization(homogenizations%length),source=0)
|
||||
|
||||
allocate(material_homogenizationID(discretization_Ncells),source=0)
|
||||
allocate(material_homogenizationEntry(discretization_Ncells),source=0)
|
||||
|
||||
allocate(material_phaseID(homogenization_maxNconstituents,discretization_Ncells),source=0)
|
||||
allocate(material_phaseEntry(homogenization_maxNconstituents,discretization_Ncells),source=0)
|
||||
|
||||
allocate(material_v(homogenization_maxNconstituents,discretization_Ncells),source=0.0_pReal)
|
||||
|
||||
allocate(material_O_0(materials%length))
|
||||
allocate(material_F_i_0(materials%length))
|
||||
|
||||
select type(materials)
|
||||
|
||||
class is(tList)
|
||||
|
||||
if (maxval(discretization_materialAt) > materials%length) &
|
||||
call IO_error(155,ext_msg='More materials requested than found in material.yaml')
|
||||
|
||||
allocate(temp_ho(materials%length))
|
||||
allocate(temp_ph(materials%length,homogenization_maxNconstituents),source=-1)
|
||||
allocate(temp_v(materials%length,homogenization_maxNconstituents),source=0.0_pReal)
|
||||
|
||||
! parse YAML structure
|
||||
select type(materials)
|
||||
|
||||
class is(tList)
|
||||
|
||||
item => materials%first
|
||||
do ma = 1, materials%length
|
||||
material => item%node
|
||||
|
@ -175,12 +168,21 @@ subroutine parse()
|
|||
if (dNeq(sum(temp_v(ma,:)),1.0_pReal,1.e-9_pReal)) call IO_error(153,ext_msg='constituent')
|
||||
|
||||
item => item%next
|
||||
|
||||
end do
|
||||
|
||||
end select
|
||||
|
||||
|
||||
allocate(counterPhase(phases%length),source=0)
|
||||
allocate(counterHomogenization(homogenizations%length),source=0)
|
||||
|
||||
allocate(material_homogenizationID(discretization_Ncells),source=0)
|
||||
allocate(material_homogenizationEntry(discretization_Ncells),source=0)
|
||||
|
||||
allocate(material_phaseID(homogenization_maxNconstituents,discretization_Ncells),source=0)
|
||||
allocate(material_phaseEntry(homogenization_maxNconstituents,discretization_Ncells),source=0)
|
||||
|
||||
|
||||
! build mappings
|
||||
do el = 1, discretization_Nelems
|
||||
|
||||
|
@ -212,6 +214,7 @@ subroutine parse()
|
|||
|
||||
end subroutine parse
|
||||
|
||||
|
||||
#if defined (__GFORTRAN__)
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief %keys() is broken on gfortran
|
||||
|
|
Loading…
Reference in New Issue