Mercurial > repos > public > sbplib
comparison +multiblock/local2globalPenalty.m @ 1033:037f203b9bf5 feature/burgers1d
Merge with branch feature/advectioRV to utilize the +rv package
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 17 Jan 2019 10:44:12 +0100 |
parents | ba10f24bf476 |
children |
comparison
equal
deleted
inserted
replaced
854:18162a0a5bb5 | 1033:037f203b9bf5 |
---|---|
1 % Takes the block-local penalty and turns it into a global penalty | |
2 % local -- The local penalty | |
3 % div -- block matrix division for the diffOp | |
4 % I -- Index of blockmatrix block | |
5 function penalty = local2globalPenalty(local, div, I) | |
6 penaltyDiv = {div{1}, size(local,2)}; | |
7 penalty_bm = blockmatrix.zero(penaltyDiv); | |
8 penalty_bm{I,1} = local; | |
9 | |
10 penalty = blockmatrix.toMatrix(penalty_bm); | |
11 end |