62 "ProcessSurfDistance needs bnd parameter with a single id.");
65 int surf =
m_config[
"bnd"].as<
int>();
66 int expdim =
m_f->m_graph->GetMeshDimension();
68 ASSERTL0(surf >= 0,
"Invalid surface " + std::to_string(surf));
70 int nfields =
m_f->m_variables.size();
71 m_f->m_variables.push_back(
"dist");
73 if (
m_f->m_exp[0]->GetNumElmts() == 0)
78 int NumHomogeneousDir =
m_f->m_numHomogeneousDir;
82 m_f->m_exp.resize(nfields + 1);
83 exp =
m_f->AppendExpList(NumHomogeneousDir);
85 m_f->m_exp[nfields] = exp;
94 exp->GetBndCondExpansions();
98 exp->GetBoundaryToElmtMap(BoundarytoElmtID, BoundarytoTraceID);
101 "Homogeneous expansions not supported");
103 for (i = cnt = 0; i < BndExp.size(); ++i)
105 for (j = 0; j < BndExp[i]->GetExpSize(); ++j, ++cnt)
107 int elmtNum = BoundarytoElmtID[cnt];
108 int facetNum = BoundarytoTraceID[cnt];
116 switch (elmt->DetShapeType())
120 oppositeNum = (facetNum + 2) % 4;
135 ASSERTL0(
false,
"Surface must be on a triangular "
136 "face of the prism.");
164 ASSERTL0(
false,
"Face out of bound.");
170 ASSERTL0(
false,
"Element not supported");
173 int nq = elmt->GetTotPoints();
174 int nqBnd = bndElmt->GetTotPoints();
180 elmt->GetCoords(x[0], x[1], x[2]);
184 BndExp[i]->UpdatePhys() + BndExp[i]->GetPhys_Offset(j);
190 for (k = 0; k < expdim; ++k)
196 elmt->GetTracePhysVals(facetNum, bndElmt, x[k], face1);
197 elmt->GetTracePhysVals(oppositeNum, bndElmt, x[k],
200 if (elmt->GetTraceOrient(facetNum) !=
201 elmt->GetTraceOrient(oppositeNum))
211 elmt->GetTraceOrient(facetNum);
212 elmt->GetTracePhysVals(facetNum, bndElmt, x[k], face1,
214 elmt->GetTracePhysVals(oppositeNum, bndElmt, x[k],
219 ASSERTL0(
false,
"Expansion not supported");
222 Vmath::Vvtvp(nqBnd, face1, 1, face1, 1, dist, 1, dist, 1);
227 BndExp[i]->FwdTransLocalElmt(BndExp[i]->GetPhys(),
228 BndExp[i]->UpdateCoeffs());
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 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.