Skip to content

Commit

Permalink
minor refactoring in control for protonic membrane
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierr committed Dec 10, 2024
1 parent 5764abc commit f41cb84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ProtonicMembrane/models/ProtonicMembraneCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@
elyte = 'Electrolyte';

time = state.time;
[ctrlVal, alpha] = drivingForces.src(time);
Imax = model.Control.Imax;
[ctrlVal, alpha] = drivingForces.src(time, Imax);

state.(ctrl).ctrlVal = ctrlVal;
state.(elyte).alpha = alpha;
Expand Down
2 changes: 1 addition & 1 deletion ProtonicMembrane/models/ProtonicMembraneControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

Imax = model.Imax;

control.src = @(time) pmControlFunc(time, Imax, fractionSwitch, 1, 'order', orderSwitch);
control.src = @(time, Imax) pmControlFunc(time, Imax, fractionSwitch, 1, 'order', orderSwitch);

end

Expand Down

0 comments on commit f41cb84

Please sign in to comment.