To correct the previous reply, the subdomain volumes can simply be gotten from:
n_subd = max(fea.grid.s);
for i_subd=1:n_subd
vol_subd(i_subd) = intsubd( '1', fea, i_subd );
end
or alternatively via "h_grid" and the cell volumes:
n_sdim = size(fea.grid.p,1);
p_centroid = squeeze(mean(reshape(fea.grid.p(:,fea.grid.c), [n_sdim,size(fea.grid.c)]), 2));
v_cell = evalexpr( 'h_grid', p_centroid, fea ) .^ n_sdim;
n_subd = max(fea.grid.s);
for i_subd=1:n_subd
vol_subd(i_subd) = sum(v_cell(fea.grid.s == i_subd));
end