55 StdExpansion(Ba.GetNumModes()*Bb.GetNumModes()*Bc.GetNumModes(), 3,
139 ASSERTL1(
false,
"input dir is out of range");
188 "Basis[1] is not a general tensor type");
192 "Basis[2] is not a general tensor type");
195 &&
m_base[2]->Collocation())
200 inarray, 1, outarray, 1);
222 inarray,outarray,wsp,
true,
true,
true);
246 bool doCheckCollDir0,
247 bool doCheckCollDir1,
248 bool doCheckCollDir2)
250 int nquad0 =
m_base[0]->GetNumPoints();
251 int nquad1 =
m_base[1]->GetNumPoints();
252 int nquad2 =
m_base[2]->GetNumPoints();
253 int nmodes0 =
m_base[0]->GetNumModes();
254 int nmodes1 =
m_base[1]->GetNumModes();
255 int nmodes2 =
m_base[2]->GetNumModes();
258 bool colldir0 = doCheckCollDir0?(
m_base[0]->Collocation()):
false;
259 bool colldir1 = doCheckCollDir1?(
m_base[1]->Collocation()):
false;
260 bool colldir2 = doCheckCollDir2?(
m_base[2]->Collocation()):
false;
264 if(colldir0 && colldir1 && colldir2)
271 ASSERTL1(wsp.num_elements()>=nquad0*nmodes2*(nmodes1+nquad1),
272 "Workspace size is not sufficient");
278 Blas::Dgemm(
'T',
'T', nmodes1*nmodes2, nquad0, nmodes0,
279 1.0, &inarray[0], nmodes0,
281 0.0, &wsp[0], nmodes1*nmodes2);
282 Blas::Dgemm(
'T',
'T', nquad0*nmodes2, nquad1, nmodes1,
283 1.0, &wsp[0], nmodes1,
285 0.0, &wsp2[0], nquad0*nmodes2);
286 Blas::Dgemm(
'T',
'T', nquad0*nquad1, nquad2, nmodes2,
287 1.0, &wsp2[0], nmodes2,
289 0.0, &outarray[0], nquad0*nquad1);
309 if( (
m_base[0]->Collocation())
310 &&(
m_base[1]->Collocation())
311 &&(
m_base[2]->Collocation()) )
368 if(
m_base[0]->Collocation() &&
369 m_base[1]->Collocation() &&
390 Blas::Dgemv(
'N',
m_ncoeffs,nq,1.0,iprodmat->GetPtr().get(),
391 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
400 bool multiplybyweights)
402 int nquad0 =
m_base[0]->GetNumPoints();
403 int nquad1 =
m_base[1]->GetNumPoints();
404 int nquad2 =
m_base[2]->GetNumPoints();
405 int order0 =
m_base[0]->GetNumModes();
406 int order1 =
m_base[1]->GetNumModes();
409 order0*order1*nquad2);
411 if(multiplybyweights)
419 tmp,outarray,wsp,
true,
true,
true);
426 inarray,outarray,wsp,
true,
true,
true);
441 bool doCheckCollDir0,
442 bool doCheckCollDir1,
443 bool doCheckCollDir2)
445 int nquad0 =
m_base[0]->GetNumPoints();
446 int nquad1 =
m_base[1]->GetNumPoints();
447 int nquad2 =
m_base[2]->GetNumPoints();
448 int nmodes0 =
m_base[0]->GetNumModes();
449 int nmodes1 =
m_base[1]->GetNumModes();
450 int nmodes2 =
m_base[2]->GetNumModes();
452 bool colldir0 = doCheckCollDir0?(
m_base[0]->Collocation()):
false;
453 bool colldir1 = doCheckCollDir1?(
m_base[1]->Collocation()):
false;
454 bool colldir2 = doCheckCollDir2?(
m_base[2]->Collocation()):
false;
456 if(colldir0 && colldir1 && colldir2)
462 ASSERTL1(wsp.num_elements() >= nmodes0*nquad2*(nquad1+nmodes1),
463 "Insufficient workspace size");
472 for(
int n = 0; n < nmodes0; ++n)
475 tmp0.get()+nquad1*nquad2*n,1);
480 Blas::Dgemm(
'T',
'N', nquad1*nquad2, nmodes0, nquad0,
481 1.0, inarray.get(), nquad0,
483 0.0, tmp0.get(), nquad1*nquad2);
489 for(
int n = 0; n < nmodes1; ++n)
492 tmp1.get()+nquad2*nmodes0*n,1);
497 Blas::Dgemm(
'T',
'N', nquad2*nmodes0, nmodes1, nquad1,
498 1.0, tmp0.get(), nquad1,
500 0.0, tmp1.get(), nquad2*nmodes0);
506 for(
int n = 0; n < nmodes2; ++n)
509 outarray.get()+nmodes0*nmodes1*n,1);
514 Blas::Dgemm(
'T',
'N', nmodes0*nmodes1, nmodes2, nquad2,
515 1.0, tmp1.get(), nquad2,
517 0.0, outarray.get(), nmodes0*nmodes1);
534 ASSERTL0((dir==0)||(dir==1)||(dir==2),
"input dir is out of range");
555 Blas::Dgemv(
'N',
m_ncoeffs,nq,1.0,iprodmat->GetPtr().get(),
556 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
564 ASSERTL0((dir==0)||(dir==1)||(dir==2),
"input dir is out of range");
566 int nquad1 =
m_base[1]->GetNumPoints();
567 int nquad2 =
m_base[2]->GetNumPoints();
568 int order0 =
m_base[0]->GetNumModes();
569 int order1 =
m_base[1]->GetNumModes();
573 if (outarray.num_elements() < inarray.num_elements())
626 int nquad0 =
m_base[0]->GetNumPoints();
627 int nquad1 =
m_base[1]->GetNumPoints();
628 int nquad2 =
m_base[2]->GetNumPoints();
634 int btmp0 =
m_base[0]->GetNumModes();
635 int btmp1 =
m_base[1]->GetNumModes();
636 int mode2 = mode/(btmp0*btmp1);
637 int mode1 = (mode-mode2*btmp0*btmp1)/btmp0;
638 int mode0 = (mode-mode2*btmp0*btmp1)%btmp0;
640 ASSERTL2(mode2 == (
int)floor((1.0*mode)/(btmp0*btmp1)),
641 "Integer Truncation not Equiv to Floor");
642 ASSERTL2(mode1 == (
int)floor((1.0*mode-mode2*btmp0*btmp1)
644 "Integer Truncation not Equiv to Floor");
646 "calling argument mode is larger than total expansion "
649 for(i = 0; i < nquad1*nquad2; ++i)
652 &outarray[0]+i*nquad0, 1);
655 for(j = 0; j < nquad2; ++j)
657 for(i = 0; i < nquad0; ++i)
660 &outarray[0]+i+j*nquad0*nquad1, nquad0,
661 &outarray[0]+i+j*nquad0*nquad1, nquad0);
665 for(i = 0; i < nquad2; i++)
667 Blas::Dscal(nquad0*nquad1,base2[mode2*nquad2+i],
668 &outarray[0]+i*nquad0*nquad1,1);
701 "BasisType is not a boundary interior form");
704 "BasisType is not a boundary interior form");
707 "BasisType is not a boundary interior form");
709 int nmodes0 =
m_base[0]->GetNumModes();
710 int nmodes1 =
m_base[1]->GetNumModes();
711 int nmodes2 =
m_base[2]->GetNumModes();
713 return ( 2*( nmodes0*nmodes1 + nmodes0*nmodes2
715 - 4*( nmodes0 + nmodes1 + nmodes2 ) + 8 );
722 "BasisType is not a boundary interior form");
725 "BasisType is not a boundary interior form");
728 "BasisType is not a boundary interior form");
730 int nmodes0 =
m_base[0]->GetNumModes();
731 int nmodes1 =
m_base[1]->GetNumModes();
732 int nmodes2 =
m_base[2]->GetNumModes();
734 return 2*( nmodes0*nmodes1 + nmodes0*nmodes2
740 ASSERTL2((i >= 0)&&(i <= 11),
"edge id is out of range");
742 if((i == 0)||(i == 2)||(i == 8)||(i == 10))
746 else if((i == 1)||(i == 3)||(i == 9)||(i == 11))
764 ASSERTL2((i >= 0) && (i <= 5),
"face id is out of range");
765 if((i == 0) || (i == 5))
769 else if((i == 1) || (i == 3))
782 ASSERTL2((i >= 0) && (i <= 5),
"face id is out of range");
783 if((i == 0) || (i == 5))
787 else if((i == 1) || (i == 3))
807 ASSERTL2(i >= 0 && i <= 5,
"face id is out of range");
809 if (i == 0 || i == 5)
811 return m_base[0]->GetNumPoints()*
812 m_base[1]->GetNumPoints();
814 else if (i == 1 || i == 3)
816 return m_base[0]->GetNumPoints()*
817 m_base[2]->GetNumPoints();
821 return m_base[1]->GetNumPoints()*
822 m_base[2]->GetNumPoints();
827 const int i,
const int j)
const
829 ASSERTL2(i >= 0 && i <= 5,
"face id is out of range");
830 ASSERTL2(j == 0 || j == 1,
"face direction is out of range");
832 if (i == 0 || i == 5)
834 return m_base[j]->GetPointsKey();
836 else if (i == 1 || i == 3)
838 return m_base[2*j]->GetPointsKey();
842 return m_base[j+1]->GetPointsKey();
848 int nmodes = nummodes[modes_offset]*nummodes[modes_offset+1]*nummodes[modes_offset+2];
856 const int i,
const int k)
const
858 ASSERTL2(i >= 0 && i <= 5,
"face id is out of range");
859 ASSERTL2(k >= 0 && k <= 1,
"basis key id is out of range");
881 m_base[dir]->GetNumModes());
886 ASSERTL2((i >= 0)&&(i <= 11),
"edge id is out of range");
888 if((i == 0)||(i == 2)||(i==8)||(i==10))
892 else if((i == 1)||(i == 3)||(i == 9)||(i == 11))
915 for(
int k = 0; k < Qz; ++k ) {
916 for(
int j = 0; j < Qy; ++j ) {
917 for(
int i = 0; i < Qx; ++i ) {
918 int s = i + Qx*(j + Qy*k);
941 int nummodesA, nummodesB;
945 "Method only implemented if BasisType is indentical in "
949 "Method only implemented for Modified_A or GLL_Lagrange BasisType");
951 const int nummodes0 =
m_base[0]->GetNumModes();
952 const int nummodes1 =
m_base[1]->GetNumModes();
953 const int nummodes2 =
m_base[2]->GetNumModes();
959 nummodesA = nummodes0;
960 nummodesB = nummodes1;
964 nummodesA = nummodes0;
965 nummodesB = nummodes2;
969 nummodesA = nummodes1;
970 nummodesB = nummodes2;
974 bool CheckForZeroedModes =
false;
982 if((P != nummodesA)||(Q != nummodesB))
984 CheckForZeroedModes =
true;
988 int nFaceCoeffs = P*Q;
990 if(maparray.num_elements() != nFaceCoeffs)
995 if(signarray.num_elements() != nFaceCoeffs)
1001 fill( signarray.get() , signarray.get()+nFaceCoeffs, 1 );
1006 for(i = 0; i < Q; i++)
1008 for(j = 0; j < P; j++)
1010 if( faceOrient < 9 )
1012 arrayindx[i*P+j] = i*P+j;
1016 arrayindx[i*P+j] = j*Q+i;
1031 offset = nummodes0*nummodes1;
1035 offset = (nummodes2-1)*nummodes0*nummodes1;
1052 offset = nummodes0*(nummodes1-1);
1053 jump1 = nummodes0*nummodes1;
1058 jump1 = nummodes0*nummodes1;
1069 offset = nummodes0-1;
1070 jump1 = nummodes0*nummodes1;
1077 jump1 = nummodes0*nummodes1;
1082 ASSERTL0(
false,
"fid must be between 0 and 5");
1085 for(i = 0; i < Q; i++)
1087 for(j = 0; j < P; j++)
1089 maparray[ arrayindx[i*P+j] ]
1090 = i*jump1 + j*jump2 + offset;
1095 if(CheckForZeroedModes)
1101 for(i = 0; i < nummodesB; i++)
1103 for(j = nummodesA; j < P; j++)
1105 signarray[arrayindx[i*P+j]] = 0.0;
1106 maparray[arrayindx[i*P+j]] = maparray[0];
1110 for(i = nummodesB; i < Q; i++)
1112 for(j = 0; j < P; j++)
1114 signarray[arrayindx[i*P+j]] = 0.0;
1115 maparray[arrayindx[i*P+j]] = maparray[0];
1121 ASSERTL0(
false,
"Different trace space face dimention and element face dimention not possible for GLL-Lagrange bases");
1125 if( (faceOrient==6) || (faceOrient==8) ||
1126 (faceOrient==11) || (faceOrient==12) )
1132 for(i = 3; i < Q; i+=2)
1134 for(j = 0; j < P; j++)
1136 signarray[ arrayindx[i*P+j] ] *= -1;
1140 for(i = 0; i < P; i++)
1142 swap( maparray[i] , maparray[i+P] );
1143 swap( signarray[i] , signarray[i+P] );
1149 for(i = 0; i < P; i++)
1151 for(j = 0; j < Q/2; j++)
1153 swap( maparray[i + j*P],
1156 swap( signarray[i + j*P],
1167 for(i = 0; i < Q; i++)
1169 for(j = 3; j < P; j+=2)
1171 signarray[ arrayindx[i*P+j] ] *= -1;
1175 for(i = 0; i < Q; i++)
1177 swap( maparray[i] , maparray[i+Q] );
1178 swap( signarray[i] , signarray[i+Q] );
1184 for(i = 0; i < P; i++)
1186 for(j = 0; j < Q/2; j++)
1188 swap( maparray[i*Q + j],
1189 maparray[i*Q + Q -1 -j]);
1190 swap( signarray[i*Q + j],
1191 signarray[i*Q + Q -1 -j]);
1198 if( (faceOrient==7) || (faceOrient==8) ||
1199 (faceOrient==10) || (faceOrient==12) )
1205 for(i = 0; i < Q; i++)
1207 for(j = 3; j < P; j+=2)
1209 signarray[ arrayindx[i*P+j] ] *= -1;
1213 for(i = 0; i < Q; i++)
1215 swap( maparray[i*P],
1217 swap( signarray[i*P],
1223 for(i = 0; i < Q; i++)
1225 for(j = 0; j < P/2; j++)
1227 swap( maparray[i*P + j],
1228 maparray[i*P + P -1 -j]);
1229 swap( signarray[i*P + j],
1230 signarray[i*P + P -1 -j]);
1242 for(i = 3; i < Q; i+=2)
1244 for(j = 0; j < P; j++)
1246 signarray[ arrayindx[i*P+j] ] *= -1;
1250 for(i = 0; i < P; i++)
1252 swap( maparray[i*Q],
1254 swap( signarray[i*Q],
1260 for(i = 0; i < Q; i++)
1262 for(j = 0; j < P/2; j++)
1264 swap( maparray[i + j*Q] ,
1265 maparray[i+P*Q - Q -j*Q] );
1266 swap( signarray[i + j*Q] ,
1267 signarray[i+P*Q - Q -j*Q] );
1288 "BasisType is not a boundary interior form");
1291 "BasisType is not a boundary interior form");
1294 "BasisType is not a boundary interior form");
1296 ASSERTL1((localVertexId>=0)&&(localVertexId<8),
1297 "local vertex id must be between 0 and 7");
1304 int nummodes [3] = {
m_base[0]->GetNumModes(),
1305 m_base[1]->GetNumModes(),
1306 m_base[2]->GetNumModes()};
1308 if(useCoeffPacking ==
true)
1310 if(localVertexId > 3)
1322 switch(localVertexId % 4)
1369 if( (localVertexId % 4) % 3 > 0 )
1382 if( localVertexId % 4 > 1 )
1395 if( localVertexId > 3)
1408 return r*nummodes[0]*nummodes[1] + q*nummodes[0] + p;
1425 "BasisType is not a boundary interior form");
1428 "BasisType is not a boundary interior form");
1431 "BasisType is not a boundary interior form");
1434 "local edge id must be between 0 and 11");
1438 if(maparray.num_elements()!=nEdgeIntCoeffs)
1443 if(signarray.num_elements() != nEdgeIntCoeffs)
1449 fill( signarray.get() , signarray.get()+nEdgeIntCoeffs, 1 );
1452 int nummodes [3] = {
m_base[0]->GetNumModes(),
1453 m_base[1]->GetNumModes(),
1454 m_base[2]->GetNumModes()};
1460 bool reverseOrdering =
false;
1461 bool signChange =
false;
1463 int IdxRange [3][2] = {{0,0},{0,0},{0,0}};
1483 IdxRange[2][0] = nummodes[2] - 1;
1484 IdxRange[2][1] = nummodes[2];
1501 IdxRange[2][1] = nummodes[2] - 1;
1505 reverseOrdering =
true;
1511 IdxRange[2][1] = nummodes[2];
1540 IdxRange[1][0] = nummodes[1] - 1;
1541 IdxRange[1][1] = nummodes[1];
1556 IdxRange[1][1] = nummodes[1] - 1;
1560 reverseOrdering =
true;
1566 IdxRange[1][1] = nummodes[1];
1581 IdxRange[1][1] = nummodes[1] - 1;
1585 reverseOrdering =
true;
1591 IdxRange[1][1] = nummodes[1];
1620 IdxRange[0][0] = nummodes[0] - 1;
1621 IdxRange[0][1] = nummodes[0];
1636 IdxRange[0][1] = nummodes[0] - 1;
1640 reverseOrdering =
true;
1646 IdxRange[0][1] = nummodes[0];
1661 IdxRange[0][1] = nummodes[0] - 1;
1665 reverseOrdering =
true;
1671 IdxRange[0][1] = nummodes[0];
1685 for(r = IdxRange[2][0]; r < IdxRange[2][1]; r++)
1687 for(q = IdxRange[1][0]; q < IdxRange[1][1]; q++)
1689 for(p = IdxRange[0][0]; p < IdxRange[0][1]; p++)
1692 = r*nummodes[0]*nummodes[1] + q*nummodes[0] + p;
1697 if( reverseOrdering )
1699 reverse( maparray.get() , maparray.get()+nEdgeIntCoeffs );
1704 for(p = 1; p < nEdgeIntCoeffs; p+=2)
1723 "BasisType is not a boundary interior form");
1726 "BasisType is not a boundary interior form");
1729 "BasisType is not a boundary interior form");
1732 "local face id must be between 0 and 5");
1736 if(maparray.num_elements()!=nFaceIntCoeffs)
1741 if(signarray.num_elements() != nFaceIntCoeffs)
1747 fill( signarray.get() , signarray.get()+nFaceIntCoeffs, 1 );
1750 int nummodes [3] = {
m_base[0]->GetNumModes(),
1751 m_base[1]->GetNumModes(),
1752 m_base[2]->GetNumModes()};
1768 nummodesA = nummodes[0];
1769 nummodesB = nummodes[1];
1775 nummodesA = nummodes[0];
1776 nummodesB = nummodes[2];
1782 nummodesA = nummodes[1];
1783 nummodesB = nummodes[2];
1792 for(i = 0; i < (nummodesB-2); i++)
1794 for(j = 0; j < (nummodesA-2); j++)
1796 if( faceOrient < 9 )
1798 arrayindx[i*(nummodesA-2)+j] = i*(nummodesA-2)+j;
1802 arrayindx[i*(nummodesA-2)+j] = j*(nummodesB-2)+i;
1807 int IdxRange [3][2];
1829 IdxRange[2][0] = nummodes[2] - 1;
1830 IdxRange[2][1] = nummodes[2];
1846 if( (((
int) faceOrient)-5) % 2 )
1848 IdxRange[2][0] = nummodes[2] - 2;
1856 IdxRange[2][1] = nummodes[2] - 1;
1863 IdxRange[2][1] = nummodes[2];
1866 if( (((
int) faceOrient)-5) % 2 )
1868 for(i = 3; i < nummodes[2]; i+=2)
1892 IdxRange[1][0] = nummodes[1] - 1;
1893 IdxRange[1][1] = nummodes[1];
1909 if( (((
int) faceOrient)-5) % 2 )
1911 IdxRange[1][0] = nummodes[1] - 2;
1919 IdxRange[1][1] = nummodes[1] - 1;
1926 IdxRange[1][1] = nummodes[1];
1929 if( (((
int) faceOrient)-5) % 2 )
1931 for(i = 3; i < nummodes[1]; i+=2)
1943 if( (((
int) faceOrient)-5) % 4 > 1 )
1945 IdxRange[1][0] = nummodes[1] - 2;
1953 IdxRange[1][1] = nummodes[1] - 1;
1960 IdxRange[1][1] = nummodes[1];
1963 if( (((
int) faceOrient)-5) % 4 > 1 )
1965 for(i = 3; i < nummodes[1]; i+=2)
1987 IdxRange[0][0] = nummodes[0] - 1;
1988 IdxRange[0][1] = nummodes[0];
2003 if( (((
int) faceOrient)-5) % 4 > 1 )
2005 IdxRange[0][0] = nummodes[0] - 2;
2013 IdxRange[0][1] = nummodes[0] - 1;
2020 IdxRange[0][1] = nummodes[0];
2023 if( (((
int) faceOrient)-5) % 4 > 1 )
2025 for(i = 3; i < nummodes[0]; i+=2)
2037 for(r = IdxRange[2][0]; r != IdxRange[2][1]; r+=Incr[2])
2039 for(q = IdxRange[1][0]; q != IdxRange[1][1]; q+=Incr[1])
2041 for(p = IdxRange[0][0]; p != IdxRange[0][1]; p+=Incr[0])
2043 maparray [ arrayindx[cnt ] ]
2044 = r*nummodes[0]*nummodes[1] + q*nummodes[0] + p;
2045 signarray[ arrayindx[cnt++] ]
2046 = sign0[p] * sign1[q] * sign2[r];
2060 "BasisType is not a boundary interior form");
2063 "BasisType is not a boundary interior form");
2066 "BasisType is not a boundary interior form");
2069 int nummodes [3] = {
m_base[0]->GetNumModes(),
2070 m_base[1]->GetNumModes(),
2071 m_base[2]->GetNumModes()};
2075 if(outarray.num_elements() != nIntCoeffs)
2089 for(i = 0; i < 3; i++)
2094 IntIdx[i][1] = nummodes[i];
2099 IntIdx[i][1] = nummodes[i]-1;
2103 for(r = IntIdx[2][0]; r < IntIdx[2][1]; r++)
2105 for( q = IntIdx[1][0]; q < IntIdx[1][1]; q++)
2107 for( p = IntIdx[0][0]; p < IntIdx[0][1]; p++)
2109 outarray[cnt++] = r*nummodes[0]*nummodes[1] +
2124 "BasisType is not a boundary interior form");
2127 "BasisType is not a boundary interior form");
2130 "BasisType is not a boundary interior form");
2133 int nummodes [3] = {
m_base[0]->GetNumModes(),
2134 m_base[1]->GetNumModes(),
2135 m_base[2]->GetNumModes()};
2139 if(outarray.num_elements()!=nBndCoeffs)
2154 for(i = 0; i < 3; i++)
2162 IntIdx[i][1] = nummodes[i];
2166 BndIdx[i][1] = nummodes[i]-1;
2168 IntIdx[i][1] = nummodes[i]-1;
2173 for(i = 0; i < 2; i++)
2176 for( q = 0; q < nummodes[1]; q++)
2178 for( p = 0; p < nummodes[0]; p++)
2180 outarray[cnt++] = r*nummodes[0]*nummodes[1]+q*nummodes[0] + p;
2185 for(r = IntIdx[2][0]; r < IntIdx[2][1]; r++)
2187 for( i = 0; i < 2; i++)
2190 for( p = 0; p < nummodes[0]; p++)
2192 outarray[cnt++] = r*nummodes[0]*nummodes[1] +
2197 for( q = IntIdx[1][0]; q < IntIdx[1][1]; q++)
2199 for( i = 0; i < 2; i++)
2202 outarray[cnt++] = r*nummodes[0]*nummodes[1] +
2208 sort(outarray.get(), outarray.get() + nBndCoeffs);
2276 if(inarray.get() == outarray.get())
2282 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
2287 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
2296 int nquad0 =
m_base[0]->GetNumPoints();
2297 int nquad1 =
m_base[1]->GetNumPoints();
2298 int nquad2 =
m_base[2]->GetNumPoints();
2299 int nq01 = nquad0*nquad1;
2300 int nq12 = nquad1*nquad2;
2306 for(i = 0; i < nq12; ++i)
2309 w0.get(), 1, outarray.get()+i*nquad0,1);
2312 for(i = 0; i < nq12; ++i)
2314 Vmath::Smul(nquad0, w1[i%nquad1], outarray.get()+i*nquad0, 1,
2315 outarray.get()+i*nquad0, 1);
2318 for(i = 0; i < nquad2; ++i)
2320 Vmath::Smul(nq01, w2[i], outarray.get()+i*nq01, 1,
2321 outarray.get()+i*nq01, 1);
2329 int qa =
m_base[0]->GetNumPoints();
2330 int qb =
m_base[1]->GetNumPoints();
2331 int qc =
m_base[2]->GetNumPoints();
2332 int nmodes_a =
m_base[0]->GetNumModes();
2333 int nmodes_b =
m_base[1]->GetNumModes();
2334 int nmodes_c =
m_base[2]->GetNumModes();
2352 OrthoExp.
FwdTrans(array,orthocoeffs);
2356 int nmodes = max(nmodes_a,nmodes_b);
2357 nmodes = max(nmodes,nmodes_c);
2360 for(j = cutoff; j < nmodes; ++j)
2362 fac[j] = fabs((j-nmodes)/((
NekDouble) (j-cutoff+1.0)));
2366 for(i = 0; i < nmodes_a; ++i)
2368 for(j = 0; j < nmodes_b; ++j)
2370 for(k = 0; k < nmodes_c; ++k)
2372 if((i >= cutoff)||(j >= cutoff)||(k >= cutoff))
2374 orthocoeffs[i*nmodes_a*nmodes_b + j*nmodes_c + k] *= (SvvDiffCoeff*exp( -(fac[i]+fac[j]+fac[k]) ));
2378 orthocoeffs[i*nmodes_a*nmodes_b + j*nmodes_c + k] *= 0.0;
2385 OrthoExp.
BwdTrans(orthocoeffs,array);
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
virtual LibUtilities::PointsKey v_GetFacePointsKey(const int i, const int j) const
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
virtual int v_GetEdgeNcoeffs(const int i) const
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
NekDouble GetConstFactor(const ConstFactorType &factor) const
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z)
#define ASSERTL0(condition, msg)
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual int v_NumBndryCoeffs() const
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Principle Modified Functions .
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_LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
int GetBasisNumModes(const int dir) const
This function returns the number of expansion modes in the dir direction.
void IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetNedges() const
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
virtual const LibUtilities::BasisKey v_DetFaceBasisKey(const int i, const int k) const
void IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
this function calculates the inner product of a given function f with the different modes of the expa...
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Principle Modified Functions .
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetFaceNcoeffs(const int i) const
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
int GetEdgeNcoeffs(const int i) const
This function returns the number of expansion coefficients belonging to the i-th edge.
virtual bool v_IsBoundaryInteriorExpansion()
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)
boost::shared_ptr< DNekMat > DNekMatSharedPtr
virtual void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
virtual int v_GetNfaces() const
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
Principle Orthogonal Functions .
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
virtual int v_GetFaceNumPoints(const int i) const
int NumBndryCoeffs(void) const
LibUtilities::BasisType GetEdgeBasisType(const int i) const
This function returns the type of expansion basis on the i-th edge.
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
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 void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
The base class for all shapes.
virtual int v_GetTotalEdgeIntNcoeffs() const
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)
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
int GetFaceIntNcoeffs(const int i) const
LibUtilities::BasisKey EvaluateQuadFaceBasisKey(const int facedir, const LibUtilities::BasisType faceDirBasisType, const int numpoints, const int nummodes)
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Principle Modified Functions .
Class representing a hexehedral element in reference space.
void WeakDerivMatrixOp_MatFree(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Principle Orthogonal Functions .
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
DNekMatSharedPtr CreateGeneralMatrix(const StdMatrixKey &mkey)
this function generates the mass matrix
Principle Orthogonal Functions .
Defines a specification for a set of points.
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)
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
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 int v_GetTotalFaceIntNcoeffs() const
virtual void v_BwdTrans(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)
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
void MassMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
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 LibUtilities::ShapeType v_DetShapeType() const
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
LibUtilities::NekManager< StdMatrixKey, DNekMat, StdMatrixKey::opLess > m_stdMatrixManager
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)
Differentiation Methods.
virtual int v_GetFaceIntNcoeffs(const int i) const
virtual void v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
virtual void v_HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Array< OneD, LibUtilities::BasisSharedPtr > m_base
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
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)
virtual int v_GetNverts() const
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multbyweights=true)
Describes the specification for a Basis.
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.
void BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Forward transformation from physical space to coefficient space...
virtual int v_NumDGBndryCoeffs() const