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
RectGrid3D.m
Go to the documentation of this file.
1 namespace general{
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 
20  :public handle {
40  public:
41 
99  public: /* ( Dependent ) */
100 
124  F;
135  Ba;
146  L;
157  R;
168  T;
179  Bo;
190  public: /* ( Dependent ) */
191 
192  RectGrid3D(dim1,dim2,dim3) {
193  this.Dims= [dim1 dim2 dim3];
194  m = dim1;
195  k = dim2;
196  L = this.IndexMatrix;
197 
198  /* % Inner points
199  * Find inner points */
200  this.Inner= find(convn(ones(m,k,dim3),cat(3,[0 0 0; 0 1 0; 0 0 0],[0 1 0;1 0 1; 0 1 0],[0 0 0; 0 1 0; 0 0 0])," same ") == 6);
201 
202  this.Sides= struct;
203  /* Front boundary */
204  this.Sides.F= reshape(L(2:end-1,2:end-1,1),[],1);
205  /* Back boundary */
206  this.Sides.Ba= reshape(L(2:end-1,2:end-1,end),[],1);
207  /* Left boundary */
208  this.Sides.L= reshape(L(2:end-1,1,2:end-1),[],1);
209  /* Right boundary */
210  this.Sides.R= reshape(L(2:end-1,end,2:end-1),[],1);
211  /* Top boundary */
212  this.Sides.T= reshape(L(1,2:end-1,2:end-1),[],1);
213  /* Bottom boundary */
214  this.Sides.Bo= reshape(L(end,2:end-1,2:end-1),[],1);
215 
216  /* Corner points */
217  this.Corners= struct;
218  /* % Front side corners
219  * Front top */
220  this.Corners.FT= reshape(L(1,2:end-1,1),[],1);
221  /* Front bottom */
222  this.Corners.FBo= reshape(L(end,2:end-1,1),[],1);
223  /* Front left */
224  this.Corners.FL= reshape(L(2:end-1,1,1),[],1);
225  /* Front right */
226  this.Corners.FR= reshape(L(2:end-1,end,1),[],1);
227 
228  /* % Back side corners
229  * Back top */
230  this.Corners.BaT= reshape(L(1,2:end-1,end),[],1);
231  /* Back bottom */
232  this.Corners.BaBo= reshape(L(end,2:end-1,end),[],1);
233  /* Back left */
234  this.Corners.BaL= reshape(L(2:end-1,1,end),[],1);
235  /* Back right */
236  this.Corners.BaR= reshape(L(2:end-1,end,end),[],1);
237 
238  /* % front-back connecting corners
239  * top left */
240  this.Corners.TL= reshape(L(1,1,2:end-1),[],1);
241  /* top right */
242  this.Corners.TR= reshape(L(1,end,2:end-1),[],1);
243  /* bottom left */
244  this.Corners.BoL= reshape(L(end,1,2:end-1),[],1);
245  /* bottom right */
246  this.Corners.BoR= reshape(L(end,end,2:end-1),[],1);
247 
248  /* % Edge points */
249  this.Edges= struct;
250  /* Front Top left */
251  this.Edges.FTL= 1;
252  /* Front Top right */
253  this.Edges.FTR= L(1,end,1);
254  /* Front bottom left */
255  this.Edges.FBoL= L(end,1,1);
256  /* Front bottom right */
257  this.Edges.FBoR= L(end,end,1);
258  /* Rear Top left */
259  this.Edges.BaTL= L(1,1,end);
260  /* Rear Top right */
261  this.Edges.BaTR= L(1,end,end);
262  /* Rear bottom left */
263  this.Edges.BaBoL= L(end,1,end);
264  /* Rear bottom right */
265  this.Edges.BaBoR= L(end,end,end);
266 
267  clear m k L;
268  }
269 
270 
271  /* % Getter */
272  public: /* ( Dependent ) */
273 
274 
275 #if 0 //mtoc++: 'get.Points'
276 function value = Points() {
277  value = prod(this.Dims);
278  }
279 
280 #endif
281 
282 
283 
284 #if 0 //mtoc++: 'get.IndexMatrix'
285 function value = IndexMatrix() {
286  value = zeros(this.Dims);
287  value(:) = 1:this.Points;
288  }
289 
290 #endif
291 
292 
293 
294 #if 0 //mtoc++: 'get.F'
295 function value = F() {
296  value = this.Sides.F;
297  }
298 
299 #endif
300 
301 
302 
303 #if 0 //mtoc++: 'get.Ba'
304 function value = Ba() {
305  value = this.Sides.BA;
306  }
307 
308 #endif
309 
310 
311 
312 #if 0 //mtoc++: 'get.T'
313 function value = T() {
314  value = this.Sides.T;
315  }
316 
317 #endif
318 
319 
320 
321 #if 0 //mtoc++: 'get.Bo'
322 function value = Bo() {
323  value = this.Sides.Bo;
324  }
325 
326 #endif
327 
328 
329 
330 #if 0 //mtoc++: 'get.L'
331 function value = L() {
332  value = this.Sides.L;
333  }
334 
335 #endif
336 
337 
338 
339 #if 0 //mtoc++: 'get.R'
340 function value = R() {
341  value = this.Sides.R;
342  }
343 
344 #endif
345 
346 
388 };
389 }
390 }
391 
Bo
The bottom side interior point indices.
Definition: RectGrid3D.m:179
T
The top side interior point indices.
Definition: RectGrid3D.m:168
Dims
A 1x3 row vector containing the dimensions in x,y and z direction.
Definition: RectGrid3D.m:87
RectGrid3D(dim1, dim2, dim3)
Definition: RectGrid3D.m:192
Edges
A struct with the fields.
Definition: RectGrid3D.m:76
reshape
hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape ...
Matlab's base handle class (documentation generation substitute)
Sides
A struct with fields F, Ba, L, R, T, Bo denoting the indices of the interior points of the respective...
Definition: RectGrid3D.m:53
IndexMatrix
A matrix of size dim1 x dim2 x dim3 containing the linear indices of the entry at each entry...
Definition: RectGrid3D.m:112
Corners
A struct with the fields.
Definition: RectGrid3D.m:65
Inner
The indices of the rectangular interior points.
Definition: RectGrid3D.m:42
F
The front side interior points indices.
Definition: RectGrid3D.m:124
Points
The total number of points in the grid.
Definition: RectGrid3D.m:101
Ba
The back side interior point indices.
Definition: RectGrid3D.m:135
R
The right side interior point indices.
Definition: RectGrid3D.m:157
L
The left side interior point indices.
Definition: RectGrid3D.m:146
Rect3D: Rectangular three-dimensional grid.
Definition: RectGrid3D.m:19