14 Msg::Error(
"Incomplete pyramids of order %i not yet implemented",
order);
23 if(i + j <=
order)
return true;
24 if(i + j ==
order + 1)
return i == 1 || j == 1;
36 double uhat = (w == 1.) ? 0. : u / (1. - w);
37 std::vector<double> uFcts(
order + 1);
41 double vhat = (w == 1.) ? 0. : v / (1. - w);
42 std::vector<double> vFcts(
order + 1);
46 double what = 2. * w - 1.;
47 std::vector<std::vector<double> > wFcts(
order + 1), wGrads(
order + 1);
48 for(
int mIJ = 0; mIJ <=
order; mIJ++) {
49 int kMax =
order - mIJ;
50 std::vector<double> &wf = wFcts[mIJ];
57 for(
int i = 0; i <=
order; i++) {
58 for(
int j = 0; j <=
order; j++) {
60 int mIJ = std::max(i, j);
61 double fact = pow(1. - w, mIJ);
62 std::vector<double> &wf = wFcts[mIJ];
63 for(
int k = 0; k <=
order - mIJ; k++, index++)
64 val[index] = uFcts[i] * vFcts[j] * wf[k] * fact;
83 double uhat = (w == 1.) ? 0. : u / (1. - w);
84 std::vector<double> uFcts(
order + 1), uGrads(
order + 1);
89 double vhat = (w == 1.) ? 0. : v / (1. - w);
90 std::vector<double> vFcts(
order + 1), vGrads(
order + 1);
95 double what = 2. * w - 1.;
96 std::vector<std::vector<double> > wFcts(
order + 1), wGrads(
order + 1);
97 for(
int mIJ = 0; mIJ <=
order; mIJ++) {
98 int kMax =
order - mIJ;
99 std::vector<double> &wf = wFcts[mIJ], &wg = wGrads[mIJ];
108 for(
int i = 0; i <=
order; i++) {
109 for(
int j = 0; j <=
order; j++) {
111 int mIJ = std::max(i, j);
112 std::vector<double> &wf = wFcts[mIJ], &wg = wGrads[mIJ];
114 for(
int k = 0; k <=
order - mIJ; k++, index++) {
115 grads[index][0] = 0.;
116 grads[index][1] = 0.;
117 grads[index][2] = 2. * wg[k];
122 for(
int k = 0; k <=
order - mIJ; k++, index++) {
123 grads[index][0] = 0.;
124 grads[index][1] = wf[k];
125 grads[index][2] = 2. * v * wg[k];
129 for(
int k = 0; k <=
order - mIJ; k++, index++) {
130 grads[index][0] = wf[k];
131 grads[index][1] = 0.;
132 grads[index][2] = 2. * u * wg[k];
136 for(
int k = 0; k <=
order - mIJ; k++, index++) {
137 grads[index][0] = vhat * wf[k];
138 grads[index][1] = uhat * wf[k];
139 grads[index][2] = uhat * vhat * wf[k] + 2. * uhat * v * wg[k];
145 double powM2 = pow(oMW, mIJ - 2);
146 double powM1 = powM2 * oMW;
147 for(
int k = 0; k <=
order - mIJ; k++, index++) {
148 grads[index][0] = uGrads[i] * vFcts[j] * wf[k] * powM1;
149 grads[index][1] = uFcts[i] * vGrads[j] * wf[k] * powM1;
152 (u * uGrads[i] * vFcts[j] + v * uFcts[i] * vGrads[j]) +
153 uFcts[i] * vFcts[j] * powM1 * (2. * oMW * wg[k] - mIJ * wf[k]);