view default_struct.m @ 1272:15865fbda16e feature/poroelastic

Set default stiffness tensors to 0 in CurvilinearAnisotropic schemes
author Martin Almquist <malmquist@stanford.edu>
date Sun, 31 May 2020 21:59:09 -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