Mercurial > repos > public > sbplib
comparison +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 |
comparison
equal
deleted
inserted
replaced
863:77aa40da2008 | 864:c51b3f945c65 |
---|---|
1 | |
2 % Takes the local closure for ice or water and turns it into a closure for the whole system | |
3 % local -- The local closure | |
4 % div -- block matrix division for the diffOp | |
5 % I -- Index of blockmatrix block | |
6 function closure = local2globalClosure(local, div, I) | |
7 closure_bm = blockmatrix.zero(div); | |
8 closure_bm{I,I} = local; | |
9 | |
10 closure = blockmatrix.toMatrix(closure_bm); | |
11 end |