function data=mphgetphysics(p)
% data=mphgetphysics(p)
%
% w=mphgetphysics(model.physics('jh'))

try
    a = p.prop;
catch err
    data = [];
    return
end


tags = a.tags;
for i=1:length(tags)
    item = a.get(tags(i));
    tag = char(item.tag);
    paramtags = item.params;
    for j=1:length(paramtags)
        data.(tag){j,1} = char(paramtags(j));
        data.(tag){j,2} = char(item.getString(paramtags(j)));
    end
end
% Copyright 2010-2011 COMSOL
