Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dschick/udkm1DsimML into …
Browse files Browse the repository at this point in the history
…master
  • Loading branch information
physiker05 committed Feb 26, 2021
2 parents a56ded6 + 40877cd commit cb7a8b9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion classes/unitCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
else
obj.bAxis = p.Results.bAxis;
end
obj.debWalFac = obj.checkCellArrayInput(p.Results.debWalFac);
debWalFacInit = obj.checkCellArrayInput(p.Results.debWalFac);
obj.soundVel = p.Results.soundVel;
obj.phononDamping = p.Results.phononDamping;
obj.optPenDepth = p.Results.optPenDepth;
Expand All @@ -104,6 +104,15 @@
error('Heat capacity, thermal conductivity, linear thermal expansion and subsystem coupling have not the same number of elements!');
end%if

% convert debWalFac into N-dimensional cell array of function handles in case only a single value is given (for downward compatibility)
if length(debWalFacInit) ~= length(obj.heatCapacity)
for k=1:obj.numSubSystems
disp('WARNING: One of the chosen Debye-Waller factors has not the correct dimensionality! Its numerical value is now used in the 2nd subsystem assuming that this is associated to the lattice!')
obj.debWalFac{k} = str2func('@(T)(0.*T./T)');
obj.debWalFac(2) = debWalFacInit;
end%for
end%if

% calculate the area of the unit cell
obj.area = obj.aAxis * obj.bAxis;
obj.volume = obj.area * obj.cAxis;
Expand Down

0 comments on commit cb7a8b9

Please sign in to comment.