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());
623 2,
m_base[0]->GetPointsKey());
625 2,
m_base[1]->GetPointsKey());
645 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[1] <= 1.0 &&
646 Lcoords[1] >= -1.0 && Lcoords[1] <=1.0,
647 "Local coordinates are not in region [-1,1]");
650 for (i = 0; i <
m_geom->GetCoordim(); ++i)
652 coords[i] =
m_geom->GetCoord(i,Lcoords);
668 return StdQuadExp::v_PhysEvaluate(Lcoord,physvals);
678 m_geom->GetLocCoords(coord,Lcoord);
680 return StdQuadExp::v_PhysEvaluate(Lcoord, physvals);
692 int nquad0 =
m_base[0]->GetNumPoints();
693 int nquad1 =
m_base[1]->GetNumPoints();
718 -nquad0, &(outarray[0]),1);
737 -nquad0,&(outarray[0]),1);
746 ASSERTL0(
false,
"edge value (< 3) is out of range");
769 int nquad0 =
m_base[0]->GetNumPoints();
770 int nquad1 =
m_base[1]->GetNumPoints();
786 nquad0,&(outarray[0]),1);
797 ASSERTL0(
false,
"edge value (< 3) is out of range");
807 if (
m_base[edge%2]->GetPointsKey() !=
808 EdgeExp->GetBasis(0)->GetPointsKey())
815 m_base[edge%2]->GetPointsKey(), outtmp,
816 EdgeExp->GetBasis(0)->GetPointsKey(), outarray);
832 int nq0 =
m_base[0]->GetNumPoints();
833 int nq1 =
m_base[1]->GetNumPoints();
848 for (i = 0; i < nq0; i++)
851 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
852 1, &inarray[i], nq0);
858 for (i = 0; i < nq1; i++)
861 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
862 1, &inarray[i * nq0], 1);
868 for (i = 0; i < nq0; i++)
871 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
872 1, &inarray[i], nq0);
878 for (i = 0; i < nq1; i++)
881 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
882 1, &inarray[i * nq0], 1);
887 ASSERTL0(
false,
"edge value (< 3) is out of range");
897 int nquad0 =
m_base[0]->GetNumPoints();
898 int nquad1 =
m_base[1]->GetNumPoints();
905 for (
int i = 0; i < nquad0; ++i)
912 for (
int i = 0; i < nquad1; ++i)
914 outarray[i] = (nquad0-1) + i*nquad0;
919 for (
int i = 0; i < nquad0; ++i)
921 outarray[i] = i + nquad0*(nquad1-1);
926 for (
int i = 0; i < nquad1; ++i)
928 outarray[i] = i + i*(nquad0-1);
932 ASSERTL0(
false,
"edge value (< 3) is out of range");
946 int nquad0 =
m_base[0]->GetNumPoints();
947 int nquad1 =
m_base[1]->GetNumPoints();
964 &&
m_base[1]->GetPointsType() !=
976 for (i = 0; i < nquad0; ++i)
978 outarray[i] = j[i]*sqrt(g1[i]*g1[i]
984 &(df[0][0])+(nquad0-1), nquad0,
988 &(df[2][0])+(nquad0-1), nquad0,
992 &(jac[0])+(nquad0-1), nquad0,
995 for (i = 0; i < nquad1; ++i)
997 outarray[i] = j[i]*sqrt(g0[i]*g0[i] +
1004 &(df[1][0])+(nquad0*nquad1-1), -1,
1008 &(df[3][0])+(nquad0*nquad1-1), -1,
1012 &(jac[0])+(nquad0*nquad1-1), -1,
1015 for (i = 0; i < nquad0; ++i)
1017 outarray[i] = j[i]*sqrt(g1[i]*g1[i]
1024 &(df[0][0])+nquad0*(nquad1-1),
1025 -nquad0,&(g0[0]), 1);
1028 &(df[2][0])+nquad0*(nquad1-1),
1029 -nquad0,&(g2[0]), 1);
1032 &(jac[0])+nquad0*(nquad1-1), -nquad0,
1035 for (i = 0; i < nquad1; ++i)
1037 outarray[i] = j[i]*sqrt(g0[i]*g0[i] +
1042 ASSERTL0(
false,
"edge value (< 3) is out of range");
1048 int nqtot = nquad0 * nquad1;
1067 edge, tmp_gmat1, g1_edge);
1069 edge, tmp_gmat3, g3_edge);
1071 for (i = 0; i < nquad0; ++i)
1073 outarray[i] = sqrt(g1_edge[i]*g1_edge[i] +
1074 g3_edge[i]*g3_edge[i]);
1082 &(tmp_gmat0[0]), 1);
1089 edge, tmp_gmat0, g0_edge);
1091 edge, tmp_gmat2, g2_edge);
1093 for (i = 0; i < nquad1; ++i)
1095 outarray[i] = sqrt(g0_edge[i]*g0_edge[i]
1096 + g2_edge[i]*g2_edge[i]);
1105 &(tmp_gmat1[0]), 1);
1111 edge, tmp_gmat1, g1_edge);
1113 edge, tmp_gmat3, g3_edge);
1116 for (i = 0; i < nquad0; ++i)
1118 outarray[i] = sqrt(g1_edge[i]*g1_edge[i]
1119 + g3_edge[i]*g3_edge[i]);
1129 &(tmp_gmat0[0]), 1);
1135 edge, tmp_gmat0, g0_edge);
1137 edge, tmp_gmat2, g2_edge);
1140 for (i = 0; i < nquad1; ++i)
1142 outarray[i] = sqrt(g0_edge[i]*g0_edge[i] +
1143 g2_edge[i]*g2_edge[i]);
1152 ASSERTL0(
false,
"edge value (< 3) is out of range");
1166 for (i = 0; i < nquad0; ++i)
1168 outarray[i] = jac[0]*sqrt(df[1][0]*df[1][0] +
1173 for (i = 0; i < nquad1; ++i)
1175 outarray[i] = jac[0]*sqrt(df[0][0]*df[0][0] +
1180 for (i = 0; i < nquad0; ++i)
1182 outarray[i] = jac[0]*sqrt(df[1][0]*df[1][0] +
1187 for (i = 0; i < nquad1; ++i)
1189 outarray[i] = jac[0]*sqrt(df[0][0]*df[0][0] +
1194 ASSERTL0(
false,
"edge value (< 3) is out of range");
1211 if (edge == 0 || edge == 2)
1213 nqe =
m_base[0]->GetNumPoints();
1217 nqe =
m_base[1]->GetNumPoints();
1224 for (i = 0; i < vCoordDim; ++i)
1238 for (i = 0; i < vCoordDim; ++i)
1244 for (i = 0; i < vCoordDim; ++i)
1250 for (i = 0; i < vCoordDim; ++i)
1256 for (i = 0; i < vCoordDim; ++i)
1262 ASSERTL0(
false,
"edge is out of range (edge < 4)");
1267 for (i =0 ; i < vCoordDim; ++i)
1269 fac += normal[i][0]*normal[i][0];
1271 fac = 1.0/sqrt(fac);
1272 for (i = 0; i < vCoordDim; ++i)
1281 int nquad0 = ptsKeys[0].GetNumPoints();
1282 int nquad1 = ptsKeys[1].GetNumPoints();
1302 for (j = 0; j < nquad0; ++j)
1304 edgejac[j] = jac[j];
1305 for (i = 0; i < vCoordDim; ++i)
1307 normals[i*nquad0+j] =
1308 -df[2*i+1][j]*edgejac[j];
1311 from_key = ptsKeys[0];
1314 for (j = 0; j < nquad1; ++j)
1316 edgejac[j] = jac[nquad0*j+nquad0-1];
1317 for (i = 0; i < vCoordDim; ++i)
1319 normals[i*nquad1+j] =
1320 df[2*i][nquad0*j + nquad0-1]
1324 from_key = ptsKeys[1];
1327 for (j = 0; j < nquad0; ++j)
1329 edgejac[j] = jac[nquad0*(nquad1-1)+j];
1330 for (i = 0; i < vCoordDim; ++i)
1332 normals[i*nquad0+j] =
1333 (df[2*i+1][nquad0*(nquad1-1)+j])
1337 from_key = ptsKeys[0];
1340 for (j = 0; j < nquad1; ++j)
1342 edgejac[j] = jac[nquad0*j];
1343 for (i = 0; i < vCoordDim; ++i)
1345 normals[i*nquad1+j] =
1346 -df[2*i][nquad0*j]*edgejac[j];
1349 from_key = ptsKeys[1];
1352 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1357 int nqtot = nquad0 * nquad1;
1364 for (j = 0; j < nquad0; ++j)
1366 for (i = 0; i < vCoordDim; ++i)
1373 edge, tmp_gmat, tmp_gmat_edge);
1374 normals[i*nquad0+j] = -tmp_gmat_edge[j];
1377 from_key = ptsKeys[0];
1380 for (j = 0; j < nquad1; ++j)
1382 for (i = 0; i < vCoordDim; ++i)
1389 edge, tmp_gmat, tmp_gmat_edge);
1390 normals[i*nquad1+j] = tmp_gmat_edge[j];
1393 from_key = ptsKeys[1];
1396 for (j = 0; j < nquad0; ++j)
1398 for (i = 0; i < vCoordDim; ++i)
1405 edge, tmp_gmat, tmp_gmat_edge);
1406 normals[i*nquad0+j] = tmp_gmat_edge[j];
1409 from_key = ptsKeys[0];
1412 for (j = 0; j < nquad1; ++j)
1414 for (i = 0; i < vCoordDim; ++i)
1421 edge, tmp_gmat, tmp_gmat_edge);
1422 normals[i*nquad1+j] = -tmp_gmat_edge[j];
1425 from_key = ptsKeys[1];
1428 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1437 from_key,jac,
m_base[0]->GetPointsKey(), work);
1444 from_key,&normals[i*nq],
1445 m_base[0]->GetPointsKey(),
1447 Vmath::Vmul(nqe, work, 1, normal[i], 1, normal[i], 1);
1466 Vmath::Vmul(nqe, normal[i], 1, work, 1, normal[i], 1);
1481 for (i = 0; i < vCoordDim; ++i)
1499 return m_geom->GetCoordim();
1505 const std::vector<unsigned int > &nummodes,
1508 std::vector<LibUtilities::BasisType> &fromType)
1510 int data_order0 = nummodes[mode_offset];
1511 int fillorder0 = std::min(
m_base[0]->GetNumModes(),data_order0);
1513 int data_order1 = nummodes[mode_offset + 1];
1514 int order1 =
m_base[1]->GetNumModes();
1515 int fillorder1 = min(order1,data_order1);
1526 fromType[0], data_order0,
m_base[0]->GetPointsKey()),
1528 fromType[1], data_order1,
m_base[1]->GetPointsKey()));
1530 m_base[1]->GetBasisKey());
1538 Vmath::Vcopy(tmpOut.num_elements(), &tmpOut[0], 1, coeffs, 1);
1553 "Extraction routine not set up for this basis");
1556 for (i = 0; i < fillorder0; ++i)
1558 Vmath::Vcopy(fillorder1, data + cnt, 1, coeffs +cnt1, 1);
1571 m_base[0]->GetNumModes(),
1574 m_base[1]->GetNumModes(),
1587 m_base[0]->GetNumModes(),
1590 m_base[1]->GetNumModes(),
1597 "basis is either not set up or not hierarchicial");
1604 return m_geom->GetEorient(edge);
1610 return GetGeom2D()->GetCartesianEorient(edge);
1616 ASSERTL1(dir >= 0 &&dir <= 1,
"input dir is out of range");
1642 returnval = StdQuadExp::v_GenMatrix(mkey);
1654 return tmp->GetStdMatrix(mkey);
1664 "Geometric information is not set up");
1753 int rows = deriv0.GetRows();
1754 int cols = deriv1.GetColumns();
1758 (*WeakDeriv) = df[2*dir][0]*deriv0 +
1759 df[2*dir+1][0]*deriv1;
1795 int rows = lap00.GetRows();
1796 int cols = lap00.GetColumns();
1801 (*lap) = gmat[0][0] * lap00 +
1802 gmat[1][0] * (lap01 +
Transpose(lap01)) +
1827 int rows = LapMat.GetRows();
1828 int cols = LapMat.GetColumns();
1834 (*helm) = LapMat + lambda*MassMat;
1901 int rows = stdiprod0.GetRows();
1902 int cols = stdiprod1.GetColumns();
1906 (*mat) = df[2*dir][0]*stdiprod0 +
1907 df[2*dir+1][0]*stdiprod1;
1935 coords[0] = (edge == 0 || edge == 3) ? -1.0 : 1.0;
1937 m_Ix =
m_base[(edge + 1) % 2]->GetI(coords);
1979 "Geometric information is not set up");
1983 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1984 unsigned int exp_size[] = {nbdry,nint};
1985 unsigned int nblks = 2;
2000 goto UseLocRegionsMatrix;
2005 goto UseStdRegionsMatrix;
2011 goto UseLocRegionsMatrix;
2013 UseStdRegionsMatrix:
2022 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(0,0)));
2024 AllocateSharedPtr(one,Asubmat = mat->GetBlock(0,1)));
2026 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(1,0)));
2028 AllocateSharedPtr(invfactor,Asubmat = mat->GetBlock(1,1)));
2031 UseLocRegionsMatrix:
2051 for (i = 0; i < nbdry; ++i)
2053 for(j = 0; j < nbdry; ++j)
2055 (*A)(i,j) = mat(bmap[i],bmap[j]);
2058 for(j = 0; j < nint; ++j)
2060 (*B)(i,j) = mat(bmap[i],imap[j]);
2064 for (i = 0; i < nint; ++i)
2066 for(j = 0; j < nbdry; ++j)
2068 (*C)(i,j) = mat(imap[i],bmap[j]);
2071 for(j = 0; j < nint; ++j)
2073 (*D)(i,j) = mat(imap[i],imap[j]);
2082 (*A) = (*A) - (*B)*(*C);
2088 AllocateSharedPtr(factor, A));
2090 AllocateSharedPtr(one, B));
2092 AllocateSharedPtr(factor, C));
2094 AllocateSharedPtr(invfactor, D));
2125 StdExpansion::MassMatrixOp_MatFree(inarray, outarray, mkey);
2145 StdExpansion::LaplacianMatrixOp_MatFree(
2146 k1, k2, inarray, outarray, mkey);
2156 StdExpansion::WeakDerivMatrixOp_MatFree(i, inarray, outarray, mkey);
2165 StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(
2166 inarray, outarray, mkey);
2175 StdExpansion::MassLevelCurvatureMatrixOp_MatFree(
2176 inarray, outarray, mkey);
2197 if (inarray.get() == outarray.get())
2203 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2204 tmp.get(), 1, 0.0, outarray.get(), 1);
2209 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2210 inarray.get(), 1, 0.0, outarray.get(), 1);
2219 int n_coeffs = inarray.num_elements();
2225 int nmodes0 =
m_base[0]->GetNumModes();
2226 int nmodes1 =
m_base[1]->GetNumModes();
2227 int numMax = nmodes0;
2245 b0, b1, coeff_tmp, bortho0, bortho1, coeff);
2250 for (
int i = 0; i < numMin+1; ++i)
2254 tmp2 = coeff_tmp+cnt,1);
2260 bortho0, bortho1, coeff_tmp,
2274 int nquad0 =
m_base[0]->GetNumPoints();
2275 int nquad1 =
m_base[1]->GetNumPoints();
2276 int nqtot = nquad0*nquad1;
2277 int nmodes0 =
m_base[0]->GetNumModes();
2278 int nmodes1 =
m_base[1]->GetNumModes();
2279 int wspsize = max(max(max(nqtot,
m_ncoeffs),nquad1*nmodes0),nquad0*nmodes1);
2281 ASSERTL1(wsp.num_elements() >= 3*wspsize,
2282 "Workspace is of insufficient size.");
2297 StdExpansion2D::PhysTensorDeriv(inarray,wsp1,wsp2);
2303 Vmath::Vvtvvtp(nqtot,&metric00[0],1,&wsp1[0],1,&metric01[0],1,&wsp2[0],1,&wsp0[0],1);
2304 Vmath::Vvtvvtp(nqtot,&metric01[0],1,&wsp1[0],1,&metric11[0],1,&wsp2[0],1,&wsp2[0],1);
2325 const unsigned int dim = 2;
2333 for (
unsigned int i = 0; i < dim; ++i)
2335 for (
unsigned int j = i; j < dim; ++j)
2378 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 StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const
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
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 BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Backward transformation from coefficient space to physical space...
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()
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
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.
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType)
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Forward transformation from physical space to coefficient space...