view default_arg.m @ 971:e54c2f54dbfe feature/getBoundaryOperator

Merge with feature/poroelastic. Use only the changes made to multiblock.DiffOp and scheme.Elastic2dVariable. DiffOp.getBoundaryOperator/Quadrature now use scheme methods instead of propeties.
author Martin Almquist <malmquist@stanford.edu>
date Tue, 25 Dec 2018 07:50:07 +0100
parents 48b6fb693025
children
line wrap: on
line source

function default_arg(s, val)
    if evalin('caller',sprintf('~exist(''%s'',''var'') || isempty(%s)',s,s))
        assignin('caller',s,val)
    end
end