Skip to content
Snippets Groups Projects
Commit 0f25bf30 authored by Laura Nervo's avatar Laura Nervo Committed by Nicola Vigano
Browse files

gtReadBoundaryProperties : more stable version (fix according to the MATLAB editor)


Signed-off-by: default avatarLaura Nervo <laura.nervo@esrf.fr>

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@640 4c865b51-4357-4376-afb4-474e03ccb993
parent a7ee25b9
No related branches found
No related tags found
No related merge requests found
......@@ -79,15 +79,15 @@ if spacegroup==225 || spacegroup==229
% warning('g*sym.g maybe should be sym.g*g')
for j=1:24
g1equiv = g1*sym(j).g;
netg = inv(g1equiv)*g2;
netg = g1equiv\g2;
rot_offset(j) = acos((trace(netg)-1)/2);
end
dummy = find(rot_offset ==min(rot_offset));
g1equiv = g1*sym(dummy).g;
netg = inv(g1equiv)*g2;
netg = g1equiv\g2;
misorientation_angle = (180/pi)*acos((trace(netg)-1)/2);
misorientation_angle = acosd((trace(netg)-1)/2);
[eigVec, eigVal]=eig(netg);
for p=1:3
......@@ -113,15 +113,15 @@ elseif spacegroup==167 || spacegroup==663 || spacegroup==194
% warning('g*sym.g maybe should be sym.g*g')
for j=1:length(sym)
g1equiv = g1*sym(j).g3;
netg = inv(g1equiv)*g2;
netg = g1equiv\g2;
rot_offset(j) = acos((trace(netg)-1)/2);
end
dummy = find(rot_offset ==min(rot_offset));
g1equiv = g1*sym(dummy).g3;
netg = inv(g1equiv)*g2;
netg = g1equiv\g2;
misorientation_angle = (180/pi)*acos((trace(netg)-1)/2);
misorientation_angle = acosd((trace(netg)-1)/2);
[eigVec, eigVal]=eig(netg);
for p=1:3
......@@ -157,15 +157,15 @@ end
boundaries_structure(i).gb_centre = origin';
if ~isempty(g1equiv)
plane1=inv(g1equiv)*gb_normal;
plane1=g1equiv\gb_normal;
elseif ~isempty(g1)
plane1=inv(g1)*gb_normal;
plane1=g1\gb_normal;
else
plane1=[];
end
if ~isempty(g2)
plane2=inv(g2)*gb_normal;
plane2=g2\gb_normal;
else
plane2=[];
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment