46 namespace LocalRegions
51 StdExpansion (Ba.GetNumModes()*Bb.GetNumModes(),2,Ba,Bb),
52 StdExpansion2D(Ba.GetNumModes()*Bb.GetNumModes(),Ba,Bb),
57 boost::bind(&
QuadExp::CreateMatrix, this, _1),
58 std::string(
"QuadExpMatrix")),
59 m_staticCondMatrixManager(
60 boost::bind(&
QuadExp::CreateStaticCondMatrix, this, _1),
61 std::string(
"QuadExpStaticCondMatrix"))
72 m_matrixManager(T.m_matrixManager),
73 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
87 int nquad0 =
m_base[0]->GetNumPoints();
88 int nquad1 =
m_base[1]->GetNumPoints();
96 Vmath::Vmul(nquad0*nquad1, jac, 1, inarray, 1, tmp, 1);
100 Vmath::Smul(nquad0*nquad1, jac[0], inarray, 1, tmp, 1);
104 ival = StdQuadExp::v_Integral(tmp);
115 int nquad0 =
m_base[0]->GetNumPoints();
116 int nquad1 =
m_base[1]->GetNumPoints();
117 int nqtot = nquad0*nquad1;
122 StdQuadExp::v_PhysDeriv(inarray, diff0, diff1);
126 if (out_d0.num_elements())
128 Vmath::Vmul (nqtot, df[0], 1, diff0, 1, out_d0, 1);
133 if(out_d1.num_elements())
136 Vmath::Vvtvp (nqtot,df[3],1,diff1,1, out_d1, 1, out_d1,1);
139 if (out_d2.num_elements())
142 Vmath::Vvtvp (nqtot,df[5],1,diff1,1, out_d2, 1, out_d2,1);
147 if (out_d0.num_elements())
149 Vmath::Smul (nqtot, df[0][0], diff0, 1, out_d0, 1);
150 Blas::Daxpy (nqtot, df[1][0], diff1, 1, out_d0, 1);
153 if (out_d1.num_elements())
155 Vmath::Smul (nqtot, df[2][0], diff0, 1, out_d1, 1);
156 Blas::Daxpy (nqtot, df[3][0], diff1, 1, out_d1, 1);
159 if (out_d2.num_elements())
161 Vmath::Smul (nqtot, df[4][0], diff0, 1, out_d2, 1);
162 Blas::Daxpy (nqtot, df[5][0], diff1, 1, out_d2, 1);
195 ASSERTL1(
false,
"input dir is out of range");
207 int nquad0 =
m_base[0]->GetNumPoints();
208 int nquad1 =
m_base[1]->GetNumPoints();
209 int nqtot = nquad0*nquad1;
216 StdQuadExp::v_PhysDeriv(inarray, diff0, diff1);
223 for (
int i=0; i< 2; ++i)
226 for (
int k=0; k<(
m_geom->GetCoordim()); ++k)
230 &direction[k*nqtot], 1,
237 if (out.num_elements())
263 if ((
m_base[0]->Collocation())&&(
m_base[1]->Collocation()))
289 if ((
m_base[0]->Collocation())&&(
m_base[1]->Collocation()))
296 int npoints[2] = {
m_base[0]->GetNumPoints(),
297 m_base[1]->GetNumPoints()};
298 int nmodes[2] = {
m_base[0]->GetNumModes(),
299 m_base[1]->GetNumModes()};
301 fill(outarray.get(), outarray.get()+
m_ncoeffs, 0.0 );
306 for (i = 0; i < 4; i++)
313 for (i = 0; i < npoints[0]; i++)
315 physEdge[0][i] = inarray[i];
316 physEdge[2][i] = inarray[npoints[0]*npoints[1]-1-i];
319 for (i = 0; i < npoints[1]; i++)
322 inarray[npoints[0]-1+i*npoints[0]];
324 inarray[(npoints[1]-1)*npoints[0]-i*npoints[0]];
327 for (i = 0; i < 4; i++)
331 reverse((physEdge[i]).
get(),
332 (physEdge[i]).
get() + npoints[i%2] );
337 for (i = 0; i < 4; i++)
348 for (i = 0; i < 4; i++)
350 segexp[i%2]->FwdTrans_BndConstrained(
351 physEdge[i],coeffEdge[i]);
354 for (j=0; j < nmodes[i%2]; j++)
357 outarray[ mapArray[j] ] = sign * coeffEdge[i][j];
362 int nInteriorDofs =
m_ncoeffs - nBoundaryDofs;
364 if (nInteriorDofs > 0) {
388 for (i = 0; i < nInteriorDofs; i++)
390 rhs[i] = tmp1[ mapArray[i] ];
393 Blas::Dgemv(
'N', nInteriorDofs, nInteriorDofs,
395 &((matsys->GetOwnedMatrix())->GetPtr())[0],
396 nInteriorDofs,rhs.get(),1,0.0,result.get(),1);
398 for (i = 0; i < nInteriorDofs; i++)
400 outarray[ mapArray[i] ] = result[i];
412 if (
m_base[0]->Collocation() &&
m_base[1]->Collocation())
435 bool multiplybyweights)
437 int nquad0 =
m_base[0]->GetNumPoints();
438 int nquad1 =
m_base[1]->GetNumPoints();
439 int order0 =
m_base[0]->GetNumModes();
441 if(multiplybyweights)
447 StdQuadExp::IProductWRTBase_SumFacKernel(
m_base[0]->GetBdata(),
449 tmp,outarray,wsp,
true,
true);
455 StdQuadExp::IProductWRTBase_SumFacKernel(
m_base[0]->GetBdata(),
457 inarray,outarray,wsp,
true,
true);
471 Blas::Dgemv(
'N',
m_ncoeffs,nq,iprodmat->Scale(),
472 (iprodmat->GetOwnedMatrix())->GetPtr().get(),
473 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
483 ASSERTL1((dir==0) || (dir==1) || (dir==2),
484 "Invalid direction.");
486 "Invalid direction.");
488 int nquad0 =
m_base[0]->GetNumPoints();
489 int nquad1 =
m_base[1]->GetNumPoints();
490 int nqtot = nquad0*nquad1;
491 int nmodes0 =
m_base[0]->GetNumModes();
514 df[2*dir][0], inarray.get(), 1,
517 df[2*dir+1][0], inarray.get(), 1,
526 tmp1, tmp3, tmp4,
false,
true);
529 tmp2, outarray, tmp4,
true,
false);
561 ASSERTL1(
false,
"input dir is out of range");
569 Blas::Dgemv(
'N',
m_ncoeffs, nq, iprodmat->Scale(),
570 (iprodmat->GetOwnedMatrix())->GetPtr().get(),
571 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
581 int nq =
m_base[0]->GetNumPoints()*
m_base[1]->GetNumPoints();
591 &normals[1][0],1,&Fy[0],1,&Fn[0],1);
592 Vmath::Vvtvp (nq,&normals[2][0],1,&Fz[0],1,&Fn[0],1,&Fn[0],1);
597 normals[1][0],&Fy[0],1,&Fn[0],1);
598 Vmath::Svtvp (nq,normals[2][0],&Fz[0],1,&Fn[0],1,&Fn[0],1);
615 m_base[1]->GetBasisKey());
632 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[1] <= 1.0 &&
633 Lcoords[1] >= -1.0 && Lcoords[1] <=1.0,
634 "Local coordinates are not in region [-1,1]");
637 for (i = 0; i <
m_geom->GetCoordim(); ++i)
639 coords[i] =
m_geom->GetCoord(i,Lcoords);
655 return StdQuadExp::v_PhysEvaluate(Lcoord,physvals);
665 m_geom->GetLocCoords(coord,Lcoord);
667 return StdQuadExp::v_PhysEvaluate(Lcoord, physvals);
679 int nquad0 =
m_base[0]->GetNumPoints();
680 int nquad1 =
m_base[1]->GetNumPoints();
705 -nquad0, &(outarray[0]),1);
724 -nquad0,&(outarray[0]),1);
733 ASSERTL0(
false,
"edge value (< 3) is out of range");
756 int nquad0 =
m_base[0]->GetNumPoints();
757 int nquad1 =
m_base[1]->GetNumPoints();
773 nquad0,&(outarray[0]),1);
784 ASSERTL0(
false,
"edge value (< 3) is out of range");
794 if (
m_base[edge%2]->GetPointsKey() !=
795 EdgeExp->GetBasis(0)->GetPointsKey())
802 m_base[edge%2]->GetPointsKey(), outtmp,
803 EdgeExp->GetBasis(0)->GetPointsKey(), outarray);
819 int nq0 =
m_base[0]->GetNumPoints();
820 int nq1 =
m_base[1]->GetNumPoints();
835 for (i = 0; i < nq0; i++)
838 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
839 1, &inarray[i], nq0);
845 for (i = 0; i < nq1; i++)
848 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
849 1, &inarray[i * nq0], 1);
855 for (i = 0; i < nq0; i++)
858 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
859 1, &inarray[i], nq0);
865 for (i = 0; i < nq1; i++)
868 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
869 1, &inarray[i * nq0], 1);
874 ASSERTL0(
false,
"edge value (< 3) is out of range");
884 int nquad0 =
m_base[0]->GetNumPoints();
885 int nquad1 =
m_base[1]->GetNumPoints();
892 for (
int i = 0; i < nquad0; ++i)
899 for (
int i = 0; i < nquad1; ++i)
901 outarray[i] = (nquad0-1) + i*nquad1;
906 for (
int i = 0; i < nquad0; ++i)
908 outarray[i] = i + nquad0*(nquad1-1);
913 for (
int i = 0; i < nquad1; ++i)
915 outarray[i] = i + i*(nquad0-1);
919 ASSERTL0(
false,
"edge value (< 3) is out of range");
933 int nquad0 =
m_base[0]->GetNumPoints();
934 int nquad1 =
m_base[1]->GetNumPoints();
951 &&
m_base[1]->GetPointsType() !=
963 for (i = 0; i < nquad0; ++i)
965 outarray[i] = j[i]*sqrt(g1[i]*g1[i]
971 &(df[0][0])+(nquad0-1), nquad0,
975 &(df[2][0])+(nquad0-1), nquad0,
979 &(jac[0])+(nquad0-1), nquad0,
982 for (i = 0; i < nquad0; ++i)
984 outarray[i] = j[i]*sqrt(g0[i]*g0[i] +
991 &(df[1][0])+(nquad0*nquad1-1), -1,
995 &(df[3][0])+(nquad0*nquad1-1), -1,
999 &(jac[0])+(nquad0*nquad1-1), -1,
1002 for (i = 0; i < nquad0; ++i)
1004 outarray[i] = j[i]*sqrt(g1[i]*g1[i]
1011 &(df[0][0])+nquad0*(nquad1-1),
1012 -nquad0,&(g0[0]), 1);
1015 &(df[2][0])+nquad0*(nquad1-1),
1016 -nquad0,&(g2[0]), 1);
1019 &(jac[0])+nquad0*(nquad1-1), -nquad0,
1022 for (i = 0; i < nquad0; ++i)
1024 outarray[i] = j[i]*sqrt(g0[i]*g0[i] +
1029 ASSERTL0(
false,
"edge value (< 3) is out of range");
1035 int nqtot = nquad0 * nquad1;
1054 edge, tmp_gmat1, g1_edge);
1056 edge, tmp_gmat3, g3_edge);
1058 for (i = 0; i < nquad0; ++i)
1060 outarray[i] = sqrt(g1_edge[i]*g1_edge[i] +
1061 g3_edge[i]*g3_edge[i]);
1069 &(tmp_gmat0[0]), 1);
1076 edge, tmp_gmat0, g0_edge);
1078 edge, tmp_gmat2, g2_edge);
1080 for (i = 0; i < nquad1; ++i)
1082 outarray[i] = sqrt(g0_edge[i]*g0_edge[i]
1083 + g2_edge[i]*g2_edge[i]);
1092 &(tmp_gmat1[0]), 1);
1098 edge, tmp_gmat1, g1_edge);
1100 edge, tmp_gmat3, g3_edge);
1103 for (i = 0; i < nquad0; ++i)
1105 outarray[i] = sqrt(g1_edge[i]*g1_edge[i]
1106 + g3_edge[i]*g3_edge[i]);
1116 &(tmp_gmat0[0]), 1);
1122 edge, tmp_gmat0, g0_edge);
1124 edge, tmp_gmat2, g2_edge);
1127 for (i = 0; i < nquad1; ++i)
1129 outarray[i] = sqrt(g0_edge[i]*g0_edge[i] +
1130 g2_edge[i]*g2_edge[i]);
1139 ASSERTL0(
false,
"edge value (< 3) is out of range");
1153 for (i = 0; i < nquad0; ++i)
1155 outarray[i] = jac[0]*sqrt(df[1][0]*df[1][0] +
1160 for (i = 0; i < nquad1; ++i)
1162 outarray[i] = jac[0]*sqrt(df[0][0]*df[0][0] +
1167 for (i = 0; i < nquad0; ++i)
1169 outarray[i] = jac[0]*sqrt(df[1][0]*df[1][0] +
1174 for (i = 0; i < nquad1; ++i)
1176 outarray[i] = jac[0]*sqrt(df[0][0]*df[0][0] +
1181 ASSERTL0(
false,
"edge value (< 3) is out of range");
1197 int nqe =
m_base[0]->GetNumPoints();
1203 for (i = 0; i < vCoordDim; ++i)
1217 for (i = 0; i < vCoordDim; ++i)
1223 for (i = 0; i < vCoordDim; ++i)
1229 for (i = 0; i < vCoordDim; ++i)
1235 for (i = 0; i < vCoordDim; ++i)
1241 ASSERTL0(
false,
"edge is out of range (edge < 4)");
1246 for (i =0 ; i < vCoordDim; ++i)
1248 fac += normal[i][0]*normal[i][0];
1250 fac = 1.0/sqrt(fac);
1251 for (i = 0; i < vCoordDim; ++i)
1260 int nquad0 = ptsKeys[0].GetNumPoints();
1261 int nquad1 = ptsKeys[1].GetNumPoints();
1281 for (j = 0; j < nquad0; ++j)
1283 edgejac[j] = jac[j];
1284 for (i = 0; i < vCoordDim; ++i)
1286 normals[i*nquad0+j] =
1287 -df[2*i+1][j]*edgejac[j];
1290 from_key = ptsKeys[0];
1293 for (j = 0; j < nquad1; ++j)
1295 edgejac[j] = jac[nquad0*j+nquad0-1];
1296 for (i = 0; i < vCoordDim; ++i)
1298 normals[i*nquad1+j] =
1299 df[2*i][nquad0*j + nquad0-1]
1303 from_key = ptsKeys[1];
1306 for (j = 0; j < nquad0; ++j)
1308 edgejac[j] = jac[nquad0*(nquad1-1)+j];
1309 for (i = 0; i < vCoordDim; ++i)
1311 normals[i*nquad0+j] =
1312 (df[2*i+1][nquad0*(nquad1-1)+j])
1316 from_key = ptsKeys[0];
1319 for (j = 0; j < nquad1; ++j)
1321 edgejac[j] = jac[nquad0*j];
1322 for (i = 0; i < vCoordDim; ++i)
1324 normals[i*nquad1+j] =
1325 -df[2*i][nquad0*j]*edgejac[j];
1328 from_key = ptsKeys[1];
1331 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1336 int nqtot = nquad0 * nquad1;
1343 for (j = 0; j < nquad0; ++j)
1345 for (i = 0; i < vCoordDim; ++i)
1352 edge, tmp_gmat, tmp_gmat_edge);
1353 normals[i*nquad0+j] = -tmp_gmat_edge[j];
1356 from_key = ptsKeys[0];
1359 for (j = 0; j < nquad1; ++j)
1361 for (i = 0; i < vCoordDim; ++i)
1368 edge, tmp_gmat, tmp_gmat_edge);
1369 normals[i*nquad1+j] = tmp_gmat_edge[j];
1372 from_key = ptsKeys[1];
1375 for (j = 0; j < nquad0; ++j)
1377 for (i = 0; i < vCoordDim; ++i)
1384 edge, tmp_gmat, tmp_gmat_edge);
1385 normals[i*nquad0+j] = tmp_gmat_edge[j];
1388 from_key = ptsKeys[0];
1391 for (j = 0; j < nquad1; ++j)
1393 for (i = 0; i < vCoordDim; ++i)
1400 edge, tmp_gmat, tmp_gmat_edge);
1401 normals[i*nquad1+j] = -tmp_gmat_edge[j];
1404 from_key = ptsKeys[1];
1407 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1416 from_key,jac,
m_base[0]->GetPointsKey(), work);
1423 from_key,&normals[i*nq],
1424 m_base[0]->GetPointsKey(),
1426 Vmath::Vmul(nqe, work, 1, normal[i], 1, normal[i], 1);
1445 Vmath::Vmul(nqe, normal[i], 1, work, 1, normal[i], 1);
1460 for (i = 0; i < vCoordDim; ++i)
1478 return m_geom->GetCoordim();
1484 const std::vector<unsigned int > &nummodes,
1488 int data_order0 = nummodes[mode_offset];
1489 int fillorder0 = std::min(
m_base[0]->GetNumModes(),data_order0);
1491 int data_order1 = nummodes[mode_offset + 1];
1492 int order1 =
m_base[1]->GetNumModes();
1493 int fillorder1 = min(order1,data_order1);
1505 "Extraction routine not set up for this basis");
1508 for (i = 0; i < fillorder0; ++i)
1510 Vmath::Vcopy(fillorder1, data + cnt, 1, coeffs +cnt1, 1);
1524 m_base[0]->GetPointsKey(),
1525 m_base[1]->GetPointsKey(),
1537 m_base[0]->GetPointsKey(),
1538 m_base[1]->GetPointsKey(),
1544 "basis is either not set up or not hierarchicial");
1551 return m_geom->GetEorient(edge);
1557 return GetGeom2D()->GetCartesianEorient(edge);
1563 ASSERTL1(dir >= 0 &&dir <= 1,
"input dir is out of range");
1589 returnval = StdQuadExp::v_GenMatrix(mkey);
1601 return tmp->GetStdMatrix(mkey);
1611 "Geometric information is not set up");
1700 int rows = deriv0.GetRows();
1701 int cols = deriv1.GetColumns();
1705 (*WeakDeriv) = df[2*dir][0]*deriv0 +
1706 df[2*dir+1][0]*deriv1;
1742 int rows = lap00.GetRows();
1743 int cols = lap00.GetColumns();
1748 (*lap) = gmat[0][0] * lap00 +
1749 gmat[1][0] * (lap01 +
Transpose(lap01)) +
1774 int rows = LapMat.GetRows();
1775 int cols = LapMat.GetColumns();
1781 (*helm) = LapMat + lambda*MassMat;
1848 int rows = stdiprod0.GetRows();
1849 int cols = stdiprod1.GetColumns();
1853 (*mat) = df[2*dir][0]*stdiprod0 +
1854 df[2*dir+1][0]*stdiprod1;
1882 coords[0] = (edge == 0 || edge == 3) ? -1.0 : 1.0;
1884 m_Ix =
m_base[(edge + 1) % 2]->GetI(coords);
1926 "Geometric information is not set up");
1930 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1931 unsigned int exp_size[] = {nbdry,nint};
1932 unsigned int nblks = 2;
1947 goto UseLocRegionsMatrix;
1952 goto UseStdRegionsMatrix;
1958 goto UseLocRegionsMatrix;
1960 UseStdRegionsMatrix:
1969 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(0,0)));
1971 AllocateSharedPtr(one,Asubmat = mat->GetBlock(0,1)));
1973 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(1,0)));
1975 AllocateSharedPtr(invfactor,Asubmat = mat->GetBlock(1,1)));
1978 UseLocRegionsMatrix:
1998 for (i = 0; i < nbdry; ++i)
2000 for(j = 0; j < nbdry; ++j)
2002 (*A)(i,j) = mat(bmap[i],bmap[j]);
2005 for(j = 0; j < nint; ++j)
2007 (*B)(i,j) = mat(bmap[i],imap[j]);
2011 for (i = 0; i < nint; ++i)
2013 for(j = 0; j < nbdry; ++j)
2015 (*C)(i,j) = mat(imap[i],bmap[j]);
2018 for(j = 0; j < nint; ++j)
2020 (*D)(i,j) = mat(imap[i],imap[j]);
2029 (*A) = (*A) - (*B)*(*C);
2035 AllocateSharedPtr(factor, A));
2037 AllocateSharedPtr(one, B));
2039 AllocateSharedPtr(factor, C));
2041 AllocateSharedPtr(invfactor, D));
2072 StdExpansion::MassMatrixOp_MatFree(inarray, outarray, mkey);
2092 StdExpansion::LaplacianMatrixOp_MatFree(
2093 k1, k2, inarray, outarray, mkey);
2103 StdExpansion::WeakDerivMatrixOp_MatFree(i, inarray, outarray, mkey);
2112 StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(
2113 inarray, outarray, mkey);
2122 StdExpansion::MassLevelCurvatureMatrixOp_MatFree(
2123 inarray, outarray, mkey);
2144 if (inarray.get() == outarray.get())
2150 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2151 tmp.get(), 1, 0.0, outarray.get(), 1);
2156 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2157 inarray.get(), 1, 0.0, outarray.get(), 1);
2166 int n_coeffs = inarray.num_elements();
2172 int nmodes0 =
m_base[0]->GetNumModes();
2173 int nmodes1 =
m_base[1]->GetNumModes();
2174 int numMax = nmodes0;
2192 b0, b1, coeff_tmp, bortho0, bortho1, coeff);
2197 for (
int i = 0; i < numMin+1; ++i)
2201 tmp2 = coeff_tmp+cnt,1);
2207 bortho0, bortho1, coeff_tmp,
2221 int nquad0 =
m_base[0]->GetNumPoints();
2222 int nquad1 =
m_base[1]->GetNumPoints();
2223 int nqtot = nquad0*nquad1;
2224 int nmodes0 =
m_base[0]->GetNumModes();
2225 int nmodes1 =
m_base[1]->GetNumModes();
2226 int wspsize = max(max(max(nqtot,
m_ncoeffs),nquad1*nmodes0),nquad0*nmodes1);
2228 ASSERTL1(wsp.num_elements() >= 3*wspsize,
2229 "Workspace is of insufficient size.");
2244 StdExpansion2D::PhysTensorDeriv(inarray,wsp1,wsp2);
2250 Vmath::Vvtvvtp(nqtot,&metric00[0],1,&wsp1[0],1,&metric01[0],1,&wsp2[0],1,&wsp0[0],1);
2251 Vmath::Vvtvvtp(nqtot,&metric01[0],1,&wsp1[0],1,&metric11[0],1,&wsp2[0],1,&wsp2[0],1);
2272 const unsigned int dim = 2;
2280 for (
unsigned int i = 0; i < dim; ++i)
2282 for (
unsigned int j = i; j < dim; ++j)
2325 StdQuadExp::v_SVVLaplacianFilter( array, mkey);
void ComputeLaplacianMetric()
const LibUtilities::PointsKeyVector GetPointsKeys() const
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
NekDouble GetConstFactor(const ConstFactorType &factor) const
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
#define ASSERTL0(condition, msg)
StdRegions::Orientation GetCartesianEorient(int edge)
virtual StdRegions::Orientation v_GetCartesianEorient(int edge)
const ConstFactorMap & GetConstFactors() const
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, const Array< OneD, const NekDouble > &Fz, Array< OneD, NekDouble > &outarray)
const VarCoeffMap & GetVarCoeffs() const
std::vector< PointsKey > PointsKeyVector
MatrixType GetMatrixType() const
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 and put into outarray...
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual const LibUtilities::BasisSharedPtr & v_GetBasis(int dir) const
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
static Array< OneD, NekDouble > NullNekDouble1DArray
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
#define sign(a, b)
return the sign(b)*a
void IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
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...
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
boost::shared_ptr< QuadGeom > QuadGeomSharedPtr
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Transform a given function from physical quadrature space to coefficient space.
void LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual int v_GetNumPoints(const int dir) const
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
virtual const SpatialDomains::GeomFactorsSharedPtr & v_GetMetricInfo() 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
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
Principle Modified Functions .
void NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
std::map< int, StdRegions::NormalVector > m_edgeNormals
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
Lagrange Polynomials using the Gauss points .
StdRegions::Orientation GetEorient(int edge)
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
virtual void v_GetEdgeInterpVals(const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void Sdiv(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha/y.
DNekMatSharedPtr BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
LibUtilities::ShapeType GetShapeType() const
std::map< ConstFactorType, NekDouble > ConstFactorMap
virtual void v_GetEdgePhysMap(const int edge, Array< OneD, int > &outarray)
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
SpatialDomains::GeometrySharedPtr m_geom
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
boost::shared_ptr< DNekMat > DNekMatSharedPtr
virtual void v_PhysDirectionalDeriv(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &direction, Array< OneD, NekDouble > &out)
Physical derivative along a direction vector.
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
1D Gauss-Gauss-Legendre quadrature points
virtual void v_GetTracePhysVals(const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
void IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
virtual void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
bool ConstFactorExists(const ConstFactorType &factor) const
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
void Interp2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
this function interpolates a 2D function evaluated at the quadrature points of the 2D basis...
int NumBndryCoeffs(void) const
virtual StdRegions::Orientation v_GetEorient(int edge)
virtual void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
DNekBlkMatSharedPtr GetStdStaticCondMatrix(const StdMatrixKey &mkey)
boost::shared_ptr< SegExp > SegExpSharedPtr
SpatialDomains::Geometry2DSharedPtr GetGeom2D() const
void Reverse(int n, const T *x, const int incx, T *y, const int incy)
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrates the specified function over the domain.
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs)
Unpack data from input file assuming it comes from the same expansion type.
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
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=NullNekDouble1DArray)
Calculate the derivative of the physical points.
Principle Orthogonal Functions .
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Defines a specification for a set of points.
Expansion3DSharedPtr GetLeftAdjacentElementExp() const
virtual void v_MassLevelCurvatureMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
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_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
boost::shared_ptr< DNekBlkMat > DNekBlkMatSharedPtr
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
SpatialDomains::GeometrySharedPtr GetGeom() const
boost::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
void GetEdgeToElementMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P=-1)
void Vvtvvtp(int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
vvtvvtp (vector times vector plus vector times vector):
virtual void v_IProductWRTDerivBase_SumFac(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...
Geometry is straight-sided with constant geometric factors.
void Interp1D(const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
this function interpolates a 1D function evaluated at the quadrature points of the basis fbasis0 to ...
void HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
unsigned int GetNumPoints() const
virtual void v_GetEdgeQFactors(const int edge, Array< OneD, NekDouble > &outarray)
boost::shared_ptr< StdQuadExp > StdQuadExpSharedPtr
void ComputeQuadratureMetric()
virtual void v_WeakDirectionalDerivMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
int GetLeftAdjacentElementFace() const
virtual void v_ComputeLaplacianMetric()
void Svtsvtp(int n, const T alpha, const T *x, int incx, const T beta, const T *y, int incy, T *z, int incz)
vvtvvtp (scalar times vector plus scalar times vector):
void IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0=true, bool doCheckCollDir1=true)
GeomType
Indicates the type of element geometry.
virtual NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
boost::shared_ptr< Basis > BasisSharedPtr
void Zero(int n, T *x, const int incx)
Zero vector.
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
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...
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void InterpCoeff2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Geometry is curved or has non-constant factors.
virtual int v_GetCoordim()
virtual void v_ComputeEdgeNormal(const int edge)
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Describes the specification for a Basis.
1D Gauss-Lobatto-Legendre quadrature points
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 void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
virtual void v_GetEdgePhysVals(const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Extract the physical values along edge edge from inarray into outarray following the local edge orien...
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals)
This function evaluates the expansion at a single (arbitrary) point of the domain.