51 "Add a field which contains the composite ID of each element");
66 int nfields =
m_f->m_variables.size();
67 m_f->m_variables.push_back(
"compositeID");
69 if (
m_f->m_exp[0]->GetNumElmts() == 0)
74 int NumHomogeneousDir =
m_f->m_numHomogeneousDir;
79 m_f->m_exp.resize(nfields + 1);
80 exp =
m_f->AppendExpList(NumHomogeneousDir);
82 m_f->m_exp[nfields] = exp;
91 m_f->m_graph->GetComposites();
96 for (
int n = 0; n < exp->GetNumElmts(); ++n)
103 if (
find(it.second->m_geomVec.begin(), it.second->m_geomVec.end(),
104 elmt->GetGeom()) != it.second->m_geomVec.end())
111 WARNINGL0(compid != -1,
"Failed to find composite ID for element: " +
112 boost::lexical_cast<string>(n));
115 int npts = elmt->GetTotPoints();
118 tmp = exp->UpdatePhys() + exp->GetPhys_Offset(n), 1);
122 exp->FwdTransLocalElmt(exp->GetPhys(), exp->UpdateCoeffs());
#define WARNINGL0(condition, msg)
FieldSharedPtr m_f
Field object.
ProcessAddCompositeID(FieldSharedPtr f)
static ModuleKey className
~ProcessAddCompositeID() override
static std::shared_ptr< Module > create(FieldSharedPtr f)
Creates an instance of this class.
void v_Process(po::variables_map &vm) override
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)
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.