view default_field.m @ 670:52a9dedb9171 feature/poroelastic

Add 6th order to D2variable.
author Martin Almquist <malmquist@stanford.edu>
date Fri, 22 Dec 2017 16:38:08 +0100
parents 14bf01b7a068
children 50cafc4b9e40
line wrap: on
line source

function default_field(s, f, val)
    if isfield(s,f)
        return
    end
    s.(f) = val;
    assignin('caller', inputname(1),s);
end