40 #include <boost/core/ignore_unused.hpp>
51 ModuleKey ProcessAddCompositeID::className =
54 ProcessAddCompositeID::create,
55 "Add a field which contains the composite ID of each element");
70 int nfields =
m_f->m_variables.size();
71 m_f->m_variables.push_back(
"compositeID");
73 if (
m_f->m_exp[0]->GetNumElmts() == 0)
78 int NumHomogeneousDir =
m_f->m_numHomogeneousDir;
83 m_f->m_exp.resize(nfields + 1);
84 exp =
m_f->AppendExpList(NumHomogeneousDir);
86 m_f->m_exp[nfields] = exp;
95 m_f->m_graph->GetComposites();
100 for (
int n = 0; n < exp->GetNumElmts(); ++n)
107 if (
find(it.second->m_geomVec.begin(),
108 it.second->m_geomVec.end(), elmt->GetGeom()) !=
109 it.second->m_geomVec.end())
117 "Failed to find composite ID for element: " +
118 boost::lexical_cast<string>(n));
121 int npts = elmt->GetTotPoints();
124 tmp = exp->UpdatePhys() + exp->GetPhys_Offset(n), 1);
128 exp->FwdTrans_IterPerExp(exp->GetPhys(), exp->UpdateCoeffs());
#define WARNINGL0(condition, msg)
FieldSharedPtr m_f
Field object.
virtual ~ProcessAddCompositeID()
virtual void Process(po::variables_map &vm)
Write mesh to output file.
Abstract base class for processing modules.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
std::shared_ptr< Field > FieldSharedPtr
std::pair< ModuleType, std::string > ModuleKey
ModuleFactory & GetModuleFactory()
std::shared_ptr< Expansion > ExpansionSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::map< int, CompositeSharedPtr > CompositeMap
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
The above copyright notice and this permission notice shall be included.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.