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);
130 Vmath::Vmul (nqtot, df[0], 1, diff0, 1, out_d0, 1);
138 Vmath::Vvtvp (nqtot,df[3],1,diff1,1, out_d1, 1, out_d1,1);
144 Vmath::Vvtvp (nqtot,df[5],1,diff1,1, out_d2, 1, out_d2,1);
151 Vmath::Smul (nqtot, df[0][0], diff0, 1, out_d0, 1);
152 Blas::Daxpy (nqtot, df[1][0], diff1, 1, out_d0, 1);
157 Vmath::Smul (nqtot, df[2][0], diff0, 1, out_d1, 1);
158 Blas::Daxpy (nqtot, df[3][0], diff1, 1, out_d1, 1);
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,
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();
517 tmp1, tmp3, tmp4,
false,
true);
520 tmp2, outarray, tmp4,
true,
false);
529 ASSERTL1((dir==0) || (dir==1) || (dir==2),
530 "Invalid direction.");
532 "Invalid direction.");
534 int nquad0 =
m_base[0]->GetNumPoints();
535 int nquad1 =
m_base[1]->GetNumPoints();
536 int nqtot = nquad0*nquad1;
537 int nmodes0 =
m_base[0]->GetNumModes();
561 df[2*dir][0], inarray.get(), 1,
564 df[2*dir+1][0], inarray.get(), 1,
596 ASSERTL1(
false,
"input dir is out of range");
605 (iprodmat->GetOwnedMatrix())->GetPtr().get(),
606 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
616 int nq =
m_base[0]->GetNumPoints()*
m_base[1]->GetNumPoints();
626 &normals[1][0],1,&Fy[0],1,&Fn[0],1);
627 Vmath::Vvtvp (nq,&normals[2][0],1,&Fz[0],1,&Fn[0],1,&Fn[0],1);
632 normals[1][0],&Fy[0],1,&Fn[0],1);
633 Vmath::Svtvp (nq,normals[2][0],&Fz[0],1,&Fn[0],1,&Fn[0],1);
650 m_base[1]->GetBasisKey());
657 2,
m_base[0]->GetPointsKey());
659 2,
m_base[1]->GetPointsKey());
679 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[1] <= 1.0 &&
680 Lcoords[1] >= -1.0 && Lcoords[1] <=1.0,
681 "Local coordinates are not in region [-1,1]");
684 for (i = 0; i <
m_geom->GetCoordim(); ++i)
686 coords[i] =
m_geom->GetCoord(i,Lcoords);
702 return StdQuadExp::v_PhysEvaluate(Lcoord,physvals);
712 m_geom->GetLocCoords(coord,Lcoord);
714 return StdQuadExp::v_PhysEvaluate(Lcoord, physvals);
726 int nquad0 =
m_base[0]->GetNumPoints();
727 int nquad1 =
m_base[1]->GetNumPoints();
752 -nquad0, &(outarray[0]),1);
771 -nquad0,&(outarray[0]),1);
780 ASSERTL0(
false,
"edge value (< 3) is out of range");
793 int nquad0 =
m_base[0]->GetNumPoints();
794 int nquad1 =
m_base[1]->GetNumPoints();
809 nquad0,&(outarray[0]),1);
820 ASSERTL0(
false,
"edge value (< 3) is out of range");
830 if (
m_base[edge%2]->GetPointsKey() !=
831 EdgeExp->GetBasis(0)->GetPointsKey())
838 m_base[edge%2]->GetPointsKey(), outtmp,
839 EdgeExp->GetBasis(0)->GetPointsKey(), outarray);
859 int nq0 =
m_base[0]->GetNumPoints();
860 int nq1 =
m_base[1]->GetNumPoints();
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);
895 for (i = 0; i < nq0; i++)
898 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
899 1, &inarray[i], nq0);
905 for (i = 0; i < nq1; i++)
908 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().get(),
909 1, &inarray[i * nq0], 1);
914 ASSERTL0(
false,
"edge value (< 3) is out of range");
924 int nquad0 =
m_base[0]->GetNumPoints();
925 int nquad1 =
m_base[1]->GetNumPoints();
932 for (
int i = 0; i < nquad0; ++i)
939 for (
int i = 0; i < nquad1; ++i)
941 outarray[i] = (nquad0-1) + i*nquad0;
946 for (
int i = 0; i < nquad0; ++i)
948 outarray[i] = i + nquad0*(nquad1-1);
953 for (
int i = 0; i < nquad1; ++i)
955 outarray[i] = i*nquad0;
959 ASSERTL0(
false,
"edge value (< 3) is out of range");
973 int nquad0 =
m_base[0]->GetNumPoints();
974 int nquad1 =
m_base[1]->GetNumPoints();
1003 for (i = 0; i < nquad0; ++i)
1005 outarray[i] = j[i]*
sqrt(g1[i]*g1[i]
1011 &(df[0][0])+(nquad0-1), nquad0,
1015 &(df[2][0])+(nquad0-1), nquad0,
1019 &(jac[0])+(nquad0-1), nquad0,
1022 for (i = 0; i < nquad1; ++i)
1024 outarray[i] = j[i]*
sqrt(g0[i]*g0[i] +
1031 &(df[1][0])+(nquad0*(nquad1-1)), 1,
1035 &(df[3][0])+(nquad0*(nquad1-1)), 1,
1039 &(jac[0])+(nquad0*(nquad1-1)), 1,
1042 for (i = 0; i < nquad0; ++i)
1045 j[i]*
sqrt(g1[i]*g1[i]+ g3[i]*g3[i]);
1054 for (i = 0; i < nquad1; ++i)
1056 outarray[i] = j[i]*
sqrt(g0[i]*g0[i] +
1061 ASSERTL0(
false,
"edge value (< 3) is out of range");
1067 int nqtot = nquad0 * nquad1;
1086 edge, tmp_gmat1, g1_edge);
1088 edge, tmp_gmat3, g3_edge);
1090 for (i = 0; i < nquad0; ++i)
1092 outarray[i] =
sqrt(g1_edge[i]*g1_edge[i] +
1093 g3_edge[i]*g3_edge[i]);
1101 &(tmp_gmat0[0]), 1);
1108 edge, tmp_gmat0, g0_edge);
1110 edge, tmp_gmat2, g2_edge);
1112 for (i = 0; i < nquad1; ++i)
1114 outarray[i] =
sqrt(g0_edge[i]*g0_edge[i]
1115 + g2_edge[i]*g2_edge[i]);
1124 &(tmp_gmat1[0]), 1);
1130 edge, tmp_gmat1, g1_edge);
1132 edge, tmp_gmat3, g3_edge);
1135 for (i = 0; i < nquad0; ++i)
1137 outarray[i] =
sqrt(g1_edge[i]*g1_edge[i]
1138 + g3_edge[i]*g3_edge[i]);
1148 &(tmp_gmat0[0]), 1);
1154 edge, tmp_gmat0, g0_edge);
1156 edge, tmp_gmat2, g2_edge);
1159 for (i = 0; i < nquad1; ++i)
1161 outarray[i] =
sqrt(g0_edge[i]*g0_edge[i] +
1162 g2_edge[i]*g2_edge[i]);
1171 ASSERTL0(
false,
"edge value (< 3) is out of range");
1185 for (i = 0; i < nquad0; ++i)
1187 outarray[i] = jac[0]*
sqrt(df[1][0]*df[1][0] +
1192 for (i = 0; i < nquad1; ++i)
1194 outarray[i] = jac[0]*
sqrt(df[0][0]*df[0][0] +
1199 for (i = 0; i < nquad0; ++i)
1201 outarray[i] = jac[0]*
sqrt(df[1][0]*df[1][0] +
1206 for (i = 0; i < nquad1; ++i)
1208 outarray[i] = jac[0]*
sqrt(df[0][0]*df[0][0] +
1213 ASSERTL0(
false,
"edge value (< 3) is out of range");
1228 for(i = 0; i < ptsKeys.size(); ++i)
1241 if (edge == 0 || edge == 2)
1243 nqe =
m_base[0]->GetNumPoints();
1247 nqe =
m_base[1]->GetNumPoints();
1254 for (i = 0; i < vCoordDim; ++i)
1273 for (i = 0; i < vCoordDim; ++i)
1279 for (i = 0; i < vCoordDim; ++i)
1285 for (i = 0; i < vCoordDim; ++i)
1291 for (i = 0; i < vCoordDim; ++i)
1297 ASSERTL0(
false,
"edge is out of range (edge < 4)");
1302 for (i =0 ; i < vCoordDim; ++i)
1304 fac += normal[i][0]*normal[i][0];
1306 fac = 1.0/
sqrt(fac);
1310 for (i = 0; i < vCoordDim; ++i)
1319 int nquad0 = ptsKeys[0].GetNumPoints();
1320 int nquad1 = ptsKeys[1].GetNumPoints();
1340 for (j = 0; j < nquad0; ++j)
1342 edgejac[j] = jac[j];
1343 for (i = 0; i < vCoordDim; ++i)
1345 normals[i*nquad0+j] =
1346 -df[2*i+1][j]*edgejac[j];
1349 from_key = ptsKeys[0];
1352 for (j = 0; j < nquad1; ++j)
1354 edgejac[j] = jac[nquad0*j+nquad0-1];
1355 for (i = 0; i < vCoordDim; ++i)
1357 normals[i*nquad1+j] =
1358 df[2*i][nquad0*j + nquad0-1]
1362 from_key = ptsKeys[1];
1365 for (j = 0; j < nquad0; ++j)
1367 edgejac[j] = jac[nquad0*(nquad1-1)+j];
1368 for (i = 0; i < vCoordDim; ++i)
1370 normals[i*nquad0+j] =
1371 (df[2*i+1][nquad0*(nquad1-1)+j])
1375 from_key = ptsKeys[0];
1378 for (j = 0; j < nquad1; ++j)
1380 edgejac[j] = jac[nquad0*j];
1381 for (i = 0; i < vCoordDim; ++i)
1383 normals[i*nquad1+j] =
1384 -df[2*i][nquad0*j]*edgejac[j];
1387 from_key = ptsKeys[1];
1390 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1395 int nqtot = nquad0 * nquad1;
1402 for (j = 0; j < nquad0; ++j)
1404 for (i = 0; i < vCoordDim; ++i)
1411 edge, tmp_gmat, tmp_gmat_edge);
1412 normals[i*nquad0+j] = -tmp_gmat_edge[j];
1415 from_key = ptsKeys[0];
1418 for (j = 0; j < nquad1; ++j)
1420 for (i = 0; i < vCoordDim; ++i)
1427 edge, tmp_gmat, tmp_gmat_edge);
1428 normals[i*nquad1+j] = tmp_gmat_edge[j];
1431 from_key = ptsKeys[1];
1434 for (j = 0; j < nquad0; ++j)
1436 for (i = 0; i < vCoordDim; ++i)
1443 edge, tmp_gmat, tmp_gmat_edge);
1444 normals[i*nquad0+j] = tmp_gmat_edge[j];
1447 from_key = ptsKeys[0];
1450 for (j = 0; j < nquad1; ++j)
1452 for (i = 0; i < vCoordDim; ++i)
1459 edge, tmp_gmat, tmp_gmat_edge);
1460 normals[i*nquad1+j] = -tmp_gmat_edge[j];
1463 from_key = ptsKeys[1];
1466 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1475 from_key,jac,
m_base[0]->GetPointsKey(), work);
1482 from_key,&normals[i*nq],
1483 m_base[0]->GetPointsKey(),
1485 Vmath::Vmul(nqe, work, 1, normal[i], 1, normal[i], 1);
1506 Vmath::Vmul(nqe, normal[i], 1, work, 1, normal[i], 1);
1511 for (i = 0; i < vCoordDim; ++i)
1529 return m_geom->GetCoordim();
1535 const std::vector<unsigned int > &nummodes,
1538 std::vector<LibUtilities::BasisType> &fromType)
1540 int data_order0 = nummodes[mode_offset];
1541 int fillorder0 = std::min(
m_base[0]->GetNumModes(),data_order0);
1543 int data_order1 = nummodes[mode_offset + 1];
1544 int order1 =
m_base[1]->GetNumModes();
1545 int fillorder1 = min(order1,data_order1);
1556 fromType[0], data_order0,
m_base[0]->GetPointsKey()),
1558 fromType[1], data_order1,
m_base[1]->GetPointsKey()));
1560 m_base[1]->GetBasisKey());
1583 "Extraction routine not set up for this basis");
1586 for (i = 0; i < fillorder0; ++i)
1588 Vmath::Vcopy(fillorder1, data + cnt, 1, coeffs +cnt1, 1);
1601 m_base[0]->GetNumModes(),
1604 m_base[1]->GetNumModes(),
1617 m_base[0]->GetNumModes(),
1620 m_base[1]->GetNumModes(),
1627 "basis is either not set up or not hierarchicial");
1634 return m_geom->GetEorient(edge);
1640 ASSERTL1(dir >= 0 &&dir <= 1,
"input dir is out of range");
1666 returnval = StdQuadExp::v_GenMatrix(mkey);
1678 return tmp->GetStdMatrix(mkey);
1688 "Geometric information is not set up");
1777 int rows = deriv0.GetRows();
1778 int cols = deriv1.GetColumns();
1782 (*WeakDeriv) = df[2*dir][0]*deriv0 +
1783 df[2*dir+1][0]*deriv1;
1819 int rows = lap00.GetRows();
1820 int cols = lap00.GetColumns();
1825 (*lap) = gmat[0][0] * lap00 +
1826 gmat[1][0] * (lap01 +
Transpose(lap01)) +
1851 int rows = LapMat.GetRows();
1852 int cols = LapMat.GetColumns();
1858 (*helm) = LapMat + lambda*MassMat;
1925 int rows = stdiprod0.GetRows();
1926 int cols = stdiprod1.GetColumns();
1930 (*mat) = df[2*dir][0]*stdiprod0 +
1931 df[2*dir+1][0]*stdiprod1;
1959 coords[0] = (edge == 0 || edge == 3) ? -1.0 : 1.0;
1961 m_Ix =
m_base[(edge + 1) % 2]->GetI(coords);
2003 "Geometric information is not set up");
2007 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
2008 unsigned int exp_size[] = {nbdry,nint};
2009 unsigned int nblks = 2;
2024 goto UseLocRegionsMatrix;
2029 goto UseStdRegionsMatrix;
2035 goto UseLocRegionsMatrix;
2037 UseStdRegionsMatrix:
2046 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(0,0)));
2048 AllocateSharedPtr(one,Asubmat = mat->GetBlock(0,1)));
2050 AllocateSharedPtr(factor,Asubmat = mat->GetBlock(1,0)));
2052 AllocateSharedPtr(invfactor,Asubmat = mat->GetBlock(1,1)));
2055 UseLocRegionsMatrix:
2075 for (i = 0; i < nbdry; ++i)
2077 for(j = 0; j < nbdry; ++j)
2079 (*A)(i,j) = mat(bmap[i],bmap[j]);
2082 for(j = 0; j < nint; ++j)
2084 (*B)(i,j) = mat(bmap[i],imap[j]);
2088 for (i = 0; i < nint; ++i)
2090 for(j = 0; j < nbdry; ++j)
2092 (*C)(i,j) = mat(imap[i],bmap[j]);
2095 for(j = 0; j < nint; ++j)
2097 (*D)(i,j) = mat(imap[i],imap[j]);
2106 (*A) = (*A) - (*B)*(*C);
2112 AllocateSharedPtr(factor,
A));
2114 AllocateSharedPtr(one, B));
2116 AllocateSharedPtr(factor, C));
2118 AllocateSharedPtr(invfactor, D));
2149 StdExpansion::MassMatrixOp_MatFree(inarray, outarray, mkey);
2169 StdExpansion::LaplacianMatrixOp_MatFree(
2170 k1, k2, inarray, outarray, mkey);
2180 StdExpansion::WeakDerivMatrixOp_MatFree(i, inarray, outarray, mkey);
2189 StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(
2190 inarray, outarray, mkey);
2199 StdExpansion::MassLevelCurvatureMatrixOp_MatFree(
2200 inarray, outarray, mkey);
2221 if (inarray.get() == outarray.get())
2227 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2228 tmp.get(), 1, 0.0, outarray.get(), 1);
2233 (mat->GetOwnedMatrix())->GetPtr().get(),
m_ncoeffs,
2234 inarray.get(), 1, 0.0, outarray.get(), 1);
2243 int n_coeffs = inarray.size();
2249 int nmodes0 =
m_base[0]->GetNumModes();
2250 int nmodes1 =
m_base[1]->GetNumModes();
2251 int numMax = nmodes0;
2269 b0, b1, coeff_tmp, bortho0, bortho1, coeff);
2274 for (
int i = 0; i < numMin+1; ++i)
2278 tmp2 = coeff_tmp+cnt,1);
2284 bortho0, bortho1, coeff_tmp,
2298 int nquad0 =
m_base[0]->GetNumPoints();
2299 int nquad1 =
m_base[1]->GetNumPoints();
2300 int nqtot = nquad0*nquad1;
2301 int nmodes0 =
m_base[0]->GetNumModes();
2302 int nmodes1 =
m_base[1]->GetNumModes();
2303 int wspsize = max(max(max(nqtot,
m_ncoeffs),nquad1*nmodes0),nquad0*nmodes1);
2306 "Workspace is of insufficient size.");
2321 StdExpansion2D::PhysTensorDeriv(inarray,wsp1,wsp2);
2327 Vmath::Vvtvvtp(nqtot,&metric00[0],1,&wsp1[0],1,&metric01[0],1,&wsp2[0],1,&wsp0[0],1);
2328 Vmath::Vvtvvtp(nqtot,&metric01[0],1,&wsp1[0],1,&metric11[0],1,&wsp2[0],1,&wsp2[0],1);
2349 const unsigned int dim = 2;
2357 for (
unsigned int i = 0; i < dim; ++i)
2359 for (
unsigned int j = i; j < dim; ++j)
2402 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
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
SpatialDomains::Geometry2DSharedPtr GetGeom2D() const
std::map< int, NormalVector > m_edgeNormals
std::map< int, Array< OneD, NekDouble > > m_elmtBndNormDirElmtLen
the element length in each element boundary(Vertex, edge or face) normal direction calculated based o...
SpatialDomains::GeometrySharedPtr GetGeom() const
SpatialDomains::GeometrySharedPtr m_geom
ExpansionSharedPtr GetLeftAdjacentElementExp() const
DNekMatSharedPtr BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
void ComputeLaplacianMetric()
int GetLeftAdjacentElementTrace() const
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)
StdRegions::Orientation GetTraceOrient(int trace)
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_ComputeTraceNormal(const int edge)
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_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)
virtual StdRegions::Orientation v_GetTraceOrient(int edge)
virtual void v_GetTracePhysMap(const int edge, Array< OneD, int > &outarray)
virtual void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
virtual void v_GetEdgePhysVals(const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
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)
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
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_GetTraceQFactors(const int edge, Array< OneD, NekDouble > &outarray)
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)
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)
void GetTraceToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient=eForwards, int P=-1, int Q=-1)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
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
The above copyright notice and this permission notice shall be included.
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*x.
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.
scalarT< T > sqrt(scalarT< T > in)