view default_arg.m @ 982:a0b3161e44f3 feature/getBoundaryOp

Add the following methods in LaplaceCurvilinear: getBoundaryOperator, getBoundaryQuadrature, getBoundaryBorrowing. Remove get_boundary_ops. Make interface and boundary_condition methods use the new methods.
author Martin Almquist <malmquist@stanford.edu>
date Tue, 08 Jan 2019 11:51:24 +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