Mercurial > repos > public > sbplib
changeset 1292:3c87e8d08076 feature/poroelastic
Merge heads
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Mon, 29 Jun 2020 15:24:21 -0700 |
parents | a8e730db76e9 (current diff) a52033540dd9 (diff) |
children | 3e2c1df740df |
files | |
diffstat | 2 files changed, 16 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/+scheme/+bc/forcingSetup.m Mon Jun 29 15:23:01 2020 -0700 +++ b/+scheme/+bc/forcingSetup.m Mon Jun 29 15:24:21 2020 -0700 @@ -22,8 +22,14 @@ [gridData, symbolicData] = parseAndSortData(bcs, penalties, diffOp); - % Setup penalty function - O = spzeros(size(diffOp),1); + if length(gridData) + length(symbolicData) == 0 + S = []; + else + % Setup penalty function + O = spzeros(size(diffOp),1); + S = @S_fun; + end + function v = S_fun(t) v = O; for i = 1:length(gridData) @@ -36,7 +42,6 @@ v = S_sign * v; end - S = @S_fun; end % Go through a cell array of boundary condition specifications and return cell arrays
--- a/+scheme/+bc/forcingSetupStaggered.m Mon Jun 29 15:23:01 2020 -0700 +++ b/+scheme/+bc/forcingSetupStaggered.m Mon Jun 29 15:24:21 2020 -0700 @@ -22,8 +22,14 @@ [gridData, symbolicData] = parseAndSortData(bcs, penalties, diffOp); - % Setup penalty function - O = spzeros(size(diffOp),1); + if length(gridData) + length(symbolicData) == 0 + S = []; + else + % Setup penalty function + O = spzeros(size(diffOp),1); + S = @S_fun; + end + function v = S_fun(t) v = O; for i = 1:length(gridData) @@ -36,7 +42,6 @@ v = S_sign * v; end - S = @S_fun; end % Go through a cell array of boundary condition specifications and return cell arrays