64 ASSERTL0(
false,
"order in 'a' direction is higher "
65 "than order in 'c' direction");
69 ASSERTL0(
false,
"order in 'b' direction is higher "
70 "than order in 'c' direction");
88 for (
int i = 2; i <= P; ++i)
94 for (
int i = 2; i <= Q; ++i)
100 for (
int i = 2; i <= P; ++i)
106 for (
int i = 2; i <= Q; ++i)
112 for (
int i = 2; i <= R; ++i)
118 for (
int i = 2; i <= R; ++i)
124 for (
int i = 2; i <= R; ++i)
130 for (
int i = 2; i <= R; ++i)
136 for (
int j = 2; j <= Q; ++j)
138 for (
int i = 2; i <= P; ++i)
145 for (
int i = 2; i <= P; ++i)
147 for (
int j = 1; j <= R-i; ++j)
154 for (
int i = 2; i <= Q; ++i)
156 for (
int j = 1; j <= R-i; ++j)
163 for (
int i = 2; i <= P; ++i)
165 for (
int j = 1; j <= R-i; ++j)
172 for (
int i = 2; i <= Q; ++i)
174 for (
int j = 1; j <= R-i; ++j)
181 for (
int i = 2; i <= P+1; ++i)
183 for (
int j = 1; j <= Q-i+1; ++j)
185 for (
int k = 1; k <= R-i-j+1; ++k)
195 "Duplicate coefficient entries in map");
198 for (it =
m_map.begin(); it !=
m_map.end(); ++it)
200 const int p = it->first.get<0>();
201 const int q = it->first.get<1>();
202 const int r = it->first.get<2>();
203 const int rp = it->first.get<3>();
206 m_idxMap[p] = map<int, map<int, pair<int, int> > >();
211 m_idxMap[p][q] = map<int, pair<int, int> >();
216 m_idxMap[p][q][r] = pair<int, int>(it->second, rp);
258 int Qx =
m_base[0]->GetNumPoints();
259 int Qy =
m_base[1]->GetNumPoints();
260 int Qz =
m_base[2]->GetNumPoints();
268 eta_x =
m_base[0]->GetZ();
269 eta_y =
m_base[1]->GetZ();
270 eta_z =
m_base[2]->GetZ();
274 for (k = 0, n = 0; k < Qz; ++k)
276 for (j = 0; j < Qy; ++j)
278 for (i = 0; i < Qx; ++i, ++n)
280 if (out_dxi1.num_elements() > 0)
281 out_dxi1[n] = 2.0/(1.0 - eta_z[k]) * dEta_bar1[n];
282 if (out_dxi2.num_elements() > 0)
283 out_dxi2[n] = 2.0/(1.0 - eta_z[k]) * dXi2[n];
284 if (out_dxi3.num_elements() > 0)
285 out_dxi3[n] = (1.0+eta_x[i])/(1.0-eta_z[k])*dEta_bar1[n] +
286 (1.0+eta_y[j])/(1.0-eta_z[k])*dXi2[n] + dEta3[n];
321 ASSERTL1(
false,
"input dir is out of range");
370 if (
m_base[0]->Collocation() &&
371 m_base[1]->Collocation() &&
377 inarray, 1, outarray, 1);
396 inarray,outarray,wsp,
407 bool doCheckCollDir0,
408 bool doCheckCollDir1,
409 bool doCheckCollDir2)
411 const int Qx =
m_base[0]->GetNumPoints();
412 const int Qy =
m_base[1]->GetNumPoints();
413 const int Qz =
m_base[2]->GetNumPoints();
420 map<int, map<int, map<int, pair<int, int> > > >
::iterator it_p;
421 map<int, map<int, pair<int, int> > >
::iterator it_q;
427 for (it_q = it_p->second.begin(); it_q != it_p->second.end(); ++it_q)
435 int i ,j, k, s = 0, cnt = 0, cnt2 = 0;
437 for (k = 0; k < Qz; ++k)
444 for (it_q = it_p->second.begin(); it_q != it_p->second.end(); ++it_q)
447 for (it_r = it_q->second.begin(); it_r != it_q->second.end(); ++it_r)
449 sum += inarray[it_r->second.first] * bz[k + Qz*it_r->second.second];
455 for (j = 0; j < Qy; ++j)
464 for (it_q = it_p->second.begin(); it_q != it_p->second.end(); ++it_q)
466 sum += by[j + Qy*it_q->first] * fpq[cnt++];
471 for (i = 0; i < Qx; ++i, ++s)
477 sum += bx[i + Qx*it_p->first] * fp[cnt2++];
479 sum += inarray[4]*(by1*(bx[i] + bx[i+Qx]) + by0*bx[i+Qx]);
538 if (
m_base[0]->Collocation() &&
539 m_base[1]->Collocation() &&
553 bool multiplybyweights)
557 if(multiplybyweights)
574 inarray,outarray,wsp,
586 bool doCheckCollDir0,
587 bool doCheckCollDir1,
588 bool doCheckCollDir2)
591 int Qx =
m_base[0]->GetNumPoints();
592 int Qy =
m_base[1]->GetNumPoints();
593 int Qz =
m_base[2]->GetNumPoints();
599 map<int, map<int, map<int, pair<int, int> > > >
::iterator it_p;
600 map<int, map<int, pair<int, int> > >
::iterator it_q;
608 const int p = it_p->first;
610 for (k = 0; k < Qz; ++k)
612 for (j = 0; j < Qy; ++j)
615 for (i = 0; i < Qx; ++i, ++s)
617 sum += bx[i + Qx*p]*inarray[s];
623 for (it_q = it_p->second.begin(); it_q != it_p->second.end(); ++it_q)
625 const int q = it_q->first;
627 for (k = 0; k < Qz; ++k)
630 for (j = 0; j < Qy; ++j)
632 sum += by[j + Qy*q]*f[j+Qy*k];
637 for (it_r = it_q->second.begin(); it_r != it_q->second.end(); ++it_r)
639 const int rpqr = it_r->second.second;
641 for (k = 0; k < Qz; ++k)
643 sum += bz[k + Qz*rpqr]*fb[k];
646 outarray[it_r->second.first] = sum;
653 for (k = 0; k < Qz; ++k)
655 for (j = 0; j < Qy; ++j)
657 for (i = 0; i < Qx; ++i, ++s)
659 outarray[4] += inarray[s] * bz[k+Qz]*(
688 int nquad0 =
m_base[0]->GetNumPoints();
689 int nquad1 =
m_base[1]->GetNumPoints();
690 int nquad2 =
m_base[2]->GetNumPoints();
691 int nqtot = nquad0*nquad1*nquad2;
704 for(i = 0; i < nquad0; ++i)
706 gfac0[i] = 0.5*(1+z0[i]);
710 for(i = 0; i < nquad1; ++i)
712 gfac1[i] = 0.5*(1+z1[i]);
716 for(i = 0; i < nquad2; ++i)
718 gfac2[i] = 2.0/(1-z2[i]);
722 const int nq01 = nquad0*nquad1;
723 for(i = 0; i < nquad2; ++i)
726 &inarray[0] + i*nq01, 1,
727 &tmp0 [0] + i*nq01, 1);
758 for(i = 0; i < nquad1*nquad2; ++i)
762 tmp0 .get() + i*nquad0, 1);
771 for(i = 0; i < nquad2; ++i)
774 &inarray[0] + i*nq01, 1,
775 &tmp0 [0] + i*nq01, 1);
777 for(i = 0; i < nquad1*nquad2; ++i)
780 &tmp0[0] + i*nquad0, 1,
781 &tmp0[0] + i*nquad0, 1);
804 ASSERTL1(
false,
"input dir is out of range");
829 eta[1] = 2.0*(1.0 + xi[1])/(1.0 - xi[2]) - 1.0;
830 eta[0] = 2.0*(1.0 + xi[0])/(1.0 - xi[2]) - 1.0;
846 for (
int k = 0; k < Qz; ++k )
848 for (
int j = 0; j < Qy; ++j)
850 for (
int i = 0; i < Qx; ++i)
852 int s = i + Qx*(j + Qy*k);
855 xi_y[s] = (1.0 + eta_y[j]) * (1.0 - eta_z[k]) / 2.0 - 1.0;
856 xi_x[s] = (1.0 + etaBar_x[i]) * (1.0 - eta_z[k]) / 2.0 - 1.0;
898 "BasisType is not a boundary interior form");
901 "BasisType is not a boundary interior form");
904 "BasisType is not a boundary interior form");
906 int P =
m_base[0]->GetNumModes();
907 int Q =
m_base[1]->GetNumModes();
908 int R =
m_base[2]->GetNumModes();
916 ASSERTL2(i >= 0 && i <= 7,
"edge id is out of range");
918 if (i == 0 || i == 2)
922 else if (i == 1 || i == 3)
934 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
940 else if (i == 1 || i == 3)
943 return Q+1 + (P*(1 + 2*Q - P))/2;
948 return Q+1 + (P*(1 + 2*Q - P))/2;
954 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
956 int P =
m_base[0]->GetNumModes()-1;
957 int Q =
m_base[1]->GetNumModes()-1;
958 int R =
m_base[2]->GetNumModes()-1;
964 else if (i == 1 || i == 3)
966 return (P-1) * (2*(R-1) - (P-1) - 1) / 2;
970 return (Q-1) * (2*(R-1) - (Q-1) - 1) / 2;
976 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
980 return m_base[0]->GetNumPoints()*
981 m_base[1]->GetNumPoints();
983 else if (i == 1 || i == 3)
985 return m_base[0]->GetNumPoints()*
986 m_base[2]->GetNumPoints();
990 return m_base[1]->GetNumPoints()*
991 m_base[2]->GetNumPoints();
997 const int i,
const int k)
const
999 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
1000 ASSERTL2(k >= 0 && k <= 1,
"basis key id is out of range");
1009 m_base[k]->GetNumModes());
1018 m_base[2*k]->GetNumModes());
1026 m_base[k+1]->GetNumModes());
1035 const std::vector<unsigned int> &nummodes,
1039 nummodes[modes_offset],
1040 nummodes[modes_offset+1],
1041 nummodes[modes_offset+2]);
1049 ASSERTL2(i >= 0 && i <= 7,
"edge id is out of range");
1050 if (i == 0 || i == 2)
1054 else if (i == 1 || i == 3)
1078 "Method only implemented if BasisType is identical"
1079 "in x and y directions");
1082 "Method only implemented for Modified_A BasisType"
1083 "(x and y direction) and Modified_C BasisType (z "
1086 int i, j, p, q, r, nFaceCoeffs;
1088 int order0 =
m_base[0]->GetNumModes();
1089 int order1 =
m_base[1]->GetNumModes();
1090 int order2 =
m_base[2]->GetNumModes();
1092 if (nummodesA == -1)
1097 nummodesA =
m_base[0]->GetNumModes();
1098 nummodesB =
m_base[1]->GetNumModes();
1102 nummodesA =
m_base[0]->GetNumModes();
1103 nummodesB =
m_base[2]->GetNumModes();
1107 nummodesA =
m_base[1]->GetNumModes();
1108 nummodesB =
m_base[2]->GetNumModes();
1115 nFaceCoeffs = nummodesB + (nummodesA-1)*(1+2*(nummodesB-1)-(nummodesA-1))/2;
1119 nFaceCoeffs = nummodesA*nummodesB;
1123 if (maparray.num_elements() != nFaceCoeffs)
1128 if (signarray.num_elements() != nFaceCoeffs)
1134 fill(signarray.get(), signarray.get() + nFaceCoeffs, 1);
1143 for (i = 0; i < nummodesB; i++)
1145 for (j = 0; j < nummodesA; j++)
1149 arrayindx[i*nummodesA+j] = i*nummodesA+j;
1153 arrayindx[i*nummodesA+j] = j*nummodesB+i;
1167 maparray[arrayindx[0]] = 0;
1168 maparray[arrayindx[1]] = 1;
1169 maparray[arrayindx[nummodesA+1]] = 2;
1170 maparray[arrayindx[nummodesA]] = 3;
1174 for (p = 2; p < nummodesA; ++p)
1176 maparray[arrayindx[p]] = p-2 + cnt;
1181 for (q = 2; q < nummodesB; ++q)
1183 maparray[arrayindx[q*nummodesA+1]] = q-2 + cnt;
1188 for (p = 2; p < nummodesA; ++p)
1190 maparray[arrayindx[nummodesA+p]] = p-2 + cnt;
1195 for (q = 2; q < nummodesB; ++q)
1197 maparray[arrayindx[q*nummodesA]] = q-2 + cnt;
1201 cnt += nummodesB-2 + 4*(nummodesA-2);
1202 for (q = 2; q < nummodesB; ++q)
1204 for (p = 2; p < nummodesA; ++p)
1206 maparray[arrayindx[q*nummodesA+p]] = cnt + (q-2)*nummodesA+(p-2);
1215 maparray[nummodesB] = 1;
1220 for (p = 2; p < nummodesA; q += nummodesB-p, ++p)
1222 maparray[q] = cnt++;
1223 if ((
int)faceOrient == 7)
1225 signarray[q] = p % 2 ? -1 : 1;
1230 cnt = 5 + 2*(order0-2) + 2*(order1-2) + (order2-2);
1231 for (q = 2; q < nummodesB; ++q)
1233 maparray[q] = cnt++;
1234 if ((
int)faceOrient == 7)
1236 signarray[q] = q % 2 ? -1 : 1;
1241 cnt = 5 + 2*(order0-2) + 2*(order1-2);
1242 for (q = 2; q < nummodesB; ++q)
1244 maparray[nummodesB+q-1] = cnt++;
1245 if ((
int)faceOrient == 7)
1247 signarray[nummodesB+q-1] = q % 2 ? -1 : 1;
1252 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1254 cnt2 = 2*nummodesB + 1;
1255 for (p = 2; p < nummodesA; ++p)
1257 for (r = 2; r < nummodesB-p; ++r)
1259 maparray[cnt2] = cnt++;
1260 if ((
int)faceOrient == 7 && p > 1)
1262 signarray[cnt2++] = p % 2 ? -1 : 1;
1273 maparray[nummodesB] = 2;
1276 cnt = 5 + (order0-2);
1278 for (p = 2; p < nummodesA; q += nummodesB-p, ++p)
1280 maparray[q] = cnt++;
1281 if ((
int)faceOrient == 7)
1283 signarray[q] = p % 2 ? -1 : 1;
1288 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 2*(order2-2);
1289 for (q = 2; q < nummodesB; ++q)
1291 maparray[q] = cnt++;
1292 if ((
int)faceOrient == 7)
1294 signarray[q] = q % 2 ? -1 : 1;
1299 cnt = 5 + 2*(order0-2) + 2*(order1-2) + (order2-2);
1300 for (q = 2; q < nummodesB; ++q)
1302 maparray[nummodesB+q-1] = cnt++;
1303 if ((
int)faceOrient == 7)
1305 signarray[nummodesB+q-1] = q % 2 ? -1 : 1;
1310 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1312 cnt2 = 2*nummodesB + 1;
1313 for (p = 2; p < nummodesA; ++p)
1315 for (r = 2; r < nummodesB-p; ++r)
1317 maparray[cnt2] = cnt++;
1318 if ((
int)faceOrient == 7 && p > 1)
1320 signarray[cnt2++] = p % 2 ? -1 : 1;
1331 maparray[nummodesB] = 2;
1334 cnt = 5 + (order0-2) + (order1-2);
1336 for (p = 2; p < nummodesA; q += nummodesB-p, ++p)
1338 maparray[q] = cnt++;
1339 if ((
int)faceOrient == 7)
1341 signarray[q] = p % 2 ? -1 : 1;
1346 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 2*(order2-2);
1347 for (q = 2; q < nummodesB; ++q)
1349 maparray[q] = cnt++;
1350 if ((
int)faceOrient == 7)
1352 signarray[q] = q % 2 ? -1 : 1;
1357 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 3*(order2-2);
1358 for (q = 2; q < nummodesB; ++q)
1360 maparray[nummodesB+q-1] = cnt++;
1361 if ((
int)faceOrient == 7)
1363 signarray[nummodesB+q-1] = q % 2 ? -1 : 1;
1368 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1371 cnt2 = 2*nummodesB + 1;
1372 for (p = 2; p < nummodesA; ++p)
1374 for (r = 2; r < nummodesB-p; ++r)
1376 maparray[cnt2] = cnt++;
1377 if ((
int)faceOrient == 7 && p > 1)
1379 signarray[cnt2++] = p % 2 ? -1 : 1;
1390 maparray[nummodesB] = 3;
1393 cnt = 5 + 2*(order0-2) + (order1-2);
1395 for (p = 2; p < nummodesA; q += nummodesB-p, ++p)
1397 maparray[q] = cnt++;
1398 if ((
int)faceOrient == 7)
1400 signarray[q] = p % 2 ? -1 : 1;
1405 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 3*(order2-2);
1406 for (q = 2; q < nummodesB; ++q)
1408 maparray[q] = cnt++;
1409 if ((
int)faceOrient == 7)
1411 signarray[q] = q % 2 ? -1 : 1;
1416 cnt = 5 + 2*(order0-2) + 2*(order1-2);
1417 for (q = 2; q < nummodesB; ++q)
1419 maparray[nummodesB+q-1] = cnt++;
1420 if ((
int)faceOrient == 7)
1422 signarray[nummodesB+q-1] = q % 2 ? -1 : 1;
1427 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1430 cnt2 = 2*nummodesB + 1;
1431 for (p = 2; p < nummodesA; ++p)
1433 for (r = 2; r < nummodesB-p; ++r)
1435 maparray[cnt2] = cnt++;
1436 if ((
int)faceOrient == 7 && p > 1)
1438 signarray[cnt2++] = p % 2 ? -1 : 1;
1446 ASSERTL0(
false,
"Face to element map unavailable.");
1453 if ((
int)faceOrient == 7)
1455 swap(maparray[0], maparray[nummodesA]);
1456 for (i = 1; i < nummodesA-1; ++i)
1458 swap(maparray[i+1], maparray[nummodesA+i]);
1468 if (faceOrient == 6 || faceOrient == 8 ||
1469 faceOrient == 11 || faceOrient == 12)
1473 for (i = 3; i < nummodesB; i += 2)
1475 for (j = 0; j < nummodesA; j++)
1477 signarray[arrayindx[i*nummodesA+j]] *= -1;
1481 for (i = 0; i < nummodesA; i++)
1483 swap(maparray [i], maparray [i+nummodesA]);
1484 swap(signarray[i], signarray[i+nummodesA]);
1489 for (i = 0; i < nummodesB; i++)
1491 for (j = 3; j < nummodesA; j += 2)
1493 signarray[arrayindx[i*nummodesA+j]] *= -1;
1497 for (i = 0; i < nummodesB; i++)
1499 swap (maparray [i], maparray [i+nummodesB]);
1500 swap (signarray[i], signarray[i+nummodesB]);
1505 if (faceOrient == 7 || faceOrient == 8 ||
1506 faceOrient == 10 || faceOrient == 12)
1510 for (i = 0; i < nummodesB; i++)
1512 for (j = 3; j < nummodesA; j += 2)
1514 signarray[arrayindx[i*nummodesA+j]] *= -1;
1518 for(i = 0; i < nummodesB; i++)
1520 swap(maparray [i*nummodesA], maparray [i*nummodesA+1]);
1521 swap(signarray[i*nummodesA], signarray[i*nummodesA+1]);
1526 for (i = 3; i < nummodesB; i += 2)
1528 for (j = 0; j < nummodesA; j++)
1530 signarray[arrayindx[i*nummodesA+j]] *= -1;
1534 for (i = 0; i < nummodesA; i++)
1536 swap(maparray [i*nummodesB], maparray [i*nummodesB+1]);
1537 swap(signarray[i*nummodesB], signarray[i*nummodesB+1]);
1549 "Mapping not defined for this type of basis");
1561 const int P =
m_base[0]->GetNumModes() - 2;
1562 const int Q =
m_base[1]->GetNumModes() - 2;
1563 const int R =
m_base[2]->GetNumModes() - 2;
1566 if (maparray.num_elements() != nEdgeIntCoeffs)
1571 if(signarray.num_elements() != nEdgeIntCoeffs)
1577 fill(signarray.get(), signarray.get()+nEdgeIntCoeffs, 1);
1603 offset += 2*(P+Q)+R;
1606 offset += 2*(P+Q+R);
1609 offset += 2*(P+Q)+3*R;
1612 ASSERTL0(
false,
"Edge not defined.");
1616 for (i = 0; i < nEdgeIntCoeffs; ++i)
1618 maparray[i] = offset + i;
1623 for (i = 1; i < nEdgeIntCoeffs; i += 2)
1636 const int P =
m_base[0]->GetNumModes() - 1;
1637 const int Q =
m_base[1]->GetNumModes() - 1;
1638 const int R =
m_base[2]->GetNumModes() - 1;
1640 int p, q, r, idx = 0;
1645 if (maparray.num_elements() != nFaceIntCoeffs)
1650 if (signarray.num_elements() != nFaceIntCoeffs)
1656 fill(signarray.get(), signarray.get()+nFaceIntCoeffs, 1);
1667 for (i = 0; i < nummodesB; i++)
1669 for (j = 0; j < nummodesA; j++)
1673 arrayindx[i*nummodesA+j] = i*nummodesA+j;
1677 arrayindx[i*nummodesA+j] = j*nummodesB+i;
1683 int offset = 5 + 2*(P-1) + 2*(Q-1) + 4*(R-1);
1685 for (i = 0; i < fid; ++i)
1693 for (q = 2; q <= Q; ++q)
1695 for (p = 2; p <= P; ++p)
1697 maparray[arrayindx[(q-2)*nummodesA+(p-2)]]
1698 = offset + (q-2)*nummodesA+(p-2);
1705 for (p = 2; p <= P; ++p)
1707 for (r = 1; r <= R-p; ++r, ++idx)
1709 if ((
int)faceOrient == 7)
1711 signarray[idx] = p % 2 ? -1 : 1;
1713 maparray[idx] = offset + idx;
1720 for (q = 2; q <= Q; ++q)
1722 for (r = 1; r <= R-q; ++r, ++idx)
1724 if ((
int)faceOrient == 7)
1726 signarray[idx] = q % 2 ? -1 : 1;
1728 maparray[idx] = offset + idx;
1734 ASSERTL0(
false,
"Face interior map not available.");
1744 if (faceOrient == 6 || faceOrient == 8 ||
1745 faceOrient == 11 || faceOrient == 12)
1749 for (i = 1; i < nummodesB; i += 2)
1751 for (j = 0; j < nummodesA; j++)
1753 signarray[arrayindx[i*nummodesA+j]] *= -1;
1759 for (i = 0; i < nummodesB; i++)
1761 for (j = 1; j < nummodesA; j += 2)
1763 signarray[arrayindx[i*nummodesA+j]] *= -1;
1769 if (faceOrient == 7 || faceOrient == 8 ||
1770 faceOrient == 10 || faceOrient == 12)
1774 for (i = 0; i < nummodesB; i++)
1776 for (j = 1; j < nummodesA; j += 2)
1778 signarray[arrayindx[i*nummodesA+j]] *= -1;
1784 for (i = 1; i < nummodesB; i += 2)
1786 for (j = 0; j < nummodesA; j++)
1788 signarray[arrayindx[i*nummodesA+j]] *= -1;
1799 "BasisType is not a boundary interior form");
1802 "BasisType is not a boundary interior form");
1805 "BasisType is not a boundary interior form");
1810 if (outarray.num_elements() != nIntCoeffs)
1817 for (p = nBndCoeffs; p <
m_ncoeffs; ++p)
1819 outarray[idx++] = p;
1827 "BasisType is not a boundary interior form");
1830 "BasisType is not a boundary interior form");
1833 "BasisType is not a boundary interior form");
1837 for (idx = 0; idx < nBndry; ++idx)
1839 maparray[idx] = idx;
1864 const int R =
m_base[2]->GetNumModes();
1866 for (i = 0; i < I; ++i)
1868 cnt += (R-i)*(R-i+1)/2;
1872 for (j = 0; j < J; ++j)
1887 int nquad0 =
m_base[0]->GetNumPoints();
1888 int nquad1 =
m_base[1]->GetNumPoints();
1889 int nquad2 =
m_base[2]->GetNumPoints();
1898 for(i = 0; i < nquad1*nquad2; ++i)
1901 w0.get(), 1, outarray.get()+i*nquad0,1);
1905 for(j = 0; j < nquad2; ++j)
1907 for(i = 0; i < nquad1; ++i)
1909 Blas::Dscal(nquad0,w1[i], &outarray[0]+i*nquad0 +
1921 for(i = 0; i < nquad2; ++i)
1923 Blas::Dscal(nquad0*nquad1, 0.25*w2[i],
1924 &outarray[0]+i*nquad0*nquad1, 1);
1929 for(i = 0; i < nquad2; ++i)
1931 Blas::Dscal(nquad0*nquad1,0.125*(1-z2[i])*(1-z2[i])*w2[i],
1932 &outarray[0]+i*nquad0*nquad1,1);
virtual LibUtilities::ShapeType v_DetShapeType() const
virtual void v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
#define ASSERTL0(condition, msg)
Principle Modified Functions .
virtual int v_GetEdgeNcoeffs(const int i) const
virtual void v_GetCoords(Array< OneD, NekDouble > &xi_x, Array< OneD, NekDouble > &xi_y, Array< OneD, NekDouble > &xi_z)
void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
static Array< OneD, NekDouble > NullNekDouble1DArray
int GetBasisNumModes(const int dir) const
This function returns the number of expansion modes in the dir direction.
virtual const LibUtilities::BasisKey v_DetFaceBasisKey(const int i, const int k) const
void MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
virtual int v_GetNedges() const
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
LibUtilities::BasisKey EvaluateTriFaceBasisKey(const int facedir, const LibUtilities::BasisType faceDirBasisType, const int numpoints, const int nummodes)
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
Principle Modified Functions .
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
int getNumberOfBndCoefficients(int Na, int Nb, int Nc)
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
boost::shared_ptr< DNekMat > DNekMatSharedPtr
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
Calculate the derivative of the physical points.
virtual int v_GetFaceNcoeffs(const int i) const
map< Mode, unsigned int, cmpop > m_map
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
int NumBndryCoeffs(void) const
LibUtilities::BasisType GetEdgeBasisType(const int i) const
This function returns the type of expansion basis on the i-th edge.
void PhysTensorDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray_d1, Array< OneD, NekDouble > &outarray_d2, Array< OneD, NekDouble > &outarray_d3)
Calculate the 3D derivative in the local tensor/collapsed coordinate at the physical points...
virtual int v_GetNfaces() const
The base class for all shapes.
void IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
static const NekDouble kNekZeroTol
virtual int v_GetFaceIntNcoeffs(const int i) const
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
int getNumberOfCoefficients(int Na)
LibUtilities::BasisKey EvaluateQuadFaceBasisKey(const int facedir, const LibUtilities::BasisType faceDirBasisType, const int numpoints, const int nummodes)
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
boost::tuple< unsigned int, unsigned int, unsigned int, unsigned int > Mode
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
virtual int v_NumBndryCoeffs() const
DNekMatSharedPtr CreateGeneralMatrix(const StdMatrixKey &mkey)
this function generates the mass matrix
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
virtual void v_IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
map< int, map< int, map< int, pair< int, int > > > > m_idxMap
virtual void v_BwdTrans_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
virtual void v_GetFaceToElementMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int nummodesA=-1, int nummodesB=-1)
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
int getNumberOfCoefficients(int Na, int Nb, int Nc)
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
int GetFaceNcoeffs(const int i) const
This function returns the number of expansion coefficients belonging to the i-th face.
int GetTetMode(int I, int J, int K)
Number tetrahedral modes in r-direction. Much the same as StdTetExp::GetTetMode but slightly simplifi...
virtual int v_GetFaceNumPoints(const int i) const
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
Gauss Radau pinned at x=-1, .
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Inner product of inarray over region with respect to the expansion basis m_base[0]->GetBdata(),m_base[1]->GetBdata(), m_base[2]->GetBdata() and return in outarray.
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
static const BasisKey NullBasisKey(eNoBasisType, 0, NullPointsKey)
Defines a null basis with no type or points.
virtual void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
int GetNumModes() const
Returns the order of the basis.
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetNverts() const
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Backward transformation is evaluated at the quadrature points.
Describes the specification for a Basis.
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.