rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
comsol_get_DBC_ind.m
1 function [com_DBC_ind, com_DBC_value, com_DOF_ind, ud, Null] = comsol_get_DBC_ind(cmodel)
2 %function [com_DBC_ind, com_DBC_value, com_DOF_ind, ud, Null] = comsol_get_DBC_ind(cmodel)
3 %
4 % function returning all the COMSOL_indices of dofs with Dirichlet Boundary
5 % Conditions and the according values
6 % Important: com_DBC_ind are the indices COMSOL uses (and not the rbmatlab-ordering)!!!
7 %
8 % GERMAN:
9 % Funktion, die die COMSOL-Indizes der Dofs mit Dirichlet Boundary Conditions
10 % zurückgibt!
11 %
12 % Oliver Zeeb
13 % 10.09.2012
14 
15 str = mphmatrix(cmodel,'sol1','Out',{'Null','ud'});
16 com_DBC_ind = find(sum(str.Null,2)==0);
17 ud = str.ud; %particular solution --> DBC_values!
18 Null = str.Null;
19 com_DBC_value = ud(com_DBC_ind);
20 com_DOF_ind = find(sum(str.Null,2)~=0);