rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
comsol_get_grid_type.m
1 function grid_type = comsol_get_grid_type(cmodel)
2 %function grid_type = comsol_get_grid_type(cmodel)
3 %
4 % returns a string with the grid type that is used in comsol
5 %
6 % needed inputs:
7 % cmodel : a comsol 4.2 model
8 %
9 % Oliver Zeeb, 10.09.2012
10 
11 
12 
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!
17 
18 grid_type = char(cmodel.mesh(mesh_name).feature(feature_name).getType);