Mercurial > repos > public > sbplib
diff +multiblock/local2globalClosure.m @ 864:c51b3f945c65 bcSetupExperiment
Add functions for taking local closures and penalties global
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 25 Jul 2018 15:24:37 -0700 |
parents | |
children | ba10f24bf476 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/+multiblock/local2globalClosure.m Wed Jul 25 15:24:37 2018 -0700 @@ -0,0 +1,11 @@ + +% Takes the local closure for ice or water and turns it into a closure for the whole system +% local -- The local closure +% div -- block matrix division for the diffOp +% I -- Index of blockmatrix block +function closure = local2globalClosure(local, div, I) + closure_bm = blockmatrix.zero(div); + closure_bm{I,I} = local; + + closure = blockmatrix.toMatrix(closure_bm); +end