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; } } }