KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Cube20Node.m
Go to the documentation of this file.
1 namespace fem{
2 namespace geometry{
3 
4 
5 /* (Autoinserted by mtoc++)
6  * This source code has been filtered by the mtoc++ executable,
7  * which generates code that can be processed by the doxygen documentation tool.
8  *
9  * On the other hand, it can neither be interpreted by MATLAB, nor can it be compiled with a C++ compiler.
10  * Except for the comments, the function bodies of your M-file functions are untouched.
11  * Consequently, the FILTER_SOURCE_FILES doxygen switch (default in our Doxyfile.template) will produce
12  * attached source files that are highly readable by humans.
13  *
14  * Additionally, links in the doxygen generated documentation to the source code of functions and class members refer to
15  * the correct locations in the source code browser.
16  * However, the line numbers most likely do not correspond to the line numbers in the original MATLAB source files.
17  */
18 
77  public:
78 
79 
80  Cube20Node(pts,cubes) {
81  if nargin < 2
82  this = fem.geometry.RegularHex20Grid;
83  return;
84  elseif size(unique(pts" , "rows^t),1) ~= size(pts,2);
85  error(" Please provide unique points! ");
86  end
87  this.Nodes= pts;
88  this.Elements= cubes;
89  this.DofsPerElement= 20;
90  /* EdgeIndices = [1 3 6 8 13 15 18 20]; */
91 
92  /* % Compute edges */
93  e = int16.empty(0,2);
94  for i=1:size(cubes,1)
95  hlp = cubes(i,[1 2 1 4 1 9 2 3 3 5 3 10 4 6 5 8 6 7 ...
96  6 11 7 8 8 12 9 13 10 15 11 18 12 20 13 14 13 16 ...
97  14 15 15 17 16 18 17 20 18 19 19 20]);
98  e(end+1:end+24,:) = reshape(hlp" ,2,[]) ";
99  end
100  e = unique(e," rows "," stable ");
101  this.Edges= e;
102 
103  /* % Set Face indices */
104  this.MasterFaces= [ 1 4 6 9 11 13 16 18
105  3 5 8 10 12 15 17 20
106  1:3 9 10 13:15
107  6:8 11 12 18:20
108  1:8
109  13:20];
110  this.PatchFacesIdx= [ 1 4 6 11 18 16 13 9
111  3 5 8 12 20 17 15 10
112  1 2 3 10 15 14 13 9
113  6 7 8 12 20 19 18 11
114  1 2 3 5 8 7 6 4
115  13 14 15 17 20 19 18 16];
116  this.PatchesPerFace= 1;
117  this.Faces= this.computeFaces;
118 
119  /* Sanity checks */
120  this.ReverseAxesIndices= [3 2 1 5 4 8 7 6 10 9 12 11 15 14 13 17 16 20 19 18
121  6:8 4 5 1:3 11 12 9 10 18:20 16 17 13:15
122  13:20 9:12 1:8];
123  this.OrientationCheckIndices(:,:,1) = [1:3; 6:8; 13:15; 18:20];
124  this.OrientationCheckIndices(:,:,2) = [1 4 6; 3 5 8; 13 16 18; 15 17 20];
125  this.OrientationCheckIndices(:,:,3) = [1 9 13; 3 10 15; 6 11 18; 8 12 20];
126  this.checkOrientation;
127  }
128 
129 
130  function cube8 = toCube8Node() {
131  elems20 = this.Elements;
132  nodes20 = this.Nodes;
133  elems8 = elems20(:,[1 3 6 8 13 15 18 20]);
134  usednodes = unique(elems8(:)," stable ");
135  nodes8 = nodes20(:,usednodes);
136  invidx(usednodes) = 1:length(usednodes);
137  elems8 = invidx(elems8);
138  cube8 = fem.geometry.Cube8Node(nodes8,elems8);
139  }
149 };
150 }
151 }
152 
Elements
m x p index vector for all p nodes of m elements
Definition: BaseGeometry.m:41
function cube8 = toCube8Node()
Creates a 8 node cube geometry from this 20 node cube geometry by simply leaving out the on-edge node...
Definition: Cube20Node.m:130
Nodes
n x 3 position vector of nodes
Definition: BaseGeometry.m:30
PatchFacesIdx
The indices of the nodes suitable for creating a patch surface object.
Definition: BaseGeometry.m:69
reshape
hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape ...
Edges
2 x k index vector for edges between two points
Definition: BaseGeometry.m:52
Hexahedral geometry with 20 position nodes on each basic hexahedron/cube.
Definition: Cube20Node.m:19
function faces = computeFaces()
Computes the outward faces of this fem.geometry.
Definition: BaseGeometry.m:378
Faces
A 2 x N_F vector containing the element number in the first row and the face number on that element i...
Definition: BaseGeometry.m:83
Cube20Node(pts, cubes)
Definition: Cube20Node.m:80