1 function [C,L,Lii,LiI,LII,Dnodes,varnodes]=...
2 METLINEScapcomp(imesh,epsilon,contacts)
6 ## [C,L,Lii,LiI,LII,Dnodes,varnodes]=METLINEScapcomp(imesh,epsilon,contacts)
10 Ncontacts = length(contacts);
11 Nnodes = columns(imesh.p);
12 varnodes = [1:Nnodes];
15 Dnodes{ii}=Unodesonside(imesh,contacts{ii});
16 varnodes = setdiff(varnodes,Dnodes{ii});
19 L = Ucomplap (imesh,epsilon);
22 Lii{ii} = L(Dnodes{ii},Dnodes{ii});
23 LiI{ii} = L(Dnodes{ii},varnodes);
25 LII = L(varnodes,varnodes);
30 C(ii,jj)=sum(sum(Lii{ii}-LiI{ii}*(LII\(LiI{ii})')));
32 C(ii,jj)=sum(sum(-LiI{ii}*(LII\(LiI{jj})')));