Mercurial > repos > public > sbplib
annotate +multiblock/setAllInterfaceTypes.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 | dd95470d4baf |
children |
rev | line source |
---|---|
934
dd95470d4baf
Change from opts to type in multiblock.setAllInterfaceTypes
Jonatan Werpers <jonatan@werpers.com>
parents:
928
diff
changeset
|
1 % Create interface configuration with a single type for all interfaces |
dd95470d4baf
Change from opts to type in multiblock.setAllInterfaceTypes
Jonatan Werpers <jonatan@werpers.com>
parents:
928
diff
changeset
|
2 % g -- multiblock grid |
dd95470d4baf
Change from opts to type in multiblock.setAllInterfaceTypes
Jonatan Werpers <jonatan@werpers.com>
parents:
928
diff
changeset
|
3 % type -- type for all interfaces |
dd95470d4baf
Change from opts to type in multiblock.setAllInterfaceTypes
Jonatan Werpers <jonatan@werpers.com>
parents:
928
diff
changeset
|
4 function intfTypes = setAllInterfaceTypes(g, type) |
dd95470d4baf
Change from opts to type in multiblock.setAllInterfaceTypes
Jonatan Werpers <jonatan@werpers.com>
parents:
928
diff
changeset
|
5 intfTypes = cell(g.nBlocks(), g.nBlocks()); |
928
1c61d8fa9903
Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
6 for i = 1:g.nBlocks() |
934
dd95470d4baf
Change from opts to type in multiblock.setAllInterfaceTypes
Jonatan Werpers <jonatan@werpers.com>
parents:
928
diff
changeset
|
7 for j = 1:g.nBlocks() |
928
1c61d8fa9903
Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
8 if ~isempty(g.connections{i,j}) |
934
dd95470d4baf
Change from opts to type in multiblock.setAllInterfaceTypes
Jonatan Werpers <jonatan@werpers.com>
parents:
928
diff
changeset
|
9 intfTypes{i,j} = type; |
928
1c61d8fa9903
Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
10 end |
1c61d8fa9903
Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
11 end |
1c61d8fa9903
Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
12 end |
934
dd95470d4baf
Change from opts to type in multiblock.setAllInterfaceTypes
Jonatan Werpers <jonatan@werpers.com>
parents:
928
diff
changeset
|
13 end |