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();
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);
609 m_base[1]->GetBasisKey());
626 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[1] <= 1.0 &&
627 Lcoords[1] >= -1.0 && Lcoords[1] <=1.0,
628 "Local coordinates are not in region [-1,1]");
631 for (i = 0; i <
m_geom->GetCoordim(); ++i)
633 coords[i] =
m_geom->GetCoord(i,Lcoords);
649 return StdQuadExp::v_PhysEvaluate(Lcoord,physvals);
659 m_geom->GetLocCoords(coord,Lcoord);
661 return StdQuadExp::v_PhysEvaluate(Lcoord, physvals);
673 int nquad0 =
m_base[0]->GetNumPoints();
674 int nquad1 =
m_base[1]->GetNumPoints();
699 -nquad0, &(outarray[0]),1);
718 -nquad0,&(outarray[0]),1);
727 ASSERTL0(
false,
"edge value (< 3) is out of range");
750 int nquad0 =
m_base[0]->GetNumPoints();
751 int nquad1 =
m_base[1]->GetNumPoints();
767 nquad0,&(outarray[0]),1);
778 ASSERTL0(
false,
"edge value (< 3) is out of range");
788 if (
m_base[edge%2]->GetPointsKey() !=
789 EdgeExp->GetBasis(0)->GetPointsKey())
796 m_base[edge%2]->GetPointsKey(),outtmp,
797 EdgeExp->GetBasis(0)->GetPointsKey(),outarray);
813 int nq0 =
m_base[0]->GetNumPoints();
814 int nq1 =
m_base[1]->GetNumPoints();
829 for (i = 0; i < nq0; i++)
832 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
833 1, &inarray[i], nq0);
839 for (i = 0; i < nq1; i++)
842 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
843 1, &inarray[i * nq0], 1);
849 for (i = 0; i < nq0; i++)
852 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
853 1, &inarray[i], nq0);
859 for (i = 0; i < nq1; i++)
862 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
863 1, &inarray[i * nq0], 1);
868 ASSERTL0(
false,
"edge value (< 3) is out of range");
878 int nquad0 =
m_base[0]->GetNumPoints();
879 int nquad1 =
m_base[1]->GetNumPoints();
896 &&
m_base[1]->GetPointsType() !=
908 for (i = 0; i < nquad0; ++i)
910 outarray[i] = j[i]*sqrt(g1[i]*g1[i]
916 &(df[0][0])+(nquad0-1), nquad0,
920 &(df[2][0])+(nquad0-1), nquad0,
924 &(jac[0])+(nquad0-1), nquad0,
927 for (i = 0; i < nquad0; ++i)
929 outarray[i] = j[i]*sqrt(g0[i]*g0[i] +
936 &(df[1][0])+(nquad0*nquad1-1), -1,
940 &(df[3][0])+(nquad0*nquad1-1), -1,
944 &(jac[0])+(nquad0*nquad1-1), -1,
947 for (i = 0; i < nquad0; ++i)
949 outarray[i] = j[i]*sqrt(g1[i]*g1[i]
956 &(df[0][0])+nquad0*(nquad1-1),
957 -nquad0,&(g0[0]), 1);
960 &(df[2][0])+nquad0*(nquad1-1),
961 -nquad0,&(g2[0]), 1);
964 &(jac[0])+nquad0*(nquad1-1), -nquad0,
967 for (i = 0; i < nquad0; ++i)
969 outarray[i] = j[i]*sqrt(g0[i]*g0[i] +
974 ASSERTL0(
false,
"edge value (< 3) is out of range");
980 int nqtot = nquad0 * nquad1;
999 edge, tmp_gmat1, g1_edge);
1001 edge, tmp_gmat3, g3_edge);
1003 for (i = 0; i < nquad0; ++i)
1005 outarray[i] = sqrt(g1_edge[i]*g1_edge[i] +
1006 g3_edge[i]*g3_edge[i]);
1014 &(tmp_gmat0[0]), 1);
1021 edge, tmp_gmat0, g0_edge);
1023 edge, tmp_gmat2, g2_edge);
1025 for (i = 0; i < nquad1; ++i)
1027 outarray[i] = sqrt(g0_edge[i]*g0_edge[i]
1028 + g2_edge[i]*g2_edge[i]);
1037 &(tmp_gmat1[0]), 1);
1043 edge, tmp_gmat1, g1_edge);
1045 edge, tmp_gmat3, g3_edge);
1048 for (i = 0; i < nquad0; ++i)
1050 outarray[i] = sqrt(g1_edge[i]*g1_edge[i]
1051 + g3_edge[i]*g3_edge[i]);
1061 &(tmp_gmat0[0]), 1);
1067 edge, tmp_gmat0, g0_edge);
1069 edge, tmp_gmat2, g2_edge);
1072 for (i = 0; i < nquad1; ++i)
1074 outarray[i] = sqrt(g0_edge[i]*g0_edge[i] +
1075 g2_edge[i]*g2_edge[i]);
1084 ASSERTL0(
false,
"edge value (< 3) is out of range");
1098 for (i = 0; i < nquad0; ++i)
1100 outarray[i] = jac[0]*sqrt(df[1][0]*df[1][0] +
1105 for (i = 0; i < nquad1; ++i)
1107 outarray[i] = jac[0]*sqrt(df[0][0]*df[0][0] +
1112 for (i = 0; i < nquad0; ++i)
1114 outarray[i] = jac[0]*sqrt(df[1][0]*df[1][0] +
1119 for (i = 0; i < nquad1; ++i)
1121 outarray[i] = jac[0]*sqrt(df[0][0]*df[0][0] +
1126 ASSERTL0(
false,
"edge value (< 3) is out of range");
1142 int nqe =
m_base[0]->GetNumPoints();
1148 for (i = 0; i < vCoordDim; ++i)
1162 for (i = 0; i < vCoordDim; ++i)
1168 for (i = 0; i < vCoordDim; ++i)
1174 for (i = 0; i < vCoordDim; ++i)
1180 for (i = 0; i < vCoordDim; ++i)
1186 ASSERTL0(
false,
"edge is out of range (edge < 4)");
1191 for (i =0 ; i < vCoordDim; ++i)
1193 fac += normal[i][0]*normal[i][0];
1195 fac = 1.0/sqrt(fac);
1196 for (i = 0; i < vCoordDim; ++i)
1205 int nquad0 = ptsKeys[0].GetNumPoints();
1206 int nquad1 = ptsKeys[1].GetNumPoints();
1226 for (j = 0; j < nquad0; ++j)
1228 edgejac[j] = jac[j];
1229 for (i = 0; i < vCoordDim; ++i)
1231 normals[i*nquad0+j] =
1232 -df[2*i+1][j]*edgejac[j];
1235 from_key = ptsKeys[0];
1238 for (j = 0; j < nquad1; ++j)
1240 edgejac[j] = jac[nquad0*j+nquad0-1];
1241 for (i = 0; i < vCoordDim; ++i)
1243 normals[i*nquad1+j] =
1244 df[2*i][nquad0*j + nquad0-1]
1248 from_key = ptsKeys[1];
1251 for (j = 0; j < nquad0; ++j)
1253 edgejac[j] = jac[nquad0*(nquad1-1)+j];
1254 for (i = 0; i < vCoordDim; ++i)
1256 normals[i*nquad0+j] =
1257 (df[2*i+1][nquad0*(nquad1-1)+j])
1261 from_key = ptsKeys[0];
1264 for (j = 0; j < nquad1; ++j)
1266 edgejac[j] = jac[nquad0*j];
1267 for (i = 0; i < vCoordDim; ++i)
1269 normals[i*nquad1+j] =
1270 -df[2*i][nquad0*j]*edgejac[j];
1273 from_key = ptsKeys[1];
1276 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1281 int nqtot = nquad0 * nquad1;
1288 for (j = 0; j < nquad0; ++j)
1290 for (i = 0; i < vCoordDim; ++i)
1297 edge, tmp_gmat, tmp_gmat_edge);
1298 normals[i*nquad0+j] = -tmp_gmat_edge[j];
1301 from_key = ptsKeys[0];
1304 for (j = 0; j < nquad1; ++j)
1306 for (i = 0; i < vCoordDim; ++i)
1313 edge, tmp_gmat, tmp_gmat_edge);
1314 normals[i*nquad1+j] = tmp_gmat_edge[j];
1317 from_key = ptsKeys[1];
1320 for (j = 0; j < nquad0; ++j)
1322 for (i = 0; i < vCoordDim; ++i)
1329 edge, tmp_gmat, tmp_gmat_edge);
1330 normals[i*nquad0+j] = tmp_gmat_edge[j];
1333 from_key = ptsKeys[0];
1336 for (j = 0; j < nquad1; ++j)
1338 for (i = 0; i < vCoordDim; ++i)
1345 edge, tmp_gmat, tmp_gmat_edge);
1346 normals[i*nquad1+j] = -tmp_gmat_edge[j];
1349 from_key = ptsKeys[1];
1352 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1361 from_key,jac,
m_base[0]->GetPointsKey(), work);
1368 from_key,&normals[i*nq],
1369 m_base[0]->GetPointsKey(),
1371 Vmath::Vmul(nqe, work, 1, normal[i], 1, normal[i], 1);
1390 Vmath::Vmul(nqe, normal[i], 1, work, 1, normal[i], 1);
1405 for (i = 0; i < vCoordDim; ++i)
1423 return m_geom->GetCoordim();
1429 const std::vector<unsigned int > &nummodes,
1433 int data_order0 = nummodes[mode_offset];
1434 int fillorder0 = std::min(
m_base[0]->GetNumModes(),data_order0);
1436 int data_order1 = nummodes[mode_offset + 1];
1437 int order1 =
m_base[1]->GetNumModes();
1438 int fillorder1 = min(order1,data_order1);
1450 "Extraction routine not set up for this basis");
1453 for (i = 0; i < fillorder0; ++i)
1455 Vmath::Vcopy(fillorder1, data + cnt, 1, coeffs +cnt1, 1);
1469 m_base[0]->GetPointsKey(),
1470 m_base[1]->GetPointsKey(),
1482 m_base[0]->GetPointsKey(),
1483 m_base[1]->GetPointsKey(),
1489 "basis is either not set up or not hierarchicial");
1496 return m_geom->GetEorient(edge);
1502 return GetGeom2D()->GetCartesianEorient(edge);
1508 ASSERTL1(dir >= 0 &&dir <= 1,
"input dir is out of range");
1534 returnval = StdQuadExp::v_GenMatrix(mkey);
1546 return tmp->GetStdMatrix(mkey);
1556 "Geometric information is not set up");
1645 int rows = deriv0.GetRows();
1646 int cols = deriv1.GetColumns();
1650 (*WeakDeriv) = df[2*dir][0]*deriv0 +
1651 df[2*dir+1][0]*deriv1;
1687 int rows = lap00.GetRows();
1688 int cols = lap00.GetColumns();
1693 (*lap) = gmat[0][0] * lap00 +
1694 gmat[1][0] * (lap01 +
Transpose(lap01)) +
1719 int rows = LapMat.GetRows();
1720 int cols = LapMat.GetColumns();
1726 (*helm) = LapMat + lambda*MassMat;
1793 int rows = stdiprod0.GetRows();
1794 int cols = stdiprod1.GetColumns();
1798 (*mat) = df[2*dir][0]*stdiprod0 +
1799 df[2*dir+1][0]*stdiprod1;
1827 coords[0] = (edge == 0 || edge == 3) ? -1.0 : 1.0;
1829 m_Ix =
m_base[(edge + 1) % 2]->GetI(coords);
1871 "Geometric information is not set up");
1875 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1876 unsigned int exp_size[] = {nbdry,nint};
1877 unsigned int nblks = 2;
1892 goto UseLocRegionsMatrix;
1897 goto UseStdRegionsMatrix;
1903 goto UseLocRegionsMatrix;
1905 UseStdRegionsMatrix:
1914 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(0,0)));
1916 AllocateSharedPtr(one,Asubmat = mat->GetBlock(0,1)));
1918 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(1,0)));
1920 AllocateSharedPtr(invfactor,Asubmat = mat->GetBlock(1,1)));
1923 UseLocRegionsMatrix:
1943 for (i = 0; i < nbdry; ++i)
1945 for(j = 0; j < nbdry; ++j)
1947 (*A)(i,j) = mat(bmap[i],bmap[j]);
1950 for(j = 0; j < nint; ++j)
1952 (*B)(i,j) = mat(bmap[i],imap[j]);
1956 for (i = 0; i < nint; ++i)
1958 for(j = 0; j < nbdry; ++j)
1960 (*C)(i,j) = mat(imap[i],bmap[j]);
1963 for(j = 0; j < nint; ++j)
1965 (*D)(i,j) = mat(imap[i],imap[j]);
1974 (*A) = (*A) - (*B)*(*C);
1980 AllocateSharedPtr(factor, A));
1982 AllocateSharedPtr(one, B));
1984 AllocateSharedPtr(factor, C));
1986 AllocateSharedPtr(invfactor, D));
2017 StdExpansion::MassMatrixOp_MatFree(inarray, outarray, mkey);
2037 StdExpansion::LaplacianMatrixOp_MatFree(
2038 k1, k2, inarray, outarray, mkey);
2048 StdExpansion::WeakDerivMatrixOp_MatFree(i, inarray, outarray, mkey);
2057 StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(
2058 inarray, outarray, mkey);
2067 StdExpansion::MassLevelCurvatureMatrixOp_MatFree(
2068 inarray, outarray, mkey);
2089 if (inarray.get() == outarray.get())
2095 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2096 tmp.get(), 1, 0.0, outarray.get(), 1);
2101 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2102 inarray.get(), 1, 0.0, outarray.get(), 1);
2111 int n_coeffs = inarray.num_elements();
2117 int nmodes0 =
m_base[0]->GetNumModes();
2118 int nmodes1 =
m_base[1]->GetNumModes();
2119 int numMax = nmodes0;
2137 b0, b1, coeff_tmp, bortho0, bortho1, coeff);
2142 for (
int i = 0; i < numMin+1; ++i)
2146 tmp2 = coeff_tmp+cnt,1);
2152 bortho0, bortho1, coeff_tmp,
2166 int nquad0 =
m_base[0]->GetNumPoints();
2167 int nquad1 =
m_base[1]->GetNumPoints();
2168 int nqtot = nquad0*nquad1;
2169 int nmodes0 =
m_base[0]->GetNumModes();
2170 int nmodes1 =
m_base[1]->GetNumModes();
2171 int wspsize = max(max(max(nqtot,
m_ncoeffs),nquad1*nmodes0),nquad0*nmodes1);
2173 ASSERTL1(wsp.num_elements() >= 3*wspsize,
2174 "Workspace is of insufficient size.");
2189 StdExpansion2D::PhysTensorDeriv(inarray,wsp1,wsp2);
2195 Vmath::Vvtvvtp(nqtot,&metric00[0],1,&wsp1[0],1,&metric01[0],1,&wsp2[0],1,&wsp0[0],1);
2196 Vmath::Vvtvvtp(nqtot,&metric01[0],1,&wsp1[0],1,&metric11[0],1,&wsp2[0],1,&wsp2[0],1);
2217 const unsigned int dim = 2;
2225 for (
unsigned int i = 0; i < dim; ++i)
2227 for (
unsigned int j = i; j < dim; ++j)
2270 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)
void GetEdgeToElementMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
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 .
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
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 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.