66 this = fem.geometry.RegularHex27Grid;
68 elseif size(unique(nodes
" , "rows^
t),1) ~= size(nodes,2);
69 error(
" Please provide unique points! ");
79 hlp = elems(i,[1 2 4 5 7 8 2 3 5 6 8 9 1 4 2 5 3 6 4 7 5 8 6 9 ...
81 1 10 2 11 3 12 10 19 11 20 12 21 10 11 11 12 19 20 20 21 ...
83 12 15 15 18 21 24 24 27 6 15 15 24 9 18 18 27 ...
85 4 13 13 22 7 16 16 25 10 13 13 16 19 22 22 25 ...
87 8 17 17 26 16 17 17 18 25 26 26 27 ...
89 20 23 23 26 22 23 23 24 ...
93 e(end+1:end+48,:) =
reshape(hlp
" ,2,[]) ";
95 e = unique(e,
" rows ",
" stable ");
106 this.
PatchFacesIdx= [1 4 13 10; 4 7 16 13; 13 16 25 22; 10 13 22 19;
107 3 6 15 12; 6 9 18 15; 12 15 24 21; 15 18 27 24;
108 1 2 11 10; 2 3 12 11; 10 11 20 19; 11 12 21 20;
109 7 8 17 16; 8 9 18 17; 16 17 26 25; 17 18 27 26;
110 1 2 5 4; 4 5 8 7; 2 3 6 5; 5 6 9 8;
111 19 20 23 22; 20 21 24 23; 22 23 26 25; 23 24 27 26];
115 this.
ReverseAxesIndices= [3 2 1 6 5 4 9 8 7 12 11 10 15 14 13 18 17 16 21 20 19 24 23 22 27 26 25
116 7:9 4:6 1:3 16:18 13:15 10:12 25:27 22:24 19:21
120 this.
OrientationCheckIndices(:,:,2) = [1 4 7; 2 5 8; 3 6 9; 10 13 16; 11 14 17;12 15 18; 19 22 25; 20 23 26; 21 24 27];
121 this.
OrientationCheckIndices(:,:,3) = [1 10 19; 2 11 20; 3 12 21; 4 13 22; 5 14 23; 6 15 24; 7 16 25; 8 17 26; 9 18 27];
127 elems8 = this.
Elements(:,[1 3 7 9 19 21 25 27]);
128 usednodes = unique(elems8(:),
" stable ");
129 invidx(usednodes) = 1:length(usednodes);
130 elems8 = invidx(elems8);
131 cube8 = fem.geometry.Cube8Node(this.
Nodes(:,usednodes),elems8);
142 elems20 = this.
Elements(:,[1:4 6:10 12 16 18:22 24:27]);
143 usednodes = unique(elems20(:),
" stable ");
144 invidx(usednodes) = 1:length(usednodes);
145 elems20 = invidx(elems20);
146 cube20 = fem.geometry.Cube20Node(this.
Nodes(:,usednodes),elems20);
152 n([2 3],:) = n([3 2],:);
154 this.
Elements= this.
Elements(:,[1:3 10:12 19:21 4:6 13:15 22:24 7:9 16:18 25:27]);
function checkOrientation()
Elements
m x p index vector for all p nodes of m elements
Hexahedral geometry with 27 position nodes on each basic hexahedron/cube.
Nodes
n x 3 position vector of nodes
PatchFacesIdx
The indices of the nodes suitable for creating a patch surface object.
reshape
hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape ...
function cube8 = toCube8Node()
Creates a 8 node cube geometry from this 20 node cube geometry by simply leaving out the on-edge node...
Edges
2 x k index vector for edges between two points
function cube20 = toCube20Node()
function faces = computeFaces()
Computes the outward faces of this fem.geometry.
Faces
A 2 x N_F vector containing the element number in the first row and the face number on that element i...