annotate +multiblock/local2globalClosure.m @ 1031:2ef20d00b386 feature/advectionRV

For easier comparison, return both the first order and residual viscosity when evaluating the residual. Add the first order and residual viscosity to the state of the RungekuttaRV time steppers
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 17 Jan 2019 10:25:06 +0100
parents ba10f24bf476
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
899
ba10f24bf476 Fix the documentation of functions
Jonatan Werpers <jonatan@werpers.com>
parents: 864
diff changeset
1 % Takes the block-local closures and turns it into a global closure
864
c51b3f945c65 Add functions for taking local closures and penalties global
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
2 % local -- The local closure
c51b3f945c65 Add functions for taking local closures and penalties global
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
3 % div -- block matrix division for the diffOp
c51b3f945c65 Add functions for taking local closures and penalties global
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
4 % I -- Index of blockmatrix block
c51b3f945c65 Add functions for taking local closures and penalties global
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
5 function closure = local2globalClosure(local, div, I)
c51b3f945c65 Add functions for taking local closures and penalties global
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
6 closure_bm = blockmatrix.zero(div);
c51b3f945c65 Add functions for taking local closures and penalties global
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
7 closure_bm{I,I} = local;
c51b3f945c65 Add functions for taking local closures and penalties global
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
8
c51b3f945c65 Add functions for taking local closures and penalties global
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
9 closure = blockmatrix.toMatrix(closure_bm);
c51b3f945c65 Add functions for taking local closures and penalties global
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
10 end