Mercurial > repos > public > sbplib
annotate stuffStruct.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 | 7ea4b6de59d9 |
children |
rev | line source |
---|---|
893
7ea4b6de59d9
Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
1 function s = stuffStruct(varargin) |
7ea4b6de59d9
Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
2 s = struct(); |
7ea4b6de59d9
Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
3 |
7ea4b6de59d9
Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
4 for i = 1:nargin |
7ea4b6de59d9
Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
5 assert(~isempty(inputname(i)), 'All inputs must be variables.'); |
7ea4b6de59d9
Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
6 s.(inputname(i)) = varargin{i}; |
7ea4b6de59d9
Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
7 end |
7ea4b6de59d9
Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
8 end |