本文整理汇总了C++中Facet::setTag方法的典型用法代码示例。如果您正苦于以下问题:C++ Facet::setTag方法的具体用法?C++ Facet::setTag怎么用?C++ Facet::setTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facet
的用法示例。
在下文中一共展示了Facet::setTag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readFileMsh
//.........这里部分代码省略.........
FEPIC_ASSERT(false, "invalid msh format", std::runtime_error);
this->timer.restart();
int inc(0);
int nodes_per_cell = mesh->nodesPerCell();
int id_aux;
int numm_tags;
int elm_dim;
int physical;
int const cell_dim = mesh->cellDim();
int const cell_msh_tag = mesh->cellMshTag();
for (int k=0; k < num_elms; ++k)
{
if ( EOF == fscanf(file_ptr, "%d %d %d %d", &elem_number, &type_tag, &numm_tags, &physical) )
FEPIC_ASSERT(false, "invalid msh format", std::runtime_error);
// sincronização
FEPIC_ASSERT(elem_number==k+1, "invalid file format", std::invalid_argument);
for (int j=1; j<numm_tags; ++j)
{
if ( EOF == fscanf(file_ptr, "%s", buffer) )
FEPIC_ASSERT(false, "invalid msh format", std::runtime_error);
}
elm_dim = dimForMshTag(EMshTag(type_tag));
if (elm_dim==0)
{
if ( EOF == fscanf(file_ptr, "%d", &id_aux) )
FEPIC_ASSERT(false, "invalid msh format", std::runtime_error);
--id_aux;
mesh->getNodePtr(id_aux)->setTag(physical);
}
else if (elm_dim == cell_dim)
{
cell = mesh->pushCell((int*)0);
++inc;
FEPIC_ASSERT(cell_msh_tag == type_tag, "Invalid cell or invalid mesh", std::runtime_error);
for (int i=0; i< nodes_per_cell; ++i)
{
if ( EOF == fscanf(file_ptr, "%d", &id_aux) )
FEPIC_ASSERT(false, "invalid msh format", std::runtime_error);
cell->setNodeId(i, id_aux-1);
}
cell->setTag(physical);
//mesh->pushCell(cell);
}
else
{
if ( NULL == fgets(buffer, sizeof(buffer), file_ptr) )
FEPIC_ASSERT(false, "invalid msh format", std::runtime_error);
}
}// end for k
this->timer.elapsed("readFileMsh(): read connectivity");
// até aqui, apenas foi lido a conectividade
//
/* constroi as facets e Corners */
if (mesh->qBuildAdjacency())
mesh->buildAdjacency();
else
{