本文整理汇总了C++中Corner::getTag方法的典型用法代码示例。如果您正苦于以下问题:C++ Corner::getTag方法的具体用法?C++ Corner::getTag怎么用?C++ Corner::getTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Corner
的用法示例。
在下文中一共展示了Corner::getTag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readFileMsh
//.........这里部分代码省略.........
int* nodes = new int[n_nodes_per_facet]; // facet nodes
//int* vtcs = new int[n_vertices_per_facet];
int* bnodes = new int[n_nodes_per_corner]; // corner nodes
//int* bvtcs = new int[n_vertices_per_corner];
int facet_id;
int corner_id;
for (int k=0; k < num_elms; ++k)
{
fscanf(file_ptr, "%d %d %d %d", &elem_number, &type_tag, &numm_tags, &physical);
//// sincronização
//FEPIC_ASSERT(elem_number==k+1, "invalid file format", std::invalid_argument);
for (int j=1; j<numm_tags; ++j)
{
fscanf(file_ptr, "%s", buffer);
}
elm_dim = dimForMshTag(EMshTag(type_tag));
if ((elm_dim == 0) && (cell_dim!=2))
{
fscanf(file_ptr, "%d", &id_aux);
}
else if (elm_dim == cell_dim-1) // facets
{
for (int i=0; i<n_nodes_per_facet; ++i)
{
fscanf(file_ptr, "%d", &nodes[i]);
--nodes[i];
if (mesh->getNodePtr(nodes[i])->getTag() == 0)
mesh->getNodePtr(nodes[i])->setTag(physical);
}
//std::copy( nodes, nodes + n_vertices_per_facet, vtcs );
if (cell_dim > 1)
{
if (mesh->getFacetIdFromVertices(nodes, facet_id))
mesh->getFacetPtr(abs(facet_id))->setTag(physical); //std::cout << (++TESTE) << std::endl;
else
{
printf("WARNING: INVALID FACET IN INPUT MESH! vtcs: ");
for (int zz = 0; zz < n_nodes_per_facet; ++zz)
printf("%d ", nodes[zz]);
printf("\n");
}
}
}
else if (elm_dim == cell_dim-2) // corners
{
for (int i=0; i<n_nodes_per_corner; ++i)
{
fscanf(file_ptr, "%d", &bnodes[i]);
--bnodes[i];
if (mesh->getNodePtr(bnodes[i])->getTag() == 0)
mesh->getNodePtr(bnodes[i])->setTag(physical);
}
//std::copy( bnodes, bnodes + n_vertices_per_corner, bvtcs );
if (cell_dim>2)
{
if (mesh->getCornerIdFromVertices(bnodes, corner_id))
{
mesh->getCornerPtr(abs(corner_id))->setTag(physical); //std::cout << (++TESTE) << std::endl;
}