-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gradient Matrix. Big data boundary misorientation.
Add gradient matrix calculation. Add small function for progress display. Add calcBoundaryMisorientation for Big sample, calc misorientation for grains pairs.
- Loading branch information
1 parent
7742294
commit 11a3de6
Showing
5 changed files
with
81 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
function [ mori ] = calcBoundaryMisorientationBig( grains, varargin ) | ||
%UNTITLED Summary of this function goes here | ||
% Detailed explanation goes here | ||
|
||
% Pairs of grains | ||
[~, pairs] = neighbors(grains); | ||
|
||
% One way for getting misorientations and lengths of boundary | ||
for i = 1:length(pairs) | ||
mori0 = calcBoundaryMisorientation(grains(pairs(i,1)),grains(pairs(i,2)), varargin{:}); | ||
if (i == 1) | ||
mori = mori0; | ||
else | ||
mori = [mori; mori0]; %#ok<AGROW> | ||
end | ||
if (progressStatus(i,length(pairs),10)) | ||
fprintf(1,'.'); | ||
end | ||
end | ||
fprintf(1,' - done\n'); | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function f = progressStatus( i, n, part ) | ||
%Return true if progress has reached a specified value. | ||
|
||
if (mod(i,fix(n/part)) == 0) | ||
f = true; | ||
else | ||
f = false; | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function L = gradM(R, U) | ||
|
||
nabla = R.'/(R*(R.')); | ||
|
||
L = (U*nabla).'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters