Mercurial > repos > public > sbplib
diff +scheme/bcSetup.m @ 795:1f6b2fb69225 feature/poroelastic
Revert bcSetup and update bc functions in elastic schemes to be compatible.
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Wed, 25 Jul 2018 18:33:03 -0700 |
parents | eac5fb4b63db |
children | 5cf9fdf4c98f |
line wrap: on
line diff
--- a/+scheme/bcSetup.m Wed Jul 25 18:06:08 2018 -0700 +++ b/+scheme/bcSetup.m Wed Jul 25 18:33:03 2018 -0700 @@ -25,17 +25,10 @@ if isempty(bc{i}.data) continue end + assertType(bc{i}.data, 'function_handle'); coord = diffOp.grid.getBoundary(bc{i}.boundary); - if iscell(bc{i}.data) - for j = 1:length(bc{i}.data) - assertType(bc{i}.data{j}, 'function_handle'); - assertNumberOfArguments(bc{i}.data{j}, 1+size(coord,2)); - end - else - assertType(bc{i}.data, 'function_handle'); - assertNumberOfArguments(bc{i}.data, 1+size(coord,2)); - end + assertNumberOfArguments(bc{i}.data, 1+size(coord,2)); penalties{end+1} = penalty; dataFunctions{end+1} = bc{i}.data; @@ -46,13 +39,7 @@ function v = S_fun(t) v = O; for i = 1:length(dataFunctions) - if iscell(penalties{i}) - for j = 1:length(penalties{i}) - v = v + penalties{i}{j}*dataFunctions{i}{j}(t, dataParams{i}{:}); - end - else - v = v + penalties{i}*dataFunctions{i}(t, dataParams{i}{:}); - end + v = v + penalties{i}*dataFunctions{i}(t, dataParams{i}{:}); end v = S_sign * v;