1 function grid_type = comsol_get_grid_type(cmodel)
2 %
function grid_type = comsol_get_grid_type(cmodel)
4 % returns a
string with the grid type that is used in comsol
7 % cmodel : a comsol 4.2 model
9 % Oliver Zeeb, 10.09.2012
13 mesh_name=char(cmodel.mesh.tags);
14 feature_name = char(cmodel.mesh(mesh_name).feature.tags);
15 feature_name = feature_name(2,:);
16 feature_name = strrep(feature_name,
' ',
''); %
delete blanks!
else strcmp will not work properly!
18 grid_type = char(cmodel.mesh(mesh_name).feature(feature_name).getType);