mandatory N_constituents

This commit is contained in:
Martin Diehl 2020-10-07 17:44:54 +02:00
parent 28380c0985
commit 9550b0d8a2
8 changed files with 11 additions and 10 deletions

@ -1 +1 @@
Subproject commit ae5882a2ffd932807d7589bc375ebff01836495f
Subproject commit 4c9a47e76ca23cbae70d47b2ab07d1ec15e158d7

View File

@ -1,5 +1,6 @@
homogenization:
SX:
N_constituents: 1
mech: {type: none}
phase:

View File

@ -1,5 +1,6 @@
homogenization:
SX:
N_constituents: 1
mech: {type: none}
material:

View File

@ -371,8 +371,6 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
msg = 'write error for file:'
case (102)
msg = 'could not read file:'
case (103)
msg = 'could not assemble input files'
case (106)
msg = 'working directory does not exist:'
@ -411,7 +409,7 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
msg = 'not enough interaction parameters given'
!--------------------------------------------------------------------------------------------------
! errors related to the parsing of material.config
! errors related to the parsing of material.yaml
case (140)
msg = 'key not found'
case (141)

View File

@ -165,7 +165,7 @@ module subroutine mech_RGC_init(num_homogMech)
prm%N_constituents = homogMech%get_asInts('cluster_size',requiredSize=3)
if (homogenization_Ngrains(h) /= product(prm%N_constituents)) &
call IO_error(211,ext_msg='clustersize (mech_rgc)')
call IO_error(211,ext_msg='N_constituents (mech_RGC)')
prm%xi_alpha = homogMech%get_asFloat('xi_alpha')
prm%c_alpha = homogMech%get_asFloat('c_alpha')

View File

@ -51,7 +51,7 @@ module subroutine mech_isostrain_init
homogMech => homog%get('mech')
associate(prm => param(homogenization_typeInstance(h)))
prm%N_constituents = homog%get_asInt('N_constituents')
prm%N_constituents = homogenization_Ngrains(h)
select case(homogMech%get_asString('mapping',defaultVal = 'sum'))
case ('sum')
prm%mapping = parallel_ID

View File

@ -24,7 +24,10 @@ module subroutine mech_none_init
print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT)
do h = 1, size(homogenization_type)
if (homogenization_type(h) /= HOMOGENIZATION_NONE_ID) cycle
if(homogenization_type(h) /= HOMOGENIZATION_NONE_ID) cycle
if(homogenization_Ngrains(h) /= 1) &
call IO_error(211,ext_msg='N_constituents (mech_none)')
NofMyHomog = count(material_homogenizationAt == h)
homogState(h)%sizeState = 0

View File

@ -256,16 +256,14 @@ subroutine material_parseHomogenization
do h=1, material_Nhomogenization
homog => material_homogenization%get(h)
homogMech => homog%get('mech')
homogenization_Ngrains(h) = homog%get_asInt('N_constituents')
select case (homogMech%get_asString('type'))
case('none')
homogenization_type(h) = HOMOGENIZATION_NONE_ID
homogenization_Ngrains(h) = 1
case('isostrain')
homogenization_type(h) = HOMOGENIZATION_ISOSTRAIN_ID
homogenization_Ngrains(h) = homog%get_asInt('N_constituents')
case('RGC')
homogenization_type(h) = HOMOGENIZATION_RGC_ID
homogenization_Ngrains(h) = homog%get_asInt('N_constituents')
case default
call IO_error(500,ext_msg=homogMech%get_asString('type'))
end select