Mercurial > repos > public > sbplib
view +multiblock/local2globalPenalty.m @ 1149:1fe48cbd379a feature/rv
Change Burgers2d to inviscid formulation. Rewrite to use opSets and fix the implementation of the Dirichlet conditions.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 24 Jan 2019 09:05:44 +0100 |
parents | ba10f24bf476 |
children |
line wrap: on
line source
% Takes the block-local penalty and turns it into a global penalty % local -- The local penalty % div -- block matrix division for the diffOp % I -- Index of blockmatrix block function penalty = local2globalPenalty(local, div, I) penaltyDiv = {div{1}, size(local,2)}; penalty_bm = blockmatrix.zero(penaltyDiv); penalty_bm{I,1} = local; penalty = blockmatrix.toMatrix(penalty_bm); end