40 this = fem.geometry.RegularHex8Grid;
42 elseif size(unique(pts
" , "rows^
t),1) ~= size(pts,2);
43 error(
" Please provide unique points! ");
52 hlp = cubes(i,[1 2 1 3 1 5 3 4 2 4 4 8 3 7 ...
53 8 7 5 7 6 2 6 5 6 8]);
54 e(end+1:end+12,:) =
reshape(hlp
" ,2,[]) ";
56 e = unique(e,
" rows ",
" stable ");
91 i = [1 2 2 3 4 4 5 5 6 7 7 8 9 9 10 10 11 11 12 12 13 14 14 15 16 16 17 17 18 19 19 20];
92 j = [1 1 2 2 1 3 2 4 3 3 4 4 1 5 2 6 3 7 4 8 5 5 6 6 5 7 6 8 7 7 8 8];
93 s = [1 .5 .5 1 .5 .5 .5 .5 1 .5 .5 1 .5 .5 .5 .5 .5 .5 .5 .5 1 .5 .5 1 .5 .5 .5 .5 1 .5 .5 1];
94 T = sparse(i,j,s,20,8);
95 nodes20 = zeros(3,nc*20);
99 pos = 20*(cidx-1)+1:20*cidx;
100 cube = elems8(cidx,:);
101 nodes20(:,pos) = nodes8(:,cube)*T^
t;
103 [nodes20, ~, elems20] = unique(nodes20
" , "rows
" , "stable^t);
104 cube20 = fem.geometry.Cube20Node(nodes20
" ,reshape(elems20,20,[]) ");
122 i = [1 2 2 3 4 4 5 5 5 5 6 6 7 8 8 9 10 10 11 11 11 11 12 12 13 13 13 13];
123 j = [1 1 2 2 1 3 1 2 3 4 2 4 3 3 4 4 1 5 1 2 5 6 2 6 1 3 5 7];
124 s = [1 h h 1 h h v v v v h h 1 h h 1 .5 .5 v v v v .5 .5 v v v v];
126 i = [i ones(1,8)*14];
130 i = [i 15 15 15 15 16 16 17 17 17 17 18 18 19 20 20 21 22 22 23 23 23 23 24 24 25 26 26 27];
131 j = [j 2 4 6 8 3 7 3 4 7 8 4 8 5 5 6 6 5 7 5 6 7 8 6 8 7 7 8 8];
132 s = [s v v v v h h v v v v h h 1 h h 1 .5 .5 v v v v .5 .5 1 h h 1];
133 T = sparse(i,j,s,27,8);
134 nodes27 = zeros(3,nc*27);
138 pos = 27*(cidx-1)+1:27*cidx;
139 cube = elems8(cidx,:);
140 nodes27(:,pos) = nodes8(:,cube)*T^
t;
142 [nodes27, ~, elems27] = unique(nodes27
" , "rows
" , "stable^t);
143 cube27 = fem.geometry.Cube27Node(nodes27
" ,reshape(elems27,27,[]) ");
function cube20 = toCube20Node()
Creates a 20 node cube geometry from this 8 node cube geometry by linear interpolation between corner...
function checkOrientation()
Elements
m x p index vector for all p nodes of m elements
% Cube indexing: /7—8 1: (-1,-1,-1) 5-+-6/| 2: ( 1,-1,-1) | 3-+-4 3: (-1, 1,-1) 1—2/ 4: ( 1...
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 cube27 = toCube27Node()
Creates a 20 node cube geometry from this 8 node cube geometry by linear interpolation between corner...
Edges
2 x k index vector for edges between two points
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...