diff --git a/PRIVATE b/PRIVATE index ae5882a2f..4c9a47e76 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit ae5882a2ffd932807d7589bc375ebff01836495f +Subproject commit 4c9a47e76ca23cbae70d47b2ab07d1ec15e158d7 diff --git a/examples/FEM/polyXtal/material.yaml b/examples/FEM/polyXtal/material.yaml index 3d4b0addf..5c00f17ad 100644 --- a/examples/FEM/polyXtal/material.yaml +++ b/examples/FEM/polyXtal/material.yaml @@ -1,5 +1,6 @@ homogenization: SX: + N_constituents: 1 mech: {type: none} phase: diff --git a/examples/SpectralMethod/Polycrystal/material.yaml b/examples/SpectralMethod/Polycrystal/material.yaml index 394d16ed8..cdc210152 100644 --- a/examples/SpectralMethod/Polycrystal/material.yaml +++ b/examples/SpectralMethod/Polycrystal/material.yaml @@ -1,5 +1,6 @@ homogenization: SX: + N_constituents: 1 mech: {type: none} material: diff --git a/src/IO.f90 b/src/IO.f90 index 4a442cb06..a95938a7f 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -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) diff --git a/src/homogenization_mech_RGC.f90 b/src/homogenization_mech_RGC.f90 index 6c015eea8..b429e949f 100644 --- a/src/homogenization_mech_RGC.f90 +++ b/src/homogenization_mech_RGC.f90 @@ -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') diff --git a/src/homogenization_mech_isostrain.f90 b/src/homogenization_mech_isostrain.f90 index 5eec454f1..f064578c8 100644 --- a/src/homogenization_mech_isostrain.f90 +++ b/src/homogenization_mech_isostrain.f90 @@ -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 diff --git a/src/homogenization_mech_none.f90 b/src/homogenization_mech_none.f90 index 3cbec5911..a58147c45 100644 --- a/src/homogenization_mech_none.f90 +++ b/src/homogenization_mech_none.f90 @@ -24,8 +24,11 @@ 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 allocate(homogState(h)%state0 (0,NofMyHomog)) diff --git a/src/material.f90 b/src/material.f90 index bab2f7499..11dfeb42e 100644 --- a/src/material.f90 +++ b/src/material.f90 @@ -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