Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
AHartmaier committed Aug 12, 2024
1 parent 2de707b commit ecb79ad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/kanapy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,9 @@ def generate_orientations(self, data, ang=None, omega=None, Nbase=5000,
'"random" or "unimodal"')
for i, igr in enumerate(self.mesh.grain_dict.keys()):
if self.mesh.grain_phase_dict[igr] == ip:
ind = i - ip * self.ngrains[0]
ori_dict[igr] = ori_rve[ind, :]
if iphase is None or iphase == ip:
ind = i - ip * self.ngrains[0]
ori_dict[igr] = ori_rve[ind, :]
self.mesh.grain_ori_dict = ori_dict
return

Expand Down Expand Up @@ -767,7 +768,7 @@ def write_abq(self, nodes=None, file=None, path='./', voxel_dict=None, grain_dic
dual_phase=dual_phase,
ialloy=ialloy, grain_phase_dict=grpd,
thermal=thermal, periodic=self.rve.periodic)
# if orientation exists and ialloy is defined also write material file with Euler angles
# if orientations exist and ialloy is defined also write material file with Euler angles
if not (self.mesh.grain_ori_dict is None or ialloy is None):
writeAbaqusMat(ialloy, self.mesh.grain_ori_dict,
file=file[0:-8] + 'mat.inp',
Expand Down

0 comments on commit ecb79ad

Please sign in to comment.