view default_struct.m @ 596:4bb298faa8dc feature/better_multiblock_defs

Add more boundary groups in Rectangle. Bugfix in boundaryGroups.all.
author Martin Almquist <malmquist@stanford.edu>
date Tue, 26 Sep 2017 13:28:12 -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