本文整理汇总了C++中percept::PerceptMesh::edge_rank方法的典型用法代码示例。如果您正苦于以下问题:C++ PerceptMesh::edge_rank方法的具体用法?C++ PerceptMesh::edge_rank怎么用?C++ PerceptMesh::edge_rank使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类percept::PerceptMesh
的用法示例。
在下文中一共展示了PerceptMesh::edge_rank方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: correctBlockNamesForPartPartConsistency
BlockNamesType RefinerUtil::correctBlockNamesForPartPartConsistency(percept::PerceptMesh& eMesh, BlockNamesType& blocks)
{
if (EXTRA_PRINT_UR_GETBLOCKS) std::cout << "RefinerUtil::correctBlockNamesForPartPartConsistency..." << std::endl;
if (blocks[eMesh.element_rank()].size() == 0)
return blocks;
stk_classic::mesh::EntityRank subDimRank = (eMesh.get_spatial_dim() == 3 ? eMesh.face_rank() : eMesh.edge_rank());
mesh::PartVector all_parts = eMesh.get_fem_meta_data()->get_parts();
for (mesh::PartVector::iterator i_part = all_parts.begin(); i_part != all_parts.end(); ++i_part)
{
mesh::Part * part = *i_part ;
for (mesh::PartVector::iterator i_surfacePart = all_parts.begin(); i_surfacePart != all_parts.end(); ++i_surfacePart)
{
mesh::Part * surfacePart = *i_surfacePart ;
if ( stk_classic::mesh::is_auto_declared_part(*surfacePart) )
continue;
const CellTopologyData * part_cell_topo_data = stk_classic::percept::PerceptMesh::get_cell_topology(*surfacePart);
CellTopology surf_topo(part_cell_topo_data);
//if (EXTRA_PRINT_UR_GETBLOCKS) std::cout << "tmp srk surfacePart= " << surfacePart->name() << " topo= " << (part_cell_topo_data?surf_topo.getName() : "NULL") << std::endl;
if (part_cell_topo_data && part->primary_entity_rank() == eMesh.element_rank() && surfacePart->primary_entity_rank() == subDimRank)
{
std::string partNamePlus = "+" + part->name();
std::vector<std::string>::iterator partInBlocks = std::find(blocks[eMesh.element_rank()].begin(), blocks[eMesh.element_rank()].end(), partNamePlus);
// if this part is not in the blocks list, skip it
if (partInBlocks == blocks[eMesh.element_rank()].end())
{
//if (EXTRA_PRINT_UR_GETBLOCKS) std::cout << "tmp srk skipping part= " << partNamePlus << std::endl;
continue;
}
std::string surfacePartNamePlus = "+" + surfacePart->name();
std::vector<std::string>::iterator surfacePartInBlocks = std::find(blocks[subDimRank].begin(), blocks[subDimRank].end(), surfacePartNamePlus);
// if this surface is already in the list, skip it
if (surfacePartInBlocks != blocks[subDimRank].end())
{
//if (EXTRA_PRINT_UR_GETBLOCKS) std::cout << "tmp srk skipping surf= " << surfacePartNamePlus << std::endl;
continue;
}
bool isBoundarySurface= eMesh.isBoundarySurface(*part, *surfacePart);
if (EXTRA_PRINT_UR_GETBLOCKS) std::cout << "tmp srk isBoundarySurface for part/surf= " << part->name() << " / " << surfacePart->name() << " = " << isBoundarySurface << std::endl;
if (isBoundarySurface)
{
if (EXTRA_PRINT_UR_GETBLOCKS) std::cout << "tmp part [" << part->name() << "] shares sideset [" << surfacePart->name() << "]" << std::endl;
blocks[subDimRank].push_back(std::string("+"+surfacePart->name()));
}
else
{
//std::cout << "tmp part [" << part->name() << "] doesn't shares sideset [" << surfacePart->name() << "]" << std::endl;
}
}
}
}
if (0) std::cout << "tmp RefinerUtil::correctBlockNamesForPartPartConsistency: blocks = " << blocks << std::endl;
return blocks;
}