From cd9d704aae3057be6b0589916c0d43c0cfb3caea Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 5 Jul 2021 11:30:52 +0200 Subject: [PATCH] bug fixes: invalid material.yaml, detect such errors in future --- PRIVATE | 2 +- .../config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml | 1 + src/phase_mechanical.f90 | 4 ---- src/phase_mechanical_plastic.f90 | 2 ++ 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/PRIVATE b/PRIVATE index 5bdddaab8..15bb4a182 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 5bdddaab80eb42a04393d4cd85079ff83d5a6d53 +Subproject commit 15bb4a18292bf4f5d3b371dc1edbf9a33606eb60 diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml index d7c2e8a4a..2ebf0b498 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml @@ -1,4 +1,5 @@ type: phenopowerlaw +references: - C. Zambaldi et al., Journal of Materials Research, 27(1), 356-367, 2021, 10.1557/jmr.2011.334 diff --git a/src/phase_mechanical.f90 b/src/phase_mechanical.f90 index 104127b53..7562c055f 100644 --- a/src/phase_mechanical.f90 +++ b/src/phase_mechanical.f90 @@ -267,15 +267,11 @@ module subroutine mechanical_init(materials,phases) enddo -! initialize elasticity call elastic_init(phases) -! initialize plasticity allocate(plasticState(phases%length)) allocate(phase_plasticity(phases%length),source = PLASTICITY_undefined_ID) - call plastic_init() - do ph = 1,phases%length plasticState(ph)%state0 = plasticState(ph)%state enddo diff --git a/src/phase_mechanical_plastic.f90 b/src/phase_mechanical_plastic.f90 index 6a053e12d..75da4fcdd 100644 --- a/src/phase_mechanical_plastic.f90 +++ b/src/phase_mechanical_plastic.f90 @@ -232,6 +232,8 @@ module subroutine plastic_init where(plastic_dislotungsten_init()) phase_plasticity = PLASTICITY_DISLOTUNGSTEN_ID where(plastic_nonlocal_init()) phase_plasticity = PLASTICITY_NONLOCAL_ID + if (any(phase_plasticity == PLASTICITY_undefined_ID)) call IO_error(201) + end subroutine plastic_init !--------------------------------------------------------------------------------------------------