Mercurial > repos > public > sbplib
changeset 461:0b010f8de7cb feature/grids
Make f parameter optional.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 22 Jun 2017 13:05:32 +0200 |
parents | e0caae9ef6ed |
children | 7dbdf7390265 |
files | +time/SBPInTimeImplicitFormulation.m |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
diff -r e0caae9ef6ed -r 0b010f8de7cb +time/SBPInTimeImplicitFormulation.m --- a/+time/SBPInTimeImplicitFormulation.m Mon Jun 19 16:50:13 2017 +0200 +++ b/+time/SBPInTimeImplicitFormulation.m Thu Jun 22 13:05:32 2017 +0200 @@ -27,6 +27,7 @@ function obj = SBPInTimeImplicitFormulation(A, B, f, k, t0, v0, TYPE, order, blockSize) default_arg('TYPE','gauss'); + default_arg('f',[]); if(strcmp(TYPE,'gauss')) default_arg('order',4) @@ -38,7 +39,13 @@ obj.A = A; obj.B = B; - obj.f = f; + + if ~isempty(f) + obj.f = f; + else + obj.f = @(t)sparse(length(v0),1); + end + obj.k = k; obj.blockSize = blockSize;