diff --git a/Electrochemistry/FullSolidDiffusionModel.m b/Electrochemistry/FullSolidDiffusionModel.m index f11efa7f..69010ce9 100644 --- a/Electrochemistry/FullSolidDiffusionModel.m +++ b/Electrochemistry/FullSolidDiffusionModel.m @@ -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