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, k, p, q, r, nFaceCoeffs, idx = 0;
1016 int nummodesA, nummodesB;
1021 nummodesA =
m_base[0]->GetNumModes();
1022 nummodesB =
m_base[1]->GetNumModes();
1026 nummodesA =
m_base[0]->GetNumModes();
1027 nummodesB =
m_base[2]->GetNumModes();
1031 nummodesA =
m_base[1]->GetNumModes();
1032 nummodesB =
m_base[2]->GetNumModes();
1036 bool CheckForZeroedModes =
false;
1044 else if (fid == 1 || fid == 3)
1046 nFaceCoeffs = P*(2*Q-P+1)/2;
1047 CheckForZeroedModes =
true;
1052 CheckForZeroedModes =
true;
1056 if (maparray.num_elements() != nFaceCoeffs)
1061 if (signarray.num_elements() != nFaceCoeffs)
1067 fill(signarray.get(), signarray.get() + nFaceCoeffs, 1);
1074 if (fid != 1 && fid != 3)
1076 for (i = 0; i < Q; i++)
1078 for (j = 0; j < P; j++)
1082 arrayindx[i*P+j] = i*P+j;
1086 arrayindx[i*P+j] = j*Q+i;
1097 for (q = 0; q < Q; ++q)
1099 for (p = 0; p < P; ++p)
1101 maparray[arrayindx[q*P+p]] =
GetMode(p,q,0);
1107 for (p = 0; p < P; ++p)
1109 for (r = 0; r < Q-p; ++r)
1111 if ((
int)faceOrient == 7 && p > 1)
1113 signarray[idx] = p % 2 ? -1 : 1;
1115 maparray[idx++] =
GetMode(p,0,r);
1121 for (q = 0; q < P; ++q)
1123 maparray[arrayindx[q]] =
GetMode(1,q,0);
1125 for (q = 0; q < P; ++q)
1127 maparray[arrayindx[P+q]] =
GetMode(0,q,1);
1129 for (r = 1; r < Q-1; ++r)
1131 for (q = 0; q < P; ++q)
1133 maparray[arrayindx[(r+1)*P+q]] =
GetMode(1,q,r);
1139 for (p = 0; p < P; ++p)
1141 for (r = 0; r < Q-p; ++r)
1143 if ((
int)faceOrient == 7 && p > 1)
1145 signarray[idx] = p % 2 ? -1 : 1;
1147 maparray[idx++] =
GetMode(p, 1, r);
1153 for (r = 0; r < Q; ++r)
1155 for (q = 0; q < P; ++q)
1157 maparray[arrayindx[r*P+q]] =
GetMode(0, q, r);
1163 ASSERTL0(
false,
"Face to element map unavailable.");
1166 if (fid == 1 || fid == 3)
1168 if(CheckForZeroedModes)
1173 for (j = 0; j < nummodesA; ++j)
1176 for (k = nummodesB-j; k < Q-j; ++k)
1178 signarray[idx] = 0.0;
1179 maparray[idx++] = maparray[0];
1183 for (j = nummodesA; j < P; ++j)
1185 for (k = 0; k < Q-j; ++k)
1187 signarray[idx] = 0.0;
1188 maparray[idx++] = maparray[0];
1196 if ((
int)faceOrient == 7)
1198 swap(maparray[0], maparray[P]);
1199 for (i = 1; i < P-1; ++i)
1201 swap(maparray[i+1], maparray[P+i]);
1208 if(CheckForZeroedModes)
1212 for (j = 0; j < nummodesA; ++j)
1214 for (k = nummodesB; k < Q; ++k)
1216 signarray[arrayindx[j+k*P]] = 0.0;
1217 maparray[arrayindx[j+k*P]] = maparray[0];
1221 for (j = nummodesA; j < P; ++j)
1223 for (k = 0; k < Q; ++k)
1225 signarray[arrayindx[j+k*P]] = 0.0;
1226 maparray[arrayindx[j+k*P]] = maparray[0];
1235 if (faceOrient == 6 || faceOrient == 8 ||
1236 faceOrient == 11 || faceOrient == 12)
1240 for (i = 3; i < Q; i += 2)
1242 for (j = 0; j < P; j++)
1244 signarray[arrayindx[i*P+j]] *= -1;
1248 for (i = 0; i < P; i++)
1250 swap(maparray [i], maparray [i+P]);
1251 swap(signarray[i], signarray[i+P]);
1256 for (i = 0; i < Q; i++)
1258 for (j = 3; j < P; j += 2)
1260 signarray[arrayindx[i*P+j]] *= -1;
1264 for (i = 0; i < Q; i++)
1266 swap (maparray [i], maparray [i+Q]);
1267 swap (signarray[i], signarray[i+Q]);
1272 if (faceOrient == 7 || faceOrient == 8 ||
1273 faceOrient == 10 || faceOrient == 12)
1277 for (i = 0; i < Q; i++)
1279 for (j = 3; j < P; j += 2)
1281 signarray[arrayindx[i*P+j]] *= -1;
1285 for(i = 0; i < Q; i++)
1287 swap(maparray [i*P], maparray [i*P+1]);
1288 swap(signarray[i*P], signarray[i*P+1]);
1293 for (i = 3; i < Q; i += 2)
1295 for (j = 0; j < P; j++)
1297 signarray[arrayindx[i*P+j]] *= -1;
1301 for (i = 0; i < P; i++)
1303 swap(maparray [i*Q], maparray [i*Q+1]);
1304 swap(signarray[i*Q], signarray[i*Q+1]);
1316 "Mapping not defined for this type of basis");
1320 if(useCoeffPacking ==
true)
1343 ASSERTL0(
false,
"local vertex id must be between 0 and 5");
1369 ASSERTL0(
false,
"local vertex id must be between 0 and 5");
1384 const int P =
m_base[0]->GetNumModes() - 1;
1385 const int Q =
m_base[1]->GetNumModes() - 1;
1386 const int R =
m_base[2]->GetNumModes() - 1;
1389 if (maparray.num_elements() != nEdgeIntCoeffs)
1394 if(signarray.num_elements() != nEdgeIntCoeffs)
1400 fill(signarray.get(), signarray.get()+nEdgeIntCoeffs, 1);
1410 for (i = 2; i <= P; ++i)
1412 maparray[i-2] =
GetMode(i,0,0);
1417 for (i = 2; i <= Q; ++i)
1419 maparray[i-2] =
GetMode(1,i,0);
1426 for (i = 2; i <= P; ++i)
1428 maparray[i-2] =
GetMode(i,1,0);
1435 for (i = 2; i <= Q; ++i)
1437 maparray[i-2] =
GetMode(0,i,0);
1442 for (i = 2; i <= R; ++i)
1444 maparray[i-2] =
GetMode(0,0,i);
1449 for (i = 1; i <= R-1; ++i)
1451 maparray[i-1] =
GetMode(1,0,i);
1456 for (i = 1; i <= R-1; ++i)
1458 maparray[i-1] =
GetMode(1,1,i);
1463 for (i = 2; i <= R; ++i)
1465 maparray[i-2] =
GetMode(0,1,i);
1470 for (i = 2; i <= Q; ++i)
1472 maparray[i-2] =
GetMode(0,i,1);
1477 ASSERTL0(
false,
"Edge not defined.");
1483 for (i = 1; i < nEdgeIntCoeffs; i += 2)
1496 const int P =
m_base[0]->GetNumModes() - 1;
1497 const int Q =
m_base[1]->GetNumModes() - 1;
1498 const int R =
m_base[2]->GetNumModes() - 1;
1500 int p, q, r, idx = 0;
1506 if (maparray.num_elements() != nFaceIntCoeffs)
1511 if (signarray.num_elements() != nFaceIntCoeffs)
1517 fill(signarray.get(), signarray.get()+nFaceIntCoeffs, 1);
1523 if (fid != 1 && fid != 3)
1536 for (i = 0; i < nummodesB; i++)
1538 for (j = 0; j < nummodesA; j++)
1542 arrayindx[i*nummodesA+j] = i*nummodesA+j;
1546 arrayindx[i*nummodesA+j] = j*nummodesB+i;
1555 for (q = 2; q <= Q; ++q)
1557 for (p = 2; p <= P; ++p)
1559 maparray[arrayindx[(q-2)*nummodesA+(p-2)]] =
GetMode(p,q,0);
1565 for (p = 2; p <= P; ++p)
1567 for (r = 1; r <= R-p; ++r)
1569 if ((
int)faceOrient == 7)
1571 signarray[idx] = p % 2 ? -1 : 1;
1573 maparray[idx++] =
GetMode(p,0,r);
1579 for (r = 1; r <= R-1; ++r)
1581 for (q = 2; q <= Q; ++q)
1583 maparray[arrayindx[(r-1)*nummodesA+(q-2)]] =
GetMode(1, q, r);
1589 for (p = 2; p <= P; ++p)
1591 for (r = 1; r <= R-p; ++r)
1593 if ((
int)faceOrient == 7)
1595 signarray[idx] = p % 2 ? -1 : 1;
1597 maparray[idx++] =
GetMode(p, 1, r);
1603 for (r = 2; r <= R; ++r)
1605 for (q = 2; q <= Q; ++q)
1607 maparray[arrayindx[(r-2)*nummodesA+(q-2)]] =
GetMode(0, q, r);
1613 ASSERTL0(
false,
"Face interior map not available.");
1618 if (fid == 1 || fid == 3)
1621 if (faceOrient == 6 || faceOrient == 8 ||
1622 faceOrient == 11 || faceOrient == 12)
1626 for (i = 1; i < nummodesB; i += 2)
1628 for (j = 0; j < nummodesA; j++)
1630 signarray[arrayindx[i*nummodesA+j]] *= -1;
1636 for (i = 0; i < nummodesB; i++)
1638 for (j = 1; j < nummodesA; j += 2)
1640 signarray[arrayindx[i*nummodesA+j]] *= -1;
1646 if (faceOrient == 7 || faceOrient == 8 ||
1647 faceOrient == 10 || faceOrient == 12)
1651 for (i = 0; i < nummodesB; i++)
1653 for (j = 1; j < nummodesA; j += 2)
1655 signarray[arrayindx[i*nummodesA+j]] *= -1;
1661 for (i = 1; i < nummodesB; i += 2)
1663 for (j = 0; j < nummodesA; j++)
1665 signarray[arrayindx[i*nummodesA+j]] *= -1;
1676 "BasisType is not a boundary interior form");
1679 "BasisType is not a boundary interior form");
1682 "BasisType is not a boundary interior form");
1684 int P =
m_base[0]->GetNumModes() - 1, p;
1685 int Q =
m_base[1]->GetNumModes() - 1, q;
1686 int R =
m_base[2]->GetNumModes() - 1, r;
1690 if(outarray.num_elements()!=nIntCoeffs)
1698 for (p = 2; p <= P; ++p)
1700 for (q = 2; q <= Q; ++q)
1702 for (r = 1; r <= R-p; ++r)
1704 outarray[idx++] =
GetMode(p,q,r);
1714 "BasisType is not a boundary interior form");
1717 "BasisType is not a boundary interior form");
1720 "BasisType is not a boundary interior form");
1722 int P =
m_base[0]->GetNumModes() - 1, p;
1723 int Q =
m_base[1]->GetNumModes() - 1, q;
1724 int R =
m_base[2]->GetNumModes() - 1, r;
1729 if (maparray.num_elements() != nBnd)
1735 for (p = 0; p <= P; ++p)
1740 for (q = 0; q <= Q; ++q)
1742 for (r = 0; r <= R-p; ++r)
1744 maparray[idx++] =
GetMode(p,q,r);
1752 for (q = 0; q <= Q; ++q)
1756 for (r = 0; r <= R-p; ++r)
1758 maparray[idx++] =
GetMode(p,q,r);
1763 maparray[idx++] =
GetMode(p,q,0);
1787 int nq0 =
m_base[0]->GetNumPoints();
1788 int nq1 =
m_base[1]->GetNumPoints();
1789 int nq2 =
m_base[2]->GetNumPoints();
1799 nq = max(nq0,max(nq1,nq2));
1812 for(
int i = 0; i < nq; ++i)
1814 for(
int j = 0; j < nq; ++j)
1816 for(
int k = 0; k < nq-i; ++k,++cnt)
1819 coords[cnt][0] = -1.0 + 2*k/(
NekDouble)(nq-1);
1820 coords[cnt][1] = -1.0 + 2*j/(
NekDouble)(nq-1);
1821 coords[cnt][2] = -1.0 + 2*i/(
NekDouble)(nq-1);
1826 for(
int i = 0; i < neq; ++i)
1830 I[0] =
m_base[0]->GetI(coll );
1831 I[1] =
m_base[1]->GetI(coll+1);
1832 I[2] =
m_base[2]->GetI(coll+2);
1836 for(
int k = 0; k < nq2; ++k)
1838 for (
int j = 0; j < nq1; ++j)
1841 fac = (I[1]->GetPtr())[j]*(I[2]->GetPtr())[k];
1846 k * nq0 * nq1 * neq +
1891 int Q =
m_base[1]->GetNumModes() - 1;
1892 int R =
m_base[2]->GetNumModes() - 1;
1896 (Q+1)*(p*R + 1-(p-2)*(p-1)/2);
1904 int nquad0 =
m_base[0]->GetNumPoints();
1905 int nquad1 =
m_base[1]->GetNumPoints();
1906 int nquad2 =
m_base[2]->GetNumPoints();
1915 for(i = 0; i < nquad1*nquad2; ++i)
1918 w0.get(), 1, outarray.get()+i*nquad0,1);
1922 for(j = 0; j < nquad2; ++j)
1924 for(i = 0; i < nquad1; ++i)
1926 Blas::Dscal(nquad0,w1[i], &outarray[0]+i*nquad0 +
1938 for(i = 0; i < nquad2; ++i)
1940 Blas::Dscal(nquad0*nquad1, 0.5*w2[i],
1941 &outarray[0]+i*nquad0*nquad1, 1);
1946 for(i = 0; i < nquad2; ++i)
1948 Blas::Dscal(nquad0*nquad1,0.25*(1-z2[i])*w2[i],
1949 &outarray[0]+i*nquad0*nquad1,1);
1960 int qa =
m_base[0]->GetNumPoints();
1961 int qb =
m_base[1]->GetNumPoints();
1962 int qc =
m_base[2]->GetNumPoints();
1963 int nmodes_a =
m_base[0]->GetNumModes();
1964 int nmodes_b =
m_base[1]->GetNumModes();
1965 int nmodes_c =
m_base[2]->GetNumModes();
1986 int cutoff_a = (int) (SVVCutOff*nmodes_a);
1987 int cutoff_b = (int) (SVVCutOff*nmodes_b);
1988 int cutoff_c = (int) (SVVCutOff*nmodes_c);
1993 OrthoExp.
FwdTrans(array,orthocoeffs);
1994 int nmodes = min(min(nmodes_a,nmodes_b),nmodes_c);
1995 NekDouble cutoff = min(min(cutoff_a,cutoff_b),cutoff_c);
1998 for(i = 0; i < nmodes_a; ++i)
2000 for(j = 0; j < nmodes_b; ++j)
2002 for(k = 0; k < nmodes_c-i; ++k)
2004 if(j >= cutoff || i + k >= cutoff)
2006 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)))));
2010 orthocoeffs[cnt] *= 0.0;
2018 OrthoExp.
BwdTrans(orthocoeffs,array);
2028 int nquad0 =
m_base[0]->GetNumPoints();
2029 int nquad1 =
m_base[1]->GetNumPoints();
2030 int nquad2 =
m_base[2]->GetNumPoints();
2031 int nqtot = nquad0*nquad1*nquad2;
2032 int nmodes0 =
m_base[0]->GetNumModes();
2033 int nmodes1 =
m_base[1]->GetNumModes();
2034 int nmodes2 =
m_base[2]->GetNumModes();
2035 int numMax = nmodes0;
2063 OrthoPrismExp->FwdTrans(phys_tmp, coeff);
2066 for (u = 0; u < numMin; ++u)
2068 for (i = 0; i < numMin; ++i)
2071 tmp2 = coeff_tmp1 + cnt, 1);
2075 for (i = numMin; i < numMax; ++i)
2081 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)
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 .
bool ConstFactorExists(const ConstFactorType &factor) const
virtual void v_GetFaceToElementMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P=-1, int Q=-1)
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...