47 namespace LocalRegions
52 StdExpansion (Ba.GetNumModes()*Bb.GetNumModes(),2,Ba,Bb),
53 StdExpansion2D(Ba.GetNumModes()*Bb.GetNumModes(),Ba,Bb),
58 boost::bind(&
QuadExp::CreateMatrix, this, _1),
59 std::string(
"QuadExpMatrix")),
60 m_staticCondMatrixManager(
61 boost::bind(&
QuadExp::CreateStaticCondMatrix, this, _1),
62 std::string(
"QuadExpStaticCondMatrix"))
73 m_matrixManager(T.m_matrixManager),
74 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
88 int nquad0 =
m_base[0]->GetNumPoints();
89 int nquad1 =
m_base[1]->GetNumPoints();
97 Vmath::Vmul(nquad0*nquad1, jac, 1, inarray, 1, tmp, 1);
101 Vmath::Smul(nquad0*nquad1, jac[0], inarray, 1, tmp, 1);
105 ival = StdQuadExp::v_Integral(tmp);
116 int nquad0 =
m_base[0]->GetNumPoints();
117 int nquad1 =
m_base[1]->GetNumPoints();
118 int nqtot = nquad0*nquad1;
123 StdQuadExp::v_PhysDeriv(inarray, diff0, diff1);
127 if (out_d0.num_elements())
129 Vmath::Vmul (nqtot, df[0], 1, diff0, 1, out_d0, 1);
134 if(out_d1.num_elements())
137 Vmath::Vvtvp (nqtot,df[3],1,diff1,1, out_d1, 1, out_d1,1);
140 if (out_d2.num_elements())
143 Vmath::Vvtvp (nqtot,df[5],1,diff1,1, out_d2, 1, out_d2,1);
148 if (out_d0.num_elements())
150 Vmath::Smul (nqtot, df[0][0], diff0, 1, out_d0, 1);
151 Blas::Daxpy (nqtot, df[1][0], diff1, 1, out_d0, 1);
154 if (out_d1.num_elements())
156 Vmath::Smul (nqtot, df[2][0], diff0, 1, out_d1, 1);
157 Blas::Daxpy (nqtot, df[3][0], diff1, 1, out_d1, 1);
160 if (out_d2.num_elements())
162 Vmath::Smul (nqtot, df[4][0], diff0, 1, out_d2, 1);
163 Blas::Daxpy (nqtot, df[5][0], diff1, 1, out_d2, 1);
196 ASSERTL1(
false,
"input dir is out of range");
208 int nquad0 =
m_base[0]->GetNumPoints();
209 int nquad1 =
m_base[1]->GetNumPoints();
210 int nqtot = nquad0*nquad1;
217 StdQuadExp::v_PhysDeriv(inarray, diff0, diff1);
224 for (
int i=0; i< 2; ++i)
227 for (
int k=0; k<(
m_geom->GetCoordim()); ++k)
231 &direction[k*nqtot], 1,
238 if (out.num_elements())
264 if ((
m_base[0]->Collocation())&&(
m_base[1]->Collocation()))
290 if ((
m_base[0]->Collocation())&&(
m_base[1]->Collocation()))
297 int npoints[2] = {
m_base[0]->GetNumPoints(),
298 m_base[1]->GetNumPoints()};
299 int nmodes[2] = {
m_base[0]->GetNumModes(),
300 m_base[1]->GetNumModes()};
302 fill(outarray.get(), outarray.get()+
m_ncoeffs, 0.0 );
307 for (i = 0; i < 4; i++)
314 for (i = 0; i < npoints[0]; i++)
316 physEdge[0][i] = inarray[i];
317 physEdge[2][i] = inarray[npoints[0]*npoints[1]-1-i];
320 for (i = 0; i < npoints[1]; i++)
323 inarray[npoints[0]-1+i*npoints[0]];
325 inarray[(npoints[1]-1)*npoints[0]-i*npoints[0]];
328 for (i = 0; i < 4; i++)
332 reverse((physEdge[i]).
get(),
333 (physEdge[i]).
get() + npoints[i%2] );
338 for (i = 0; i < 4; i++)
349 for (i = 0; i < 4; i++)
351 segexp[i%2]->FwdTrans_BndConstrained(
352 physEdge[i],coeffEdge[i]);
355 for (j=0; j < nmodes[i%2]; j++)
358 outarray[ mapArray[j] ] = sign * coeffEdge[i][j];
363 int nInteriorDofs =
m_ncoeffs - nBoundaryDofs;
365 if (nInteriorDofs > 0) {
389 for (i = 0; i < nInteriorDofs; i++)
391 rhs[i] = tmp1[ mapArray[i] ];
394 Blas::Dgemv(
'N', nInteriorDofs, nInteriorDofs,
396 &((matsys->GetOwnedMatrix())->GetPtr())[0],
397 nInteriorDofs,rhs.get(),1,0.0,result.get(),1);
399 for (i = 0; i < nInteriorDofs; i++)
401 outarray[ mapArray[i] ] = result[i];
413 if (
m_base[0]->Collocation() &&
m_base[1]->Collocation())
436 bool multiplybyweights)
438 int nquad0 =
m_base[0]->GetNumPoints();
439 int nquad1 =
m_base[1]->GetNumPoints();
440 int order0 =
m_base[0]->GetNumModes();
442 if(multiplybyweights)
448 StdQuadExp::IProductWRTBase_SumFacKernel(
m_base[0]->GetBdata(),
450 tmp,outarray,wsp,
true,
true);
456 StdQuadExp::IProductWRTBase_SumFacKernel(
m_base[0]->GetBdata(),
458 inarray,outarray,wsp,
true,
true);
472 Blas::Dgemv(
'N',
m_ncoeffs,nq,iprodmat->Scale(),
473 (iprodmat->GetOwnedMatrix())->GetPtr().get(),
474 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
484 ASSERTL1((dir==0) || (dir==1) || (dir==2),
485 "Invalid direction.");
487 "Invalid direction.");
489 int nquad0 =
m_base[0]->GetNumPoints();
490 int nquad1 =
m_base[1]->GetNumPoints();
491 int nqtot = nquad0*nquad1;
492 int nmodes0 =
m_base[0]->GetNumModes();
515 df[2*dir][0], inarray.get(), 1,
518 df[2*dir+1][0], inarray.get(), 1,
527 tmp1, tmp3, tmp4,
false,
true);
530 tmp2, outarray, tmp4,
true,
false);
562 ASSERTL1(
false,
"input dir is out of range");
570 Blas::Dgemv(
'N',
m_ncoeffs, nq, iprodmat->Scale(),
571 (iprodmat->GetOwnedMatrix())->GetPtr().get(),
572 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
582 int nq =
m_base[0]->GetNumPoints()*
m_base[1]->GetNumPoints();
592 &normals[1][0],1,&Fy[0],1,&Fn[0],1);
593 Vmath::Vvtvp (nq,&normals[2][0],1,&Fz[0],1,&Fn[0],1,&Fn[0],1);
598 normals[1][0],&Fy[0],1,&Fn[0],1);
599 Vmath::Svtvp (nq,normals[2][0],&Fz[0],1,&Fn[0],1,&Fn[0],1);
616 m_base[1]->GetBasisKey());
633 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[1] <= 1.0 &&
634 Lcoords[1] >= -1.0 && Lcoords[1] <=1.0,
635 "Local coordinates are not in region [-1,1]");
638 for (i = 0; i <
m_geom->GetCoordim(); ++i)
640 coords[i] =
m_geom->GetCoord(i,Lcoords);
656 return StdQuadExp::v_PhysEvaluate(Lcoord,physvals);
666 m_geom->GetLocCoords(coord,Lcoord);
668 return StdQuadExp::v_PhysEvaluate(Lcoord, physvals);
680 int nquad0 =
m_base[0]->GetNumPoints();
681 int nquad1 =
m_base[1]->GetNumPoints();
706 -nquad0, &(outarray[0]),1);
725 -nquad0,&(outarray[0]),1);
734 ASSERTL0(
false,
"edge value (< 3) is out of range");
757 int nquad0 =
m_base[0]->GetNumPoints();
758 int nquad1 =
m_base[1]->GetNumPoints();
774 nquad0,&(outarray[0]),1);
785 ASSERTL0(
false,
"edge value (< 3) is out of range");
795 if (
m_base[edge%2]->GetPointsKey() !=
796 EdgeExp->GetBasis(0)->GetPointsKey())
803 m_base[edge%2]->GetPointsKey(), outtmp,
804 EdgeExp->GetBasis(0)->GetPointsKey(), outarray);
820 int nq0 =
m_base[0]->GetNumPoints();
821 int nq1 =
m_base[1]->GetNumPoints();
836 for (i = 0; i < nq0; i++)
839 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
840 1, &inarray[i], nq0);
846 for (i = 0; i < nq1; i++)
849 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
850 1, &inarray[i * nq0], 1);
856 for (i = 0; i < nq0; i++)
859 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
860 1, &inarray[i], nq0);
866 for (i = 0; i < nq1; i++)
869 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
870 1, &inarray[i * nq0], 1);
875 ASSERTL0(
false,
"edge value (< 3) is out of range");
885 int nquad0 =
m_base[0]->GetNumPoints();
886 int nquad1 =
m_base[1]->GetNumPoints();
893 for (
int i = 0; i < nquad0; ++i)
900 for (
int i = 0; i < nquad1; ++i)
902 outarray[i] = (nquad0-1) + i*nquad0;
907 for (
int i = 0; i < nquad0; ++i)
909 outarray[i] = i + nquad0*(nquad1-1);
914 for (
int i = 0; i < nquad1; ++i)
916 outarray[i] = i + i*(nquad0-1);
920 ASSERTL0(
false,
"edge value (< 3) is out of range");
934 int nquad0 =
m_base[0]->GetNumPoints();
935 int nquad1 =
m_base[1]->GetNumPoints();
952 &&
m_base[1]->GetPointsType() !=
964 for (i = 0; i < nquad0; ++i)
966 outarray[i] = j[i]*sqrt(g1[i]*g1[i]
972 &(df[0][0])+(nquad0-1), nquad0,
976 &(df[2][0])+(nquad0-1), nquad0,
980 &(jac[0])+(nquad0-1), nquad0,
983 for (i = 0; i < nquad1; ++i)
985 outarray[i] = j[i]*sqrt(g0[i]*g0[i] +
992 &(df[1][0])+(nquad0*nquad1-1), -1,
996 &(df[3][0])+(nquad0*nquad1-1), -1,
1000 &(jac[0])+(nquad0*nquad1-1), -1,
1003 for (i = 0; i < nquad0; ++i)
1005 outarray[i] = j[i]*sqrt(g1[i]*g1[i]
1012 &(df[0][0])+nquad0*(nquad1-1),
1013 -nquad0,&(g0[0]), 1);
1016 &(df[2][0])+nquad0*(nquad1-1),
1017 -nquad0,&(g2[0]), 1);
1020 &(jac[0])+nquad0*(nquad1-1), -nquad0,
1023 for (i = 0; i < nquad1; ++i)
1025 outarray[i] = j[i]*sqrt(g0[i]*g0[i] +
1030 ASSERTL0(
false,
"edge value (< 3) is out of range");
1036 int nqtot = nquad0 * nquad1;
1055 edge, tmp_gmat1, g1_edge);
1057 edge, tmp_gmat3, g3_edge);
1059 for (i = 0; i < nquad0; ++i)
1061 outarray[i] = sqrt(g1_edge[i]*g1_edge[i] +
1062 g3_edge[i]*g3_edge[i]);
1070 &(tmp_gmat0[0]), 1);
1077 edge, tmp_gmat0, g0_edge);
1079 edge, tmp_gmat2, g2_edge);
1081 for (i = 0; i < nquad1; ++i)
1083 outarray[i] = sqrt(g0_edge[i]*g0_edge[i]
1084 + g2_edge[i]*g2_edge[i]);
1093 &(tmp_gmat1[0]), 1);
1099 edge, tmp_gmat1, g1_edge);
1101 edge, tmp_gmat3, g3_edge);
1104 for (i = 0; i < nquad0; ++i)
1106 outarray[i] = sqrt(g1_edge[i]*g1_edge[i]
1107 + g3_edge[i]*g3_edge[i]);
1117 &(tmp_gmat0[0]), 1);
1123 edge, tmp_gmat0, g0_edge);
1125 edge, tmp_gmat2, g2_edge);
1128 for (i = 0; i < nquad1; ++i)
1130 outarray[i] = sqrt(g0_edge[i]*g0_edge[i] +
1131 g2_edge[i]*g2_edge[i]);
1140 ASSERTL0(
false,
"edge value (< 3) is out of range");
1154 for (i = 0; i < nquad0; ++i)
1156 outarray[i] = jac[0]*sqrt(df[1][0]*df[1][0] +
1161 for (i = 0; i < nquad1; ++i)
1163 outarray[i] = jac[0]*sqrt(df[0][0]*df[0][0] +
1168 for (i = 0; i < nquad0; ++i)
1170 outarray[i] = jac[0]*sqrt(df[1][0]*df[1][0] +
1175 for (i = 0; i < nquad1; ++i)
1177 outarray[i] = jac[0]*sqrt(df[0][0]*df[0][0] +
1182 ASSERTL0(
false,
"edge value (< 3) is out of range");
1199 if (edge == 0 || edge == 2)
1201 nqe =
m_base[0]->GetNumPoints();
1205 nqe =
m_base[1]->GetNumPoints();
1212 for (i = 0; i < vCoordDim; ++i)
1226 for (i = 0; i < vCoordDim; ++i)
1232 for (i = 0; i < vCoordDim; ++i)
1238 for (i = 0; i < vCoordDim; ++i)
1244 for (i = 0; i < vCoordDim; ++i)
1250 ASSERTL0(
false,
"edge is out of range (edge < 4)");
1255 for (i =0 ; i < vCoordDim; ++i)
1257 fac += normal[i][0]*normal[i][0];
1259 fac = 1.0/sqrt(fac);
1260 for (i = 0; i < vCoordDim; ++i)
1269 int nquad0 = ptsKeys[0].GetNumPoints();
1270 int nquad1 = ptsKeys[1].GetNumPoints();
1290 for (j = 0; j < nquad0; ++j)
1292 edgejac[j] = jac[j];
1293 for (i = 0; i < vCoordDim; ++i)
1295 normals[i*nquad0+j] =
1296 -df[2*i+1][j]*edgejac[j];
1299 from_key = ptsKeys[0];
1302 for (j = 0; j < nquad1; ++j)
1304 edgejac[j] = jac[nquad0*j+nquad0-1];
1305 for (i = 0; i < vCoordDim; ++i)
1307 normals[i*nquad1+j] =
1308 df[2*i][nquad0*j + nquad0-1]
1312 from_key = ptsKeys[1];
1315 for (j = 0; j < nquad0; ++j)
1317 edgejac[j] = jac[nquad0*(nquad1-1)+j];
1318 for (i = 0; i < vCoordDim; ++i)
1320 normals[i*nquad0+j] =
1321 (df[2*i+1][nquad0*(nquad1-1)+j])
1325 from_key = ptsKeys[0];
1328 for (j = 0; j < nquad1; ++j)
1330 edgejac[j] = jac[nquad0*j];
1331 for (i = 0; i < vCoordDim; ++i)
1333 normals[i*nquad1+j] =
1334 -df[2*i][nquad0*j]*edgejac[j];
1337 from_key = ptsKeys[1];
1340 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1345 int nqtot = nquad0 * nquad1;
1352 for (j = 0; j < nquad0; ++j)
1354 for (i = 0; i < vCoordDim; ++i)
1361 edge, tmp_gmat, tmp_gmat_edge);
1362 normals[i*nquad0+j] = -tmp_gmat_edge[j];
1365 from_key = ptsKeys[0];
1368 for (j = 0; j < nquad1; ++j)
1370 for (i = 0; i < vCoordDim; ++i)
1377 edge, tmp_gmat, tmp_gmat_edge);
1378 normals[i*nquad1+j] = tmp_gmat_edge[j];
1381 from_key = ptsKeys[1];
1384 for (j = 0; j < nquad0; ++j)
1386 for (i = 0; i < vCoordDim; ++i)
1393 edge, tmp_gmat, tmp_gmat_edge);
1394 normals[i*nquad0+j] = tmp_gmat_edge[j];
1397 from_key = ptsKeys[0];
1400 for (j = 0; j < nquad1; ++j)
1402 for (i = 0; i < vCoordDim; ++i)
1409 edge, tmp_gmat, tmp_gmat_edge);
1410 normals[i*nquad1+j] = -tmp_gmat_edge[j];
1413 from_key = ptsKeys[1];
1416 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1425 from_key,jac,
m_base[0]->GetPointsKey(), work);
1432 from_key,&normals[i*nq],
1433 m_base[0]->GetPointsKey(),
1435 Vmath::Vmul(nqe, work, 1, normal[i], 1, normal[i], 1);
1454 Vmath::Vmul(nqe, normal[i], 1, work, 1, normal[i], 1);
1469 for (i = 0; i < vCoordDim; ++i)
1487 return m_geom->GetCoordim();
1493 const std::vector<unsigned int > &nummodes,
1497 int data_order0 = nummodes[mode_offset];
1498 int fillorder0 = std::min(
m_base[0]->GetNumModes(),data_order0);
1500 int data_order1 = nummodes[mode_offset + 1];
1501 int order1 =
m_base[1]->GetNumModes();
1502 int fillorder1 = min(order1,data_order1);
1514 "Extraction routine not set up for this basis");
1517 for (i = 0; i < fillorder0; ++i)
1519 Vmath::Vcopy(fillorder1, data + cnt, 1, coeffs +cnt1, 1);
1533 m_base[0]->GetPointsKey(),
1534 m_base[1]->GetPointsKey(),
1546 m_base[0]->GetPointsKey(),
1547 m_base[1]->GetPointsKey(),
1553 "basis is either not set up or not hierarchicial");
1560 return m_geom->GetEorient(edge);
1566 return GetGeom2D()->GetCartesianEorient(edge);
1572 ASSERTL1(dir >= 0 &&dir <= 1,
"input dir is out of range");
1598 returnval = StdQuadExp::v_GenMatrix(mkey);
1610 return tmp->GetStdMatrix(mkey);
1620 "Geometric information is not set up");
1709 int rows = deriv0.GetRows();
1710 int cols = deriv1.GetColumns();
1714 (*WeakDeriv) = df[2*dir][0]*deriv0 +
1715 df[2*dir+1][0]*deriv1;
1751 int rows = lap00.GetRows();
1752 int cols = lap00.GetColumns();
1757 (*lap) = gmat[0][0] * lap00 +
1758 gmat[1][0] * (lap01 +
Transpose(lap01)) +
1783 int rows = LapMat.GetRows();
1784 int cols = LapMat.GetColumns();
1790 (*helm) = LapMat + lambda*MassMat;
1857 int rows = stdiprod0.GetRows();
1858 int cols = stdiprod1.GetColumns();
1862 (*mat) = df[2*dir][0]*stdiprod0 +
1863 df[2*dir+1][0]*stdiprod1;
1891 coords[0] = (edge == 0 || edge == 3) ? -1.0 : 1.0;
1893 m_Ix =
m_base[(edge + 1) % 2]->GetI(coords);
1935 "Geometric information is not set up");
1939 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1940 unsigned int exp_size[] = {nbdry,nint};
1941 unsigned int nblks = 2;
1956 goto UseLocRegionsMatrix;
1961 goto UseStdRegionsMatrix;
1967 goto UseLocRegionsMatrix;
1969 UseStdRegionsMatrix:
1978 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(0,0)));
1980 AllocateSharedPtr(one,Asubmat = mat->GetBlock(0,1)));
1982 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(1,0)));
1984 AllocateSharedPtr(invfactor,Asubmat = mat->GetBlock(1,1)));
1987 UseLocRegionsMatrix:
2007 for (i = 0; i < nbdry; ++i)
2009 for(j = 0; j < nbdry; ++j)
2011 (*A)(i,j) = mat(bmap[i],bmap[j]);
2014 for(j = 0; j < nint; ++j)
2016 (*B)(i,j) = mat(bmap[i],imap[j]);
2020 for (i = 0; i < nint; ++i)
2022 for(j = 0; j < nbdry; ++j)
2024 (*C)(i,j) = mat(imap[i],bmap[j]);
2027 for(j = 0; j < nint; ++j)
2029 (*D)(i,j) = mat(imap[i],imap[j]);
2038 (*A) = (*A) - (*B)*(*C);
2044 AllocateSharedPtr(factor, A));
2046 AllocateSharedPtr(one, B));
2048 AllocateSharedPtr(factor, C));
2050 AllocateSharedPtr(invfactor, D));
2081 StdExpansion::MassMatrixOp_MatFree(inarray, outarray, mkey);
2101 StdExpansion::LaplacianMatrixOp_MatFree(
2102 k1, k2, inarray, outarray, mkey);
2112 StdExpansion::WeakDerivMatrixOp_MatFree(i, inarray, outarray, mkey);
2121 StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(
2122 inarray, outarray, mkey);
2131 StdExpansion::MassLevelCurvatureMatrixOp_MatFree(
2132 inarray, outarray, mkey);
2153 if (inarray.get() == outarray.get())
2159 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2160 tmp.get(), 1, 0.0, outarray.get(), 1);
2165 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2166 inarray.get(), 1, 0.0, outarray.get(), 1);
2175 int n_coeffs = inarray.num_elements();
2181 int nmodes0 =
m_base[0]->GetNumModes();
2182 int nmodes1 =
m_base[1]->GetNumModes();
2183 int numMax = nmodes0;
2201 b0, b1, coeff_tmp, bortho0, bortho1, coeff);
2206 for (
int i = 0; i < numMin+1; ++i)
2210 tmp2 = coeff_tmp+cnt,1);
2216 bortho0, bortho1, coeff_tmp,
2230 int nquad0 =
m_base[0]->GetNumPoints();
2231 int nquad1 =
m_base[1]->GetNumPoints();
2232 int nqtot = nquad0*nquad1;
2233 int nmodes0 =
m_base[0]->GetNumModes();
2234 int nmodes1 =
m_base[1]->GetNumModes();
2235 int wspsize = max(max(max(nqtot,
m_ncoeffs),nquad1*nmodes0),nquad0*nmodes1);
2237 ASSERTL1(wsp.num_elements() >= 3*wspsize,
2238 "Workspace is of insufficient size.");
2253 StdExpansion2D::PhysTensorDeriv(inarray,wsp1,wsp2);
2259 Vmath::Vvtvvtp(nqtot,&metric00[0],1,&wsp1[0],1,&metric01[0],1,&wsp2[0],1,&wsp0[0],1);
2260 Vmath::Vvtvvtp(nqtot,&metric01[0],1,&wsp1[0],1,&metric11[0],1,&wsp2[0],1,&wsp2[0],1);
2281 const unsigned int dim = 2;
2289 for (
unsigned int i = 0; i < dim; ++i)
2291 for (
unsigned int j = i; j < dim; ++j)
2334 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.