46 StdPyrExp::StdPyrExp()
66 ASSERTL0(
false,
"order in 'a' direction is higher "
67 "than order in 'c' direction");
71 ASSERTL0(
false,
"order in 'b' direction is higher "
72 "than order in 'c' direction");
90 for (
int i = 2; i <=
P; ++i)
96 for (
int i = 2; i <= Q; ++i)
102 for (
int i = 2; i <=
P; ++i)
108 for (
int i = 2; i <= Q; ++i)
114 for (
int i = 2; i <= R; ++i)
120 for (
int i = 2; i <= R; ++i)
126 for (
int i = 2; i <= R; ++i)
132 for (
int i = 2; i <= R; ++i)
138 for (
int j = 2; j <= Q; ++j)
140 for (
int i = 2; i <=
P; ++i)
147 for (
int i = 2; i <=
P; ++i)
149 for (
int j = 1; j <= R-i; ++j)
156 for (
int i = 2; i <= Q; ++i)
158 for (
int j = 1; j <= R-i; ++j)
165 for (
int i = 2; i <=
P; ++i)
167 for (
int j = 1; j <= R-i; ++j)
174 for (
int i = 2; i <= Q; ++i)
176 for (
int j = 1; j <= R-i; ++j)
183 for (
int i = 2; i <= P+1; ++i)
185 for (
int j = 1; j <= Q-i+1; ++j)
187 for (
int k = 1; k <= R-i-j+1; ++k)
197 "Duplicate coefficient entries in map");
200 for (it =
m_map.begin(); it !=
m_map.end(); ++it)
202 const int p = it->first.get<0>();
203 const int q = it->first.get<1>();
204 const int r = it->first.get<2>();
205 const int rp = it->first.get<3>();
208 m_idxMap[
p] = map<int, map<int, pair<int, int> > >();
213 m_idxMap[
p][q] = map<int, pair<int, int> >();
218 m_idxMap[
p][q][r] = pair<int, int>(it->second, rp);
260 int Qx =
m_base[0]->GetNumPoints();
261 int Qy =
m_base[1]->GetNumPoints();
262 int Qz =
m_base[2]->GetNumPoints();
270 eta_x =
m_base[0]->GetZ();
271 eta_y =
m_base[1]->GetZ();
272 eta_z =
m_base[2]->GetZ();
276 for (k = 0, n = 0; k < Qz; ++k)
278 for (j = 0; j < Qy; ++j)
280 for (i = 0; i < Qx; ++i, ++n)
282 if (out_dxi1.num_elements() > 0)
283 out_dxi1[n] = 2.0/(1.0 - eta_z[k]) * dEta_bar1[n];
284 if (out_dxi2.num_elements() > 0)
285 out_dxi2[n] = 2.0/(1.0 - eta_z[k]) * dXi2[n];
286 if (out_dxi3.num_elements() > 0)
287 out_dxi3[n] = (1.0+eta_x[i])/(1.0-eta_z[k])*dEta_bar1[n] +
288 (1.0+eta_y[j])/(1.0-eta_z[k])*dXi2[n] + dEta3[n];
323 ASSERTL1(
false,
"input dir is out of range");
372 if (
m_base[0]->Collocation() &&
373 m_base[1]->Collocation() &&
379 inarray, 1, outarray, 1);
398 inarray,outarray,wsp,
409 bool doCheckCollDir0,
410 bool doCheckCollDir1,
411 bool doCheckCollDir2)
413 const int Qx =
m_base[0]->GetNumPoints();
414 const int Qy =
m_base[1]->GetNumPoints();
415 const int Qz =
m_base[2]->GetNumPoints();
422 map<int, map<int, map<int, pair<int, int> > > >
::iterator it_p;
423 map<int, map<int, pair<int, int> > >
::iterator it_q;
429 for (it_q = it_p->second.begin(); it_q != it_p->second.end(); ++it_q)
437 int i ,j, k, s = 0, cnt = 0, cnt2 = 0;
439 for (k = 0; k < Qz; ++k)
446 for (it_q = it_p->second.begin(); it_q != it_p->second.end(); ++it_q)
449 for (it_r = it_q->second.begin(); it_r != it_q->second.end(); ++it_r)
451 sum += inarray[it_r->second.first] * bz[k + Qz*it_r->second.second];
457 for (j = 0; j < Qy; ++j)
466 for (it_q = it_p->second.begin(); it_q != it_p->second.end(); ++it_q)
468 sum += by[j + Qy*it_q->first] * fpq[cnt++];
473 for (i = 0; i < Qx; ++i, ++s)
479 sum += bx[i + Qx*it_p->first] * fp[cnt2++];
481 sum += inarray[4]*(by1*(bx[i] + bx[i+Qx]) + by0*bx[i+Qx]);
540 if (
m_base[0]->Collocation() &&
541 m_base[1]->Collocation() &&
555 bool multiplybyweights)
559 if(multiplybyweights)
576 inarray,outarray,wsp,
588 bool doCheckCollDir0,
589 bool doCheckCollDir1,
590 bool doCheckCollDir2)
593 int Qx =
m_base[0]->GetNumPoints();
594 int Qy =
m_base[1]->GetNumPoints();
595 int Qz =
m_base[2]->GetNumPoints();
601 map<int, map<int, map<int, pair<int, int> > > >
::iterator it_p;
602 map<int, map<int, pair<int, int> > >
::iterator it_q;
610 const int p = it_p->first;
612 for (k = 0; k < Qz; ++k)
614 for (j = 0; j < Qy; ++j)
617 for (i = 0; i < Qx; ++i, ++s)
619 sum += bx[i + Qx*
p]*inarray[s];
625 for (it_q = it_p->second.begin(); it_q != it_p->second.end(); ++it_q)
627 const int q = it_q->first;
629 for (k = 0; k < Qz; ++k)
632 for (j = 0; j < Qy; ++j)
634 sum += by[j + Qy*q]*f[j+Qy*k];
639 for (it_r = it_q->second.begin(); it_r != it_q->second.end(); ++it_r)
641 const int rpqr = it_r->second.second;
643 for (k = 0; k < Qz; ++k)
645 sum += bz[k + Qz*rpqr]*fb[k];
648 outarray[it_r->second.first] = sum;
655 for (k = 0; k < Qz; ++k)
657 for (j = 0; j < Qy; ++j)
659 for (i = 0; i < Qx; ++i, ++s)
661 outarray[4] += inarray[s] * bz[k+Qz]*(
690 int nquad0 =
m_base[0]->GetNumPoints();
691 int nquad1 =
m_base[1]->GetNumPoints();
692 int nquad2 =
m_base[2]->GetNumPoints();
693 int nqtot = nquad0*nquad1*nquad2;
706 for(i = 0; i < nquad0; ++i)
708 gfac0[i] = 0.5*(1+z0[i]);
712 for(i = 0; i < nquad1; ++i)
714 gfac1[i] = 0.5*(1+z1[i]);
718 for(i = 0; i < nquad2; ++i)
720 gfac2[i] = 2.0/(1-z2[i]);
724 const int nq01 = nquad0*nquad1;
725 for(i = 0; i < nquad2; ++i)
728 &inarray[0] + i*nq01, 1,
729 &tmp0 [0] + i*nq01, 1);
760 for(i = 0; i < nquad1*nquad2; ++i)
764 tmp0 .get() + i*nquad0, 1);
773 for(i = 0; i < nquad2; ++i)
776 &inarray[0] + i*nq01, 1,
777 &tmp0 [0] + i*nq01, 1);
779 for(i = 0; i < nquad1*nquad2; ++i)
782 &tmp0[0] + i*nquad0, 1,
783 &tmp0[0] + i*nquad0, 1);
806 ASSERTL1(
false,
"input dir is out of range");
831 eta[1] = 2.0*(1.0 + xi[1])/(1.0 - xi[2]) - 1.0;
832 eta[0] = 2.0*(1.0 + xi[0])/(1.0 - xi[2]) - 1.0;
848 for (
int k = 0; k < Qz; ++k )
850 for (
int j = 0; j < Qy; ++j)
852 for (
int i = 0; i < Qx; ++i)
854 int s = i + Qx*(j + Qy*k);
857 xi_y[s] = (1.0 + eta_y[j]) * (1.0 - eta_z[k]) / 2.0 - 1.0;
858 xi_x[s] = (1.0 + etaBar_x[i]) * (1.0 - eta_z[k]) / 2.0 - 1.0;
877 int nummodes [3] = {
m_base[0]->GetNumModes(),
879 m_base[2]->GetNumModes()};
885 numModes0 = nummodes[0];
886 numModes1 = nummodes[1];
892 numModes0 = nummodes[0];
893 numModes1 = nummodes[2];
899 numModes0 = nummodes[1];
900 numModes1 = nummodes[2];
905 if ( faceOrient >= 9 )
907 std::swap(numModes0, numModes1);
939 "BasisType is not a boundary interior form");
942 "BasisType is not a boundary interior form");
945 "BasisType is not a boundary interior form");
947 int P =
m_base[0]->GetNumModes();
948 int Q =
m_base[1]->GetNumModes();
949 int R =
m_base[2]->GetNumModes();
957 ASSERTL2(i >= 0 && i <= 7,
"edge id is out of range");
959 if (i == 0 || i == 2)
963 else if (i == 1 || i == 3)
975 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
981 else if (i == 1 || i == 3)
984 return Q+1 + (P*(1 + 2*Q -
P))/2;
989 return Q+1 + (P*(1 + 2*Q -
P))/2;
995 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
997 int P =
m_base[0]->GetNumModes()-1;
998 int Q =
m_base[1]->GetNumModes()-1;
999 int R =
m_base[2]->GetNumModes()-1;
1005 else if (i == 1 || i == 3)
1007 return (P-1) * (2*(R-1) - (P-1) - 1) / 2;
1011 return (Q-1) * (2*(R-1) - (Q-1) - 1) / 2;
1017 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
1021 return m_base[0]->GetNumPoints()*
1022 m_base[1]->GetNumPoints();
1024 else if (i == 1 || i == 3)
1026 return m_base[0]->GetNumPoints()*
1027 m_base[2]->GetNumPoints();
1031 return m_base[1]->GetNumPoints()*
1032 m_base[2]->GetNumPoints();
1038 const int i,
const int k)
const
1040 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
1041 ASSERTL2(k >= 0 && k <= 1,
"basis key id is out of range");
1050 m_base[k]->GetNumModes());
1059 m_base[2*k]->GetNumModes());
1067 m_base[k+1]->GetNumModes());
1076 const std::vector<unsigned int> &nummodes,
1080 nummodes[modes_offset],
1081 nummodes[modes_offset+1],
1082 nummodes[modes_offset+2]);
1090 ASSERTL2(i >= 0 && i <= 7,
"edge id is out of range");
1091 if (i == 0 || i == 2)
1095 else if (i == 1 || i == 3)
1119 "Method only implemented if BasisType is identical"
1120 "in x and y directions");
1123 "Method only implemented for Modified_A BasisType"
1124 "(x and y direction) and Modified_C BasisType (z "
1127 int i, j, k,
p, q, r, nFaceCoeffs;
1128 int nummodesA=0, nummodesB=0;
1130 int order0 =
m_base[0]->GetNumModes();
1131 int order1 =
m_base[1]->GetNumModes();
1132 int order2 =
m_base[2]->GetNumModes();
1152 bool CheckForZeroedModes =
false;
1162 nFaceCoeffs = P*(2*Q-P+1)/2;
1163 CheckForZeroedModes =
true;
1168 CheckForZeroedModes =
true;
1172 if (maparray.num_elements() != nFaceCoeffs)
1177 if (signarray.num_elements() != nFaceCoeffs)
1183 fill(signarray.get(), signarray.get() + nFaceCoeffs, 1);
1192 for (i = 0; i < Q; i++)
1194 for (j = 0; j <
P; j++)
1198 arrayindx[i*P+j] = i*P+j;
1202 arrayindx[i*P+j] = j*Q+i;
1216 maparray[arrayindx[0]] = 0;
1217 maparray[arrayindx[1]] = 1;
1218 maparray[arrayindx[P+1]] = 2;
1219 maparray[arrayindx[
P]] = 3;
1223 for (p = 2; p <
P; ++
p)
1225 maparray[arrayindx[
p]] = p-2 + cnt;
1230 for (q = 2; q < Q; ++q)
1232 maparray[arrayindx[q*P+1]] = q-2 + cnt;
1237 for (p = 2; p <
P; ++
p)
1239 maparray[arrayindx[P+
p]] = p-2 + cnt;
1244 for (q = 2; q < Q; ++q)
1246 maparray[arrayindx[q*
P]] = q-2 + cnt;
1250 cnt += Q-2 + 4*(P-2);
1251 for (q = 2; q < Q; ++q)
1253 for (p = 2; p <
P; ++
p)
1255 maparray[arrayindx[q*P+
p]] = cnt + (q-2)*P+(p-2);
1271 for (p = 2; p <
P; q += Q-
p, ++
p)
1273 maparray[q] = cnt++;
1274 if ((
int)faceOrient == 7)
1276 signarray[q] = p % 2 ? -1 : 1;
1281 cnt = 5 + 2*(order0-2) + 2*(order1-2) + (order2-2);
1282 for (q = 2; q < Q; ++q)
1284 maparray[q] = cnt++;
1285 if ((
int)faceOrient == 7)
1287 signarray[q] = q % 2 ? -1 : 1;
1292 cnt = 5 + 2*(order0-2) + 2*(order1-2);
1293 for (q = 2; q < Q; ++q)
1295 maparray[Q+q-1] = cnt++;
1296 if ((
int)faceOrient == 7)
1298 signarray[Q+q-1] = q % 2 ? -1 : 1;
1303 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1306 for (p = 2; p <
P; ++
p)
1308 for (r = 2; r < Q-
p; ++r)
1310 maparray[cnt2] = cnt++;
1311 if ((
int)faceOrient == 7 && p > 1)
1313 signarray[cnt2++] = p % 2 ? -1 : 1;
1327 cnt = 5 + (order0-2);
1329 for (p = 2; p <
P; q += Q-
p, ++
p)
1331 maparray[q] = cnt++;
1332 if ((
int)faceOrient == 7)
1334 signarray[q] = p % 2 ? -1 : 1;
1339 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 2*(order2-2);
1340 for (q = 2; q < Q; ++q)
1342 maparray[q] = cnt++;
1343 if ((
int)faceOrient == 7)
1345 signarray[q] = q % 2 ? -1 : 1;
1350 cnt = 5 + 2*(order0-2) + 2*(order1-2) + (order2-2);
1351 for (q = 2; q < Q; ++q)
1353 maparray[Q+q-1] = cnt++;
1354 if ((
int)faceOrient == 7)
1356 signarray[Q+q-1] = q % 2 ? -1 : 1;
1361 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1364 for (p = 2; p <
P; ++
p)
1366 for (r = 2; r < Q-
p; ++r)
1368 maparray[cnt2] = cnt++;
1369 if ((
int)faceOrient == 7 && p > 1)
1371 signarray[cnt2++] = p % 2 ? -1 : 1;
1385 cnt = 5 + (order0-2) + (order1-2);
1387 for (p = 2; p <
P; q += Q-
p, ++
p)
1389 maparray[q] = cnt++;
1390 if ((
int)faceOrient == 7)
1392 signarray[q] = p % 2 ? -1 : 1;
1397 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 2*(order2-2);
1398 for (q = 2; q < Q; ++q)
1400 maparray[q] = cnt++;
1401 if ((
int)faceOrient == 7)
1403 signarray[q] = q % 2 ? -1 : 1;
1408 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 3*(order2-2);
1409 for (q = 2; q < Q; ++q)
1411 maparray[Q+q-1] = cnt++;
1412 if ((
int)faceOrient == 7)
1414 signarray[Q+q-1] = q % 2 ? -1 : 1;
1419 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1423 for (p = 2; p <
P; ++
p)
1425 for (r = 2; r < Q-
p; ++r)
1427 maparray[cnt2] = cnt++;
1428 if ((
int)faceOrient == 7 && p > 1)
1430 signarray[cnt2++] = p % 2 ? -1 : 1;
1444 cnt = 5 + 2*(order0-2) + (order1-2);
1446 for (p = 2; p <
P; q += Q-
p, ++
p)
1448 maparray[q] = cnt++;
1449 if ((
int)faceOrient == 7)
1451 signarray[q] = p % 2 ? -1 : 1;
1456 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 3*(order2-2);
1457 for (q = 2; q < Q; ++q)
1459 maparray[q] = cnt++;
1460 if ((
int)faceOrient == 7)
1462 signarray[q] = q % 2 ? -1 : 1;
1467 cnt = 5 + 2*(order0-2) + 2*(order1-2);
1468 for (q = 2; q < Q; ++q)
1470 maparray[Q+q-1] = cnt++;
1471 if ((
int)faceOrient == 7)
1473 signarray[Q+q-1] = q % 2 ? -1 : 1;
1478 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1482 for (p = 2; p <
P; ++
p)
1484 for (r = 2; r < Q-
p; ++r)
1486 maparray[cnt2] = cnt++;
1487 if ((
int)faceOrient == 7 && p > 1)
1489 signarray[cnt2++] = p % 2 ? -1 : 1;
1497 ASSERTL0(
false,
"Face to element map unavailable.");
1503 if(CheckForZeroedModes)
1508 for (j = 0; j <
P; ++j)
1511 for (k = Q-j; k < Q-j; ++k)
1513 signarray[idx] = 0.0;
1514 maparray[idx++] = maparray[0];
1518 for (j = P; j <
P; ++j)
1520 for (k = 0; k < Q-j; ++k)
1522 signarray[idx] = 0.0;
1523 maparray[idx++] = maparray[0];
1530 if ((
int)faceOrient == 7)
1532 swap(maparray[0], maparray[P]);
1533 for (i = 1; i < P-1; ++i)
1535 swap(maparray[i+1], maparray[P+i]);
1541 if(CheckForZeroedModes)
1545 for (j = 0; j <
P; ++j)
1547 for (k = Q; k < Q; ++k)
1549 signarray[arrayindx[j+k*
P]] = 0.0;
1550 maparray[arrayindx[j+k*
P]] = maparray[0];
1554 for (j = P; j <
P; ++j)
1556 for (k = 0; k < Q; ++k)
1558 signarray[arrayindx[j+k*
P]] = 0.0;
1559 maparray[arrayindx[j+k*
P]] = maparray[0];
1568 if (faceOrient == 6 || faceOrient == 8 ||
1569 faceOrient == 11 || faceOrient == 12)
1573 for (i = 3; i < Q; i += 2)
1575 for (j = 0; j <
P; j++)
1577 signarray[arrayindx[i*P+j]] *= -1;
1581 for (i = 0; i <
P; i++)
1583 swap(maparray [i], maparray [i+P]);
1584 swap(signarray[i], signarray[i+P]);
1589 for (i = 0; i < Q; i++)
1591 for (j = 3; j <
P; j += 2)
1593 signarray[arrayindx[i*P+j]] *= -1;
1597 for (i = 0; i < Q; i++)
1599 swap (maparray [i], maparray [i+Q]);
1600 swap (signarray[i], signarray[i+Q]);
1605 if (faceOrient == 7 || faceOrient == 8 ||
1606 faceOrient == 10 || faceOrient == 12)
1610 for (i = 0; i < Q; i++)
1612 for (j = 3; j <
P; j += 2)
1614 signarray[arrayindx[i*P+j]] *= -1;
1618 for(i = 0; i < Q; i++)
1620 swap(maparray [i*P], maparray [i*P+1]);
1621 swap(signarray[i*P], signarray[i*P+1]);
1626 for (i = 3; i < Q; i += 2)
1628 for (j = 0; j <
P; j++)
1630 signarray[arrayindx[i*P+j]] *= -1;
1634 for (i = 0; i <
P; i++)
1636 swap(maparray [i*Q], maparray [i*Q+1]);
1637 swap(signarray[i*Q], signarray[i*Q+1]);
1649 "Mapping not defined for this type of basis");
1661 const int P =
m_base[0]->GetNumModes() - 2;
1662 const int Q =
m_base[1]->GetNumModes() - 2;
1663 const int R =
m_base[2]->GetNumModes() - 2;
1666 if (maparray.num_elements() != nEdgeIntCoeffs)
1671 if(signarray.num_elements() != nEdgeIntCoeffs)
1677 fill(signarray.get(), signarray.get()+nEdgeIntCoeffs, 1);
1703 offset += 2*(P+Q)+R;
1706 offset += 2*(P+Q+R);
1709 offset += 2*(P+Q)+3*R;
1712 ASSERTL0(
false,
"Edge not defined.");
1716 for (i = 0; i < nEdgeIntCoeffs; ++i)
1718 maparray[i] = offset + i;
1723 for (i = 1; i < nEdgeIntCoeffs; i += 2)
1736 const int P =
m_base[0]->GetNumModes() - 1;
1737 const int Q =
m_base[1]->GetNumModes() - 1;
1738 const int R =
m_base[2]->GetNumModes() - 1;
1740 int p, q, r, idx = 0;
1745 if (maparray.num_elements() != nFaceIntCoeffs)
1750 if (signarray.num_elements() != nFaceIntCoeffs)
1756 fill(signarray.get(), signarray.get()+nFaceIntCoeffs, 1);
1767 for (i = 0; i < nummodesB; i++)
1769 for (j = 0; j < nummodesA; j++)
1773 arrayindx[i*nummodesA+j] = i*nummodesA+j;
1777 arrayindx[i*nummodesA+j] = j*nummodesB+i;
1783 int offset = 5 + 2*(P-1) + 2*(Q-1) + 4*(R-1);
1785 for (i = 0; i < fid; ++i)
1793 for (q = 2; q <= Q; ++q)
1795 for (p = 2; p <=
P; ++
p)
1797 maparray[arrayindx[(q-2)*nummodesA+(p-2)]]
1798 = offset + (q-2)*nummodesA+(p-2);
1805 for (p = 2; p <=
P; ++
p)
1807 for (r = 1; r <= R-
p; ++r, ++idx)
1809 if ((
int)faceOrient == 7)
1811 signarray[idx] = p % 2 ? -1 : 1;
1813 maparray[idx] = offset + idx;
1820 for (q = 2; q <= Q; ++q)
1822 for (r = 1; r <= R-q; ++r, ++idx)
1824 if ((
int)faceOrient == 7)
1826 signarray[idx] = q % 2 ? -1 : 1;
1828 maparray[idx] = offset + idx;
1834 ASSERTL0(
false,
"Face interior map not available.");
1844 if (faceOrient == 6 || faceOrient == 8 ||
1845 faceOrient == 11 || faceOrient == 12)
1849 for (i = 1; i < nummodesB; i += 2)
1851 for (j = 0; j < nummodesA; j++)
1853 signarray[arrayindx[i*nummodesA+j]] *= -1;
1859 for (i = 0; i < nummodesB; i++)
1861 for (j = 1; j < nummodesA; j += 2)
1863 signarray[arrayindx[i*nummodesA+j]] *= -1;
1869 if (faceOrient == 7 || faceOrient == 8 ||
1870 faceOrient == 10 || faceOrient == 12)
1874 for (i = 0; i < nummodesB; i++)
1876 for (j = 1; j < nummodesA; j += 2)
1878 signarray[arrayindx[i*nummodesA+j]] *= -1;
1884 for (i = 1; i < nummodesB; i += 2)
1886 for (j = 0; j < nummodesA; j++)
1888 signarray[arrayindx[i*nummodesA+j]] *= -1;
1899 "BasisType is not a boundary interior form");
1902 "BasisType is not a boundary interior form");
1905 "BasisType is not a boundary interior form");
1910 if (outarray.num_elements() != nIntCoeffs)
1919 outarray[idx++] =
p;
1927 "BasisType is not a boundary interior form");
1930 "BasisType is not a boundary interior form");
1933 "BasisType is not a boundary interior form");
1937 for (idx = 0; idx < nBndry; ++idx)
1939 maparray[idx] = idx;
1964 const int R =
m_base[2]->GetNumModes();
1966 for (i = 0; i < I; ++i)
1968 cnt += (R-i)*(R-i+1)/2;
1972 for (j = 0; j < J; ++j)
1987 int nquad0 =
m_base[0]->GetNumPoints();
1988 int nquad1 =
m_base[1]->GetNumPoints();
1989 int nquad2 =
m_base[2]->GetNumPoints();
1998 for(i = 0; i < nquad1*nquad2; ++i)
2001 w0.get(), 1, outarray.get()+i*nquad0,1);
2005 for(j = 0; j < nquad2; ++j)
2007 for(i = 0; i < nquad1; ++i)
2009 Blas::Dscal(nquad0,w1[i], &outarray[0]+i*nquad0 +
2021 for(i = 0; i < nquad2; ++i)
2023 Blas::Dscal(nquad0*nquad1, 0.25*w2[i],
2024 &outarray[0]+i*nquad0*nquad1, 1);
2029 for(i = 0; i < nquad2; ++i)
2031 Blas::Dscal(nquad0*nquad1,0.125*(1-z2[i])*(1-z2[i])*w2[i],
2032 &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
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)
virtual void v_GetFaceNumModes(const int fid, const Orientation faceOrient, int &numModes0, int &numModes1)
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)
std::map< Mode, unsigned int, cmpop > m_map
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.
std::map< int, std::map< int, std::map< int, std::pair< int, int > > > > m_idxMap
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.