v0.13.1
Searching...
No Matches

## Functions

MoFEMErrorCode monom_ordering (int *perm, int p, int q, int r=0)

static void get_ksi_hex (int shift, double *N, double *N_diff, double ksi[3], double diff_ksi[3][3])

## ◆ get_ksi_hex()

 static void DemkowiczHexAndQuad::get_ksi_hex ( int shift, double * N, double * N_diff, double ksi[3], double diff_ksi[3][3] )
inlinestatic

Definition at line 103 of file EdgeQuadHexPolynomials.cpp.

104 {
105
106 constexpr std::array<size_t, 4> ksi_nodes[2][3] = {
107
108 {{1, 2, 6, 5}, {3, 2, 6, 7}, {4, 5, 6, 7}},
109
110 {{0, 3, 7, 4}, {0, 1, 5, 4}, {0, 1, 2, 3}}
111
112 };
113
114 for (size_t i = 0; i != 3; ++i) {
115 for (auto n : ksi_nodes[0][i])
116 ksi[i] += N[shift + n];
117 for (auto n : ksi_nodes[1][i])
118 ksi[i] -= N[shift + n];
119 }
120
121 for (size_t i = 0; i != 3; ++i) {
122 for (auto d = 0; d != 3; ++d) {
123 for (auto n : ksi_nodes[0][i]) {
124
125 diff_ksi[i][d] += N_diff[3 * (shift + n) + d];
126 }
127 }
128 for (auto n : ksi_nodes[1][i]) {
129 for (auto d = 0; d != 3; ++d) {
130 diff_ksi[i][d] -= N_diff[3 * (shift + n) + d];
131 }
132 }
133 }
134}
FTensor::Index< 'n', SPACE_DIM > n
FTensor::Index< 'i', SPACE_DIM > i
const Tensor1_Expr< const dTensor0< T, Dim, i >, typename promote< T, double >::V, Dim, i > d(const Tensor0< T * > &a, const Index< i, Dim > index, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: dTensor0.hpp:27
const int N
Definition: speed_test.cpp:3

## ◆ monom_ordering()

 MoFEMErrorCode DemkowiczHexAndQuad::monom_ordering ( int * perm, int p, int q, int r = 0 )

Definition at line 11 of file EdgeQuadHexPolynomials.cpp.

11 {
13
14 if (r > 0) {
15
16 for (int m = 0; m != std::max(std::max(p, q), r) + 1; ++m) {
17
18 const int i = std::min(m, p);
19 const int j = std::min(m, q);
20 const int k = std::min(m, r);
21
22 if (i == m)
23 for (int jj = 0; jj != j; ++jj) {
24 for (int kk = 0; kk != k; ++kk) {
25 *(perm++) = i;
26 *(perm++) = jj;
27 *(perm++) = kk;
28 }
29 }
30
31 if (j == m)
32 for (int ii = 0; ii != i; ++ii) {
33 for (int kk = 0; kk != k; ++kk) {
34 *(perm++) = ii;
35 *(perm++) = j;
36 *(perm++) = kk;
37 }
38 }
39
40 if (k == m)
41 for (int ii = 0; ii != i; ++ii) {
42 for (int jj = 0; jj != j; ++jj) {
43 *(perm++) = ii;
44 *(perm++) = jj;
45 *(perm++) = k;
46 }
47 }
48
49 if (j == m || k == m)
50 for (int ii = 0; ii != i; ++ii) {
51 *(perm++) = ii;
52 *(perm++) = j;
53 *(perm++) = k;
54 }
55
56 if (i == m || k == m)
57 for (int jj = 0; jj != j; ++jj) {
58 *(perm++) = i;
59 *(perm++) = jj;
60 *(perm++) = k;
61 }
62
63 if (i == m || j == m)
64 for (int kk = 0; kk != k; ++kk) {
65 *(perm++) = i;
66 *(perm++) = j;
67 *(perm++) = kk;
68 }
69
70 *(perm++) = i;
71 *(perm++) = j;
72 *(perm++) = k;
73 }
74 } else {
75
76 for (int m = 0; m != std::max(p, q) + 1; ++m) {
77
78 const int i = std::min(m, p);
79 const int j = std::min(m, q);
80
81 if (j == m)
82 for (int ii = 0; ii != i; ++ii) {
83 *(perm++) = ii;
84 *(perm++) = j;
85 *(perm++) = 0;
86 }
87
88 if (i == m)
89 for (int jj = 0; jj != j; ++jj) {
90 *(perm++) = i;
91 *(perm++) = jj;
92 *(perm++) = 0;
93 }
94
95 *(perm++) = i;
96 *(perm++) = j;
97 *(perm++) = 0;
98 }
99 }
101}
static Index< 'p', 3 > p
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
FTensor::Index< 'm', SPACE_DIM > m
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k