MFEM  v3.3
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
tlayout.hpp
Go to the documentation of this file.
1 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
2 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
3 // reserved. See file COPYRIGHT for details.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability see http://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the GNU Lesser General Public License (as published by the Free
10 // Software Foundation) version 2.1 dated February 1999.
11 
12 #ifndef MFEM_TEMPLATE_LAYOUT
13 #define MFEM_TEMPLATE_LAYOUT
14 
15 #include "../config/tconfig.hpp"
16 #include "../fem/fespace.hpp"
17 
18 namespace mfem
19 {
20 
21 // Layout classes
22 
23 template <int N1, int S1>
25 template <int N1, int S1, int N2, int S2>
27 
28 template <int N1, int S1>
30 {
31  static const int rank = 1;
32  static const int dim_1 = N1;
33  static const int size = N1;
34 
35  static inline int ind(int i1)
36  {
37  return S1*i1;
38  }
39 
40  template <int M1>
42  {
43  return OffsetStridedLayout1D<M1,S1>(S1*o1);
44  }
45 
46  // reshape methods
47 
48  template <int N1_1, int N1_2>
50  {
51  // S1*i1 == S1*(i1_1+N1_1*i1_2)
52  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
54  }
55 };
56 
57 template <int N1, int S1, int N2, int S2>
59 
60 template <int N1, int S1>
62 {
63  static const int rank = 1;
64  static const int dim_1 = N1;
65  static const int size = N1;
66 
67  int offset;
68 
70  OffsetStridedLayout1D(int offset_) : offset(offset_) { }
71  inline int ind(int i1) const
72  {
73  return offset+S1*i1;
74  }
75 
76  template <int M1>
78  {
80  }
81 
82  // reshape methods
83 
84  template <int N1_1, int N1_2>
86  {
87  // S1*i1 == S1*(i1_1+N1_1*i1_2)
88  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
90  }
91 };
92 
93 template <int N1, int S1, int N2, int S2, int N3, int S3>
95 template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
97 
98 template <int N1, int S1, int N2, int S2>
99 struct StridedLayout2D
100 {
101  static const int rank = 2;
102  static const int dim_1 = N1;
103  static const int dim_2 = N2;
104  static const int size = N1*N2;
105 
106  static inline int ind(int i1, int i2)
107  {
108  return (S1*i1+S2*i2);
109  }
111  {
112  return OffsetStridedLayout1D<N2,S2>(S1*i1);
113  }
115  {
116  return OffsetStridedLayout1D<N1,S1>(S2*i2);
117  }
118 
119  template <int M1, int M2>
121  {
122  return OffsetStridedLayout2D<M1,S1,M2,S2>(S1*o1+S2*o2);
123  }
124 
125  // reshape methods
126 
127  template <int N1_1, int N1_2>
129  {
130  // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*i2
131  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
133  }
134  template <int N2_1, int N2_2>
136  {
137  // S1*i1+S2*i2 == S1*i1+S2*(i2_1*N2_1*i2_2)
138  MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
140  }
141  template <int N1_1, int N1_2, int N2_1, int N2_2>
143  {
144  // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*(i2_1+N2_1*i2_2)
145  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1 && N2_1*N2_2 == N2,
146  "invalid dimensions");
148  }
150  {
151  // use: (S1*i1+S2*i2) == (S1*(i1+S2/S1*i2))
152  // or (S1*i1+S2*i2) == (S2*(S1/S2*i1+i2))
153  // assuming: S2 == S1*N1 || S1 == S2*N2
154  MFEM_STATIC_ASSERT(S2 == S1*N1 || S1 == S2*N2, "invalid reshape");
156  }
158  {
160  }
161 };
162 
163 template <int N1, int S1, int N2, int S2, int N3, int S3>
165 template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
167 
168 template <int N1, int S1, int N2, int S2>
170 {
171  static const int rank = 2;
172  static const int dim_1 = N1;
173  static const int dim_2 = N2;
174  static const int size = N1*N2;
175 
176  int offset;
177 
179  OffsetStridedLayout2D(int offset_) : offset(offset_) { }
180  inline int ind(int i1, int i2) const
181  {
182  return offset+S1*i1+S2*i2;
183  }
185  {
186  return OffsetStridedLayout1D<N2,S2>(offset+S1*i1);
187  }
189  {
190  return OffsetStridedLayout1D<N1,S1>(offset+S2*i2);
191  }
192 
193  template <int M1, int M2>
195  {
196  return OffsetStridedLayout2D<M1,S1,M2,S2>(offset+S1*o1+S2*o2);
197  }
198 
199  // reshape methods
200 
201  template <int N1_1, int N1_2>
203  {
204  // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*i2
205  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
207  }
208  template <int N2_1, int N2_2>
210  {
211  // S1*i1+S2*i2 == S1*i1+S2*(i2_1*N2_1*i2_2)
212  MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
214  }
215  template <int N1_1, int N1_2, int N2_1, int N2_2>
217  split_12() const
218  {
219  // S1*i1+S2*i2 == S1*(i1_1+N1_1*i1_2)+S2*(i2_1+N2_1*i2_2)
220  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1 && N2_1*N2_2 == N2,
221  "invalid dimensions");
222  return OffsetStridedLayout4D<
223  N1_1,S1,N1_2,S1*N1_1,N2_1,S2,N2_2,S2*N2_1>(offset);
224  }
226  {
227  // use: (S1*i1+S2*i2) == (S1*(i1+S2/S1*i2))
228  // or (S1*i1+S2*i2) == (S2*(S1/S2*i1+i2))
229  // assuming: S2 == S1*N1 || S1 == S2*N2
230  MFEM_STATIC_ASSERT(S2 == S1*N1 || S1 == S2*N2, "invalid reshape");
232  }
234  {
236  }
237 };
238 
239 template <int N1, int S1, int N2, int S2, int N3, int S3>
240 struct StridedLayout3D
241 {
242  static const int rank = 3;
243  static const int dim_1 = N1;
244  static const int dim_2 = N2;
245  static const int dim_3 = N3;
246  static const int size = N1*N2*N3;
247 
248  static inline int ind(int i1, int i2, int i3)
249  {
250  return S1*i1+S2*i2+S3*i3;
251  }
253  {
255  }
257  {
259  }
261  {
263  }
264 
265  // reshape methods
266 
268  {
269  // use: (S1*i1+S2*i2+S3*i3) == (S1*(i1+S2/S1*i2)+S3*i3)
270  // assuming: S2 == S1*N1
271  MFEM_STATIC_ASSERT(S2 == S1*N1, "invalid reshape");
273  // alternative:
274  // use: (S1*i1+S2*i2+S3*i3) == (S2*(S1/S2*i1+i2)+S3*i3)
275  // assuming: S1 == S2*N2
276  // result is: StridedLayout2D<N1*N2,S2,N3,S3>
277  }
279  {
280  // use: (S1*i1+S2*i2+S3*i3) == (S1*i1+S2*(i2+S3/S2*i3))
281  // assuming: S3 == S2*N2
282  MFEM_STATIC_ASSERT(S3 == S2*N2, "invalid reshape");
284  }
285 
286  template <int N1_1, int N1_2>
288  {
289  // S1*i1+S2*i2+S3*i3 == S1*(i1_1+N1_1*i1_2)+S2*i2+S3*i3
290  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
292  }
293  template <int N2_1, int N2_2>
295  {
296  // S1*i1+S2*i2+S3*i3 == S1*i1+S2*(i2_1+N2_1*i2_2)+S3*i3
297  MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
299  }
300  template <int N3_1, int N3_2>
302  {
303  // S1*i1+S2*i2+S3*i3 == S1*i1+S2*i2+S3*(i3_1+N3_1*i3_2)
304  MFEM_STATIC_ASSERT(N3_1*N3_2 == N3, "invalid dimensions");
306  }
307 
309  {
311  }
313  {
315  }
317  {
319  }
320 };
321 
322 template <int N1, int S1, int N2, int S2, int N3, int S3>
323 struct OffsetStridedLayout3D
324 {
325  static const int rank = 3;
326  static const int dim_1 = N1;
327  static const int dim_2 = N2;
328  static const int dim_3 = N3;
329  static const int size = N1*N2*N3;
330 
331  int offset;
332 
334  OffsetStridedLayout3D(int offset_) : offset(offset_) { }
335  inline int ind(int i1, int i2, int i3) const
336  {
337  return offset+S1*i1+S2*i2+S3*i3;
338  }
340  {
342  }
344  {
346  }
348  {
350  }
351 
352  // reshape methods
353 
355  {
356  // use: (S1*i1+S2*i2+S3*i3) == (S1*(i1+S2/S1*i2)+S3*i3)
357  // assuming: S2 == S1*N1
358  MFEM_STATIC_ASSERT(S2 == S1*N1, "invalid reshape");
360  }
362  {
363  // use: (S1*i1+S2*i2+S3*i3) == (S1*i1+S2*(i2+S3/S2*i3))
364  // assuming: S3 == S2*N2
365  MFEM_STATIC_ASSERT(S3 == S2*N2, "invalid reshape");
367  }
368 
369  template <int N1_1, int N1_2>
371  {
372  // S1*i1+S2*i2+S3*i3 == S1*(i1_1+N1_1*i1_2)+S2*i2+S3*i3
373  MFEM_STATIC_ASSERT(N1_1*N1_2 == N1, "invalid dimensions");
375  }
376  template <int N2_1, int N2_2>
378  {
379  // S1*i1+S2*i2+S3*i3 == S1*i1+S2*(i2_1+N2_1*i2_2)+S3*i3
380  MFEM_STATIC_ASSERT(N2_1*N2_2 == N2, "invalid dimensions");
382  }
383 };
384 
385 template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
386 struct StridedLayout4D
387 {
388  static const int rank = 4;
389  static const int dim_1 = N1;
390  static const int dim_2 = N2;
391  static const int dim_3 = N3;
392  static const int dim_4 = N4;
393  static const int size = N1*N2*N3*N4;
394 
395  static inline int ind(int i1, int i2, int i3, int i4)
396  {
397  return S1*i1+S2*i2+S3*i3+S4*i4;
398  }
400  {
401  return OffsetStridedLayout2D<N1,S1,N4,S4>(S2*i2+S3*i3);
402  }
404  {
405  return OffsetStridedLayout2D<N2,S2,N3,S3>(S1*i1+S4*i4);
406  }
408  {
410  }
411 
413  {
414  // use: (S1*i1+S2*i2+S3*i3+S4*i4) == (S1*(i1+S2/S1*i2)+S3*i3+S4*i4)
415  // assuming S2 == S1*N1
416  MFEM_STATIC_ASSERT(S2 == S1*N1, "invalid reshape");
418  }
420  {
421  // use: (S1*i1+S2*i2+S3*i3+S4*i4) == (S1*i1+S2*i2+S3*(i3+S4/S3*i4))
422  // assuming S4 == S3*N3
423  MFEM_STATIC_ASSERT(S4 == S3*N3, "invalid reshape");
425  }
426 };
427 
428 template <int N1, int S1, int N2, int S2, int N3, int S3, int N4, int S4>
429 struct OffsetStridedLayout4D
430 {
431  static const int rank = 4;
432  static const int dim_1 = N1;
433  static const int dim_2 = N2;
434  static const int dim_3 = N3;
435  static const int dim_4 = N4;
436  static const int size = N1*N2*N3*N4;
437 
438  int offset;
439 
441  OffsetStridedLayout4D(int offset_) : offset(offset_) { }
442  inline int ind(int i1, int i2, int i3, int i4) const
443  {
444  return offset+S1*i1+S2*i2+S3*i3+S4*i4;
445  }
446 };
447 
448 template <int N1, int N2>
450  : public StridedLayout2D<N1,1,N2,N1> { };
451 
452 template <int N1, int N2, int N3>
454  : public StridedLayout3D<N1,1,N2,N1,N3,N1*N2> { };
455 
456 template <int N1, int N2, int N3, int N4>
458  : public StridedLayout4D<N1,1,N2,N1,N3,N1*N2,N4,N1*N2*N3> { };
459 
460 
461 // Vector layout classes
462 
464 {
465 public:
466  static const int vec_dim = 0; // 0 - dynamic
467 
468 protected:
471 
472  void Init(Ordering::Type ordering, int scalar_size, int num_comp)
473  {
474  num_components = num_comp;
475  if (ordering == Ordering::byNODES)
476  {
477  scal_stride = 1;
478  comp_stride = scalar_size;
479  }
480  else
481  {
482  scal_stride = num_comp;
483  comp_stride = 1;
484  }
485  }
486 
487 public:
488  DynamicVectorLayout(Ordering::Type ordering, int scalar_size, int num_comp)
489  {
490  Init(ordering, scalar_size, num_comp);
491  }
493  {
494  Init(fes.GetOrdering(), fes.GetNDofs(), fes.GetVDim());
495  }
496  // default copy constructor
497 
498  int NumComponents() const { return num_components; }
499 
500  int ind(int scalar_idx, int comp_idx) const
501  {
502  return scal_stride * scalar_idx + comp_stride * comp_idx;
503  }
504 
505  static bool Matches(const FiniteElementSpace &fes)
506  {
507  return true;
508  }
509 };
510 
511 // The default value (NumComp = 0) indicates that the number of components is
512 // dynamic, i.e. it will be specified at run-time.
513 template <Ordering::Type Ord, int NumComp = 0>
515 {
516 public:
517  static const int vec_dim = NumComp;
518 
519 protected:
521 
522 public:
523  VectorLayout(int scalar_size_, int num_comp_ = NumComp)
524  : num_components(num_comp_),
525  scalar_size(scalar_size_)
526  {
527  MFEM_ASSERT(NumComp == 0 || num_components == NumComp,
528  "invalid number of components");
529  }
530 
532  : num_components(fes.GetVDim()),
533  scalar_size(fes.GetNDofs())
534  {
535  MFEM_ASSERT(fes.GetOrdering() == Ord, "ordering mismatch");
536  MFEM_ASSERT(NumComp == 0 || num_components == NumComp,
537  "invalid number of components");
538  }
539  // default copy constructor
540 
541  int NumComponents() const { return (NumComp ? NumComp : num_components); }
542 
543  int ind(int scalar_idx, int comp_idx) const
544  {
545  if (Ord == Ordering::byNODES)
546  {
547  return scalar_idx + comp_idx * scalar_size;
548  }
549  else
550  {
551  return comp_idx + (NumComp ? NumComp : num_components) * scalar_idx;
552  }
553  }
554 
555  static bool Matches(const FiniteElementSpace &fes)
556  {
557  return (Ord == fes.GetOrdering() &&
558  (NumComp == 0 || NumComp == fes.GetVDim()));
559  }
560 };
561 
563 {
564 public:
565  static const int vec_dim = 1;
566 
568 
570  {
571  MFEM_ASSERT(fes.GetVDim() == 1, "invalid number of components");
572  }
573 
574  int NumComponents() const { return 1; }
575 
576  int ind(int scalar_idx, int comp_idx) const { return scalar_idx; }
577 
578  static bool Matches(const FiniteElementSpace &fes)
579  {
580  return (fes.GetVDim() == 1);
581  }
582 };
583 
584 } // namespace mfem
585 
586 #endif // MFEM_TEMPLATE_LAYOUT
static const int size
Definition: tlayout.hpp:174
static const int size
Definition: tlayout.hpp:436
OffsetStridedLayout1D< N1, S1 > ind2(int i2) const
Definition: tlayout.hpp:188
int ind(int scalar_idx, int comp_idx) const
Definition: tlayout.hpp:576
static const int dim_2
Definition: tlayout.hpp:173
Ordering::Type GetOrdering() const
Return the ordering method.
Definition: fespace.hpp:175
static const int size
Definition: tlayout.hpp:393
static const int dim_1
Definition: tlayout.hpp:432
OffsetStridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2_1, S2, N2_2, S2 *N2_1 > split_12() const
Definition: tlayout.hpp:217
int GetNDofs() const
Returns number of degrees of freedom.
Definition: fespace.hpp:161
int NumComponents() const
Definition: tlayout.hpp:498
OffsetStridedLayout2D< N1 *N2, S1, N3, S3 > merge_12() const
Definition: tlayout.hpp:354
static const int dim_1
Definition: tlayout.hpp:64
static StridedLayout2D< N1_1, S1, N1_2, S1 *N1_1 > split_1()
Definition: tlayout.hpp:49
static StridedLayout4D< N1, S1, N2, S2, N3_1, S3, N3_2, S3 *N3_1 > split_3()
Definition: tlayout.hpp:301
static OffsetStridedLayout2D< N2, S2, N3, S3 > ind1(int i1)
Definition: tlayout.hpp:252
static StridedLayout3D< N1, S1, N3, S3, N2, S2 > transpose_23()
Definition: tlayout.hpp:316
static const int dim_1
Definition: tlayout.hpp:326
static const int dim_3
Definition: tlayout.hpp:328
static const int dim_4
Definition: tlayout.hpp:435
static bool Matches(const FiniteElementSpace &fes)
Definition: tlayout.hpp:578
static StridedLayout2D< N1, S1, N2 *N3, S2 > merge_23()
Definition: tlayout.hpp:278
OffsetStridedLayout4D(int offset_)
Definition: tlayout.hpp:441
static StridedLayout2D< N2, S2, N1, S1 > transpose_12()
Definition: tlayout.hpp:157
int NumComponents() const
Definition: tlayout.hpp:574
OffsetStridedLayout1D< M1, S1 > sub(int o1) const
Definition: tlayout.hpp:77
static const int dim_2
Definition: tlayout.hpp:433
OffsetStridedLayout2D< N1, S1, N2, S2 > ind3(int i3) const
Definition: tlayout.hpp:347
OffsetStridedLayout3D< N1_1, S1, N1_2, S1 *N1_1, N2, S2 > split_1() const
Definition: tlayout.hpp:202
VectorLayout(const FiniteElementSpace &fes)
Definition: tlayout.hpp:531
OffsetStridedLayout1D< N1 *N2,(S1< S2)?S1:S2 > merge_12() const
Definition: tlayout.hpp:225
static const int size
Definition: tlayout.hpp:33
ScalarLayout(const FiniteElementSpace &fes)
Definition: tlayout.hpp:569
OffsetStridedLayout2D< N1_1, S1, N1_2, S1 *N1_1 > split_1() const
Definition: tlayout.hpp:85
static OffsetStridedLayout1D< M1, S1 > sub(int o1)
Definition: tlayout.hpp:41
static const int size
Definition: tlayout.hpp:65
int ind(int i1, int i2, int i3, int i4) const
Definition: tlayout.hpp:442
static OffsetStridedLayout3D< N1, S1, N2, S2, N3, S3 > ind4(int i4)
Definition: tlayout.hpp:407
static const int size
Definition: tlayout.hpp:329
static const int dim_2
Definition: tlayout.hpp:103
static const int rank
Definition: tlayout.hpp:63
OffsetStridedLayout2D< N1, S1, N2 *N3, S2 > merge_23() const
Definition: tlayout.hpp:361
static OffsetStridedLayout2D< N2, S2, N3, S3 > ind14(int i1, int i4)
Definition: tlayout.hpp:403
OffsetStridedLayout3D(int offset_)
Definition: tlayout.hpp:334
static StridedLayout3D< N1, S1, N2, S2, N3 *N4, S3 > merge_34()
Definition: tlayout.hpp:419
OffsetStridedLayout4D< N1, S1, N2_1, S2, N2_2, S2 *N2_1, N3, S3 > split_2() const
Definition: tlayout.hpp:377
static int ind(int i1, int i2, int i3, int i4)
Definition: tlayout.hpp:395
static const int rank
Definition: tlayout.hpp:388
VectorLayout(int scalar_size_, int num_comp_=NumComp)
Definition: tlayout.hpp:523
static const int rank
Definition: tlayout.hpp:171
int ind(int i1) const
Definition: tlayout.hpp:71
static OffsetStridedLayout2D< N1, S1, N4, S4 > ind23(int i2, int i3)
Definition: tlayout.hpp:399
static int ind(int i1)
Definition: tlayout.hpp:35
static OffsetStridedLayout1D< N2, S2 > ind1(int i1)
Definition: tlayout.hpp:110
static StridedLayout4D< N1, S1, N2_1, S2, N2_2, S2 *N2_1, N3, S3 > split_2()
Definition: tlayout.hpp:294
OffsetStridedLayout2D< M1, S1, M2, S2 > sub(int o1, int o2) const
Definition: tlayout.hpp:194
OffsetStridedLayout2D< N2, S2, N1, S1 > transpose_12() const
Definition: tlayout.hpp:233
OffsetStridedLayout2D< N2, S2, N3, S3 > ind1(int i1) const
Definition: tlayout.hpp:339
static StridedLayout3D< N1, S1, N2_1, S2, N2_2, S2 *N2_1 > split_2()
Definition: tlayout.hpp:135
static const int dim_2
Definition: tlayout.hpp:390
int GetVDim() const
Returns vector dimension.
Definition: fespace.hpp:153
static const int dim_2
Definition: tlayout.hpp:327
static const int dim_4
Definition: tlayout.hpp:392
void Init(Ordering::Type ordering, int scalar_size, int num_comp)
Definition: tlayout.hpp:472
static const int dim_3
Definition: tlayout.hpp:391
DynamicVectorLayout(const FiniteElementSpace &fes)
Definition: tlayout.hpp:492
static OffsetStridedLayout2D< N1, S1, N2, S2 > ind3(int i3)
Definition: tlayout.hpp:260
static int ind(int i1, int i2, int i3)
Definition: tlayout.hpp:248
int ind(int scalar_idx, int comp_idx) const
Definition: tlayout.hpp:500
static bool Matches(const FiniteElementSpace &fes)
Definition: tlayout.hpp:555
static int ind(int i1, int i2)
Definition: tlayout.hpp:106
static StridedLayout3D< N2, S2, N1, S1, N3, S3 > transpose_12()
Definition: tlayout.hpp:308
static OffsetStridedLayout2D< M1, S1, M2, S2 > sub(int o1, int o2)
Definition: tlayout.hpp:120
static StridedLayout1D< N1 *N2,(S1< S2)?S1:S2 > merge_12()
Definition: tlayout.hpp:149
int ind(int i1, int i2, int i3) const
Definition: tlayout.hpp:335
OffsetStridedLayout2D(int offset_)
Definition: tlayout.hpp:179
static const int dim_1
Definition: tlayout.hpp:32
static StridedLayout2D< N1 *N2, S1, N3, S3 > merge_12()
Definition: tlayout.hpp:267
int ind(int i1, int i2) const
Definition: tlayout.hpp:180
static OffsetStridedLayout2D< N1, S1, N3, S3 > ind2(int i2)
Definition: tlayout.hpp:256
static StridedLayout3D< N1_1, S1, N1_2, S1 *N1_1, N2, S2 > split_1()
Definition: tlayout.hpp:128
static const int size
Definition: tlayout.hpp:246
static StridedLayout3D< N1 *N2, S1, N3, S3, N4, S4 > merge_12()
Definition: tlayout.hpp:412
OffsetStridedLayout1D(int offset_)
Definition: tlayout.hpp:70
static const int rank
Definition: tlayout.hpp:325
int NumComponents() const
Definition: tlayout.hpp:541
static const int dim_1
Definition: tlayout.hpp:102
int ind(int scalar_idx, int comp_idx) const
Definition: tlayout.hpp:543
static const int dim_1
Definition: tlayout.hpp:172
static const int vec_dim
Definition: tlayout.hpp:517
static const int vec_dim
Definition: tlayout.hpp:466
static const int rank
Definition: tlayout.hpp:101
static StridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2, S2, N3, S3 > split_1()
Definition: tlayout.hpp:287
static const int rank
Definition: tlayout.hpp:242
static const int size
Definition: tlayout.hpp:104
static const int rank
Definition: tlayout.hpp:31
static OffsetStridedLayout1D< N1, S1 > ind2(int i2)
Definition: tlayout.hpp:114
OffsetStridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2, S2, N3, S3 > split_1() const
Definition: tlayout.hpp:370
OffsetStridedLayout3D< N1, S1, N2_1, S2, N2_2, S2 *N2_1 > split_2() const
Definition: tlayout.hpp:209
static const int dim_3
Definition: tlayout.hpp:245
static const int dim_1
Definition: tlayout.hpp:243
static const int rank
Definition: tlayout.hpp:431
static const int dim_3
Definition: tlayout.hpp:434
static StridedLayout3D< N3, S3, N2, S2, N1, S1 > transpose_13()
Definition: tlayout.hpp:312
OffsetStridedLayout1D< N2, S2 > ind1(int i1) const
Definition: tlayout.hpp:184
static const int vec_dim
Definition: tlayout.hpp:565
DynamicVectorLayout(Ordering::Type ordering, int scalar_size, int num_comp)
Definition: tlayout.hpp:488
OffsetStridedLayout2D< N1, S1, N3, S3 > ind2(int i2) const
Definition: tlayout.hpp:343
static StridedLayout4D< N1_1, S1, N1_2, S1 *N1_1, N2_1, S2, N2_2, S2 *N2_1 > split_12()
Definition: tlayout.hpp:142
static const int dim_1
Definition: tlayout.hpp:389
static const int dim_2
Definition: tlayout.hpp:244
static bool Matches(const FiniteElementSpace &fes)
Definition: tlayout.hpp:505