本文整理汇总了C++中shards::CellTopology::getBaseCellTopologyData方法的典型用法代码示例。如果您正苦于以下问题:C++ CellTopology::getBaseCellTopologyData方法的具体用法?C++ CellTopology::getBaseCellTopologyData怎么用?C++ CellTopology::getBaseCellTopologyData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类shards::CellTopology
的用法示例。
在下文中一共展示了CellTopology::getBaseCellTopologyData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mapToModifiedReference
inline
void
OrientationTools::
mapToModifiedReference(outPointViewType outPoints,
const refPointViewType refPoints,
const shards::CellTopology cellTopo,
const ordinal_type cellOrt) {
#ifdef HAVE_INTREPID2_DEBUG
{
const auto cellDim = cellTopo.getDimension();
INTREPID2_TEST_FOR_EXCEPTION( !( (1 <= cellDim) && (cellDim <= 2 ) ), std::invalid_argument,
">>> ERROR (Intrepid::OrientationTools::mapToModifiedReference): " \
"Method defined only for 1 and 2-dimensional subcells.");
INTREPID2_TEST_FOR_EXCEPTION( !( outPoints.dimension(0) == refPoints.dimension(0) ), std::invalid_argument,
">>> ERROR (Intrepid::OrientationTools::mapToModifiedReference): " \
"Size of input and output point arrays does not match each other.");
}
#endif
// Apply the parametrization map to every point in parameter domain
const auto numPts = outPoints.dimension(0);
const auto key = cellTopo.getBaseCellTopologyData()->key;
switch (key) {
case shards::Line<>::key : {
for (auto pt=0;pt<numPts;++pt)
getModifiedLinePoint(outPoints(pt, 0),
refPoints(pt, 0),
cellOrt);
break;
}
case shards::Triangle<>::key : {
for (auto pt=0;pt<numPts;++pt)
getModifiedTrianglePoint(outPoints(pt, 0), outPoints(pt, 1),
refPoints(pt, 0), refPoints(pt, 1),
cellOrt);
break;
}
case shards::Quadrilateral<>::key : {
for (auto pt=0;pt<numPts;++pt)
getModifiedQuadrilateralPoint(outPoints(pt, 0), outPoints(pt, 1),
refPoints(pt, 0), refPoints(pt, 1),
cellOrt);
break;
}
default: {
INTREPID2_TEST_FOR_EXCEPTION( true, std::invalid_argument,
">>> ERROR (Intrepid2::OrientationTools::mapToModifiedReference): " \
"Invalid cell topology." );
break;
}
}
}