45 namespace LocalRegions
58 int nquad_f = FaceExp->GetNumPoints(0)*FaceExp->GetNumPoints(1);
59 int order_f = FaceExp->GetNcoeffs();
80 StdExpansion::GetIndexMap(ikey);
94 if ((x = varcoeffs.find(VarCoeff[0])) != varcoeffs.end())
96 GetPhysFaceVarCoeffsFromElement(face,FaceExp,x->second,varcoeff_work);
97 Vmath::Vmul(nquad_f,varcoeff_work,1,FaceExp->GetPhys(),1,FaceExp->UpdatePhys(),1);
104 FaceExp->IProductWRTBase(facePhys, outcoeff);
106 for(i = 0; i < order_f; ++i)
108 outarray[(*map)[i].index] += (*map)[i].sign*tau*outcoeff[i];
113 const NekDouble *data = invMass.GetRawPtr();
120 for(n = 0; n < coordim; ++n)
122 Vmath::Vmul(nquad_f, normals[n], 1, facePhys, 1, inval, 1);
140 FaceExp->IProductWRTBase(inval, outcoeff);
143 for(i = 0; i < ncoeffs; ++i)
146 for(j = 0; j < order_f; ++j)
148 tmpcoeff[i] += scale*data[i+(*map)[j].index*ncoeffs]*(*map)[j].sign*outcoeff[j];
153 Coeffs = Coeffs + Dmat*Tmpcoeff;
188 for(f = 0; f < nfaces; ++f)
190 order_f = FaceExp[f]->GetNcoeffs();
191 nquad_f = FaceExp[f]->GetNumPoints(0)*FaceExp[f]->GetNumPoints(1);
197 for(i = 0; i < order_f; ++i)
199 faceCoeffs[i] = inarray[i+cnt];
203 FaceExp[f]->BwdTrans(faceCoeffs, facePhys);
219 Vmath::Vmul(nquad_f, normals[dir], 1, facePhys, 1, facePhys, 1);
238 int order_f, nquad_f;
242 for(f = 0; f < nfaces; ++f)
244 order_f = FaceExp[f]->GetNcoeffs();
245 nquad_f = FaceExp[f]->GetNumPoints(0)*FaceExp[f]->GetNumPoints(1);
252 FaceExp[f]->BwdTrans(faceCoeffs[f], facePhys);
254 Vmath::Vmul(nquad_f, normals[dir], 1, facePhys, 1, facePhys, 1);
276 int order_f = FaceExp->GetNcoeffs();
284 StdExpansion::GetIndexMap(ikey);
299 FaceExp->IProductWRTBase(facePhys, coeff);
302 for(i = 0; i < order_f; ++i)
304 outarray[(*map)[i].index] += (*map)[i].sign*coeff[i];
326 StdExpansion::GetIndexMap(ikey1);
332 StdExpansion::GetIndexMap(ikey2);
334 ASSERTL1((*map1).num_elements() == (*map2).num_elements(),
335 "There is an error with the GetFaceToElementMap");
337 for(j = 0; j < (*map1).num_elements(); ++j)
340 for(k = 0; k < (*map2).num_elements(); ++k)
343 if((*map1)[j].index == (*map2)[k].index && k != j)
347 if((*map1)[j].sign != (*map2)[k].sign)
365 for(i = 0; i < nfaces; ++i)
385 "Matrix construction is not implemented for variable "
386 "coefficients at the moment");
397 "HybridDGHelmholtz matrix not set up "
398 "for non boundary-interior expansions");
425 for(i=0; i < coordim; ++i)
428 Mat = Mat + Dmat*invMass*
Transpose(Dmat);
452 Mat = Mat + lambdaval*Mass;
455 for(i = 0; i < nfaces; ++i)
458 order_f = FaceExp->GetNcoeffs();
464 StdExpansion::GetIndexMap(ikey);
484 for(j = 0; j < order_f; ++j)
486 for(k = 0; k < order_f; ++k)
488 Mat((*map)[j].index,(*map)[k].index) +=
489 tau*(*map)[j].sign*(*map)[k].sign*
eMass(j,k);
526 for(i = 0; i < nfaces; ++i)
535 for(j = 0; j < nface; ++j)
539 face_lambda[j] = 1.0;
544 FaceExp->BwdTrans(face_lambda, tmp);
550 for(k = 0; k < ncoeffs; ++k)
552 Umat(k,bndry_cnt) = Ulam[k];
628 for(i = 0; i < nfaces; ++i)
650 ASSERTL0(
false,
"Direction not known");
657 for(j = 0; j < nbndry; ++j)
663 for(k = 0; k < ncoeffs; ++k)
665 Ulam[k] = lamToU(k,j);
682 Vmath::Vcopy(ncoeffs,&ulam[0],1,&(Qmat.GetPtr())[0]+j*ncoeffs,1);
690 int order_f, nquad_f;
726 for(i = 0; i < nfaces; ++i)
732 for(i = 0; i < nbndry; ++i)
740 for(f = 0; f < nfaces; ++f)
742 order_f = FaceExp[f]->GetNcoeffs();
743 nquad_f = FaceExp[f]->GetNumPoints(0)*FaceExp[f]->GetNumPoints(1);
754 StdExpansion::GetIndexMap(ikey);
768 for(j = 0; j < order_f; ++j)
770 faceCoeffs[j] = (*map)[j].sign*(*LamToQ[0])((*map)[j].index,i);
773 FaceExp[f]->BwdTrans(faceCoeffs, facePhys);
785 Vmath::Vmul(nquad_f, normals[0], 1, facePhys, 1, work, 1);
788 for(j = 0; j < order_f; ++j)
790 faceCoeffs[j] = (*map)[j].sign*(*LamToQ[1])((*map)[j].index,i);
793 FaceExp[f]->BwdTrans(faceCoeffs, facePhys);
805 Vmath::Vvtvp(nquad_f, normals[1], 1, facePhys, 1, work, 1, work, 1);
808 for(j = 0; j < order_f; ++j)
810 faceCoeffs[j] = (*map)[j].sign*(*LamToQ[2])((*map)[j].index,i);
813 FaceExp[f]->BwdTrans(faceCoeffs, facePhys);
835 for(j = 0; j < order_f; ++j)
837 faceCoeffs[j] = (*map)[j].sign*LamToU((*map)[j].index,i) - lam[cnt+j];
840 FaceExp[f]->BwdTrans(faceCoeffs, facePhys);
856 FaceExp[f]->IProductWRTBase(work, faceCoeffs);
860 for(j = 0; j < order_f; ++j)
862 BndMat(cnt+j,i) = faceCoeffs[j];
889 &(lmat->GetPtr())[0],1);
896 ASSERTL0(
false,
"This matrix type cannot be generated from this class");
906 ASSERTL1(face < nFaces,
"Face is out of range.");
951 if (faceExp->GetRightAdjacentElementExp())
953 if (faceExp->GetRightAdjacentElementExp()->GetGeom3D()
954 ->GetGlobalID() ==
GetGeom3D()->GetGlobalID())
967 StdExpansion::GetIndexMap(ikey);
969 int order_e = (*map).num_elements();
970 int n_coeffs = FaceExp->GetNcoeffs();
974 if (n_coeffs != order_e)
979 FaceExp->FwdTrans(Fn, faceCoeffs);
981 int NumModesElementMax = FaceExp->GetBasis(0)->GetNumModes();
982 int NumModesElementMin =
m_base[0]->GetNumModes();
984 FaceExp->ReduceOrderCoeffs(NumModesElementMin,
989 FaceExp->DetShapeType(),
991 FaceExp->MassMatrixOp(faceCoeffs, faceCoeffs, masskey);
994 int offset1 = 0, offset2 = 0;
998 for (i = 0; i < NumModesElementMin; ++i)
1000 for (j = 0; j < NumModesElementMin; ++j)
1002 faceCoeffs[offset1+j] =
1003 faceCoeffs[offset2+j];
1005 offset1 += NumModesElementMin;
1006 offset2 += NumModesElementMax;
1010 for (i = NumModesElementMin; i < NumModesElementMax; ++i)
1012 for (j = NumModesElementMin; j < NumModesElementMax; ++j)
1014 faceCoeffs[i*NumModesElementMax+j] = 0.0;
1023 int offset1 = 0, offset2 = 0;
1025 for (i = 0; i < NumModesElementMin; ++i)
1027 for (j = 0; j < NumModesElementMin-i; ++j)
1029 faceCoeffs[offset1+j] =
1030 faceCoeffs[offset2+j];
1032 offset1 += NumModesElementMin-i;
1033 offset2 += NumModesElementMax-i;
1040 FaceExp->IProductWRTBase(Fn, faceCoeffs);
1045 for (i = 0; i < order_e; ++i)
1047 outarray[(*map)[i].index] -= (*map)[i].sign * faceCoeffs[i];
1052 for (i = 0; i < order_e; ++i)
1054 outarray[(*map)[i].index] += (*map)[i].sign * faceCoeffs[i];
1092 Out_d = InvMass*Coeffs;
1101 "Not set up for non boundary-interior expansions");
1102 ASSERTL1(inoutmat->GetRows() == inoutmat->GetColumns(),
1103 "Assuming that input matrix was square");
1108 int order_f = faceExp->GetNcoeffs();
1117 faceExp->DetShapeType();
1125 DNekScalMat &facemat = *faceExp->GetLocMatrix(mkey);
1139 int rows = inoutmat->GetRows();
1153 for(i = 0; i < order_f; ++i)
1155 for(j = 0; j < nbndry; ++j)
1157 if(map[i] == bmap[j])
1163 ASSERTL1(j != nbndry,
"Did not find number in map");
1178 StdExpansion::GetIndexMap(ikey1);
1188 StdExpansion::GetIndexMap(ikey2);
1190 ASSERTL1((*map1).num_elements() == (*map2).num_elements(),
1191 "There is an error with the GetFaceToElementMap");
1193 for (i = 0; i < face; ++i)
1198 for(i = 0; i < (*map1).num_elements(); ++i)
1202 for(j = 0; j < (*map2).num_elements(); ++j)
1204 if((*map1)[i].index == (*map2)[j].index)
1211 ASSERTL2(idx >= 0,
"Index not found");
1212 map [i] = idx + cnt;
1213 sign[i] = (*map2)[idx].sign;
1218 ASSERTL0(
false,
"Could not identify matrix type from dimension");
1221 for(i = 0; i < order_f; ++i)
1224 for(j = 0; j < order_f; ++j)
1227 (*inoutmat)(id1,id2) += facemat(i,j)*sign[i]*sign[j];
1238 int nVerts, vid1, vid2, vMap1, vMap2;
1245 nVerts, nVerts, 0.0, storage);
1246 DNekMat &VertexMat = (*m_vertexmatrix);
1248 for (vid1 = 0; vid1 < nVerts; ++vid1)
1252 for (vid2 = 0; vid2 < nVerts; ++vid2)
1255 VertexValue = (*r_bnd)(vMap1, vMap2);
1256 VertexMat.SetValue(vid1, vid2, VertexValue);
1260 return m_vertexmatrix;
1268 int eid, fid, vid, n, i;
1301 int nConnectedEdges = 3;
1302 int nConnectedFaces = 3;
1306 MatEdgeLocation(nConnectedEdges);
1308 MatFaceLocation(nConnectedFaces);
1315 m_transformationmatrix =
1317 nBndCoeffs, nBndCoeffs, 0.0, storage);
1318 m_transposedtransformationmatrix =
1320 nBndCoeffs, nBndCoeffs, 0.0, storage);
1322 DNekMat &R = (*m_transformationmatrix);
1323 DNekMat &RT = (*m_transposedtransformationmatrix);
1328 for (vid = 0; vid < nVerts; ++vid)
1339 int nedgemodesconnected =
1345 int nfacemodesconnected =
1354 for (eid = 0; eid < nConnectedEdges; ++eid)
1357 geom->GetVertexEdgeMap(vid, eid));
1358 nmodes = MatEdgeLocation[eid].num_elements();
1363 1, &edgemodearray[offset], 1);
1372 for (fid = 0; fid < nConnectedFaces; ++fid)
1375 geom->GetVertexFaceMap(vid, fid));
1376 nmodes = MatFaceLocation[fid].num_elements();
1381 1, &facemodearray[offset], 1);
1388 1, efRow, 0.0, storage);
1389 DNekMat &Sveft = (*m_vertexedgefacetransformmatrix);
1393 1, efRow, 0.0, storage);
1394 DNekMat &Svef = (*m_vertexedgefacecoupling);
1397 for (n = 0; n < nedgemodesconnected; ++n)
1404 Svef.SetValue(0, n, VertexEdgeFaceValue);
1408 for (n = 0; n < nfacemodesconnected; ++n)
1415 Svef.SetValue(0, n + nedgemodesconnected, VertexEdgeFaceValue);
1428 efRow, efRow, 0.0, storage);
1429 DNekMat &Sefef = (*m_edgefacecoupling);
1434 for (m = 0; m < nedgemodesconnected; ++m)
1436 for (n = 0; n < nedgemodesconnected; ++n)
1439 EdgeEdgeValue = (*r_bnd)(edgemodearray[n],
1443 Sefef.SetValue(n, m, EdgeEdgeValue);
1448 for (n = 0; n < nfacemodesconnected; ++n)
1450 for (m = 0; m < nfacemodesconnected; ++m)
1453 FaceFaceValue = (*r_bnd)(facemodearray[n],
1456 Sefef.SetValue(nedgemodesconnected + n,
1457 nedgemodesconnected + m, FaceFaceValue);
1462 for (n = 0; n < nedgemodesconnected; ++n)
1464 for (m = 0; m < nfacemodesconnected; ++m)
1467 FaceFaceValue = (*r_bnd)(edgemodearray[n],
1472 nedgemodesconnected + m,
1476 Sefef.SetValue(nedgemodesconnected + m,
1489 Sveft = -Svef * Sefef;
1493 for (n = 0; n < edgemodearray.num_elements(); ++n)
1502 for (n = 0; n < facemodearray.num_elements(); ++n)
1505 Sveft(0, n + nedgemodesconnected));
1507 Sveft(0, n + nedgemodesconnected));
1530 int efCol, efRow, nedgemodes;
1533 nConnectedFaces = 2;
1544 for (eid = 0; eid < nEdges; ++eid)
1554 efRow, efCol, 0.0, storage);
1555 DNekMat &Mef = (*m_efedgefacecoupling);
1560 efCol, efCol, 0.0, storage);
1561 DNekMat &Meff = (*m_effacefacecoupling);
1566 efRow, efCol, 0.0, storage);
1567 DNekMat &Meft = (*m_edgefacetransformmatrix);
1569 int nfacemodesconnected =
1573 facemodearray(nfacemodesconnected);
1584 1, &edgemodearray[0], 1);
1590 for (fid = 0; fid < nConnectedFaces; ++fid)
1593 geom->GetEdgeFaceMap(eid, fid));
1594 nmodes = MatFaceLocation[fid].num_elements();
1599 1, &facemodearray[offset], 1);
1605 for (n = 0; n < nedgemodes; ++n)
1607 for (m = 0; m < nfacemodesconnected; ++m)
1610 EdgeFaceValue = (*r_bnd)(edgemodearray[n],
1614 Mef.SetValue(n, m, EdgeFaceValue);
1619 for (n = 0; n < nfacemodesconnected; ++n)
1621 for (m = 0; m < nfacemodesconnected; ++m)
1624 FaceFaceValue = (*r_bnd)(facemodearray[n],
1628 Meff.SetValue(n, m, FaceFaceValue);
1642 for (n = 0; n < Meft.GetRows(); ++n)
1644 for (m = 0; m < Meft.GetColumns(); ++m)
1646 R.SetValue(edgemodearray[n], facemodearray[m],
1648 RT.SetValue(facemodearray[m], edgemodearray[n],
1654 for (i = 0; i < R.GetRows(); ++i)
1656 R.SetValue(i, i, 1.0);
1657 RT.SetValue(i, i, 1.0);
1663 return m_transformationmatrix;
1668 return m_transposedtransformationmatrix;
1689 int i, j, n, eid = 0, fid = 0;
1700 nCoeffs, nCoeffs, 0.0, storage);
1701 DNekMat &InvR = (*m_inversetransformationmatrix);
1709 int nedgemodestotal = 0;
1710 int nfacemodestotal = 0;
1712 for (eid = 0; eid < nEdges; ++eid)
1715 nedgemodestotal += nedgemodes;
1718 for (fid = 0; fid < nFaces; ++fid)
1721 nfacemodestotal += nfacemodes;
1725 edgemodearray(nedgemodestotal);
1727 facemodearray(nfacemodestotal);
1732 for (eid = 0; eid < nEdges; ++eid)
1742 &edgemodearray[offset], 1);
1745 offset += nedgemodes;
1751 for (fid = 0; fid < nFaces; ++fid)
1761 &facemodearray[offset], 1);
1764 offset += nfacemodes;
1768 for (i = 0; i < nVerts; ++i)
1770 for (j = 0; j < nedgemodestotal; ++j)
1776 for (j = 0; j < nfacemodestotal; ++j)
1781 for (n = 0; n < nedgemodestotal; ++n)
1786 * R(edgemodearray[n], facemodearray[j]);
1795 for (i = 0; i < nedgemodestotal; ++i)
1797 for (j = 0; j < nfacemodestotal; ++j)
1800 edgemodearray[i], facemodearray[j],
1801 -R(edgemodearray[i], facemodearray[j]));
1805 for (i = 0; i < nCoeffs; ++i)
1807 InvR.SetValue(i, i, 1.0);
1810 return m_inversetransformationmatrix;
1825 map<int, int> invmap;
1826 for (j = 0; j < nBndCoeffs; ++j)
1828 invmap[bmap[j]] = j;
1838 geom->GetEorient(eid);
1847 for (n = 0; n < nEdgeCoeffs; ++n)
1849 edgemaparray[n] = invmap[maparray[n]];
1852 return edgemaparray;
1870 map<int, int> reversemap;
1871 for (j = 0; j < bmap.num_elements(); ++j)
1873 reversemap[bmap[j]] = j;
1892 fOrient = faceOrient;
1898 for (n = 0; n < nFaceCoeffs; ++n)
1900 facemaparray[n] = reversemap[maparray[n]];
1903 return facemaparray;
1908 return m_geom->GetForient(face);
1938 int nq0 = FaceExp->GetNumPoints(0);
1939 int nq1 = FaceExp->GetNumPoints(1);
1951 Vmath::Gathr(faceids.num_elements(),inarray,faceids,o_tmp);
1969 m_base[dir1]->GetPointsKey(),
1971 FaceExp->GetBasis(to_id0)->GetPointsKey(),
1972 FaceExp->GetBasis(to_id1)->GetPointsKey(),
1982 const int nq0,
const int nq1,
2000 if(idmap.num_elements() != nq0*nq1)
2009 for(
int i = 0; i < nq0*nq1; ++i)
2016 for (
int j = 0; j < nq1; ++j)
2018 for(
int i = 0; i < nq0; ++i)
2020 idmap[j*nq0+i] = nq0-1-i +j*nq0;
2025 ASSERTL0(
false,
"Case not supposed to be used in this function");
2035 if(idmap.num_elements() != nq0*nq1)
2045 for(
int i = 0; i < nq0*nq1; ++i)
2053 for (
int j = 0; j < nq1; j++)
2055 for (
int i =0; i < nq0; ++i)
2057 idmap[j*nq0+i] = nq0-1-i + j*nq0;
2065 for (
int j = 0; j < nq1; j++)
2067 for (
int i =0; i < nq0; ++i)
2069 idmap[j*nq0+i] = nq0*(nq1-1-j)+i;
2076 for (
int j = 0; j < nq1; j++)
2078 for (
int i =0; i < nq0; ++i)
2080 idmap[j*nq0+i] = nq0*nq1-1-j*nq0 -i;
2087 for (
int i =0; i < nq0; ++i)
2089 for (
int j = 0; j < nq1; ++j)
2091 idmap[i*nq1+j] = i + j*nq0;
2099 for (
int i =0; i < nq0; ++i)
2101 for (
int j = 0; j < nq1; ++j)
2103 idmap[i*nq1+j] = nq0-1-i + j*nq0;
2111 for (
int i =0; i < nq0; ++i)
2113 for (
int j = 0; j < nq1; ++j)
2115 idmap[i*nq1+j] = i+nq0*(nq1-1)-j*nq0;
2123 for (
int i =0; i < nq0; ++i)
2125 for (
int j = 0; j < nq1; ++j)
2127 idmap[i*nq1+j] = nq0*nq1-1-i-j*nq0;
2133 ASSERTL0(
false,
"Unknow orientation");
void AddFaceBoundaryInt(const int face, ExpansionSharedPtr &FaceExp, Array< OneD, NekDouble > &facePhys, Array< OneD, NekDouble > &outarray, const StdRegions::VarCoeffMap &varcoeffs=StdRegions::NullVarCoeffMap)
virtual void v_DGDeriv(const int dir, const Array< OneD, const NekDouble > &incoeffs, Array< OneD, ExpansionSharedPtr > &FaceExp, Array< OneD, Array< OneD, NekDouble > > &faceCoeffs, Array< OneD, NekDouble > &out_d)
Evaluate coefficients of weak deriviative in the direction dir given the input coefficicents incoeffs...
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
NekDouble GetConstFactor(const ConstFactorType &factor) const
#define ASSERTL0(condition, msg)
int GetFaceNumPoints(const int i) const
This function returns the number of quadrature points belonging to the i-th face. ...
const ConstFactorMap & GetConstFactors() const
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
const VarCoeffMap & GetVarCoeffs() const
boost::shared_ptr< IndexMapValues > IndexMapValuesSharedPtr
MatrixType GetMatrixType() const
int GetNfaces() const
This function returns the number of faces of the expansion domain.
void Gathr(int n, const T *x, const int *y, T *z)
Gather vector z[i] = x[y[i]].
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
int GetBasisNumModes(const int dir) const
This function returns the number of expansion modes in the dir direction.
Array< OneD, unsigned int > GetFaceInverseBoundaryMap(int fid, StdRegions::Orientation faceOrient=eNoOrientation)
bool HasVarCoeff(const StdRegions::VarCoeffType &coeff) const
#define sign(a, b)
return the sign(b)*a
virtual StdRegions::Orientation v_GetForient(int face)
void GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
void SetFaceToGeomOrientation(const int face, Array< OneD, NekDouble > &inout)
Align face orientation with the geometry orientation.
void GetFacePhysMap(const int face, Array< OneD, int > &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 Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void ReOrientQuadFacePhysMap(const StdRegions::Orientation orient, const int nq0, const int nq1, Array< OneD, int > &idmap)
SpatialDomains::Geometry3DSharedPtr GetGeom3D() 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
void NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
virtual DNekMatSharedPtr v_BuildTransformationMatrix(const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType)
SpatialDomains::GeometrySharedPtr m_geom
StdRegions::Orientation GetForient(int face)
int GetEdgeNcoeffs(const int i) const
This function returns the number of expansion coefficients belonging to the i-th edge.
boost::shared_ptr< DNekMat > DNekMatSharedPtr
virtual DNekMatSharedPtr v_BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
void ReOrientFacePhysMap(const int nvert, const StdRegions::Orientation orient, const int nq0, const int nq1, Array< OneD, int > &idmap)
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
const NormalVector & GetFaceNormal(const int face) const
static DNekMatSharedPtr NullDNekMatSharedPtr
std::vector< bool > m_requireNeg
void SetTraceToGeomOrientation(Array< OneD, NekDouble > &inout)
Align trace orientation with the geometry orientation.
std::map< int, bool > m_negatedNormals
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
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
bool IsBoundaryInteriorExpansion()
virtual Array< OneD, unsigned int > v_GetFaceInverseBoundaryMap(int fid, StdRegions::Orientation faceOrient=StdRegions::eNoOrientation)
void SetFaceExp(const int face, Expansion2DSharedPtr &f)
Array< OneD, unsigned int > GetEdgeInverseBoundaryMap(int eid)
int GetVertexMap(const int localVertexId, bool useCoeffPacking=false)
int GetFaceIntNcoeffs(const int i) const
void ReOrientTriFacePhysMap(const StdRegions::Orientation orient, const int nq0, const int nq1, Array< OneD, int > &idmap)
void GetFaceToElementMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int nummodesA=-1, int nummodesB=-1)
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
virtual void v_GetTracePhysVals(const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
Returns the physical values at the quadrature points of a face Wrapper function to v_GetFacePhysVals...
void Scatr(int n, const T *x, const int *y, T *z)
Scatter vector z[y[i]] = x[i].
virtual void v_GetFacePhysVals(const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
void Neg(int n, T *x, const int incx)
Negate x = -x.
boost::shared_ptr< Expansion > ExpansionSharedPtr
void AddNormTraceInt(const int dir, Array< OneD, ExpansionSharedPtr > &FaceExp, Array< OneD, Array< OneD, NekDouble > > &faceCoeffs, Array< OneD, NekDouble > &outarray)
int GetNverts() const
This function returns the number of vertices of the expansion domain.
void AddHDGHelmholtzFaceTerms(const NekDouble tau, const int edge, Array< OneD, NekDouble > &facePhys, const StdRegions::VarCoeffMap &dirForcing, Array< OneD, NekDouble > &outarray)
int GetFaceNcoeffs(const int i) const
This function returns the number of expansion coefficients belonging to the i-th face.
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
std::vector< Expansion2DWeakPtr > m_faceExp
virtual DNekMatSharedPtr v_BuildInverseTransformationMatrix(const DNekScalMatSharedPtr &m_transformationmatrix)
Build inverse and inverse transposed transformation matrix: and .
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
virtual void v_AddFaceNormBoundaryInt(const int face, const ExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
virtual void v_AddRobinMassMatrix(const int face, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat)
int NumDGBndryCoeffs(void) const
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
Expansion2DSharedPtr GetFaceExp(const int face)
void Zero(int n, T *x, const int incx)
Zero vector.
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
#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 Vcopy(int n, const T *x, const int incx, T *y, const int incy)
int GetNedges() const
This function returns the number of edges of the expansion domain.
void v_NormVectorIProductWRTBase(const Array< OneD, const Array< OneD, NekDouble > > &Fvec, Array< OneD, NekDouble > &outarray)
virtual Array< OneD, unsigned int > v_GetEdgeInverseBoundaryMap(int eid)
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
void GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
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.
boost::shared_ptr< Expansion2D > Expansion2DSharedPtr
static ConstFactorMap NullConstFactorMap
boost::shared_ptr< Geometry3D > Geometry3DSharedPtr