Mercurial > repos > public > sbplib
view +multiblock/local2globalPenalty.m @ 1258:74eec7e69b63 feature/FMMlabb
Speed up computations using RungeKuttaSecondOrder when only the source term is time dependent.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 13 Mar 2020 12:07:00 +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