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, k, p, q, r, nFaceCoeffs;
1087 int nummodesA, nummodesB;
1089 int order0 =
m_base[0]->GetNumModes();
1090 int order1 =
m_base[1]->GetNumModes();
1091 int order2 =
m_base[2]->GetNumModes();
1111 bool CheckForZeroedModes =
false;
1121 nFaceCoeffs = P*(2*Q-P+1)/2;
1122 CheckForZeroedModes =
true;
1127 CheckForZeroedModes =
true;
1131 if (maparray.num_elements() != nFaceCoeffs)
1136 if (signarray.num_elements() != nFaceCoeffs)
1142 fill(signarray.get(), signarray.get() + nFaceCoeffs, 1);
1151 for (i = 0; i < Q; i++)
1153 for (j = 0; j < P; j++)
1157 arrayindx[i*P+j] = i*P+j;
1161 arrayindx[i*P+j] = j*Q+i;
1175 maparray[arrayindx[0]] = 0;
1176 maparray[arrayindx[1]] = 1;
1177 maparray[arrayindx[P+1]] = 2;
1178 maparray[arrayindx[P]] = 3;
1182 for (p = 2; p < P; ++p)
1184 maparray[arrayindx[p]] = p-2 + cnt;
1189 for (q = 2; q < Q; ++q)
1191 maparray[arrayindx[q*P+1]] = q-2 + cnt;
1196 for (p = 2; p < P; ++p)
1198 maparray[arrayindx[P+p]] = p-2 + cnt;
1203 for (q = 2; q < Q; ++q)
1205 maparray[arrayindx[q*P]] = q-2 + cnt;
1209 cnt += Q-2 + 4*(P-2);
1210 for (q = 2; q < Q; ++q)
1212 for (p = 2; p < P; ++p)
1214 maparray[arrayindx[q*P+p]] = cnt + (q-2)*P+(p-2);
1230 for (p = 2; p < P; q += Q-p, ++p)
1232 maparray[q] = cnt++;
1233 if ((
int)faceOrient == 7)
1235 signarray[q] = p % 2 ? -1 : 1;
1240 cnt = 5 + 2*(order0-2) + 2*(order1-2) + (order2-2);
1241 for (q = 2; q < Q; ++q)
1243 maparray[q] = cnt++;
1244 if ((
int)faceOrient == 7)
1246 signarray[q] = q % 2 ? -1 : 1;
1251 cnt = 5 + 2*(order0-2) + 2*(order1-2);
1252 for (q = 2; q < Q; ++q)
1254 maparray[Q+q-1] = cnt++;
1255 if ((
int)faceOrient == 7)
1257 signarray[Q+q-1] = q % 2 ? -1 : 1;
1262 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1265 for (p = 2; p < P; ++p)
1267 for (r = 2; r < Q-p; ++r)
1269 maparray[cnt2] = cnt++;
1270 if ((
int)faceOrient == 7 && p > 1)
1272 signarray[cnt2++] = p % 2 ? -1 : 1;
1286 cnt = 5 + (order0-2);
1288 for (p = 2; p < P; q += Q-p, ++p)
1290 maparray[q] = cnt++;
1291 if ((
int)faceOrient == 7)
1293 signarray[q] = p % 2 ? -1 : 1;
1298 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 2*(order2-2);
1299 for (q = 2; q < Q; ++q)
1301 maparray[q] = cnt++;
1302 if ((
int)faceOrient == 7)
1304 signarray[q] = q % 2 ? -1 : 1;
1309 cnt = 5 + 2*(order0-2) + 2*(order1-2) + (order2-2);
1310 for (q = 2; q < Q; ++q)
1312 maparray[Q+q-1] = cnt++;
1313 if ((
int)faceOrient == 7)
1315 signarray[Q+q-1] = q % 2 ? -1 : 1;
1320 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1323 for (p = 2; p < P; ++p)
1325 for (r = 2; r < Q-p; ++r)
1327 maparray[cnt2] = cnt++;
1328 if ((
int)faceOrient == 7 && p > 1)
1330 signarray[cnt2++] = p % 2 ? -1 : 1;
1344 cnt = 5 + (order0-2) + (order1-2);
1346 for (p = 2; p < P; q += Q-p, ++p)
1348 maparray[q] = cnt++;
1349 if ((
int)faceOrient == 7)
1351 signarray[q] = p % 2 ? -1 : 1;
1356 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 2*(order2-2);
1357 for (q = 2; q < Q; ++q)
1359 maparray[q] = cnt++;
1360 if ((
int)faceOrient == 7)
1362 signarray[q] = q % 2 ? -1 : 1;
1367 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 3*(order2-2);
1368 for (q = 2; q < Q; ++q)
1370 maparray[Q+q-1] = cnt++;
1371 if ((
int)faceOrient == 7)
1373 signarray[Q+q-1] = q % 2 ? -1 : 1;
1378 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1382 for (p = 2; p < P; ++p)
1384 for (r = 2; r < Q-p; ++r)
1386 maparray[cnt2] = cnt++;
1387 if ((
int)faceOrient == 7 && p > 1)
1389 signarray[cnt2++] = p % 2 ? -1 : 1;
1403 cnt = 5 + 2*(order0-2) + (order1-2);
1405 for (p = 2; p < P; q += Q-p, ++p)
1407 maparray[q] = cnt++;
1408 if ((
int)faceOrient == 7)
1410 signarray[q] = p % 2 ? -1 : 1;
1415 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 3*(order2-2);
1416 for (q = 2; q < Q; ++q)
1418 maparray[q] = cnt++;
1419 if ((
int)faceOrient == 7)
1421 signarray[q] = q % 2 ? -1 : 1;
1426 cnt = 5 + 2*(order0-2) + 2*(order1-2);
1427 for (q = 2; q < Q; ++q)
1429 maparray[Q+q-1] = cnt++;
1430 if ((
int)faceOrient == 7)
1432 signarray[Q+q-1] = q % 2 ? -1 : 1;
1437 cnt = 5 + 2*(order0-2) + 2*(order1-2) + 4*(order2-2)
1441 for (p = 2; p < P; ++p)
1443 for (r = 2; r < Q-p; ++r)
1445 maparray[cnt2] = cnt++;
1446 if ((
int)faceOrient == 7 && p > 1)
1448 signarray[cnt2++] = p % 2 ? -1 : 1;
1456 ASSERTL0(
false,
"Face to element map unavailable.");
1462 if(CheckForZeroedModes)
1467 for (j = 0; j < P; ++j)
1470 for (k = Q-j; k < Q-j; ++k)
1472 signarray[idx] = 0.0;
1473 maparray[idx++] = maparray[0];
1477 for (j = P; j < P; ++j)
1479 for (k = 0; k < Q-j; ++k)
1481 signarray[idx] = 0.0;
1482 maparray[idx++] = maparray[0];
1489 if ((
int)faceOrient == 7)
1491 swap(maparray[0], maparray[P]);
1492 for (i = 1; i < P-1; ++i)
1494 swap(maparray[i+1], maparray[P+i]);
1500 if(CheckForZeroedModes)
1504 for (j = 0; j < P; ++j)
1506 for (k = Q; k < Q; ++k)
1508 signarray[arrayindx[j+k*P]] = 0.0;
1509 maparray[arrayindx[j+k*P]] = maparray[0];
1513 for (j = P; j < P; ++j)
1515 for (k = 0; k < Q; ++k)
1517 signarray[arrayindx[j+k*P]] = 0.0;
1518 maparray[arrayindx[j+k*P]] = maparray[0];
1527 if (faceOrient == 6 || faceOrient == 8 ||
1528 faceOrient == 11 || faceOrient == 12)
1532 for (i = 3; i < Q; i += 2)
1534 for (j = 0; j < P; j++)
1536 signarray[arrayindx[i*P+j]] *= -1;
1540 for (i = 0; i < P; i++)
1542 swap(maparray [i], maparray [i+P]);
1543 swap(signarray[i], signarray[i+P]);
1548 for (i = 0; i < Q; i++)
1550 for (j = 3; j < P; j += 2)
1552 signarray[arrayindx[i*P+j]] *= -1;
1556 for (i = 0; i < Q; i++)
1558 swap (maparray [i], maparray [i+Q]);
1559 swap (signarray[i], signarray[i+Q]);
1564 if (faceOrient == 7 || faceOrient == 8 ||
1565 faceOrient == 10 || faceOrient == 12)
1569 for (i = 0; i < Q; i++)
1571 for (j = 3; j < P; j += 2)
1573 signarray[arrayindx[i*P+j]] *= -1;
1577 for(i = 0; i < Q; i++)
1579 swap(maparray [i*P], maparray [i*P+1]);
1580 swap(signarray[i*P], signarray[i*P+1]);
1585 for (i = 3; i < Q; i += 2)
1587 for (j = 0; j < P; j++)
1589 signarray[arrayindx[i*P+j]] *= -1;
1593 for (i = 0; i < P; i++)
1595 swap(maparray [i*Q], maparray [i*Q+1]);
1596 swap(signarray[i*Q], signarray[i*Q+1]);
1608 "Mapping not defined for this type of basis");
1620 const int P =
m_base[0]->GetNumModes() - 2;
1621 const int Q =
m_base[1]->GetNumModes() - 2;
1622 const int R =
m_base[2]->GetNumModes() - 2;
1625 if (maparray.num_elements() != nEdgeIntCoeffs)
1630 if(signarray.num_elements() != nEdgeIntCoeffs)
1636 fill(signarray.get(), signarray.get()+nEdgeIntCoeffs, 1);
1662 offset += 2*(P+Q)+R;
1665 offset += 2*(P+Q+R);
1668 offset += 2*(P+Q)+3*R;
1671 ASSERTL0(
false,
"Edge not defined.");
1675 for (i = 0; i < nEdgeIntCoeffs; ++i)
1677 maparray[i] = offset + i;
1682 for (i = 1; i < nEdgeIntCoeffs; i += 2)
1695 const int P =
m_base[0]->GetNumModes() - 1;
1696 const int Q =
m_base[1]->GetNumModes() - 1;
1697 const int R =
m_base[2]->GetNumModes() - 1;
1699 int p, q, r, idx = 0;
1704 if (maparray.num_elements() != nFaceIntCoeffs)
1709 if (signarray.num_elements() != nFaceIntCoeffs)
1715 fill(signarray.get(), signarray.get()+nFaceIntCoeffs, 1);
1726 for (i = 0; i < nummodesB; i++)
1728 for (j = 0; j < nummodesA; j++)
1732 arrayindx[i*nummodesA+j] = i*nummodesA+j;
1736 arrayindx[i*nummodesA+j] = j*nummodesB+i;
1742 int offset = 5 + 2*(P-1) + 2*(Q-1) + 4*(R-1);
1744 for (i = 0; i < fid; ++i)
1752 for (q = 2; q <= Q; ++q)
1754 for (p = 2; p <= P; ++p)
1756 maparray[arrayindx[(q-2)*nummodesA+(p-2)]]
1757 = offset + (q-2)*nummodesA+(p-2);
1764 for (p = 2; p <= P; ++p)
1766 for (r = 1; r <= R-p; ++r, ++idx)
1768 if ((
int)faceOrient == 7)
1770 signarray[idx] = p % 2 ? -1 : 1;
1772 maparray[idx] = offset + idx;
1779 for (q = 2; q <= Q; ++q)
1781 for (r = 1; r <= R-q; ++r, ++idx)
1783 if ((
int)faceOrient == 7)
1785 signarray[idx] = q % 2 ? -1 : 1;
1787 maparray[idx] = offset + idx;
1793 ASSERTL0(
false,
"Face interior map not available.");
1803 if (faceOrient == 6 || faceOrient == 8 ||
1804 faceOrient == 11 || faceOrient == 12)
1808 for (i = 1; i < nummodesB; i += 2)
1810 for (j = 0; j < nummodesA; j++)
1812 signarray[arrayindx[i*nummodesA+j]] *= -1;
1818 for (i = 0; i < nummodesB; i++)
1820 for (j = 1; j < nummodesA; j += 2)
1822 signarray[arrayindx[i*nummodesA+j]] *= -1;
1828 if (faceOrient == 7 || faceOrient == 8 ||
1829 faceOrient == 10 || faceOrient == 12)
1833 for (i = 0; i < nummodesB; i++)
1835 for (j = 1; j < nummodesA; j += 2)
1837 signarray[arrayindx[i*nummodesA+j]] *= -1;
1843 for (i = 1; i < nummodesB; i += 2)
1845 for (j = 0; j < nummodesA; j++)
1847 signarray[arrayindx[i*nummodesA+j]] *= -1;
1858 "BasisType is not a boundary interior form");
1861 "BasisType is not a boundary interior form");
1864 "BasisType is not a boundary interior form");
1869 if (outarray.num_elements() != nIntCoeffs)
1876 for (p = nBndCoeffs; p <
m_ncoeffs; ++p)
1878 outarray[idx++] = p;
1886 "BasisType is not a boundary interior form");
1889 "BasisType is not a boundary interior form");
1892 "BasisType is not a boundary interior form");
1896 for (idx = 0; idx < nBndry; ++idx)
1898 maparray[idx] = idx;
1923 const int R =
m_base[2]->GetNumModes();
1925 for (i = 0; i < I; ++i)
1927 cnt += (R-i)*(R-i+1)/2;
1931 for (j = 0; j < J; ++j)
1946 int nquad0 =
m_base[0]->GetNumPoints();
1947 int nquad1 =
m_base[1]->GetNumPoints();
1948 int nquad2 =
m_base[2]->GetNumPoints();
1957 for(i = 0; i < nquad1*nquad2; ++i)
1960 w0.get(), 1, outarray.get()+i*nquad0,1);
1964 for(j = 0; j < nquad2; ++j)
1966 for(i = 0; i < nquad1; ++i)
1968 Blas::Dscal(nquad0,w1[i], &outarray[0]+i*nquad0 +
1980 for(i = 0; i < nquad2; ++i)
1982 Blas::Dscal(nquad0*nquad1, 0.25*w2[i],
1983 &outarray[0]+i*nquad0*nquad1, 1);
1988 for(i = 0; i < nquad2; ++i)
1990 Blas::Dscal(nquad0*nquad1,0.125*(1-z2[i])*(1-z2[i])*w2[i],
1991 &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.