35 #include <boost/core/ignore_unused.hpp>
49 namespace LocalRegions
54 StdExpansion (Ba.GetNumModes()*Bb.GetNumModes(),2,Ba,Bb),
55 StdExpansion2D(Ba.GetNumModes()*Bb.GetNumModes(),Ba,Bb),
60 std::bind(&
QuadExp::CreateMatrix, this, std::placeholders::_1),
61 std::string(
"QuadExpMatrix")),
62 m_staticCondMatrixManager(
63 std::bind(&
QuadExp::CreateStaticCondMatrix, this, std::placeholders::_1),
64 std::string(
"QuadExpStaticCondMatrix"))
75 m_matrixManager(T.m_matrixManager),
76 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
90 int nquad0 =
m_base[0]->GetNumPoints();
91 int nquad1 =
m_base[1]->GetNumPoints();
99 Vmath::Vmul(nquad0*nquad1, jac, 1, inarray, 1, tmp, 1);
103 Vmath::Smul(nquad0*nquad1, jac[0], inarray, 1, tmp, 1);
107 ival = StdQuadExp::v_Integral(tmp);
117 int nquad0 =
m_base[0]->GetNumPoints();
118 int nquad1 =
m_base[1]->GetNumPoints();
119 int nqtot = nquad0*nquad1;
124 StdQuadExp::v_PhysDeriv(inarray, diff0, diff1);
128 if (out_d0.num_elements())
130 Vmath::Vmul (nqtot, df[0], 1, diff0, 1, out_d0, 1);
135 if(out_d1.num_elements())
138 Vmath::Vvtvp (nqtot,df[3],1,diff1,1, out_d1, 1, out_d1,1);
141 if (out_d2.num_elements())
144 Vmath::Vvtvp (nqtot,df[5],1,diff1,1, out_d2, 1, out_d2,1);
149 if (out_d0.num_elements())
151 Vmath::Smul (nqtot, df[0][0], diff0, 1, out_d0, 1);
152 Blas::Daxpy (nqtot, df[1][0], diff1, 1, out_d0, 1);
155 if (out_d1.num_elements())
157 Vmath::Smul (nqtot, df[2][0], diff0, 1, out_d1, 1);
158 Blas::Daxpy (nqtot, df[3][0], diff1, 1, out_d1, 1);
161 if (out_d2.num_elements())
163 Vmath::Smul (nqtot, df[4][0], diff0, 1, out_d2, 1);
164 Blas::Daxpy (nqtot, df[5][0], diff1, 1, out_d2, 1);
197 ASSERTL1(
false,
"input dir is out of range");
209 int nquad0 =
m_base[0]->GetNumPoints();
210 int nquad1 =
m_base[1]->GetNumPoints();
211 int nqtot = nquad0*nquad1;
218 StdQuadExp::v_PhysDeriv(inarray, diff0, diff1);
225 for (
int i=0; i< 2; ++i)
228 for (
int k=0; k<(
m_geom->GetCoordim()); ++k)
232 &direction[k*nqtot], 1,
239 if (out.num_elements())
265 if ((
m_base[0]->Collocation())&&(
m_base[1]->Collocation()))
291 if ((
m_base[0]->Collocation())&&(
m_base[1]->Collocation()))
298 int npoints[2] = {
m_base[0]->GetNumPoints(),
299 m_base[1]->GetNumPoints()};
300 int nmodes[2] = {
m_base[0]->GetNumModes(),
301 m_base[1]->GetNumModes()};
303 fill(outarray.get(), outarray.get()+
m_ncoeffs, 0.0 );
305 if(nmodes[0] == 1 && nmodes[1] == 1)
307 outarray[0] = inarray[0];
314 for (i = 0; i < 4; i++)
321 for (i = 0; i < npoints[0]; i++)
323 physEdge[0][i] = inarray[i];
324 physEdge[2][i] = inarray[npoints[0]*(npoints[1]-1)+i];
327 for (i = 0; i < npoints[1]; i++)
330 inarray[npoints[0]-1+i*npoints[0]];
332 inarray[i*npoints[0]];
335 for (i = 0; i < 4; i++)
339 reverse((physEdge[i]).get(),
340 (physEdge[i]).get() + npoints[i%2] );
345 for (i = 0; i < 4; i++)
356 for (i = 0; i < 4; i++)
358 segexp[i%2]->FwdTrans_BndConstrained(
359 physEdge[i],coeffEdge[i]);
362 for (j=0; j < nmodes[i%2]; j++)
365 outarray[ mapArray[j] ] =
sign * coeffEdge[i][j];
370 int nInteriorDofs =
m_ncoeffs - nBoundaryDofs;
372 if (nInteriorDofs > 0) {
396 for (i = 0; i < nInteriorDofs; i++)
398 rhs[i] = tmp1[ mapArray[i] ];
403 &((matsys->GetOwnedMatrix())->GetPtr())[0],
404 nInteriorDofs,
rhs.get(),1,0.0,result.get(),1);
406 for (i = 0; i < nInteriorDofs; i++)
408 outarray[ mapArray[i] ] = result[i];
420 if (
m_base[0]->Collocation() &&
m_base[1]->Collocation())
443 bool multiplybyweights)
445 int nquad0 =
m_base[0]->GetNumPoints();
446 int nquad1 =
m_base[1]->GetNumPoints();
447 int order0 =
m_base[0]->GetNumModes();
449 if(multiplybyweights)
455 StdQuadExp::IProductWRTBase_SumFacKernel(
m_base[0]->GetBdata(),
457 tmp,outarray,wsp,
true,
true);
463 StdQuadExp::IProductWRTBase_SumFacKernel(
m_base[0]->GetBdata(),
465 inarray,outarray,wsp,
true,
true);
480 (iprodmat->GetOwnedMatrix())->GetPtr().get(),
481 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
491 ASSERTL1((dir==0) || (dir==1) || (dir==2),
492 "Invalid direction.");
494 "Invalid direction.");
496 int nquad0 =
m_base[0]->GetNumPoints();
497 int nquad1 =
m_base[1]->GetNumPoints();
498 int nqtot = nquad0*nquad1;
499 int nmodes0 =
m_base[0]->GetNumModes();
522 df[2*dir][0], inarray.get(), 1,
525 df[2*dir+1][0], inarray.get(), 1,
534 tmp1, tmp3, tmp4,
false,
true);
537 tmp2, outarray, tmp4,
true,
false);
569 ASSERTL1(
false,
"input dir is out of range");
578 (iprodmat->GetOwnedMatrix())->GetPtr().get(),
579 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
589 int nq =
m_base[0]->GetNumPoints()*
m_base[1]->GetNumPoints();
599 &normals[1][0],1,&Fy[0],1,&Fn[0],1);
600 Vmath::Vvtvp (nq,&normals[2][0],1,&Fz[0],1,&Fn[0],1,&Fn[0],1);
605 normals[1][0],&Fy[0],1,&Fn[0],1);
606 Vmath::Svtvp (nq,normals[2][0],&Fz[0],1,&Fn[0],1,&Fn[0],1);
623 m_base[1]->GetBasisKey());
630 2,
m_base[0]->GetPointsKey());
632 2,
m_base[1]->GetPointsKey());
652 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[1] <= 1.0 &&
653 Lcoords[1] >= -1.0 && Lcoords[1] <=1.0,
654 "Local coordinates are not in region [-1,1]");
657 for (i = 0; i <
m_geom->GetCoordim(); ++i)
659 coords[i] =
m_geom->GetCoord(i,Lcoords);
675 return StdQuadExp::v_PhysEvaluate(Lcoord,physvals);
685 m_geom->GetLocCoords(coord,Lcoord);
687 return StdQuadExp::v_PhysEvaluate(Lcoord, physvals);
699 int nquad0 =
m_base[0]->GetNumPoints();
700 int nquad1 =
m_base[1]->GetNumPoints();
725 -nquad0, &(outarray[0]),1);
744 -nquad0,&(outarray[0]),1);
753 ASSERTL0(
false,
"edge value (< 3) is out of range");
766 boost::ignore_unused(orient);
777 int nquad0 =
m_base[0]->GetNumPoints();
778 int nquad1 =
m_base[1]->GetNumPoints();
793 nquad0,&(outarray[0]),1);
804 ASSERTL0(
false,
"edge value (< 3) is out of range");
814 if (
m_base[edge%2]->GetPointsKey() !=
815 EdgeExp->GetBasis(0)->GetPointsKey())
822 m_base[edge%2]->GetPointsKey(), outtmp,
823 EdgeExp->GetBasis(0)->GetPointsKey(), outarray);
839 int nq0 =
m_base[0]->GetNumPoints();
840 int nq1 =
m_base[1]->GetNumPoints();
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);
875 for (i = 0; i < nq0; i++)
878 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
879 1, &inarray[i], nq0);
885 for (i = 0; i < nq1; i++)
888 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
889 1, &inarray[i * nq0], 1);
894 ASSERTL0(
false,
"edge value (< 3) is out of range");
904 int nquad0 =
m_base[0]->GetNumPoints();
905 int nquad1 =
m_base[1]->GetNumPoints();
912 for (
int i = 0; i < nquad0; ++i)
919 for (
int i = 0; i < nquad1; ++i)
921 outarray[i] = (nquad0-1) + i*nquad0;
926 for (
int i = 0; i < nquad0; ++i)
928 outarray[i] = i + nquad0*(nquad1-1);
933 for (
int i = 0; i < nquad1; ++i)
935 outarray[i] = i*nquad0;
939 ASSERTL0(
false,
"edge value (< 3) is out of range");
953 int nquad0 =
m_base[0]->GetNumPoints();
954 int nquad1 =
m_base[1]->GetNumPoints();
983 for (i = 0; i < nquad0; ++i)
985 outarray[i] = j[i]*sqrt(g1[i]*g1[i]
991 &(df[0][0])+(nquad0-1), nquad0,
995 &(df[2][0])+(nquad0-1), nquad0,
999 &(jac[0])+(nquad0-1), nquad0,
1002 for (i = 0; i < nquad1; ++i)
1004 outarray[i] = j[i]*sqrt(g0[i]*g0[i] +
1011 &(df[1][0])+(nquad0*(nquad1-1)), 1,
1015 &(df[3][0])+(nquad0*(nquad1-1)), 1,
1019 &(jac[0])+(nquad0*(nquad1-1)), 1,
1022 for (i = 0; i < nquad0; ++i)
1025 j[i]*sqrt(g1[i]*g1[i]+ g3[i]*g3[i]);
1034 for (i = 0; i < nquad1; ++i)
1036 outarray[i] = j[i]*sqrt(g0[i]*g0[i] +
1041 ASSERTL0(
false,
"edge value (< 3) is out of range");
1047 int nqtot = nquad0 * nquad1;
1066 edge, tmp_gmat1, g1_edge);
1068 edge, tmp_gmat3, g3_edge);
1070 for (i = 0; i < nquad0; ++i)
1072 outarray[i] = sqrt(g1_edge[i]*g1_edge[i] +
1073 g3_edge[i]*g3_edge[i]);
1081 &(tmp_gmat0[0]), 1);
1088 edge, tmp_gmat0, g0_edge);
1090 edge, tmp_gmat2, g2_edge);
1092 for (i = 0; i < nquad1; ++i)
1094 outarray[i] = sqrt(g0_edge[i]*g0_edge[i]
1095 + g2_edge[i]*g2_edge[i]);
1104 &(tmp_gmat1[0]), 1);
1110 edge, tmp_gmat1, g1_edge);
1112 edge, tmp_gmat3, g3_edge);
1115 for (i = 0; i < nquad0; ++i)
1117 outarray[i] = sqrt(g1_edge[i]*g1_edge[i]
1118 + g3_edge[i]*g3_edge[i]);
1128 &(tmp_gmat0[0]), 1);
1134 edge, tmp_gmat0, g0_edge);
1136 edge, tmp_gmat2, g2_edge);
1139 for (i = 0; i < nquad1; ++i)
1141 outarray[i] = sqrt(g0_edge[i]*g0_edge[i] +
1142 g2_edge[i]*g2_edge[i]);
1151 ASSERTL0(
false,
"edge value (< 3) is out of range");
1165 for (i = 0; i < nquad0; ++i)
1167 outarray[i] = jac[0]*sqrt(df[1][0]*df[1][0] +
1172 for (i = 0; i < nquad1; ++i)
1174 outarray[i] = jac[0]*sqrt(df[0][0]*df[0][0] +
1179 for (i = 0; i < nquad0; ++i)
1181 outarray[i] = jac[0]*sqrt(df[1][0]*df[1][0] +
1186 for (i = 0; i < nquad1; ++i)
1188 outarray[i] = jac[0]*sqrt(df[0][0]*df[0][0] +
1193 ASSERTL0(
false,
"edge value (< 3) is out of range");
1208 for(i = 0; i < ptsKeys.size(); ++i)
1221 if (edge == 0 || edge == 2)
1223 nqe =
m_base[0]->GetNumPoints();
1227 nqe =
m_base[1]->GetNumPoints();
1234 for (i = 0; i < vCoordDim; ++i)
1248 for (i = 0; i < vCoordDim; ++i)
1254 for (i = 0; i < vCoordDim; ++i)
1260 for (i = 0; i < vCoordDim; ++i)
1266 for (i = 0; i < vCoordDim; ++i)
1272 ASSERTL0(
false,
"edge is out of range (edge < 4)");
1277 for (i =0 ; i < vCoordDim; ++i)
1279 fac += normal[i][0]*normal[i][0];
1281 fac = 1.0/sqrt(fac);
1282 for (i = 0; i < vCoordDim; ++i)
1291 int nquad0 = ptsKeys[0].GetNumPoints();
1292 int nquad1 = ptsKeys[1].GetNumPoints();
1312 for (j = 0; j < nquad0; ++j)
1314 edgejac[j] = jac[j];
1315 for (i = 0; i < vCoordDim; ++i)
1317 normals[i*nquad0+j] =
1318 -df[2*i+1][j]*edgejac[j];
1321 from_key = ptsKeys[0];
1324 for (j = 0; j < nquad1; ++j)
1326 edgejac[j] = jac[nquad0*j+nquad0-1];
1327 for (i = 0; i < vCoordDim; ++i)
1329 normals[i*nquad1+j] =
1330 df[2*i][nquad0*j + nquad0-1]
1334 from_key = ptsKeys[1];
1337 for (j = 0; j < nquad0; ++j)
1339 edgejac[j] = jac[nquad0*(nquad1-1)+j];
1340 for (i = 0; i < vCoordDim; ++i)
1342 normals[i*nquad0+j] =
1343 (df[2*i+1][nquad0*(nquad1-1)+j])
1347 from_key = ptsKeys[0];
1350 for (j = 0; j < nquad1; ++j)
1352 edgejac[j] = jac[nquad0*j];
1353 for (i = 0; i < vCoordDim; ++i)
1355 normals[i*nquad1+j] =
1356 -df[2*i][nquad0*j]*edgejac[j];
1359 from_key = ptsKeys[1];
1362 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1367 int nqtot = nquad0 * nquad1;
1374 for (j = 0; j < nquad0; ++j)
1376 for (i = 0; i < vCoordDim; ++i)
1383 edge, tmp_gmat, tmp_gmat_edge);
1384 normals[i*nquad0+j] = -tmp_gmat_edge[j];
1387 from_key = ptsKeys[0];
1390 for (j = 0; j < nquad1; ++j)
1392 for (i = 0; i < vCoordDim; ++i)
1399 edge, tmp_gmat, tmp_gmat_edge);
1400 normals[i*nquad1+j] = tmp_gmat_edge[j];
1403 from_key = ptsKeys[1];
1406 for (j = 0; j < nquad0; ++j)
1408 for (i = 0; i < vCoordDim; ++i)
1415 edge, tmp_gmat, tmp_gmat_edge);
1416 normals[i*nquad0+j] = tmp_gmat_edge[j];
1419 from_key = ptsKeys[0];
1422 for (j = 0; j < nquad1; ++j)
1424 for (i = 0; i < vCoordDim; ++i)
1431 edge, tmp_gmat, tmp_gmat_edge);
1432 normals[i*nquad1+j] = -tmp_gmat_edge[j];
1435 from_key = ptsKeys[1];
1438 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1447 from_key,jac,
m_base[0]->GetPointsKey(), work);
1454 from_key,&normals[i*nq],
1455 m_base[0]->GetPointsKey(),
1457 Vmath::Vmul(nqe, work, 1, normal[i], 1, normal[i], 1);
1476 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 ASSERTL1(dir >= 0 &&dir <= 1,
"input dir is out of range");
1636 returnval = StdQuadExp::v_GenMatrix(mkey);
1648 return tmp->GetStdMatrix(mkey);
1658 "Geometric information is not set up");
1747 int rows = deriv0.GetRows();
1748 int cols = deriv1.GetColumns();
1752 (*WeakDeriv) = df[2*dir][0]*deriv0 +
1753 df[2*dir+1][0]*deriv1;
1789 int rows = lap00.GetRows();
1790 int cols = lap00.GetColumns();
1795 (*lap) = gmat[0][0] * lap00 +
1796 gmat[1][0] * (lap01 +
Transpose(lap01)) +
1821 int rows = LapMat.GetRows();
1822 int cols = LapMat.GetColumns();
1828 (*helm) = LapMat + lambda*MassMat;
1895 int rows = stdiprod0.GetRows();
1896 int cols = stdiprod1.GetColumns();
1900 (*mat) = df[2*dir][0]*stdiprod0 +
1901 df[2*dir+1][0]*stdiprod1;
1929 coords[0] = (edge == 0 || edge == 3) ? -1.0 : 1.0;
1931 m_Ix =
m_base[(edge + 1) % 2]->GetI(coords);
1973 "Geometric information is not set up");
1977 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1978 unsigned int exp_size[] = {nbdry,nint};
1979 unsigned int nblks = 2;
1994 goto UseLocRegionsMatrix;
1999 goto UseStdRegionsMatrix;
2005 goto UseLocRegionsMatrix;
2007 UseStdRegionsMatrix:
2016 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(0,0)));
2018 AllocateSharedPtr(one,Asubmat = mat->GetBlock(0,1)));
2020 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(1,0)));
2022 AllocateSharedPtr(invfactor,Asubmat = mat->GetBlock(1,1)));
2025 UseLocRegionsMatrix:
2045 for (i = 0; i < nbdry; ++i)
2047 for(j = 0; j < nbdry; ++j)
2049 (*A)(i,j) = mat(bmap[i],bmap[j]);
2052 for(j = 0; j < nint; ++j)
2054 (*B)(i,j) = mat(bmap[i],imap[j]);
2058 for (i = 0; i < nint; ++i)
2060 for(j = 0; j < nbdry; ++j)
2062 (*C)(i,j) = mat(imap[i],bmap[j]);
2065 for(j = 0; j < nint; ++j)
2067 (*D)(i,j) = mat(imap[i],imap[j]);
2076 (*A) = (*A) - (*B)*(*C);
2082 AllocateSharedPtr(factor,
A));
2084 AllocateSharedPtr(one, B));
2086 AllocateSharedPtr(factor, C));
2088 AllocateSharedPtr(invfactor, D));
2119 StdExpansion::MassMatrixOp_MatFree(inarray, outarray, mkey);
2139 StdExpansion::LaplacianMatrixOp_MatFree(
2140 k1, k2, inarray, outarray, mkey);
2150 StdExpansion::WeakDerivMatrixOp_MatFree(i, inarray, outarray, mkey);
2159 StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(
2160 inarray, outarray, mkey);
2169 StdExpansion::MassLevelCurvatureMatrixOp_MatFree(
2170 inarray, outarray, mkey);
2191 if (inarray.get() == outarray.get())
2197 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2198 tmp.get(), 1, 0.0, outarray.get(), 1);
2203 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2204 inarray.get(), 1, 0.0, outarray.get(), 1);
2213 int n_coeffs = inarray.num_elements();
2219 int nmodes0 =
m_base[0]->GetNumModes();
2220 int nmodes1 =
m_base[1]->GetNumModes();
2221 int numMax = nmodes0;
2239 b0, b1, coeff_tmp, bortho0, bortho1, coeff);
2244 for (
int i = 0; i < numMin+1; ++i)
2248 tmp2 = coeff_tmp+cnt,1);
2254 bortho0, bortho1, coeff_tmp,
2268 int nquad0 =
m_base[0]->GetNumPoints();
2269 int nquad1 =
m_base[1]->GetNumPoints();
2270 int nqtot = nquad0*nquad1;
2271 int nmodes0 =
m_base[0]->GetNumModes();
2272 int nmodes1 =
m_base[1]->GetNumModes();
2273 int wspsize = max(max(max(nqtot,
m_ncoeffs),nquad1*nmodes0),nquad0*nmodes1);
2275 ASSERTL1(wsp.num_elements() >= 3*wspsize,
2276 "Workspace is of insufficient size.");
2291 StdExpansion2D::PhysTensorDeriv(inarray,wsp1,wsp2);
2297 Vmath::Vvtvvtp(nqtot,&metric00[0],1,&wsp1[0],1,&metric01[0],1,&wsp2[0],1,&wsp0[0],1);
2298 Vmath::Vvtvvtp(nqtot,&metric01[0],1,&wsp1[0],1,&metric11[0],1,&wsp2[0],1,&wsp2[0],1);
2319 const unsigned int dim = 2;
2327 for (
unsigned int i = 0; i < dim; ++i)
2329 for (
unsigned int j = i; j < dim; ++j)
2372 StdQuadExp::v_SVVLaplacianFilter( array, mkey);
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
#define sign(a, b)
return the sign(b)*a
Describes the specification for a Basis.
Defines a specification for a set of points.
unsigned int GetNumPoints() const
Expansion3DSharedPtr GetLeftAdjacentElementExp() const
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
SpatialDomains::Geometry2DSharedPtr GetGeom2D() const
std::map< int, StdRegions::NormalVector > m_edgeNormals
int GetLeftAdjacentElementFace() const
SpatialDomains::GeometrySharedPtr GetGeom() const
SpatialDomains::GeometrySharedPtr m_geom
DNekMatSharedPtr BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
void ComputeLaplacianMetric()
void ComputeQuadratureMetric()
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
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 DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
virtual const SpatialDomains::GeomFactorsSharedPtr & v_GetMetricInfo() const
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
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.
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual int v_GetCoordim()
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_GetEdgeQFactors(const int edge, Array< OneD, NekDouble > &outarray)
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
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.
virtual NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &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 void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
virtual void v_ComputeLaplacianMetric()
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)
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
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)
virtual void v_GetTracePhysVals(const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
virtual void v_MassLevelCurvatureMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_ComputeEdgeNormal(const int edge)
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
virtual StdRegions::Orientation v_GetEorient(int edge)
virtual void v_GetEdgePhysMap(const int edge, Array< OneD, int > &outarray)
virtual void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_WeakDirectionalDerivMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
virtual const LibUtilities::BasisSharedPtr & v_GetBasis(int dir) const
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType)
virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const
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.
virtual int v_GetNumPoints(const int dir) const
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
virtual void v_GetEdgeInterpVals(const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrates the specified function over the domain.
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.
virtual void v_IProductWRTDerivBase(const int dir, 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...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
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)
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
void HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
int NumBndryCoeffs(void) const
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
const LibUtilities::PointsKeyVector GetPointsKeys() const
DNekBlkMatSharedPtr GetStdStaticCondMatrix(const StdMatrixKey &mkey)
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
void IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
StdRegions::Orientation GetEorient(int edge)
void NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
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 LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
void GetEdgeToElementMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P=-1)
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Backward transformation from coefficient space to physical space.
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Forward transformation from physical space to coefficient space.
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
void IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Array< OneD, LibUtilities::BasisSharedPtr > m_base
const ConstFactorMap & GetConstFactors() const
LibUtilities::ShapeType GetShapeType() const
const VarCoeffMap & GetVarCoeffs() const
MatrixType GetMatrixType() const
NekDouble GetConstFactor(const ConstFactorType &factor) const
bool ConstFactorExists(const ConstFactorType &factor) const
static void Dgemv(const char &trans, const int &m, const int &n, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = A x where A[m x n].
static double Ddot(const int &n, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: output = .
static void Daxpy(const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: y = alpha x plus y.
std::shared_ptr< Basis > BasisSharedPtr
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 InterpCoeff2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
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,...
std::vector< PointsKey > PointsKeyVector
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
@ eGauss_Lagrange
Lagrange Polynomials using the Gauss points .
@ eOrtho_A
Principle Orthogonal Functions .
@ eGLL_Lagrange
Lagrange for SEM basis .
@ eModified_A
Principle Modified Functions .
std::shared_ptr< SegExp > SegExpSharedPtr
std::shared_ptr< QuadGeom > QuadGeomSharedPtr
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eNoGeomType
No type defined.
@ eMovingRegular
Currently unused.
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< StdQuadExp > StdQuadExpSharedPtr
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
@ eInvLaplacianWithUnityMean
std::map< ConstFactorType, NekDouble > ConstFactorMap
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekBlkMat > DNekBlkMatSharedPtr
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
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 Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
void 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
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 Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
void Sdiv(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha/y.
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.
void Zero(int n, T *x, const int incx)
Zero vector.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Reverse(int n, const T *x, const int incx, T *y, const int incy)
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):
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
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.