view default_struct.m @ 970:23d9ca6755be feature/poroelastic

Add getBoundaryQuadrature in Elastic2dVariable. Rename get_boundary_operator -> getBoundaryOperator. Add operators in getBoundaryOperator, with full size so that they work with multiblock.DiffOp.getBoundaryOperator.
author Martin Almquist <malmquist@stanford.edu>
date Tue, 25 Dec 2018 07:23:38 +0100
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