-
Notifications
You must be signed in to change notification settings - Fork 3
/
combineData.m
45 lines (34 loc) · 1015 Bytes
/
combineData.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
%Takes in two SimData objects as input and combines their values into one
%new SimData object.
function combinedData = combineData(simData1, simData2)
combinedData = CPFFTdata;
combinedData = simData1;
%Copy grain IDs
if isempty(combinedData.grain_id)
combinedData.grain_id = simData2.grain_id;
end
%Copy Euler angles
if isempty(combinedData.euler)
combinedData.euler = simData2.euler;
end
%Copy stresses
if isempty(combinedData.stress)
combinedData.stress = simData2.stress;
end
%Copy strains
if isempty(combinedData.strain)
combinedData.strain = simData2.strain;
end
%Copy TRSS
if isempty(combinedData.TRSS)
combinedData.TRSS = simData2.TRSS;
end
%Copy Schmid Factor of active twin variant
if isempty(combinedData.schmidFactor)
combinedData.schmidFactor = simData2.schmidFactor;
end
%Copy number of active twin variant
if isempty(combinedData.activeTwinVariant)
combinedData.activeTwinVariant = simData2.activeTwinVariant;
end
end