From f8432542338fe21daac001e1ad0694cf02ee99ac Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 1 Jun 2018 20:54:40 +0200 Subject: [PATCH 1/4] Noutput not needed, using size ensures consistency --- src/constitutive.f90 | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/constitutive.f90 b/src/constitutive.f90 index 424d53b7e..a7ca64506 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -143,7 +143,6 @@ subroutine constitutive_init() ins !< instance of plasticity/source integer(pInt), dimension(:,:), pointer :: thisSize - integer(pInt), dimension(:) , pointer :: thisNoutput character(len=64), dimension(:,:), pointer :: thisOutput character(len=32) :: outputName !< name of output, intermediate fix until HDF5 output is ready logical :: knownPlasticity, knownSource, nonlocalConstitutionPresent @@ -158,7 +157,7 @@ subroutine constitutive_init() ! parse plasticities from config file if (any(phase_plasticity == PLASTICITY_NONE_ID)) call plastic_none_init if (any(phase_plasticity == PLASTICITY_ISOTROPIC_ID)) call plastic_isotropic_init - if (any(phase_plasticity == PLASTICITY_PHENOPOWERLAW_ID)) call plastic_phenopowerlaw_init(FILEUNIT) + if (any(phase_plasticity == PLASTICITY_PHENOPOWERLAW_ID)) call plastic_phenopowerlaw_init if (any(phase_plasticity == PLASTICITY_KINEHARDENING_ID)) call plastic_kinehardening_init(FILEUNIT) if (any(phase_plasticity == PLASTICITY_DISLOTWIN_ID)) call plastic_dislotwin_init(FILEUNIT) if (any(phase_plasticity == PLASTICITY_DISLOUCLA_ID)) call plastic_disloucla_init(FILEUNIT) @@ -205,37 +204,30 @@ subroutine constitutive_init() plasticityType: select case(phase_plasticity(p)) case (PLASTICITY_NONE_ID) plasticityType outputName = PLASTICITY_NONE_label - thisNoutput => null() thisOutput => null() thisSize => null() case (PLASTICITY_ISOTROPIC_ID) plasticityType outputName = PLASTICITY_ISOTROPIC_label - thisNoutput => plastic_isotropic_Noutput thisOutput => plastic_isotropic_output thisSize => plastic_isotropic_sizePostResult case (PLASTICITY_PHENOPOWERLAW_ID) plasticityType outputName = PLASTICITY_PHENOPOWERLAW_label - thisNoutput => plastic_phenopowerlaw_Noutput thisOutput => plastic_phenopowerlaw_output thisSize => plastic_phenopowerlaw_sizePostResult case (PLASTICITY_KINEHARDENING_ID) plasticityType outputName = PLASTICITY_KINEHARDENING_label - thisNoutput => plastic_kinehardening_Noutput thisOutput => plastic_kinehardening_output thisSize => plastic_kinehardening_sizePostResult case (PLASTICITY_DISLOTWIN_ID) plasticityType outputName = PLASTICITY_DISLOTWIN_label - thisNoutput => plastic_dislotwin_Noutput thisOutput => plastic_dislotwin_output thisSize => plastic_dislotwin_sizePostResult case (PLASTICITY_DISLOUCLA_ID) plasticityType outputName = PLASTICITY_DISLOUCLA_label - thisNoutput => plastic_disloucla_Noutput thisOutput => plastic_disloucla_output thisSize => plastic_disloucla_sizePostResult case (PLASTICITY_NONLOCAL_ID) plasticityType outputName = PLASTICITY_NONLOCAL_label - thisNoutput => plastic_nonlocal_Noutput thisOutput => plastic_nonlocal_output thisSize => plastic_nonlocal_sizePostResult case default plasticityType @@ -246,7 +238,7 @@ subroutine constitutive_init() write(FILEUNIT,'(a)') '(plasticity)'//char(9)//trim(outputName) if (phase_plasticity(p) /= PLASTICITY_NONE_ID) then - OutputPlasticityLoop: do o = 1_pInt,thisNoutput(ins) + OutputPlasticityLoop: do o = 1_pInt,size(thisOutput(:,ins)) write(FILEUNIT,'(a,i4)') trim(thisOutput(o,ins))//char(9),thisSize(o,ins) enddo OutputPlasticityLoop endif @@ -257,55 +249,46 @@ subroutine constitutive_init() case (SOURCE_thermal_dissipation_ID) sourceType ins = source_thermal_dissipation_instance(p) outputName = SOURCE_thermal_dissipation_label - thisNoutput => source_thermal_dissipation_Noutput thisOutput => source_thermal_dissipation_output thisSize => source_thermal_dissipation_sizePostResult case (SOURCE_thermal_externalheat_ID) sourceType ins = source_thermal_externalheat_instance(p) outputName = SOURCE_thermal_externalheat_label - thisNoutput => source_thermal_externalheat_Noutput thisOutput => source_thermal_externalheat_output thisSize => source_thermal_externalheat_sizePostResult case (SOURCE_damage_isoBrittle_ID) sourceType ins = source_damage_isoBrittle_instance(p) outputName = SOURCE_damage_isoBrittle_label - thisNoutput => source_damage_isoBrittle_Noutput thisOutput => source_damage_isoBrittle_output thisSize => source_damage_isoBrittle_sizePostResult case (SOURCE_damage_isoDuctile_ID) sourceType ins = source_damage_isoDuctile_instance(p) outputName = SOURCE_damage_isoDuctile_label - thisNoutput => source_damage_isoDuctile_Noutput thisOutput => source_damage_isoDuctile_output thisSize => source_damage_isoDuctile_sizePostResult case (SOURCE_damage_anisoBrittle_ID) sourceType ins = source_damage_anisoBrittle_instance(p) outputName = SOURCE_damage_anisoBrittle_label - thisNoutput => source_damage_anisoBrittle_Noutput thisOutput => source_damage_anisoBrittle_output thisSize => source_damage_anisoBrittle_sizePostResult case (SOURCE_damage_anisoDuctile_ID) sourceType ins = source_damage_anisoDuctile_instance(p) outputName = SOURCE_damage_anisoDuctile_label - thisNoutput => source_damage_anisoDuctile_Noutput thisOutput => source_damage_anisoDuctile_output thisSize => source_damage_anisoDuctile_sizePostResult case (SOURCE_vacancy_phenoplasticity_ID) sourceType ins = source_vacancy_phenoplasticity_instance(p) outputName = SOURCE_vacancy_phenoplasticity_label - thisNoutput => source_vacancy_phenoplasticity_Noutput thisOutput => source_vacancy_phenoplasticity_output thisSize => source_vacancy_phenoplasticity_sizePostResult case (SOURCE_vacancy_irradiation_ID) sourceType ins = source_vacancy_irradiation_instance(p) outputName = SOURCE_vacancy_irradiation_label - thisNoutput => source_vacancy_irradiation_Noutput thisOutput => source_vacancy_irradiation_output thisSize => source_vacancy_irradiation_sizePostResult case (SOURCE_vacancy_thermalfluc_ID) sourceType ins = source_vacancy_thermalfluc_instance(p) outputName = SOURCE_vacancy_thermalfluc_label - thisNoutput => source_vacancy_thermalfluc_Noutput thisOutput => source_vacancy_thermalfluc_output thisSize => source_vacancy_thermalfluc_sizePostResult case default sourceType @@ -313,7 +296,7 @@ subroutine constitutive_init() end select sourceType if (knownSource) then write(FILEUNIT,'(a)') '(source)'//char(9)//trim(outputName) - OutputSourceLoop: do o = 1_pInt,thisNoutput(ins) + OutputSourceLoop: do o = 1_pInt,size(thisOutput(:,ins)) write(FILEUNIT,'(a,i4)') trim(thisOutput(o,ins))//char(9),thisSize(o,ins) enddo OutputSourceLoop endif From 64270f6c9596bf0baa8a9c339b0604374b38317a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 1 Jun 2018 21:22:19 +0200 Subject: [PATCH 2/4] no need to store trailing whitespace --- src/material.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/material.f90 b/src/material.f90 index cbfff1e78..89a5d9504 100644 --- a/src/material.f90 +++ b/src/material.f90 @@ -975,7 +975,7 @@ subroutine material_parsePhase(fileUnit,myPart) if (section > 0_pInt) then chunkPos = IO_stringPos(line) tag = IO_lc(IO_stringValue(line,chunkPos,1_pInt)) ! extract key - call phaseConfig(section)%add(trim(line),chunkPos) + call phaseConfig(section)%add(IO_lc(trim(line)),chunkPos) select case(tag) case ('elasticity') select case (IO_lc(IO_stringValue(line,chunkPos,2_pInt))) From cd9fb1c5446d85d2086072a61e9e1f771a487a2f Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 1 Jun 2018 21:23:25 +0200 Subject: [PATCH 3/4] adjusting variable names in isotropic to DAMASK paper --- PRIVATE | 2 +- src/plastic_isotropic.f90 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PRIVATE b/PRIVATE index cd02f6c1a..076a65960 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit cd02f6c1a481491eb4517651516b8311348b4777 +Subproject commit 076a65960f8df7ab52b4fe67249f0824e003d7eb diff --git a/src/plastic_isotropic.f90 b/src/plastic_isotropic.f90 index 31312d936..eb3120562 100644 --- a/src/plastic_isotropic.f90 +++ b/src/plastic_isotropic.f90 @@ -149,7 +149,7 @@ use IO p%gdot0 = phaseConfig(phase)%getFloat('gdot0') p%n = phaseConfig(phase)%getFloat('n') p%h0 = phaseConfig(phase)%getFloat('h0') - p%fTaylor = phaseConfig(phase)%getFloat('taylorfactor') + p%fTaylor = phaseConfig(phase)%getFloat('m') p%h0_slopeLnRate = phaseConfig(phase)%getFloat('h0_slopelnrate', defaultVal=0.0_pReal) ! ToDo: alias allowed? p%tausat_SinhFitA = phaseConfig(phase)%getFloat('tausat_sinhfita',defaultVal=0.0_pReal) p%tausat_SinhFitB = phaseConfig(phase)%getFloat('tausat_sinhfitb',defaultVal=0.0_pReal) @@ -190,7 +190,7 @@ use IO if (p%n <= 0.0_pReal) extmsg = trim(extmsg)//"'n' " if (p%tausat <= p%tau0) extmsg = trim(extmsg)//"'tausat' " if (p%a <= 0.0_pReal) extmsg = trim(extmsg)//"'a' " - if (p%fTaylor <= 0.0_pReal) extmsg = trim(extmsg)//"'taylorfactor' " + if (p%fTaylor <= 0.0_pReal) extmsg = trim(extmsg)//"'m' " if (p%aTolFlowstress <= 0.0_pReal) extmsg = trim(extmsg)//"'atol_flowstress' " if (extmsg /= '') call IO_error(211_pInt,ip=instance,& ext_msg=trim(extmsg)//'('//PLASTICITY_ISOTROPIC_label//')') From 70166657a98b12a107d838ad1bac2c62e79d1a61 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 1 Jun 2018 21:25:08 +0200 Subject: [PATCH 4/4] FILEUNIT still needed --- src/constitutive.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constitutive.f90 b/src/constitutive.f90 index a7ca64506..e2a3f0260 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -157,7 +157,7 @@ subroutine constitutive_init() ! parse plasticities from config file if (any(phase_plasticity == PLASTICITY_NONE_ID)) call plastic_none_init if (any(phase_plasticity == PLASTICITY_ISOTROPIC_ID)) call plastic_isotropic_init - if (any(phase_plasticity == PLASTICITY_PHENOPOWERLAW_ID)) call plastic_phenopowerlaw_init + if (any(phase_plasticity == PLASTICITY_PHENOPOWERLAW_ID)) call plastic_phenopowerlaw_init(FILEUNIT) if (any(phase_plasticity == PLASTICITY_KINEHARDENING_ID)) call plastic_kinehardening_init(FILEUNIT) if (any(phase_plasticity == PLASTICITY_DISLOTWIN_ID)) call plastic_dislotwin_init(FILEUNIT) if (any(phase_plasticity == PLASTICITY_DISLOUCLA_ID)) call plastic_disloucla_init(FILEUNIT)