Skip to content
Snippets Groups Projects
Commit 898c9ed8 authored by Wolfgang Ludwig's avatar Wolfgang Ludwig
Browse files

small fixes

parent 2ce367ea
No related branches found
No related tags found
No related merge requests found
...@@ -858,9 +858,9 @@ classdef GtAssembleVol3D < handle ...@@ -858,9 +858,9 @@ classdef GtAssembleVol3D < handle
sample = obj.getSample(); sample = obj.getSample();
% Sample translation % Sample translation
sample_shift = obj.localPar.sample_shift; sample_shift = obj.localPar.sample_shift;
sample_shift_size = size(sample_shift); sample_shift_size = size(sample_shift);
if sample_shift_size(2)<3 if isempty(sample_shift) || sample_shift_size(2)<3
sample_shift = [0, 0, 0]; sample_shift = [0, 0, 0];
end end
...@@ -922,9 +922,9 @@ classdef GtAssembleVol3D < handle ...@@ -922,9 +922,9 @@ classdef GtAssembleVol3D < handle
g_info{jj}.frac_shared = numel(shared_inds) / g_info{jj}.size_vol; g_info{jj}.frac_shared = numel(shared_inds) / g_info{jj}.size_vol;
grains_not_related = isempty(g_info{jj}.sigmaAnd) ... grains_not_related = isempty(g_info{jj}.sigmaAnd) ...
|| ((numel(g_info{jj}.sigmaAnd) == 1) && (g_info{jj}.sigmaAnd == -1)); || ((numel(g_info{jj}.sigmaAnd) == 1) && (g_info{jj}.sigmaAnd <= 0));
if (grains_not_related) if (grains_not_related)
if (g_info{jj}.frac_shared >= 0.5) if (g_info{jj}.frac_shared >= 0.5) && (g_info{jj}.sigmaAnd == -1)
% merge the two grains together; keep the other % merge the two grains together; keep the other
% and record this in the merge list % and record this in the merge list
g_info{jj}.type = 'merge'; g_info{jj}.type = 'merge';
......
...@@ -30,6 +30,7 @@ function gtReconstructClusters(first, last, workingdirectory, phase_id, paramete ...@@ -30,6 +30,7 @@ function gtReconstructClusters(first, last, workingdirectory, phase_id, paramete
conf = struct( ... conf = struct( ...
'list', [], ... 'list', [], ...
'ospace_resolution', [] ); 'ospace_resolution', [] );
conf = parse_pv_pairs(conf, varargin);
if (isempty(conf.list)) if (isempty(conf.list))
cluster_list = first:last; cluster_list = first:last;
......
function sigmas = gtCrystGetSigmas(crystal_system, latticepar, convention, material) function sigmas = gtCrystGetSigmas(crystal_system, latticepar, convention, material, tol_angle)
% GTCRYSTGETSIGMAS Calculates CSL sigmas values for cubic and hexagonal crystal % GTCRYSTGETSIGMAS Calculates CSL sigmas values for cubic and hexagonal crystal
% sigmas = gtCrystGetSigmas(crystal_system, latticepar, [convention], [material]) % sigmas = gtCrystGetSigmas(crystal_system, latticepar, [convention], [material])
% ------------------------------------------------------------------- % -------------------------------------------------------------------
...@@ -8,6 +8,7 @@ function sigmas = gtCrystGetSigmas(crystal_system, latticepar, convention, mater ...@@ -8,6 +8,7 @@ function sigmas = gtCrystGetSigmas(crystal_system, latticepar, convention, mater
% convention = <string> hcp axes convention {'X'}|'Y' % convention = <string> hcp axes convention {'X'}|'Y'
% material = <string> material {'Ti'}|'Mg' % material = <string> material {'Ti'}|'Mg'
% sigmas for Be, Ti and Zr are the same % sigmas for Be, Ti and Zr are the same
% tol_angle = <double> angle used in Brandon criterion {15}
if ~exist('latticepar','var') || isempty(latticepar) if ~exist('latticepar','var') || isempty(latticepar)
parameters = []; parameters = [];
load('parameters.mat'); load('parameters.mat');
...@@ -21,20 +22,27 @@ end ...@@ -21,20 +22,27 @@ end
if ~exist('material','var') || isempty(material) if ~exist('material','var') || isempty(material)
material = 'Ti'; material = 'Ti';
end end
if ~exist('tol_angle', 'var') || isempty(tol_angle)
tol_angle = 15;
end
if strcmpi(crystal_system, 'cubic') if strcmpi(crystal_system, 'cubic')
%sigma s: type, angle, axis cart, brandon criteria {, rodrigues} %sigma s: type, angle, axis cart, brandon criteria {, rodrigues}
sigmas = [ 3 60 1 1 1 0 0.333 0.333 0.333; ... sigmas = [ 3 60 1 1 1 0 0.333 0.333 0.333; ... % 3
5 36.86 1 0 0 0 0.333 0 0; ... 5 36.86 1 0 0 0 0.333 0 0; ... % 5
7 38.21 1 1 1 0 0.199 0.199 0.199; ... 7 38.21 1 1 1 0 0.199 0.199 0.199; ... % 7
9 38.94 1 1 0 0 0.25 0.25 0; ... 9 38.94 1 1 0 0 0.25 0.25 0; ... % 9
11 50.47 1 1 0 0 0.333 0.333 0; ... 11 50.47 1 1 0 0 0.333 0.333 0; ... %11
13 22.62 1 0 0 0 0.2 0 0; ... 13 22.62 1 0 0 0 0.2 0 0; ... %13a
13 27.79 1 1 1 0 0.143 0.143 0.143]; 13 27.79 1 1 1 0 0.143 0.143 0.143; ... %13b
15 48.19 2 1 0 0 0.4 0.2 0; ... %15
21 44.41 2 1 1 0 0.333 0.167 0.167; ... %21b
27 35.43 2 1 0 0 0.285 0.143 0; ... %27b
];
%add brandon criteria %add brandon criteria
sigmas(:, 6) = 15 * sigmas(:, 1) .^ (-0.5); sigmas(:, 6) = tol_angle * sigmas(:, 1) .^ (-0.5);
sigmaNorms = sqrt(sum(sigmas(:, 3:5) .* sigmas(:, 3:5), 2)); sigmaNorms = sqrt(sum(sigmas(:, 3:5) .* sigmas(:, 3:5), 2));
%normalise axis %normalise axis
sigmas(:, 3:5) = sigmas(:, 3:5) ./ sigmaNorms(:, [1 1 1]); sigmas(:, 3:5) = sigmas(:, 3:5) ./ sigmaNorms(:, [1 1 1]);
...@@ -107,7 +115,7 @@ elseif strcmpi(crystal_system, 'hexagonal') ...@@ -107,7 +115,7 @@ elseif strcmpi(crystal_system, 'hexagonal')
end end
%add brandon criteria: is it also for hcp? (laura) %add brandon criteria: is it also for hcp? (laura)
sigmas(:, 7) = 15 * sigmas(:, 1) .^ (-0.5); sigmas(:, 7) = tol_angle * sigmas(:, 1) .^ (-0.5);
sigmaNorms = sqrt(sum(sigmas(:, 8:10) .* sigmas(:, 8:10), 2)); sigmaNorms = sqrt(sum(sigmas(:, 8:10) .* sigmas(:, 8:10), 2));
%normalise axis %normalise axis
sigmas(:, 8:10) = sigmas(:, 8:10) ./ sigmaNorms(:, [1 1 1]); sigmas(:, 8:10) = sigmas(:, 8:10) ./ sigmaNorms(:, [1 1 1]);
...@@ -150,7 +158,7 @@ elseif strcmpi(crystal_system, 'tetragonal') ...@@ -150,7 +158,7 @@ elseif strcmpi(crystal_system, 'tetragonal')
21 79.02 4 4 1 0 1.1 1.1 0.275; ... %21d 21 79.02 4 4 1 0 1.1 1.1 0.275; ... %21d
]; ];
%add brandon criteria %add brandon criteria
sigmas(:, 6) = 15 * sigmas(:, 1) .^ (-0.5); sigmas(:, 6) = tol_angle * sigmas(:, 1) .^ (-0.5);
sigmaNorms = sqrt(sum(sigmas(:, 3:5) .* sigmas(:, 3:5), 2)); sigmaNorms = sqrt(sum(sigmas(:, 3:5) .* sigmas(:, 3:5), 2));
%normalise axis %normalise axis
sigmas(:, 3:5) = sigmas(:, 3:5) ./ sigmaNorms(:, [1 1 1]); sigmas(:, 3:5) = sigmas(:, 3:5) ./ sigmaNorms(:, [1 1 1]);
......
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