Skip to content
Snippets Groups Projects
Commit b7938a1c authored by Yoann Guilhem's avatar Yoann Guilhem
Browse files

Fix gtDisorientation.

parent 7ad0cad3
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ function [mis_angle, mis_axis, info] = gtDisorientation(ori1, ori2, symm, vararg
% GTDISORIENTATION Easy function to calculate the disorientation angle and axis
% between two sets of grains
%
% [mis_angle, mis_axis] = gtDisorientation(ori1, ori2, [varargin])
% [mis_angle, mis_axis] = gtDisorientation(ori1, ori2, symm, [varargin])
% -------------------------------------------------------------------------
% INPUT:
% ori1 = <double> Orientations for grains set 1
......@@ -80,7 +80,14 @@ end
% Compute active/passive disorientation angle/axis
if nargout > 1
tmp_info(Ngrain1).g1 = [];
tmp_info(Ngrain1).g1 = [];
tmp_info(Ngrain1).g2 = [];
tmp_info(Ngrain1).index_ij = [];
tmp_info(Ngrain1).index_i = [];
tmp_info(Ngrain1).index_j = [];
tmp_info(Ngrain1).symm_i = [];
tmp_info(Ngrain1).symm_j = [];
tmp_info(Ngrain1).netg = [];
for ii = 1:Ngrain1;
gA = g1(:, :, ii);
gB = g2(:, :, ii);
......@@ -137,12 +144,14 @@ index_ij = FZ_indices(ind);
r = all_r(:, index_ij).';
if nargout > 2
info.g1 = gA;
info.g2 = gB;
info.index_ij = index_ij;
[info.index_i, jj] = ind2sub([N 2*N], index_ij);
info.index_j = jj;
if info.index_j > N, info.index_j = info.index_j - N; end
info.g1 = gA;
info.g2 = gB;
if info.index_j > N
info.index_j = info.index_j - N;
end
info.symm_i = Os{info.index_i};
info.symm_j = Os{info.index_j};
info.netg = netg(:, :, FZ_indices(ind));
......@@ -167,10 +176,11 @@ end
r = all_r(:, ind).';
if nargout > 2
info.index_i = ind;
info.g1 = gA;
info.g2 = gB;
info.symm = Os{ind};
info.index_i = ind;
info.symm_i = Os{ind};
info.netg = netg(:, :, ind);
end
end
\ No newline at end of file
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