46 ModuleKey ProcessSurfDistance::className =
    49         ProcessSurfDistance::create,
    50         "Computes height of element connected to a surface.");
    65         "ProcessSurfDistance needs bnd parameter with a single id.");
    68     int surf   = 
m_config[
"bnd"].as<
int>();
    69     int expdim = 
m_f->m_graph->GetMeshDimension();
    71     ASSERTL0(surf >= 0, 
"Invalid surface " + boost::lexical_cast<string>(surf));
    73     int nfields           = 
m_f->m_variables.size();
    74     m_f->m_variables.push_back(
"dist");
    76     if (
m_f->m_exp[0]->GetNumElmts() == 0)
    81     int NumHomogeneousDir = 
m_f->m_numHomogeneousDir;
    85         m_f->m_exp.resize(nfields + 1);
    86         exp = 
m_f->AppendExpList(NumHomogeneousDir);
    88         m_f->m_exp[nfields] = exp;
    97         exp->GetBndCondExpansions();
   101     exp->GetBoundaryToElmtMap(BoundarytoElmtID, BoundarytoTraceID);
   104             "Homogeneous expansions not supported");
   106     for (i = cnt = 0; i < BndExp.num_elements(); ++i)
   110             cnt += BndExp[i]->GetExpSize();
   114         for (j = 0; j < BndExp[i]->GetExpSize(); ++j, ++cnt)
   116             int elmtNum     = BoundarytoElmtID[cnt];
   117             int facetNum    = BoundarytoTraceID[cnt];
   123                 exp->GetExp(elmtNum);
   126             switch (elmt->DetShapeType())
   130                     oppositeNum = (facetNum + 2) % 4;
   145                             ASSERTL0(
false, 
"Surface must be on a triangular "   146                                             "face of the prism.");
   174                             ASSERTL0(
false, 
"Face out of bound.");
   180                     ASSERTL0(
false, 
"Element not supported");
   183             int nq    = elmt->GetTotPoints();
   184             int nqBnd = bndElmt->GetTotPoints();
   190             elmt->GetCoords(x[0], x[1], x[2]);
   194                 BndExp[i]->UpdatePhys() + BndExp[i]->GetPhys_Offset(j);
   200             for (k = 0; k < expdim; ++k)
   206                         elmt->GetEdgePhysVals(facetNum, bndElmt, x[k], face1);
   207                         elmt->GetEdgePhysVals(oppositeNum, bndElmt, x[k],
   210                         if (elmt->GetEorient(facetNum) ==
   211                             elmt->GetEorient(oppositeNum))
   221                             elmt->GetForient(facetNum);
   222                         elmt->GetFacePhysVals(facetNum, bndElmt, x[k], face1,
   224                         elmt->GetFacePhysVals(oppositeNum, bndElmt, x[k], face2,
   229                         ASSERTL0(
false, 
"Expansion not supported");
   232                 Vmath::Vvtvp(nqBnd, face1, 1, face1, 1, dist, 1, dist, 1);
   237         BndExp[i]->FwdTrans_IterPerExp(BndExp[i]->GetPhys(),
   238                                        BndExp[i]->UpdateCoeffs());
 
#define ASSERTL0(condition, msg)
virtual void Process(po::variables_map &vm)
Write mesh to output file. 
std::map< std::string, ConfigOption > m_config
List of configuration values. 
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object. 
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x) 
virtual ~ProcessSurfDistance()
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 
std::shared_ptr< Field > FieldSharedPtr
void Reverse(int n, const T *x, const int incx, T *y, const int incy)
std::pair< ModuleType, std::string > ModuleKey
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. 
std::shared_ptr< Expansion > ExpansionSharedPtr
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory. 
void Zero(int n, T *x, const int incx)
Zero vector. 
ModuleFactory & GetModuleFactory()
FieldSharedPtr m_f
Field object.