-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConnectivityMatrixComputer.m
More file actions
44 lines (35 loc) · 990 Bytes
/
ConnectivityMatrixComputer.m
File metadata and controls
44 lines (35 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
classdef ConnectivityMatrixComputer < handle
properties (Access = private)
nElem
Tnod
end
properties (Access = public)
Td
end
methods (Access = public)
function obj = ConnectivityMatrixComputer(cParams)
obj.init(cParams);
end
function compute(obj)
obj.defineConnectivityMatrix();
end
end
methods (Access = private)
function init(obj,cParams)
obj.nElem = cParams.nElem;
obj.Tnod = cParams.Tnod;
end
function defineConnectivityMatrix(obj)
T = zeros(obj.nElem,4);
for iel = 1:obj.nElem
for a = 1:2
for j = 1:2
i = 2*(a-1)+j;
T(iel,i) = 2*(obj.Tnod(iel,a)-1)+j;
end
end
end
obj.Td = T;
end
end
end