diff --git a/vtkm/CMakeLists.txt b/vtkm/CMakeLists.txt index 4563fa27d..09dbb8684 100644 --- a/vtkm/CMakeLists.txt +++ b/vtkm/CMakeLists.txt @@ -48,9 +48,9 @@ set(headers TypeListTag.h Types.h TypeTraits.h + VecAxisAlignedPointCoordinates.h VecFromPortal.h VecFromPortalPermute.h - VecRectilinearPointCoordinates.h VectorAnalysis.h VecTraits.h VecVariable.h diff --git a/vtkm/VecRectilinearPointCoordinates.h b/vtkm/VecAxisAlignedPointCoordinates.h similarity index 70% rename from vtkm/VecRectilinearPointCoordinates.h rename to vtkm/VecAxisAlignedPointCoordinates.h index b8434b30e..21d821bc3 100644 --- a/vtkm/VecRectilinearPointCoordinates.h +++ b/vtkm/VecAxisAlignedPointCoordinates.h @@ -17,8 +17,9 @@ // Laboratory (LANL), the U.S. Government retains certain rights in // this software. //============================================================================ -#ifndef vtk_m_exec_VecRectilinearPointCoordinates_h -#define vtk_m_exec_VecRectilinearPointCoordinates_h + +#ifndef vtk_m_VecAxisAlignedPointCoordinates_h +#define vtk_m_VecAxisAlignedPointCoordinates_h #include #include @@ -31,56 +32,62 @@ namespace vtkm namespace detail { -/// Specifies the size of VecRectilinearPointCoordinates for the given +/// Specifies the size of VecAxisAlignedPointCoordinates for the given /// dimension. /// template -struct VecRectilinearPointCoordinatesNumComponents; +struct VecAxisAlignedPointCoordinatesNumComponents; template <> -struct VecRectilinearPointCoordinatesNumComponents<1> +struct VecAxisAlignedPointCoordinatesNumComponents<1> { static const vtkm::IdComponent NUM_COMPONENTS = 2; }; template <> -struct VecRectilinearPointCoordinatesNumComponents<2> +struct VecAxisAlignedPointCoordinatesNumComponents<2> { static const vtkm::IdComponent NUM_COMPONENTS = 4; }; template <> -struct VecRectilinearPointCoordinatesNumComponents<3> +struct VecAxisAlignedPointCoordinatesNumComponents<3> { static const vtkm::IdComponent NUM_COMPONENTS = 8; }; VTKM_EXEC_CONSTANT -const vtkm::FloatDefault VecRectilinearPointCoordinatesOffsetTable[8][3] = { +const vtkm::FloatDefault VecAxisAlignedPointCoordinatesOffsetTable[8][3] = { { 0.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f }, { 1.0f, 0.0f, 1.0f }, { 1.0f, 1.0f, 1.0f }, { 0.0f, 1.0f, 1.0f } }; } // namespace detail -/// \brief An implicit vector for point coordinates in rectilinear cells. +/// \brief An implicit vector for point coordinates in axis aligned cells. For +/// internal use only. /// -/// The \C VecRectilinearPointCoordinates class is a Vec-like class that holds -/// the point coordinates for a rectilinear cell. The class is templated on the -/// dimensions of the cell, which can be 1 (for a line), 2 (for a pixel), or 3 -/// (for a voxel). +/// The \C VecAxisAlignedPointCoordinates class is a Vec-like class that holds +/// the point coordinates for a axis aligned cell. The class is templated on the +/// dimensions of the cell, which can be 1 (for a line). +/// +/// This is an internal class used to represent coordinates for uniform datasets +/// in an execution environment when executing a WorkletMapPointToCell. Users +/// should not directly construct this class under any circumstances. Use the +/// related ArrayPortalUniformPointCoordinates and +/// ArrayHandleUniformPointCoordinates classes instead. /// template -class VecRectilinearPointCoordinates +class VecAxisAlignedPointCoordinates { public: typedef vtkm::Vec ComponentType; static const vtkm::IdComponent NUM_COMPONENTS = - detail::VecRectilinearPointCoordinatesNumComponents::NUM_COMPONENTS; + detail::VecAxisAlignedPointCoordinatesNumComponents::NUM_COMPONENTS; VTKM_EXEC_CONT - VecRectilinearPointCoordinates(ComponentType origin = ComponentType(0, 0, 0), + VecAxisAlignedPointCoordinates(ComponentType origin = ComponentType(0, 0, 0), ComponentType spacing = ComponentType(1, 1, 1)) : Origin(origin) , Spacing(spacing) @@ -103,7 +110,7 @@ public: VTKM_EXEC_CONT ComponentType operator[](vtkm::IdComponent index) const { - const vtkm::FloatDefault* offset = detail::VecRectilinearPointCoordinatesOffsetTable[index]; + const vtkm::FloatDefault* offset = detail::VecAxisAlignedPointCoordinatesOffsetTable[index]; return ComponentType(this->Origin[0] + offset[0] * this->Spacing[0], this->Origin[1] + offset[1] * this->Spacing[1], this->Origin[2] + offset[2] * this->Spacing[2]); @@ -124,23 +131,23 @@ private: }; template -struct TypeTraits> +struct TypeTraits> { typedef vtkm::TypeTraitsRealTag NumericTag; typedef TypeTraitsVectorTag DimensionalityTag; VTKM_EXEC_CONT - static vtkm::VecRectilinearPointCoordinates ZeroInitialization() + static vtkm::VecAxisAlignedPointCoordinates ZeroInitialization() { - return vtkm::VecRectilinearPointCoordinates( + return vtkm::VecAxisAlignedPointCoordinates( vtkm::Vec(0, 0, 0), vtkm::Vec(0, 0, 0)); } }; template -struct VecTraits> +struct VecTraits> { - typedef vtkm::VecRectilinearPointCoordinates VecType; + typedef vtkm::VecAxisAlignedPointCoordinates VecType; typedef vtkm::Vec ComponentType; typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents; @@ -166,4 +173,4 @@ struct VecTraits> } // namespace vtkm -#endif //vtk_m_exec_VecRectilinearPointCoordinates_h +#endif //vtk_m_VecAxisAlignedPointCoordinates_h diff --git a/vtkm/exec/CellDerivative.h b/vtkm/exec/CellDerivative.h index daeab3a8e..5a0aa7ea1 100644 --- a/vtkm/exec/CellDerivative.h +++ b/vtkm/exec/CellDerivative.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include @@ -531,7 +531,7 @@ VTKM_EXEC vtkm::Vec CellDerivative( template VTKM_EXEC vtkm::Vec CellDerivative( const FieldVecType& field, - const vtkm::VecRectilinearPointCoordinates<1>& wCoords, + const vtkm::VecAxisAlignedPointCoordinates<1>& wCoords, const vtkm::Vec& vtkmNotUsed(pcoords), vtkm::CellShapeTagLine, const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) @@ -823,7 +823,7 @@ VTKM_EXEC vtkm::Vec CellDerivative( template VTKM_EXEC vtkm::Vec CellDerivative( const FieldVecType& field, - const vtkm::VecRectilinearPointCoordinates<2>& wCoords, + const vtkm::VecAxisAlignedPointCoordinates<2>& wCoords, const vtkm::Vec& pcoords, vtkm::CellShapeTagQuad, const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) @@ -1014,7 +1014,7 @@ VTKM_EXEC vtkm::Vec CellDerivative( template VTKM_EXEC vtkm::Vec CellDerivative( const FieldVecType& field, - const vtkm::VecRectilinearPointCoordinates<3>& wCoords, + const vtkm::VecAxisAlignedPointCoordinates<3>& wCoords, const vtkm::Vec& pcoords, vtkm::CellShapeTagHexahedron, const vtkm::exec::FunctorBase& vtkmNotUsed(worklet)) diff --git a/vtkm/exec/CellInterpolate.h b/vtkm/exec/CellInterpolate.h index 38bfb4953..8ffb992f0 100644 --- a/vtkm/exec/CellInterpolate.h +++ b/vtkm/exec/CellInterpolate.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include @@ -188,7 +188,7 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( template VTKM_EXEC vtkm::Vec CellInterpolate( - const vtkm::VecRectilinearPointCoordinates<1>& field, + const vtkm::VecAxisAlignedPointCoordinates<1>& field, const vtkm::Vec& pcoords, vtkm::CellShapeTagLine, const vtkm::exec::FunctorBase&) @@ -331,7 +331,7 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( template VTKM_EXEC vtkm::Vec CellInterpolate( - const vtkm::VecRectilinearPointCoordinates<2>& field, + const vtkm::VecAxisAlignedPointCoordinates<2>& field, const vtkm::Vec& pcoords, vtkm::CellShapeTagQuad, const vtkm::exec::FunctorBase&) @@ -386,7 +386,7 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate( template VTKM_EXEC vtkm::Vec CellInterpolate( - const vtkm::VecRectilinearPointCoordinates<3>& field, + const vtkm::VecAxisAlignedPointCoordinates<3>& field, const vtkm::Vec& pcoords, vtkm::CellShapeTagHexahedron, const vtkm::exec::FunctorBase&) diff --git a/vtkm/exec/ParametricCoordinates.h b/vtkm/exec/ParametricCoordinates.h index ef7a700bf..5599f251a 100644 --- a/vtkm/exec/ParametricCoordinates.h +++ b/vtkm/exec/ParametricCoordinates.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -795,7 +795,7 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, } static inline VTKM_EXEC vtkm::Vec WorldCoordinatesToParametricCoordinates( - const vtkm::VecRectilinearPointCoordinates<1>& pointWCoords, + const vtkm::VecAxisAlignedPointCoordinates<1>& pointWCoords, const vtkm::Vec& wcoords, vtkm::CellShapeTagLine, const FunctorBase&) @@ -963,7 +963,7 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, } static inline VTKM_EXEC vtkm::Vec WorldCoordinatesToParametricCoordinates( - const vtkm::VecRectilinearPointCoordinates<2>& pointWCoords, + const vtkm::VecAxisAlignedPointCoordinates<2>& pointWCoords, const vtkm::Vec& wcoords, vtkm::CellShapeTagQuad, const FunctorBase&) @@ -1038,7 +1038,7 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, } static inline VTKM_EXEC vtkm::Vec WorldCoordinatesToParametricCoordinates( - const vtkm::VecRectilinearPointCoordinates<3>& pointWCoords, + const vtkm::VecAxisAlignedPointCoordinates<3>& pointWCoords, const vtkm::Vec& wcoords, vtkm::CellShapeTagHexahedron, const FunctorBase&) diff --git a/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h b/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h index 956cf53c5..07a19f38e 100644 --- a/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h +++ b/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h @@ -28,7 +28,7 @@ #include -#include +#include #include #include @@ -87,25 +87,25 @@ struct FetchArrayTopologyMapInImplementation } }; -static inline VTKM_EXEC vtkm::VecRectilinearPointCoordinates<1> make_VecRectilinearPointCoordinates( +static inline VTKM_EXEC vtkm::VecAxisAlignedPointCoordinates<1> make_VecAxisAlignedPointCoordinates( const vtkm::Vec& origin, const vtkm::Vec& spacing, const vtkm::Vec& logicalId) { vtkm::Vec offsetOrigin( origin[0] + spacing[0] * static_cast(logicalId[0]), origin[1], origin[2]); - return vtkm::VecRectilinearPointCoordinates<1>(offsetOrigin, spacing); + return vtkm::VecAxisAlignedPointCoordinates<1>(offsetOrigin, spacing); } -static inline VTKM_EXEC vtkm::VecRectilinearPointCoordinates<1> make_VecRectilinearPointCoordinates( +static inline VTKM_EXEC vtkm::VecAxisAlignedPointCoordinates<1> make_VecAxisAlignedPointCoordinates( const vtkm::Vec& origin, const vtkm::Vec& spacing, vtkm::Id logicalId) { - return make_VecRectilinearPointCoordinates(origin, spacing, vtkm::Vec(logicalId)); + return make_VecAxisAlignedPointCoordinates(origin, spacing, vtkm::Vec(logicalId)); } -static inline VTKM_EXEC vtkm::VecRectilinearPointCoordinates<2> make_VecRectilinearPointCoordinates( +static inline VTKM_EXEC vtkm::VecAxisAlignedPointCoordinates<2> make_VecAxisAlignedPointCoordinates( const vtkm::Vec& origin, const vtkm::Vec& spacing, const vtkm::Vec& logicalId) @@ -114,10 +114,10 @@ static inline VTKM_EXEC vtkm::VecRectilinearPointCoordinates<2> make_VecRectilin origin[0] + spacing[0] * static_cast(logicalId[0]), origin[1] + spacing[1] * static_cast(logicalId[1]), origin[2]); - return vtkm::VecRectilinearPointCoordinates<2>(offsetOrigin, spacing); + return vtkm::VecAxisAlignedPointCoordinates<2>(offsetOrigin, spacing); } -static inline VTKM_EXEC vtkm::VecRectilinearPointCoordinates<3> make_VecRectilinearPointCoordinates( +static inline VTKM_EXEC vtkm::VecAxisAlignedPointCoordinates<3> make_VecAxisAlignedPointCoordinates( const vtkm::Vec& origin, const vtkm::Vec& spacing, const vtkm::Vec& logicalId) @@ -126,7 +126,7 @@ static inline VTKM_EXEC vtkm::VecRectilinearPointCoordinates<3> make_VecRectilin origin[0] + spacing[0] * static_cast(logicalId[0]), origin[1] + spacing[1] * static_cast(logicalId[1]), origin[2] + spacing[2] * static_cast(logicalId[2])); - return vtkm::VecRectilinearPointCoordinates<3>(offsetOrigin, spacing); + return vtkm::VecAxisAlignedPointCoordinates<3>(offsetOrigin, spacing); } template @@ -143,7 +143,7 @@ struct FetchArrayTopologyMapInImplementation< ConnectivityType; typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; - typedef vtkm::VecRectilinearPointCoordinates ValueType; + typedef vtkm::VecAxisAlignedPointCoordinates ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -152,7 +152,7 @@ struct FetchArrayTopologyMapInImplementation< { // This works because the logical cell index is the same as the logical // point index of the first point on the cell. - return vtkm::exec::arg::detail::make_VecRectilinearPointCoordinates( + return vtkm::exec::arg::detail::make_VecAxisAlignedPointCoordinates( field.GetOrigin(), field.GetSpacing(), indices.GetIndexLogical()); } }; @@ -174,7 +174,7 @@ struct FetchArrayTopologyMapInImplementation< ConnectivityType; typedef vtkm::exec::arg::ThreadIndicesTopologyMap ThreadIndicesType; - typedef vtkm::VecRectilinearPointCoordinates ValueType; + typedef vtkm::VecAxisAlignedPointCoordinates ValueType; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -184,9 +184,9 @@ struct FetchArrayTopologyMapInImplementation< // This works because the logical cell index is the same as the logical // point index of the first point on the cell. - // we have a flat index but we need 3d rectilinear coordiantes, so we + // we have a flat index but we need 3d uniform coordinates, so we // need to take an flat index and convert to logical index - return vtkm::exec::arg::detail::make_VecRectilinearPointCoordinates( + return vtkm::exec::arg::detail::make_VecAxisAlignedPointCoordinates( field.GetOrigin(), field.GetSpacing(), indices.GetIndexLogical()); } }; diff --git a/vtkm/exec/arg/testing/UnitTestFetchArrayTopologyMapIn.cxx b/vtkm/exec/arg/testing/UnitTestFetchArrayTopologyMapIn.cxx index da34df33d..25d436ec6 100644 --- a/vtkm/exec/arg/testing/UnitTestFetchArrayTopologyMapIn.cxx +++ b/vtkm/exec/arg/testing/UnitTestFetchArrayTopologyMapIn.cxx @@ -159,7 +159,7 @@ void TryStructuredPointCoordinatesInvocation(const Invocation& invocation) vtkm::Vec origin = TestValue(0, vtkm::Vec()); vtkm::Vec spacing = TestValue(1, vtkm::Vec()); - vtkm::VecRectilinearPointCoordinates value = fetch.Load( + vtkm::VecAxisAlignedPointCoordinates value = fetch.Load( ThreadIndicesType( 0, invocation.OutputToInputMap, invocation.VisitArray, invocation.GetInputDomain()), invocation.Parameters.template GetParameter()); diff --git a/vtkm/exec/testing/UnitTestCellDerivative.cxx b/vtkm/exec/testing/UnitTestCellDerivative.cxx index 79ae8e5a0..9b95a0249 100644 --- a/vtkm/exec/testing/UnitTestCellDerivative.cxx +++ b/vtkm/exec/testing/UnitTestCellDerivative.cxx @@ -308,19 +308,19 @@ void TestDerivative() TestDerivativeFunctor testFunctorScalar; std::cout << "======== Uniform Point Coordinates 3D =====" << std::endl; testFunctorScalar.DoTestWithWCoords(vtkm::CellShapeTagHexahedron(), - vtkm::VecRectilinearPointCoordinates<3>(origin, spacing), + vtkm::VecAxisAlignedPointCoordinates<3>(origin, spacing), scalarField, expectedScalarGradient); std::cout << "======== Uniform Point Coordinates 2D =====" << std::endl; expectedScalarGradient[2] = 0.0; testFunctorScalar.DoTestWithWCoords(vtkm::CellShapeTagQuad(), - vtkm::VecRectilinearPointCoordinates<2>(origin, spacing), + vtkm::VecAxisAlignedPointCoordinates<2>(origin, spacing), scalarField, expectedScalarGradient); std::cout << "======== Uniform Point Coordinates 1D =====" << std::endl; expectedScalarGradient[1] = 0.0; testFunctorScalar.DoTestWithWCoords(vtkm::CellShapeTagLine(), - vtkm::VecRectilinearPointCoordinates<1>(origin, spacing), + vtkm::VecAxisAlignedPointCoordinates<1>(origin, spacing), scalarField, expectedScalarGradient); @@ -339,19 +339,19 @@ void TestDerivative() TestDerivativeFunctor> testFunctorVector; std::cout << "======== Uniform Point Coordinates 3D =====" << std::endl; testFunctorVector.DoTestWithWCoords(vtkm::CellShapeTagHexahedron(), - vtkm::VecRectilinearPointCoordinates<3>(origin, spacing), + vtkm::VecAxisAlignedPointCoordinates<3>(origin, spacing), vectorField, expectedVectorGradient); std::cout << "======== Uniform Point Coordinates 2D =====" << std::endl; expectedVectorGradient[2] = vtkm::Vec(0.0); testFunctorVector.DoTestWithWCoords(vtkm::CellShapeTagQuad(), - vtkm::VecRectilinearPointCoordinates<2>(origin, spacing), + vtkm::VecAxisAlignedPointCoordinates<2>(origin, spacing), vectorField, expectedVectorGradient); std::cout << "======== Uniform Point Coordinates 1D =====" << std::endl; expectedVectorGradient[1] = vtkm::Vec(0.0); testFunctorVector.DoTestWithWCoords(vtkm::CellShapeTagLine(), - vtkm::VecRectilinearPointCoordinates<1>(origin, spacing), + vtkm::VecAxisAlignedPointCoordinates<1>(origin, spacing), vectorField, expectedVectorGradient); } diff --git a/vtkm/exec/testing/UnitTestCellInterpolate.cxx b/vtkm/exec/testing/UnitTestCellInterpolate.cxx index b35b4e69b..20ac7e8cd 100644 --- a/vtkm/exec/testing/UnitTestCellInterpolate.cxx +++ b/vtkm/exec/testing/UnitTestCellInterpolate.cxx @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include @@ -163,13 +163,13 @@ void TestInterpolate() vtkm::Vec spacing = TestValue(1, vtkm::Vec()); std::cout << "======== Uniform Point Coordinates 1D =====" << std::endl; testFunctor.DoTestWithField(vtkm::CellShapeTagLine(), - vtkm::VecRectilinearPointCoordinates<1>(origin, spacing)); + vtkm::VecAxisAlignedPointCoordinates<1>(origin, spacing)); std::cout << "======== Uniform Point Coordinates 2D =====" << std::endl; testFunctor.DoTestWithField(vtkm::CellShapeTagQuad(), - vtkm::VecRectilinearPointCoordinates<2>(origin, spacing)); + vtkm::VecAxisAlignedPointCoordinates<2>(origin, spacing)); std::cout << "======== Uniform Point Coordinates 3D =====" << std::endl; testFunctor.DoTestWithField(vtkm::CellShapeTagHexahedron(), - vtkm::VecRectilinearPointCoordinates<3>(origin, spacing)); + vtkm::VecAxisAlignedPointCoordinates<3>(origin, spacing)); } } // anonymous namespace diff --git a/vtkm/exec/testing/UnitTestParametricCoordinates.cxx b/vtkm/exec/testing/UnitTestParametricCoordinates.cxx index 8fda21f77..bd58db04c 100644 --- a/vtkm/exec/testing/UnitTestParametricCoordinates.cxx +++ b/vtkm/exec/testing/UnitTestParametricCoordinates.cxx @@ -263,10 +263,10 @@ void TestAllPCoords() vtkm::Vec spacing( randomDist(g_RandomGenerator), randomDist(g_RandomGenerator), randomDist(g_RandomGenerator)); - TestPCoords(vtkm::VecRectilinearPointCoordinates<3>(origin, spacing), + TestPCoords(vtkm::VecAxisAlignedPointCoordinates<3>(origin, spacing), vtkm::CellShapeTagHexahedron()); - TestPCoords(vtkm::VecRectilinearPointCoordinates<2>(origin, spacing), vtkm::CellShapeTagQuad()); - TestPCoords(vtkm::VecRectilinearPointCoordinates<1>(origin, spacing), vtkm::CellShapeTagLine()); + TestPCoords(vtkm::VecAxisAlignedPointCoordinates<2>(origin, spacing), vtkm::CellShapeTagQuad()); + TestPCoords(vtkm::VecAxisAlignedPointCoordinates<1>(origin, spacing), vtkm::CellShapeTagLine()); } } // Anonymous namespace diff --git a/vtkm/rendering/raytracing/CellSampler.h b/vtkm/rendering/raytracing/CellSampler.h index 7e356c358..ac3babac4 100644 --- a/vtkm/rendering/raytracing/CellSampler.h +++ b/vtkm/rendering/raytracing/CellSampler.h @@ -103,7 +103,7 @@ VTKM_EXEC_CONT inline bool Sample(const vtkm::Vec, 8>& points, } template -VTKM_EXEC_CONT inline bool Sample(const vtkm::VecRectilinearPointCoordinates<3>& points, +VTKM_EXEC_CONT inline bool Sample(const vtkm::VecAxisAlignedPointCoordinates<3>& points, const vtkm::Vec& scalars, const vtkm::Vec& sampleLocation, S& lerpedScalar, @@ -238,7 +238,7 @@ public: const WorkletType& callingWorklet, const vtkm::Int32& vtkmNotUsed(cellShape = CELL_SHAPE_HEXAHEDRON)) const { - vtkm::VecRectilinearPointCoordinates<3> rPoints(points[0], points[6] - points[0]); + vtkm::VecAxisAlignedPointCoordinates<3> rPoints(points[0], points[6] - points[0]); return detail::Sample(rPoints, scalars, sampleLocation, diff --git a/vtkm/testing/CMakeLists.txt b/vtkm/testing/CMakeLists.txt index 8a5734d03..706d72629 100644 --- a/vtkm/testing/CMakeLists.txt +++ b/vtkm/testing/CMakeLists.txt @@ -45,9 +45,9 @@ set(unit_tests UnitTestTypes.cxx UnitTestTypeTraits.cxx UnitTestUnaryPredicates.cxx + UnitTestVecAxisAlignedPointCoordinates.cxx UnitTestVecFromPortal.cxx UnitTestVecFromPortalPermute.cxx - UnitTestVecRectilinearPointCoordinates.cxx UnitTestVectorAnalysis.cxx UnitTestVecTraits.cxx UnitTestVecVariable.cxx diff --git a/vtkm/testing/UnitTestVecRectilinearPointCoordinates.cxx b/vtkm/testing/UnitTestVecAxisAlignedPointCoordinates.cxx similarity index 81% rename from vtkm/testing/UnitTestVecRectilinearPointCoordinates.cxx rename to vtkm/testing/UnitTestVecAxisAlignedPointCoordinates.cxx index 4eedb11cd..0e8d775ea 100644 --- a/vtkm/testing/UnitTestVecRectilinearPointCoordinates.cxx +++ b/vtkm/testing/UnitTestVecAxisAlignedPointCoordinates.cxx @@ -18,7 +18,7 @@ // this software. //============================================================================ -#include +#include #include @@ -76,10 +76,10 @@ void CheckCoordsValues(const VecCoordsType& coords) } template -void TryVecRectilinearPointCoordinates( - const vtkm::VecRectilinearPointCoordinates& coords) +void TryVecAxisAlignedPointCoordinates( + const vtkm::VecAxisAlignedPointCoordinates& coords) { - typedef vtkm::VecRectilinearPointCoordinates VecCoordsType; + typedef vtkm::VecAxisAlignedPointCoordinates VecCoordsType; typedef vtkm::TypeTraits TTraits; typedef vtkm::VecTraits VTraits; @@ -113,39 +113,39 @@ void TryVecRectilinearPointCoordinates( VTKM_TEST_ASSERT(test_equal(coords.GetSpacing(), g_Spacing), "Wrong spacing"); } -void TestVecRectilinearPointCoordinates() +void TestVecAxisAlignedPointCoordinates() { std::cout << "***** 1D Coordinates *****************" << std::endl; - vtkm::VecRectilinearPointCoordinates<1> coords1d(g_Origin, g_Spacing); + vtkm::VecAxisAlignedPointCoordinates<1> coords1d(g_Origin, g_Spacing); VTKM_TEST_ASSERT(coords1d.NUM_COMPONENTS == 2, "Wrong number of components"); - VTKM_TEST_ASSERT(vtkm::VecRectilinearPointCoordinates<1>::NUM_COMPONENTS == 2, + VTKM_TEST_ASSERT(vtkm::VecAxisAlignedPointCoordinates<1>::NUM_COMPONENTS == 2, "Wrong number of components"); - VTKM_TEST_ASSERT(vtkm::VecTraits>::NUM_COMPONENTS == 2, + VTKM_TEST_ASSERT(vtkm::VecTraits>::NUM_COMPONENTS == 2, "Wrong number of components"); - TryVecRectilinearPointCoordinates(coords1d); + TryVecAxisAlignedPointCoordinates(coords1d); std::cout << "***** 2D Coordinates *****************" << std::endl; - vtkm::VecRectilinearPointCoordinates<2> coords2d(g_Origin, g_Spacing); + vtkm::VecAxisAlignedPointCoordinates<2> coords2d(g_Origin, g_Spacing); VTKM_TEST_ASSERT(coords2d.NUM_COMPONENTS == 4, "Wrong number of components"); - VTKM_TEST_ASSERT(vtkm::VecRectilinearPointCoordinates<2>::NUM_COMPONENTS == 4, + VTKM_TEST_ASSERT(vtkm::VecAxisAlignedPointCoordinates<2>::NUM_COMPONENTS == 4, "Wrong number of components"); - VTKM_TEST_ASSERT(vtkm::VecTraits>::NUM_COMPONENTS == 4, + VTKM_TEST_ASSERT(vtkm::VecTraits>::NUM_COMPONENTS == 4, "Wrong number of components"); - TryVecRectilinearPointCoordinates(coords2d); + TryVecAxisAlignedPointCoordinates(coords2d); std::cout << "***** 3D Coordinates *****************" << std::endl; - vtkm::VecRectilinearPointCoordinates<3> coords3d(g_Origin, g_Spacing); + vtkm::VecAxisAlignedPointCoordinates<3> coords3d(g_Origin, g_Spacing); VTKM_TEST_ASSERT(coords3d.NUM_COMPONENTS == 8, "Wrong number of components"); - VTKM_TEST_ASSERT(vtkm::VecRectilinearPointCoordinates<3>::NUM_COMPONENTS == 8, + VTKM_TEST_ASSERT(vtkm::VecAxisAlignedPointCoordinates<3>::NUM_COMPONENTS == 8, "Wrong number of components"); - VTKM_TEST_ASSERT(vtkm::VecTraits>::NUM_COMPONENTS == 8, + VTKM_TEST_ASSERT(vtkm::VecTraits>::NUM_COMPONENTS == 8, "Wrong number of components"); - TryVecRectilinearPointCoordinates(coords3d); + TryVecAxisAlignedPointCoordinates(coords3d); } } // anonymous namespace -int UnitTestVecRectilinearPointCoordinates(int, char* []) +int UnitTestVecAxisAlignedPointCoordinates(int, char* []) { - return vtkm::testing::Testing::Run(TestVecRectilinearPointCoordinates); + return vtkm::testing::Testing::Run(TestVecAxisAlignedPointCoordinates); } diff --git a/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx b/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx index 531174630..6633947b9 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx @@ -78,7 +78,7 @@ struct CheckStructuredUniformPointCoords : public vtkm::worklet::WorkletMapPoint template VTKM_EXEC void operator()( - const vtkm::VecRectilinearPointCoordinates& vtkmNotUsed(coords)) const + const vtkm::VecAxisAlignedPointCoordinates& vtkmNotUsed(coords)) const { // Success if here. }