本文整理汇总了C++中percept::PerceptMesh::element_rank方法的典型用法代码示例。如果您正苦于以下问题:C++ PerceptMesh::element_rank方法的具体用法?C++ PerceptMesh::element_rank怎么用?C++ PerceptMesh::element_rank使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类percept::PerceptMesh
的用法示例。
在下文中一共展示了PerceptMesh::element_rank方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: UniformRefinerPattern
UniformRefinerPattern(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) : URP<shards::Pyramid<5>, shards::Tetrahedron<4> >(eMesh)
{
m_primaryEntityRank = eMesh.element_rank();
Elem::StdMeshObjTopologies::bootstrap();
}
示例3: UniformRefinerPattern
UniformRefinerPattern(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) : URP<shards::ShellLine<3>, shards::ShellLine<3> >(eMesh)
{
m_primaryEntityRank = m_eMesh.edge_rank();
if (m_eMesh.get_spatial_dim() == 1)
m_primaryEntityRank = eMesh.element_rank();
setNeededParts(eMesh, block_names, true);
}
开发者ID:gitter-badger,项目名称:quinoa,代码行数:8,代码来源:UniformRefinerPattern_ShellLine3_ShellLine3_2_sierra.hpp
示例4: UniformRefinerPattern
// UniformRefinerPattern(percept::PerceptMesh& eMesh, std::string fromTopoPartName="block_1", std::string toTopoPartName="block_quad_4")
// {
// setNeededParts(eMesh, fromTopoPartName, toTopoPartName);
// }
UniformRefinerPattern(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) : URP<shards::Quadrilateral<4>, shards::Quadrilateral<4> >(eMesh)
{
m_primaryEntityRank = eMesh.face_rank();
if (m_eMesh.get_spatial_dim() == 2)
m_primaryEntityRank = eMesh.element_rank();
setNeededParts(eMesh, block_names, true);
}
示例5: UniformRefinerPattern
UniformRefinerPattern(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) : URP<shards::Beam<2>, shards::Beam<2> >(eMesh)
{
// m_primaryEntityRank = m_eMesh.edge_rank();
// if (m_eMesh.get_spatial_dim() == 1)
m_primaryEntityRank = eMesh.element_rank();
setNeededParts(eMesh, block_names, true);
Elem::StdMeshObjTopologies::bootstrap();
}
示例6: UniformRefinerPattern
UniformRefinerPattern(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) : URP<shards::Tetrahedron<4> , shards::Tetrahedron<10> >(eMesh)
{
m_primaryEntityRank = eMesh.element_rank();
setNeededParts(eMesh, block_names, false);
Elem::StdMeshObjTopologies::bootstrap();
#if FACE_BREAKER_TET4_TET10_1
m_subDim_breaker = new UniformRefinerPattern<shards::Triangle<3>, shards::Triangle<6>, 1, SierraPort > (eMesh, block_names) ;
#endif
}
示例7: UniformRefinerPattern
UniformRefinerPattern(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) : URP<shards::Pyramid<5> , shards::Pyramid<13> >(eMesh)
{
m_primaryEntityRank = eMesh.element_rank();
setNeededParts(eMesh, block_names, false);
Elem::StdMeshObjTopologies::bootstrap();
#if FACE_BREAKER_P5_P13_1
m_subDim_breaker = new UniformRefinerPattern<shards::Triangle<3>, shards::Triangle<6>, 1, SierraPort > (eMesh, block_names) ;
m_subDim_breaker_quad = new UniformRefinerPattern<shards::Quadrilateral<4>, shards::Quadrilateral<9>, 1, SierraPort > (eMesh, block_names);
#endif
}
示例8: UniformRefinerPattern
UniformRefinerPattern(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) : URP<shards::Wedge<6>, shards::Wedge<6> >(eMesh)
{
m_primaryEntityRank = eMesh.element_rank();
setNeededParts(eMesh, block_names, true);
Elem::StdMeshObjTopologies::bootstrap();
#if FACE_BREAKER_W6_W6_8
m_face_breaker = new UniformRefinerPattern<shards::Quadrilateral<4>, shards::Quadrilateral<4>, 4, SierraPort > (eMesh, block_names) ;
m_face_breaker_tri = new UniformRefinerPattern<shards::Triangle<3>, shards::Triangle<3>, 4, SierraPort > (eMesh, block_names);
#endif
}
示例9: UniformRefinerPattern
UniformRefinerPattern(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) : URP<shards::Quadrilateral<4> , shards::Quadrilateral<8> >(eMesh)
{
m_primaryEntityRank = m_eMesh.face_rank();
if (m_eMesh.get_spatial_dim() == 2)
m_primaryEntityRank = eMesh.element_rank();
setNeededParts(eMesh, block_names, false);
Elem::StdMeshObjTopologies::bootstrap();
#if EDGE_BREAKER_Q4_Q8_1
m_edge_breaker = new UniformRefinerPattern<shards::Line<2>, shards::Line<3>, 1, SierraPort > (eMesh, block_names) ;
#endif
}
示例10: UniformRefinerPattern
UniformRefinerPattern(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) : URP<shards::Triangle<6>, shards::Triangle<6> >(eMesh)
{
m_primaryEntityRank = m_eMesh.face_rank();
if (m_eMesh.get_spatial_dim() == 2)
m_primaryEntityRank = eMesh.element_rank();
setNeededParts(eMesh, block_names, true);
Elem::StdMeshObjTopologies::bootstrap();
#if EDGE_BREAKER_T6_T6
if (m_eMesh.get_spatial_dim() == 2)
m_edge_breaker = new UniformRefinerPattern<shards::Line<3>, shards::Line<3>, 2, SierraPort > (eMesh, block_names) ;
else
m_edge_breaker = 0;
#endif
}
示例11: runtime_error
URP_Heterogeneous_Enrich_3D(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) : m_eMesh(eMesh)
{
m_primaryEntityRank = eMesh.element_rank();
Elem::StdMeshObjTopologies::bootstrap();
// list all types of known break patterns to be used here
m_bp.resize(0);
int spatialDim = eMesh.get_spatial_dim();
// refine
// put them in reverse topological rank order
if (spatialDim != 3)
{
throw std::runtime_error("URP_Heterogeneous_Enrich_3D is only for 3D meshes");
}
// // refine
// m_bp.push_back( new UniformRefinerPattern<shards::Hexahedron<8>, shards::Hexahedron<8>, 8, SierraPort > (eMesh, block_names) );
// m_bp.push_back( new UniformRefinerPattern<shards::Wedge<6>, shards::Wedge<6>, 8, SierraPort > (eMesh, block_names) );
// m_bp.push_back( new UniformRefinerPattern<shards::Tetrahedron<4>, shards::Tetrahedron<4>, 8, SierraPort > (eMesh, block_names) );
// enrich
m_bp.push_back ( new UniformRefinerPattern< shards::Wedge<6>, shards::Wedge<15>, 1, SierraPort > (eMesh, block_names) );
m_bp.push_back ( new UniformRefinerPattern<shards::Tetrahedron<4>, shards::Tetrahedron<10>, 1, SierraPort > (eMesh, block_names) );
m_bp.push_back ( new UniformRefinerPattern<shards::Hexahedron<8>, shards::Hexahedron<27>, 1, SierraPort > (eMesh, block_names) );
m_bp.push_back ( new UniformRefinerPattern< shards::Pyramid<5>, shards::Pyramid<13>, 1, SierraPort > (eMesh, block_names) );
//m_bp.push_back( new UniformRefinerPattern<shards::ShellQuadrilateral<4>, shards::ShellQuadrilateral<9>, 1, SierraPort > (eMesh, block_names) );
//m_bp.push_back( new UniformRefinerPattern<shards::ShellTriangle<3>, shards::ShellTriangle<3>, 4, SierraPort > (eMesh, block_names) );
#if FACE_BREAKER_HETERO_ENRICH_3D
m_bp.push_back( new UniformRefinerPattern<shards::Quadrilateral<4>, shards::Quadrilateral<4>, 4, SierraPort > (eMesh, block_names) );
m_bp.push_back( new UniformRefinerPattern<shards::Triangle<3>, shards::Triangle<3>, 4, SierraPort > (eMesh, block_names) );
#endif
}
示例12: runtime_error
UniformRefinerPattern(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) :
URP<shards::ShellTriangle<6>, shards::ShellTriangle<6> >(eMesh)
{
if (m_eMesh.get_spatial_dim() != 3)
{
throw std::runtime_error("can't refine shell elements in 2D");
}
m_primaryEntityRank = eMesh.element_rank();
setNeededParts(eMesh, block_names, true);
Elem::StdMeshObjTopologies::bootstrap();
#if EDGE_TR6_TR6_4_BREAKER
//m_edge_breaker = Teuchos::rcp( new UniformRefinerPattern<shards::Line<2>, shards::Line<2>, 2, SierraPort > (eMesh, block_names) );
if (m_eMesh.get_spatial_dim() == 3)
{
m_edge_breaker = new UniformRefinerPattern<shards::ShellLine<3>, shards::ShellLine<3>, 2, SierraPort > (eMesh, block_names) ;
m_face_breaker = new UniformRefinerPattern<shards::Triangle<6>, shards::Triangle<6>, 4, SierraPort > (eMesh, block_names) ;
}
#endif
}
示例13: BlockNamesType
URP_Heterogeneous_3D(percept::PerceptMesh& eMesh, BlockNamesType block_names = BlockNamesType()) : m_eMesh(eMesh)
{
m_primaryEntityRank = eMesh.element_rank();
//!setNeededParts(eMesh, block_names, true);
Elem::StdMeshObjTopologies::bootstrap();
// list all types of known break patterns to be used here
m_bp.resize(0);
int spatialDim = eMesh.get_spatial_dim();
// refine
// put them in reverse topological rank order
if (spatialDim == 3)
{
m_bp.push_back(new UniformRefinerPattern<shards::Tetrahedron<4>, shards::Tetrahedron<4>, 8, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Hexahedron<8>, shards::Hexahedron<8>, 8, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Wedge<6>, shards::Wedge<6>, 8, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Pyramid<5>, shards::Pyramid<5>, 10, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Hexahedron<27>, shards::Hexahedron<27>, 8, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Hexahedron<20>, shards::Hexahedron<20>, 8, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Tetrahedron<10>, shards::Tetrahedron<10>, 8, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Wedge<15>, shards::Wedge<15>, 8, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::ShellQuadrilateral<4>, shards::ShellQuadrilateral<4>, 4, SierraPort > (eMesh, block_names) );
m_bp.push_back(new UniformRefinerPattern<shards::ShellTriangle<3>, shards::ShellTriangle<3>, 4, SierraPort > (eMesh, block_names) );
m_bp.push_back(new UniformRefinerPattern<shards::ShellTriangle<6>, shards::ShellTriangle<6>, 4, SierraPort > (eMesh, block_names) );
m_bp.push_back(new UniformRefinerPattern<shards::ShellQuadrilateral<8>, shards::ShellQuadrilateral<8>, 4, SierraPort > (eMesh, block_names));
// tmp FIXME
#define ENABLE_DEBUG_BEAM_ELEMENTS_IN_2D 1
#if !ENABLE_DEBUG_BEAM_ELEMENTS_IN_2D
m_bp.push_back(new UniformRefinerPattern<shards::Beam<2>, shards::Beam<2>, 2, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Beam<3>, shards::Beam<3>, 2, SierraPort > (eMesh, block_names));
#endif
}
#if ENABLE_DEBUG_BEAM_ELEMENTS_IN_2D
m_bp.push_back(new UniformRefinerPattern<shards::Beam<2>, shards::Beam<2>, 2, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Beam<3>, shards::Beam<3>, 2, SierraPort > (eMesh, block_names));
#endif
m_bp.push_back(new UniformRefinerPattern<shards::Quadrilateral<4>, shards::Quadrilateral<4>, 4, SierraPort > (eMesh, block_names) );
m_bp.push_back(new UniformRefinerPattern<shards::Triangle<3>, shards::Triangle<3>, 4, SierraPort > (eMesh, block_names) );
m_bp.push_back(new UniformRefinerPattern<shards::Triangle<6>, shards::Triangle<6>, 4, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Quadrilateral<9>, shards::Quadrilateral<9>, 4, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Quadrilateral<8>, shards::Quadrilateral<8>, 4, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Line<2>, shards::Line<2>, 2, SierraPort > (eMesh, block_names));
m_bp.push_back(new UniformRefinerPattern<shards::Line<3>, shards::Line<3>, 2, SierraPort > (eMesh, block_names));
#if 0
m_bp.push_back(new UniformRefinerPattern<shards::ShellLine<2>, shards::ShellLine<2>, 2, SierraPort > (eMesh, block_names));
#endif
}