63 "order in 'a' direction is higher than order in 'c' direction");
101 int Qx =
m_base[0]->GetNumPoints();
102 int Qy =
m_base[1]->GetNumPoints();
103 int Qz =
m_base[2]->GetNumPoints();
109 eta_x =
m_base[0]->GetZ();
110 eta_z =
m_base[2]->GetZ();
114 bool Do_1 = (out_dxi1.num_elements() > 0)?
true:
false;
115 bool Do_3 = (out_dxi3.num_elements() > 0)?
true:
false;
134 for (k = 0; k < Qz; ++k)
136 Vmath::Smul(Qx*Qy,2.0/(1.0-eta_z[k]),&dEta_bar1[0] + k*Qx*Qy,1,
137 &out_dxi1[0] + k*Qx*Qy,1);
144 for (k = 0; k < Qz; ++k)
146 Vmath::Smul(Qx*Qy, 1.0/(1.0-eta_z[k]),&dEta_bar1[0]+k*Qx*Qy,1,
147 &dEta_bar1[0]+k*Qx*Qy,1);
151 for (i = 0; i < Qx; ++i)
154 &out_dxi3[0]+i,Qx,&out_dxi3[0]+i,Qx);
189 ASSERTL1(
false,
"input dir is out of range");
245 "Basis[1] is not a general tensor type");
249 "Basis[2] is not a general tensor type");
251 if(
m_base[0]->Collocation() &&
252 m_base[1]->Collocation() &&
258 inarray, 1, outarray, 1);
269 int nquad1 =
m_base[1]->GetNumPoints();
270 int nquad2 =
m_base[2]->GetNumPoints();
271 int order0 =
m_base[0]->GetNumModes();
272 int order1 =
m_base[1]->GetNumModes();
275 nquad1*nquad2*order0);
280 inarray,outarray,wsp,
true,
true,
true);
291 bool doCheckCollDir0,
292 bool doCheckCollDir1,
293 bool doCheckCollDir2)
296 int nquad0 =
m_base[0]->GetNumPoints();
297 int nquad1 =
m_base[1]->GetNumPoints();
298 int nquad2 =
m_base[2]->GetNumPoints();
299 int nummodes0 =
m_base[0]->GetNumModes();
300 int nummodes1 =
m_base[1]->GetNumModes();
301 int nummodes2 =
m_base[2]->GetNumModes();
305 for (i = mode = 0; i < nummodes0; ++i)
307 Blas::Dgemm(
'N',
'N', nquad2, nummodes1, nummodes2-i,
308 1.0, base2.get() + mode*nquad2, nquad2,
309 inarray.get() + mode*nummodes1, nummodes2-i,
310 0.0, tmp0.get() + i*nquad2*nummodes1, nquad2);
316 for(i = 0; i < nummodes1; i++)
318 Blas::Daxpy(nquad2,inarray[1+i*nummodes2],base2.get()+nquad2,1,
319 tmp0.get()+nquad2*(nummodes1+i),1);
323 for (i = 0; i < nummodes0; i++)
325 Blas::Dgemm(
'N',
'T', nquad1, nquad2, nummodes1,
326 1.0, base1.get(), nquad1,
327 tmp0.get() + i*nquad2*nummodes1, nquad2,
328 0.0, tmp1.get() + i*nquad2*nquad1, nquad1);
331 Blas::Dgemm(
'N',
'T', nquad0, nquad2*nquad1, nummodes0,
332 1.0, base0.get(), nquad0,
333 tmp1.get(), nquad2*nquad1,
334 0.0, outarray.get(), nquad0);
401 "Basis[1] is not a general tensor type");
405 "Basis[2] is not a general tensor type");
407 if(
m_base[0]->Collocation() &&
m_base[1]->Collocation())
428 Blas::Dgemv(
'N',
m_ncoeffs,nq,1.0,iprodmat->GetPtr().get(),
429 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
435 bool multiplybyweights)
437 int nquad1 =
m_base[1]->GetNumPoints();
438 int nquad2 =
m_base[2]->GetNumPoints();
439 int order0 =
m_base[0]->GetNumModes();
440 int order1 =
m_base[1]->GetNumModes();
444 if(multiplybyweights)
460 inarray,outarray,wsp,
472 bool doCheckCollDir0,
473 bool doCheckCollDir1,
474 bool doCheckCollDir2)
478 const int nquad0 =
m_base[0]->GetNumPoints();
479 const int nquad1 =
m_base[1]->GetNumPoints();
480 const int nquad2 =
m_base[2]->GetNumPoints();
481 const int order0 =
m_base[0]->GetNumModes ();
482 const int order1 =
m_base[1]->GetNumModes ();
483 const int order2 =
m_base[2]->GetNumModes ();
487 ASSERTL1(wsp.num_elements() >= nquad1*nquad2*order0 +
488 nquad2*order0*order1,
489 "Insufficient workspace size");
495 Blas::Dgemm(
'T',
'N', nquad1*nquad2, order0, nquad0,
496 1.0, inarray.get(), nquad0,
498 0.0, tmp0.get(), nquad1*nquad2);
501 Blas::Dgemm(
'T',
'N', nquad2*order0, order1, nquad1,
502 1.0, tmp0.get(), nquad1,
504 0.0, tmp1.get(), nquad2*order0);
507 for (mode=i=0; i < order0; ++i)
509 Blas::Dgemm(
'T',
'N', order2-i, order1, nquad2,
510 1.0, base2.get() + mode*nquad2, nquad2,
511 tmp1.get() + i*nquad2, nquad2*order0,
512 0.0, outarray.get()+mode*order1, order2-i);
520 for (i = 0; i < order1; ++i)
524 nquad2, base2.get()+nquad2, 1,
525 tmp1.get()+i*order0*nquad2+nquad2, 1);
547 ASSERTL0(dir >= 0 && dir <= 2,
"input dir is out of range");
568 Blas::Dgemv(
'N',
m_ncoeffs,nq,1.0,iprodmat->GetPtr().get(),
569 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
577 ASSERTL0(dir >= 0 && dir <= 2,
"input dir is out of range");
580 int order0 =
m_base[0]->GetNumModes ();
581 int order1 =
m_base[1]->GetNumModes ();
582 int nquad0 =
m_base[0]->GetNumPoints();
583 int nquad1 =
m_base[1]->GetNumPoints();
584 int nquad2 =
m_base[2]->GetNumPoints();
594 for (i = 0; i < nquad0; ++i)
596 gfac0[i] = 0.5*(1+z0[i]);
600 for (i = 0; i < nquad2; ++i)
602 gfac2[i] = 2.0/(1-z2[i]);
608 for (i = 0; i < nquad2; ++i)
611 &inarray[0]+i*nquad0*nquad1,1,
612 &tmp0 [0]+i*nquad0*nquad1,1);
645 for(i = 0; i < nquad1*nquad2; ++i)
647 Vmath::Vmul(nquad0,&gfac0[0],1,&tmp0[0]+i*nquad0,1,&tmp0[0]+i*nquad0,1);
694 eta[0] = 2.0*(1.0 + xi[0])/(1.0 - xi[2]) - 1.0;
710 for (
int k = 0; k < Qz; ++k) {
711 for (
int j = 0; j < Qy; ++j) {
712 for (
int i = 0; i < Qx; ++i) {
713 int s = i + Qx*(j + Qy*k);
714 xi_x[s] = (1.0 - eta_z[k])*(1.0 + etaBar_x[i]) / 2.0 - 1.0;
762 "BasisType is not a boundary interior form");
765 "BasisType is not a boundary interior form");
768 "BasisType is not a boundary interior form");
770 int P =
m_base[0]->GetNumModes();
771 int Q =
m_base[1]->GetNumModes();
772 int R =
m_base[2]->GetNumModes();
782 "BasisType is not a boundary interior form");
785 "BasisType is not a boundary interior form");
788 "BasisType is not a boundary interior form");
790 int P =
m_base[0]->GetNumModes()-1;
791 int Q =
m_base[1]->GetNumModes()-1;
792 int R =
m_base[2]->GetNumModes()-1;
796 + 2*(R+1) + P*(1 + 2*R - P);
801 ASSERTL2(i >= 0 && i <= 8,
"edge id is out of range");
803 if (i == 0 || i == 2)
807 else if (i == 1 || i == 3 || i == 8)
828 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
833 else if (i == 1 || i == 3)
836 return Q+1 + (P*(1 + 2*Q - P))/2;
846 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
856 else if (i == 1 || i == 3)
858 return Pi * (2*Ri - Pi - 1) / 2;
873 Pi * (2*Ri - Pi - 1) +
879 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
883 return m_base[0]->GetNumPoints()*
884 m_base[1]->GetNumPoints();
886 else if (i == 1 || i == 3)
888 return m_base[0]->GetNumPoints()*
889 m_base[2]->GetNumPoints();
893 return m_base[1]->GetNumPoints()*
894 m_base[2]->GetNumPoints();
899 const int i,
const int j)
const
901 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
902 ASSERTL2(j == 0 || j == 1,
"face direction is out of range");
906 return m_base[j]->GetPointsKey();
908 else if (i == 1 || i == 3)
910 return m_base[2*j]->GetPointsKey();
914 return m_base[j+1]->GetPointsKey();
919 const int i,
const int k)
const
921 ASSERTL2(i >= 0 && i <= 4,
"face id is out of range");
922 ASSERTL2(k >= 0 && k <= 1,
"basis key id is out of range");
931 m_base[k]->GetNumModes());
939 m_base[k+1]->GetNumModes());
947 m_base[2*k]->GetNumModes());
961 nummodes[modes_offset],
962 nummodes[modes_offset+1],
963 nummodes[modes_offset+2]);
971 ASSERTL2(i >= 0 && i <= 8,
"edge id is out of range");
972 if (i == 0 || i == 2)
976 else if (i == 1 || i == 3 || i == 8)
1007 "Method only implemented if BasisType is identical"
1008 "in x and y directions");
1011 "Method only implemented for Modified_A BasisType"
1012 "(x and y direction) and Modified_B BasisType (z "
1015 int i, j, p, q, r, nFaceCoeffs, idx = 0;
1017 if (nummodesA == -1)
1022 nummodesA =
m_base[0]->GetNumModes();
1023 nummodesB =
m_base[1]->GetNumModes();
1027 nummodesA =
m_base[0]->GetNumModes();
1028 nummodesB =
m_base[2]->GetNumModes();
1032 nummodesA =
m_base[1]->GetNumModes();
1033 nummodesB =
m_base[2]->GetNumModes();
1038 else if (fid == 1 || fid == 3)
1040 nFaceCoeffs = nummodesB + (nummodesA-1)*(1+2*(nummodesB-1)-(nummodesA-1))/2;
1044 nFaceCoeffs = nummodesA*nummodesB;
1048 if (maparray.num_elements() != nFaceCoeffs)
1053 if (signarray.num_elements() != nFaceCoeffs)
1059 fill(signarray.get(), signarray.get() + nFaceCoeffs, 1);
1066 if (fid != 1 && fid != 3)
1068 for (i = 0; i < nummodesB; i++)
1070 for (j = 0; j < nummodesA; j++)
1074 arrayindx[i*nummodesA+j] = i*nummodesA+j;
1078 arrayindx[i*nummodesA+j] = j*nummodesB+i;
1089 for (q = 0; q < nummodesB; ++q)
1091 for (p = 0; p < nummodesA; ++p)
1093 maparray[arrayindx[q*nummodesA+p]] =
GetMode(p,q,0);
1099 for (p = 0; p < nummodesA; ++p)
1101 for (r = 0; r < nummodesB-p; ++r)
1103 if ((
int)faceOrient == 7 && p > 1)
1105 signarray[idx] = p % 2 ? -1 : 1;
1107 maparray[idx++] =
GetMode(p,0,r);
1113 for (q = 0; q < nummodesA; ++q)
1115 maparray[arrayindx[q]] =
GetMode(1,q,0);
1117 for (q = 0; q < nummodesA; ++q)
1119 maparray[arrayindx[nummodesA+q]] =
GetMode(0,q,1);
1121 for (r = 1; r < nummodesB-1; ++r)
1123 for (q = 0; q < nummodesA; ++q)
1125 maparray[arrayindx[(r+1)*nummodesA+q]] =
GetMode(1,q,r);
1131 for (p = 0; p < nummodesA; ++p)
1133 for (r = 0; r < nummodesB-p; ++r)
1135 if ((
int)faceOrient == 7 && p > 1)
1137 signarray[idx] = p % 2 ? -1 : 1;
1139 maparray[idx++] =
GetMode(p, 1, r);
1145 for (r = 0; r < nummodesB; ++r)
1147 for (q = 0; q < nummodesA; ++q)
1149 maparray[arrayindx[r*nummodesA+q]] =
GetMode(0, q, r);
1155 ASSERTL0(
false,
"Face to element map unavailable.");
1158 if (fid == 1 || fid == 3)
1162 if ((
int)faceOrient == 7)
1164 swap(maparray[0], maparray[nummodesA]);
1165 for (i = 1; i < nummodesA-1; ++i)
1167 swap(maparray[i+1], maparray[nummodesA+i]);
1177 if (faceOrient == 6 || faceOrient == 8 ||
1178 faceOrient == 11 || faceOrient == 12)
1182 for (i = 3; i < nummodesB; i += 2)
1184 for (j = 0; j < nummodesA; j++)
1186 signarray[arrayindx[i*nummodesA+j]] *= -1;
1190 for (i = 0; i < nummodesA; i++)
1192 swap(maparray [i], maparray [i+nummodesA]);
1193 swap(signarray[i], signarray[i+nummodesA]);
1198 for (i = 0; i < nummodesB; i++)
1200 for (j = 3; j < nummodesA; j += 2)
1202 signarray[arrayindx[i*nummodesA+j]] *= -1;
1206 for (i = 0; i < nummodesB; i++)
1208 swap (maparray [i], maparray [i+nummodesB]);
1209 swap (signarray[i], signarray[i+nummodesB]);
1214 if (faceOrient == 7 || faceOrient == 8 ||
1215 faceOrient == 10 || faceOrient == 12)
1219 for (i = 0; i < nummodesB; i++)
1221 for (j = 3; j < nummodesA; j += 2)
1223 signarray[arrayindx[i*nummodesA+j]] *= -1;
1227 for(i = 0; i < nummodesB; i++)
1229 swap(maparray [i*nummodesA], maparray [i*nummodesA+1]);
1230 swap(signarray[i*nummodesA], signarray[i*nummodesA+1]);
1235 for (i = 3; i < nummodesB; i += 2)
1237 for (j = 0; j < nummodesA; j++)
1239 signarray[arrayindx[i*nummodesA+j]] *= -1;
1243 for (i = 0; i < nummodesA; i++)
1245 swap(maparray [i*nummodesB], maparray [i*nummodesB+1]);
1246 swap(signarray[i*nummodesB], signarray[i*nummodesB+1]);
1258 "Mapping not defined for this type of basis");
1262 if(useCoeffPacking ==
true)
1285 ASSERTL0(
false,
"local vertex id must be between 0 and 5");
1311 ASSERTL0(
false,
"local vertex id must be between 0 and 5");
1326 const int P =
m_base[0]->GetNumModes() - 1;
1327 const int Q =
m_base[1]->GetNumModes() - 1;
1328 const int R =
m_base[2]->GetNumModes() - 1;
1331 if (maparray.num_elements() != nEdgeIntCoeffs)
1336 if(signarray.num_elements() != nEdgeIntCoeffs)
1342 fill(signarray.get(), signarray.get()+nEdgeIntCoeffs, 1);
1352 for (i = 2; i <= P; ++i)
1354 maparray[i-2] =
GetMode(i,0,0);
1359 for (i = 2; i <= Q; ++i)
1361 maparray[i-2] =
GetMode(1,i,0);
1368 for (i = 2; i <= P; ++i)
1370 maparray[i-2] =
GetMode(i,1,0);
1377 for (i = 2; i <= Q; ++i)
1379 maparray[i-2] =
GetMode(0,i,0);
1384 for (i = 2; i <= R; ++i)
1386 maparray[i-2] =
GetMode(0,0,i);
1391 for (i = 1; i <= R-1; ++i)
1393 maparray[i-1] =
GetMode(1,0,i);
1398 for (i = 1; i <= R-1; ++i)
1400 maparray[i-1] =
GetMode(1,1,i);
1405 for (i = 2; i <= R; ++i)
1407 maparray[i-2] =
GetMode(0,1,i);
1412 for (i = 2; i <= Q; ++i)
1414 maparray[i-2] =
GetMode(0,i,1);
1419 ASSERTL0(
false,
"Edge not defined.");
1425 for (i = 1; i < nEdgeIntCoeffs; i += 2)
1438 const int P =
m_base[0]->GetNumModes() - 1;
1439 const int Q =
m_base[1]->GetNumModes() - 1;
1440 const int R =
m_base[2]->GetNumModes() - 1;
1442 int p, q, r, idx = 0;
1448 if (maparray.num_elements() != nFaceIntCoeffs)
1453 if (signarray.num_elements() != nFaceIntCoeffs)
1459 fill(signarray.get(), signarray.get()+nFaceIntCoeffs, 1);
1465 if (fid != 1 && fid != 3)
1478 for (i = 0; i < nummodesB; i++)
1480 for (j = 0; j < nummodesA; j++)
1484 arrayindx[i*nummodesA+j] = i*nummodesA+j;
1488 arrayindx[i*nummodesA+j] = j*nummodesB+i;
1497 for (q = 2; q <= Q; ++q)
1499 for (p = 2; p <= P; ++p)
1501 maparray[arrayindx[(q-2)*nummodesA+(p-2)]] =
GetMode(p,q,0);
1507 for (p = 2; p <= P; ++p)
1509 for (r = 1; r <= R-p; ++r)
1511 if ((
int)faceOrient == 7)
1513 signarray[idx] = p % 2 ? -1 : 1;
1515 maparray[idx++] =
GetMode(p,0,r);
1521 for (r = 1; r <= R-1; ++r)
1523 for (q = 2; q <= Q; ++q)
1525 maparray[arrayindx[(r-1)*nummodesA+(q-2)]] =
GetMode(1, q, r);
1531 for (p = 2; p <= P; ++p)
1533 for (r = 1; r <= R-p; ++r)
1535 if ((
int)faceOrient == 7)
1537 signarray[idx] = p % 2 ? -1 : 1;
1539 maparray[idx++] =
GetMode(p, 1, r);
1545 for (r = 2; r <= R; ++r)
1547 for (q = 2; q <= Q; ++q)
1549 maparray[arrayindx[(r-2)*nummodesA+(q-2)]] =
GetMode(0, q, r);
1555 ASSERTL0(
false,
"Face interior map not available.");
1560 if (fid == 1 || fid == 3)
1563 if (faceOrient == 6 || faceOrient == 8 ||
1564 faceOrient == 11 || faceOrient == 12)
1568 for (i = 1; i < nummodesB; i += 2)
1570 for (j = 0; j < nummodesA; j++)
1572 signarray[arrayindx[i*nummodesA+j]] *= -1;
1578 for (i = 0; i < nummodesB; i++)
1580 for (j = 1; j < nummodesA; j += 2)
1582 signarray[arrayindx[i*nummodesA+j]] *= -1;
1588 if (faceOrient == 7 || faceOrient == 8 ||
1589 faceOrient == 10 || faceOrient == 12)
1593 for (i = 0; i < nummodesB; i++)
1595 for (j = 1; j < nummodesA; j += 2)
1597 signarray[arrayindx[i*nummodesA+j]] *= -1;
1603 for (i = 1; i < nummodesB; i += 2)
1605 for (j = 0; j < nummodesA; j++)
1607 signarray[arrayindx[i*nummodesA+j]] *= -1;
1618 "BasisType is not a boundary interior form");
1621 "BasisType is not a boundary interior form");
1624 "BasisType is not a boundary interior form");
1626 int P =
m_base[0]->GetNumModes() - 1, p;
1627 int Q =
m_base[1]->GetNumModes() - 1, q;
1628 int R =
m_base[2]->GetNumModes() - 1, r;
1632 if(outarray.num_elements()!=nIntCoeffs)
1640 for (p = 2; p <= P; ++p)
1642 for (q = 2; q <= Q; ++q)
1644 for (r = 1; r <= R-p; ++r)
1646 outarray[idx++] =
GetMode(p,q,r);
1656 "BasisType is not a boundary interior form");
1659 "BasisType is not a boundary interior form");
1662 "BasisType is not a boundary interior form");
1664 int P =
m_base[0]->GetNumModes() - 1, p;
1665 int Q =
m_base[1]->GetNumModes() - 1, q;
1666 int R =
m_base[2]->GetNumModes() - 1, r;
1671 if (maparray.num_elements() != nBnd)
1677 for (p = 0; p <= P; ++p)
1682 for (q = 0; q <= Q; ++q)
1684 for (r = 0; r <= R-p; ++r)
1686 maparray[idx++] =
GetMode(p,q,r);
1694 for (q = 0; q <= Q; ++q)
1698 for (r = 0; r <= R-p; ++r)
1700 maparray[idx++] =
GetMode(p,q,r);
1705 maparray[idx++] =
GetMode(p,q,0);
1729 int nq0 =
m_base[0]->GetNumPoints();
1730 int nq1 =
m_base[1]->GetNumPoints();
1731 int nq2 =
m_base[2]->GetNumPoints();
1732 int nq = max(nq0,max(nq1,nq2));
1743 for(
int i = 0; i < nq; ++i)
1745 for(
int j = 0; j < nq; ++j)
1747 for(
int k = 0; k < nq-i; ++k,++cnt)
1750 coords[cnt][0] = -1.0 + 2*k/(
NekDouble)(nq-1);
1751 coords[cnt][1] = -1.0 + 2*j/(
NekDouble)(nq-1);
1752 coords[cnt][2] = -1.0 + 2*i/(
NekDouble)(nq-1);
1757 for(
int i = 0; i < neq; ++i)
1761 I[0] =
m_base[0]->GetI(coll );
1762 I[1] =
m_base[1]->GetI(coll+1);
1763 I[2] =
m_base[2]->GetI(coll+2);
1767 for(
int k = 0; k < nq2; ++k)
1769 for (
int j = 0; j < nq1; ++j)
1772 fac = (I[1]->GetPtr())[j]*(I[2]->GetPtr())[k];
1777 k * nq0 * nq1 * neq +
1822 int Q =
m_base[1]->GetNumModes() - 1;
1823 int R =
m_base[2]->GetNumModes() - 1;
1827 (Q+1)*(p*R + 1-(p-2)*(p-1)/2);
1835 int nquad0 =
m_base[0]->GetNumPoints();
1836 int nquad1 =
m_base[1]->GetNumPoints();
1837 int nquad2 =
m_base[2]->GetNumPoints();
1846 for(i = 0; i < nquad1*nquad2; ++i)
1849 w0.get(), 1, outarray.get()+i*nquad0,1);
1853 for(j = 0; j < nquad2; ++j)
1855 for(i = 0; i < nquad1; ++i)
1857 Blas::Dscal(nquad0,w1[i], &outarray[0]+i*nquad0 +
1869 for(i = 0; i < nquad2; ++i)
1871 Blas::Dscal(nquad0*nquad1, 0.5*w2[i],
1872 &outarray[0]+i*nquad0*nquad1, 1);
1877 for(i = 0; i < nquad2; ++i)
1879 Blas::Dscal(nquad0*nquad1,0.25*(1-z2[i])*w2[i],
1880 &outarray[0]+i*nquad0*nquad1,1);
1891 int qa =
m_base[0]->GetNumPoints();
1892 int qb =
m_base[1]->GetNumPoints();
1893 int qc =
m_base[2]->GetNumPoints();
1894 int nmodes_a =
m_base[0]->GetNumModes();
1895 int nmodes_b =
m_base[1]->GetNumModes();
1896 int nmodes_c =
m_base[2]->GetNumModes();
1917 int cutoff_a = (int) (SVVCutOff*nmodes_a);
1918 int cutoff_b = (int) (SVVCutOff*nmodes_b);
1919 int cutoff_c = (int) (SVVCutOff*nmodes_c);
1924 OrthoExp.
FwdTrans(array,orthocoeffs);
1925 int nmodes = min(min(nmodes_a,nmodes_b),nmodes_c);
1926 NekDouble cutoff = min(min(cutoff_a,cutoff_b),cutoff_c);
1929 for(i = 0; i < nmodes_a; ++i)
1931 for(j = 0; j < nmodes_b; ++j)
1933 for(k = 0; k < nmodes_c-i; ++k)
1935 if(j >= cutoff || i + k >= cutoff)
1937 orthocoeffs[cnt] *= (SvvDiffCoeff*exp(-(i+k-nmodes)*(i+k-nmodes)/((
NekDouble)((i+k-cutoff+epsilon)*(i+k-cutoff+epsilon))))*exp(-(j-nmodes)*(j-nmodes)/((
NekDouble)((j-cutoff+epsilon)*(j-cutoff+epsilon)))));
1941 orthocoeffs[cnt] *= 0.0;
1949 OrthoExp.
BwdTrans(orthocoeffs,array);
1959 int nquad0 =
m_base[0]->GetNumPoints();
1960 int nquad1 =
m_base[1]->GetNumPoints();
1961 int nquad2 =
m_base[2]->GetNumPoints();
1962 int nqtot = nquad0*nquad1*nquad2;
1963 int nmodes0 =
m_base[0]->GetNumModes();
1964 int nmodes1 =
m_base[1]->GetNumModes();
1965 int nmodes2 =
m_base[2]->GetNumModes();
1966 int numMax = nmodes0;
1994 OrthoPrismExp->FwdTrans(phys_tmp, coeff);
1997 for (u = 0; u < numMin; ++u)
1999 for (i = 0; i < numMin; ++i)
2002 tmp2 = coeff_tmp1 + cnt, 1);
2006 for (i = numMin; i < numMax; ++i)
2012 OrthoPrismExp->BwdTrans(coeff_tmp1, phys_tmp);
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
NekDouble GetConstFactor(const ConstFactorType &factor) const
#define ASSERTL0(condition, msg)
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)
int getNumberOfCoefficients(int Na, int Nb, int Nc)
virtual int v_GetNedges() const
Principle Modified Functions .
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...
MatrixType GetMatrixType() const
void 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)
static Array< OneD, NekDouble > NullNekDouble1DArray
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetFaceIntNcoeffs(const int i) const
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
int GetBasisNumModes(const int dir) const
This function returns the number of expansion modes in the dir direction.
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)
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetTotalEdgeIntNcoeffs() const
virtual void v_GetCoords(Array< OneD, NekDouble > &xi_x, Array< OneD, NekDouble > &xi_y, Array< OneD, NekDouble > &xi_z)
boost::shared_ptr< StdPrismExp > StdPrismExpSharedPtr
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Inner product of inarray over region with respect to the object's default expansion basis; output in ...
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
virtual LibUtilities::PointsKey v_GetFacePointsKey(const int i, const int j) const
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
svtvp (scalar times vector plus vector): z = alpha*x + y
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculate the inner product of inarray with respect to the basis B=base0*base1*base2 and put into out...
LibUtilities::BasisKey EvaluateTriFaceBasisKey(const int facedir, const LibUtilities::BasisType faceDirBasisType, const int numpoints, const int nummodes)
virtual int v_GetTotalFaceIntNcoeffs() const
Principle Modified Functions .
void LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Convert local cartesian coordinate xi into local collapsed coordinates eta.
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
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)
boost::shared_ptr< DNekMat > DNekMatSharedPtr
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 void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
Gauss Radau pinned at x=-1, .
virtual int v_NumBndryCoeffs() const
Principle Orthogonal Functions .
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
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 DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
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)
static const NekDouble kNekZeroTol
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)
virtual int v_GetFaceNumPoints(const int i) const
LibUtilities::BasisKey EvaluateQuadFaceBasisKey(const int facedir, const LibUtilities::BasisType faceDirBasisType, const int numpoints, const int nummodes)
Principle Modified Functions .
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)
Class representing a prismatic element in reference space.
Principle Orthogonal Functions .
virtual int v_GetNverts() const
DNekMatSharedPtr CreateGeneralMatrix(const StdMatrixKey &mkey)
this function generates the mass matrix
Principle Orthogonal Functions .
virtual void v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Defines a specification for a set of points.
virtual int v_NumDGBndryCoeffs() const
T Ddot(int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const int > &y, const int incy)
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
int GetFaceNcoeffs(const int i) const
This function returns the number of expansion coefficients belonging to the i-th face.
int getNumberOfBndCoefficients(int Na, int Nb, int Nc)
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Backward transformation from coefficient space to physical space...
virtual int v_GetNfaces() const
virtual const LibUtilities::BasisKey v_DetFaceBasisKey(const int i, const int k) const
virtual int v_GetEdgeNcoeffs(const int i) const
static const BasisKey NullBasisKey(eNoBasisType, 0, NullPointsKey)
Defines a null basis with no type or points.
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
int GetMode(int I, int J, int K)
Compute the local mode number in the expansion for a particular tensorial combination.
virtual LibUtilities::ShapeType v_DetShapeType() const
Return Shape of region, using ShapeType enum list; i.e. prism.
int GetNumModes() const
Returns the order of the basis.
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Describes the specification for a Basis.
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
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.
virtual int v_GetFaceNcoeffs(const int i) const
virtual bool v_IsBoundaryInteriorExpansion()
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Forward transformation from physical space to coefficient space...