def test_Schmid(self, update, ref_path, lattice): O = Orientation(lattice=lattice) # noqa for mode in ['slip', 'twin']: reference = ref_path / f'{lattice}_{mode}.txt' P = O.Schmid(N_slip='*') if mode == 'slip' else O.Schmid( N_twin='*') if update: table = Table(P.reshape(-1, 9), {'Schmid': ( 3, 3, )}) table.save(reference) assert np.allclose(P, Table.load(reference).get('Schmid'))
def test_Schmid(self, update, ref_path, lattice, mode): L = Orientation(lattice=lattice) reference = ref_path / f'{lattice}_{mode}.txt' P = L.Schmid(mode) if update: table = Table(P.reshape(-1, 9), {'Schmid': ( 3, 3, )}) table.save(reference) assert np.allclose(P, Table.load(reference).get('Schmid'))