47 ModuleKey ProcessSurfDistance::className =
 
   50         ProcessSurfDistance::create,
 
   51         "Computes height of element connected to a surface.");
 
   57     f->m_writeBndFld = 
true;
 
   58     f->m_declareExpansionAsContField = 
true;
 
   59     m_f->m_fldToBnd = 
false;
 
   70     int expdim = 
m_f->m_graph->GetMeshDimension();
 
   72     ASSERTL0(surf >= 0, 
"Invalid surface "+boost::lexical_cast<string>(surf));
 
   75     m_f->m_bndRegionsToWrite.push_back(surf);
 
   82         m_f->m_exp[0]->GetBndCondExpansions();
 
   86     m_f->m_exp[0]->GetBoundaryToElmtMap(BoundarytoElmtID, BoundarytoTraceID);
 
   88     if (
m_f->m_fielddef.size() == 0)
 
   90         m_f->m_fielddef = 
m_f->m_exp[0]->GetFieldDefinitions();
 
   91         m_f->m_fielddef[0]->m_fields.push_back(
"dist");
 
   96         m_f->m_fielddef[0]->m_fields[0] = 
"dist";
 
   99     ASSERTL0(!(
m_f->m_fielddef[0]->m_numHomogeneousDir),
 
  100                 "Homogeneous expansions not supported");
 
  102     for (i = cnt = 0; i < BndExp.num_elements(); ++i)
 
  106             cnt += BndExp[i]->GetExpSize();
 
  110         for (j = 0; j < BndExp[i]->GetExpSize(); ++j, ++cnt)
 
  112             int elmtNum  = BoundarytoElmtID [cnt];
 
  113             int facetNum = BoundarytoTraceID[cnt];
 
  119                 m_f->m_exp[0]->GetExp(elmtNum);
 
  122             switch(elmt->DetShapeType())
 
  126                     oppositeNum = (facetNum+2)%4;
 
  142                                 "Surface must be on a triangular face of the prism.");
 
  170                             ASSERTL0(
false, 
"Face out of bound.");
 
  176                     ASSERTL0(
false, 
"Element not supported");
 
  179             int nq    = elmt   ->GetTotPoints();
 
  180             int nqBnd = bndElmt->GetTotPoints();
 
  186             elmt->GetCoords(x[0], x[1], x[2]);
 
  190                 BndExp[i]->UpdatePhys() + BndExp[i]->GetPhys_Offset(j);
 
  196             for (k = 0; k < expdim; ++k)
 
  202                         elmt->GetEdgePhysVals(facetNum, bndElmt, x[k], face1);
 
  203                         elmt->GetEdgePhysVals(oppositeNum, bndElmt, x[k], face2);
 
  205                         if (elmt->GetEorient(facetNum) ==
 
  206                                 elmt->GetEorient(oppositeNum))
 
  216                                         elmt->GetForient(facetNum);
 
  217                         elmt->GetFacePhysVals(facetNum, bndElmt,
 
  218                                                 x[k], face1, orientation);
 
  219                         elmt->GetFacePhysVals(oppositeNum, bndElmt,
 
  220                                                 x[k], face2, orientation);
 
  224                         ASSERTL0(
false, 
"Expansion not supported");
 
  227                 Vmath::Vvtvp(nqBnd, face1, 1, face1, 1, dist, 1, dist, 1);
 
  232         BndExp[i]->FwdTrans(BndExp[i]->GetPhys(), BndExp[i]->UpdateCoeffs());
 
virtual ~ProcessSurfDistance()
#define ASSERTL0(condition, msg)
pair< ModuleType, string > ModuleKey
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x) 
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 
map< string, ConfigOption > m_config
List of configuration values. 
FieldSharedPtr m_f
Field object. 
void Reverse(int n, const T *x, const int incx, T *y, const int incy)
boost::shared_ptr< Expansion > ExpansionSharedPtr
boost::shared_ptr< Field > FieldSharedPtr
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. 
Represents a command-line configuration option. 
void Zero(int n, T *x, const int incx)
Zero vector. 
ModuleFactory & GetModuleFactory()
Abstract base class for processing modules. 
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.