fixed reference, still not 100% sure if everything is correct, but apparently the test never run
This commit is contained in:
parent
03896fcd09
commit
0c7f4e690a
|
@ -217,14 +217,13 @@ for name in filenames:
|
||||||
o = damask.Orientation(quaternion = myData[colOri:colOri+4],
|
o = damask.Orientation(quaternion = myData[colOri:colOri+4],
|
||||||
symmetry = mySym).reduced()
|
symmetry = mySym).reduced()
|
||||||
|
|
||||||
oInv = o.quaternion.conjugated()
|
|
||||||
neighbors = KDTree.query_ball_point([x,y,z], 3) # search points within radius
|
neighbors = KDTree.query_ball_point([x,y,z], 3) # search points within radius
|
||||||
breaker = False
|
breaker = False
|
||||||
|
|
||||||
for n in neighbors: # check each neighbor
|
for n in neighbors: # check each neighbor
|
||||||
if myRank <= rank[n] or table.data[n,colPhase] != myData[colPhase]: continue # skip myself, anyone further ahead (cannot yet have a grain ID), and other phases
|
if myRank <= rank[n] or table.data[n,colPhase] != myData[colPhase]: continue # skip myself, anyone further ahead (cannot yet have a grain ID), and other phases
|
||||||
for symQ in symQuats[microstructure[rank[n]]-1]:
|
for symQ in symQuats[microstructure[rank[n]]-1]:
|
||||||
if (symQ*oInv).asAngleAxis(degrees = options.degrees)[0] <= options.tolerance: # found existing orientation resembling me
|
if (symQ*o.quaternion).asAngleAxis(degrees = options.degrees)[0] <= options.tolerance: # found existing orientation resembling me
|
||||||
microstructure[myRank] = microstructure[rank[n]]
|
microstructure[myRank] = microstructure[rank[n]]
|
||||||
breaker = True; break
|
breaker = True; break
|
||||||
if breaker: break
|
if breaker: break
|
||||||
|
@ -232,7 +231,7 @@ for name in filenames:
|
||||||
if microstructure[myRank] == 0: # no other orientation resembled me
|
if microstructure[myRank] == 0: # no other orientation resembled me
|
||||||
nGrains += 1 # make new grain ...
|
nGrains += 1 # make new grain ...
|
||||||
microstructure[myRank] = nGrains # ... and assign to me
|
microstructure[myRank] = nGrains # ... and assign to me
|
||||||
symQuats.append(o.symmetry.equivalentQuaternions(o.quaternion)) # store all symmetrically equivalent orientations for future comparison
|
symQuats.append(o.symmetry.equivalentQuaternions(o.quaternion.conjugated())) # store all symmetrically equivalent orientations for future comparison
|
||||||
phases.append(myData[colPhase]) # store phase info for future reporting
|
phases.append(myData[colPhase]) # store phase info for future reporting
|
||||||
|
|
||||||
myRank += 1
|
myRank += 1
|
||||||
|
|
Loading…
Reference in New Issue