Mercurial > repos > public > sbplib
view default_struct.m @ 1261:a3f2c1781612 feature/poroelastic
Fix bug with incorrect grids returned by D1StaggeredUpwind
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Wed, 29 Apr 2020 21:02:05 -0700 |
parents | 46256fffa329 |
children |
line wrap: on
line source
function default_struct(s, val) if evalin('caller',sprintf('~exist(''%s'',''var'')',s)) given = []; else given = evalin('caller', s); end final = copyWithDefault(given, val); assignin('caller', s, final); end