annotate +multiblock/local2globalClosure.m @ 1252:8fc2f9a4c882 feature/poroelastic

Add (temporary) fix for e-s , w-n, and x-x couplings
author Martin Almquist <malmquist@stanford.edu>
date Tue, 07 Jan 2020 12:49:09 -0800
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