Skip to content

Commit

Permalink
Fix bug: make sure the right object is used in the switch
Browse files Browse the repository at this point in the history
  • Loading branch information
augustjohansson committed Apr 25, 2024
1 parent 9a08139 commit 1157ba5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Electrochemistry/FullSolidDiffusionModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@

D = inputparams.diffusionCoefficient;
if ~isempty(D)
switch inputparams.D.type
switch D.type
case 'constant'
model.useDFunc = false;
case 'function'
model.useDFunc = true;
model.computeDFunc = str2func(inputparams.D.functionname);
model.computeDFunc = str2func(D.functionname);
otherwise
errror('type of D not recognized.')
end
Expand Down

0 comments on commit 1157ba5

Please sign in to comment.