diff --git a/python/tests/reference/Result/12grains6x7x8_tensionY.hdf5 b/python/tests/reference/Result/12grains6x7x8_tensionY.hdf5 index 6d9334d1e..4cb07593b 100644 Binary files a/python/tests/reference/Result/12grains6x7x8_tensionY.hdf5 and b/python/tests/reference/Result/12grains6x7x8_tensionY.hdf5 differ diff --git a/python/tests/reference/Result/material.yaml b/python/tests/reference/Result/12grains6x7x8_tensionY.yaml similarity index 97% rename from python/tests/reference/Result/material.yaml rename to python/tests/reference/Result/12grains6x7x8_tensionY.yaml index cd9cbad2a..50557edda 100644 --- a/python/tests/reference/Result/material.yaml +++ b/python/tests/reference/Result/12grains6x7x8_tensionY.yaml @@ -2,12 +2,12 @@ homogenization: SX: N_constituents: 1 - mech: {type: none} + mechanics: {type: none} phase: pheno_fcc: - lattice: fcc - mech: + lattice: cF + mechanics: output: [F, P, F_e, F_p, L_p, O] elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke} plasticity: @@ -23,8 +23,8 @@ phase: xi_0_sl: [31e6] xi_inf_sl: [63e6] pheno_bcc: - lattice: bcc - mech: + lattice: cI + mechanics: output: [F, P, F_e, F_p, L_p, O] elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke} plasticity: diff --git a/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.hdf5 b/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.hdf5 index 799005217..f0ac836c6 100644 Binary files a/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.hdf5 and b/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.hdf5 differ diff --git a/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.yaml b/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.yaml new file mode 100644 index 000000000..0fc5b0897 --- /dev/null +++ b/python/tests/reference/Result/6grains6x7x8_single_phase_tensionY.yaml @@ -0,0 +1,56 @@ +--- +homogenization: + SX: + N_constituents: 1 + mechanics: {type: none} + +phase: + pheno_fcc: + lattice: cF + mechanics: + output: [F, P, F_e, F_p, L_p, O] + elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke} + plasticity: + N_sl: [12] + a_sl: 2.25 + atol_xi: 1.0 + dot_gamma_0_sl: 0.001 + h_0_sl_sl: 75e6 + h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4] + n_sl: 20 + output: [xi_sl] + type: phenopowerlaw + xi_0_sl: [31e6] + xi_inf_sl: [63e6] + +material: + - constituents: + - fraction: 1.0 + O: [0.8229200444892315, 0.5284940239127993, -0.11958598847729246, 0.17086795611292308] + phase: pheno_fcc + homogenization: SX + - constituents: + - fraction: 1.0 + O: [0.029934934533052786, -0.0463822071939717, 0.9983440440417412, 0.01617900728410769] + phase: pheno_fcc + homogenization: SX + - constituents: + - fraction: 1.0 + O: [0.5285808688806949, 0.7326575088838098, 0.4051997815944012, 0.1401013087924221] + phase: pheno_fcc + homogenization: SX + - constituents: + - fraction: 1.0 + O: [0.1839974517790312, 0.49550065903084944, -0.1541415483910751, -0.8347840545305227] + phase: pheno_fcc + homogenization: SX + - constituents: + - fraction: 1.0 + O: [0.8055693100147384, -0.22778497057116814, -0.028331746016454287, 0.5462320075864553] + phase: pheno_fcc + homogenization: SX + - constituents: + - fraction: 1.0 + O: [0.8025842700117737, -0.33640019337884963, -0.3847408071640489, 0.3076815085881779] + phase: pheno_fcc + homogenization: SX diff --git a/python/tests/reference/Result/tensionY.yaml b/python/tests/reference/Result/tensionY.yaml index eb34e3e47..4cc041729 100644 --- a/python/tests/reference/Result/tensionY.yaml +++ b/python/tests/reference/Result/tensionY.yaml @@ -5,7 +5,7 @@ step: t: 20 N: 40 f_out: 4 - mech: + mechanics: dot_F: [x, 0, 0, 0, 1.0e-3, 0, 0, 0, x] diff --git a/python/tests/test_Result.py b/python/tests/test_Result.py index 787721339..a1d5f74f6 100644 --- a/python/tests/test_Result.py +++ b/python/tests/test_Result.py @@ -173,11 +173,8 @@ class TestResult: loc = {'O': default.get_dataset_location('O'), 'color': default.get_dataset_location('IPFcolor_[{} {} {}]'.format(*d))} qu = default.read_dataset(loc['O']).view(np.double).squeeze() - crystal_structure = default.get_crystal_structure() - c = Orientation(rotation=qu, - lattice={'fcc':'cF', - 'bcc':'cI', - 'hex':'hP'}[crystal_structure]) + crystal_structure = default._get_attribute(default.get_dataset_location('O')[0],'Lattice') + c = Orientation(rotation=qu,lattice=crystal_structure) in_memory = np.uint8(c.IPF_color(np.array(d))*255) in_file = default.read_dataset(loc['color']) assert np.allclose(in_memory,in_file)