Go to the documentation of this file.
10 #ifndef vtk_m_cont_DataSetBuilderCurvilinear_h
11 #define vtk_m_cont_DataSetBuilderCurvilinear_h
30 const std::string& coordsNm =
"coords")
34 std::vector<T> yVals(xVals.size(), 0), zVals(xVals.size(), 0);
36 auto coords = vtkm::cont::make_ArrayHandleSOA<vtkm::Vec<T, 3>>({ xVals, yVals, zVals });
43 const std::vector<T>& yVals,
45 const std::string& coordsNm =
"coords")
47 VTKM_ASSERT(xVals.size() > 0 && xVals.size() == yVals.size());
49 std::vector<T> zVals(xVals.size(), 0);
50 auto coords = vtkm::cont::make_ArrayHandleSOA<vtkm::Vec<T, 3>>({ xVals, yVals, zVals });
57 const std::vector<T>& yVals,
58 const std::vector<T>& zVals,
60 const std::string& coordsNm =
"coords")
62 VTKM_ASSERT(xVals.size() > 0 && xVals.size() == yVals.size());
65 auto coords = vtkm::cont::make_ArrayHandleSOA<vtkm::Vec<T, 3>>({ xVals, yVals, zVals });
73 const std::string& coordsNm =
"coords")
79 template <
typename CoordsType>
82 const std::string& coordsNm =
"coords")
87 template <
typename CoordsType>
90 const std::string& coordsNm =
"coords")
95 template <
typename CoordsType>
97 const std::string& coordsNm =
"coords")
100 coords, { coords.GetNumberOfValues(), 0, 0 }, 1, coordsNm);
104 template <
typename CoordsType>
108 const std::string& coordsNm =
"coords")
115 VTKM_ASSERT(dims[0] >= 1 && dims[1] >= 1 && dims[2] >= 1);
116 VTKM_ASSERT(coords.GetNumberOfValues() == dims[0] * dims[1] * dims[2]);
122 else if (cellSetDim == 2)
124 VTKM_ASSERT(dims[0] >= 1 && dims[1] >= 1 && dims[2] == 0);
125 VTKM_ASSERT(coords.GetNumberOfValues() == dims[0] * dims[1]);
131 else if (cellSetDim == 1)
133 VTKM_ASSERT(dims[0] >= 1 && dims[1] == 0 && dims[2] == 0);
134 VTKM_ASSERT(coords.GetNumberOfValues() == dims[0]);
150 #endif //vtk_m_cont_DataSetBuilderCurvilinear_h
Groups connected points that have the same field value.
Definition: Atomic.h:19
static vtkm::cont::DataSet Create(const CoordsType &coords, const vtkm::Id3 &dims, const vtkm::Id &cellSetDim, const std::string &coordsNm="coords")
Definition: DataSetBuilderCurvilinear.h:105
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
static vtkm::cont::DataSet Create(const std::vector< T > &xVals, const std::string &coordsNm="coords")
Definition: DataSetBuilderCurvilinear.h:29
static vtkm::cont::DataSet Create(const std::vector< T > &xVals, const std::vector< T > &yVals, const std::vector< T > &zVals, const vtkm::Id3 &dims, const std::string &coordsNm="coords")
Definition: DataSetBuilderCurvilinear.h:56
Defines a 1-, 2-, or 3-dimensional structured grid of points.
Definition: CastAndCall.h:32
void SetCellSet(const CellSetType &cellSet)
Definition: DataSet.h:396
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
static vtkm::cont::DataSet Create(const CoordsType &coords, const std::string &coordsNm="coords")
Definition: DataSetBuilderCurvilinear.h:96
Manages a coordinate system for a DataSet.
Definition: CoordinateSystem.h:30
static vtkm::cont::DataSet Create(const std::vector< vtkm::Vec< T, 3 >> &points, const vtkm::Id3 &dims, const std::string &coordsNm="coords")
Definition: DataSetBuilderCurvilinear.h:71
static vtkm::cont::DataSet Create(const CoordsType &coords, const vtkm::Id2 &dims, const std::string &coordsNm="coords")
Definition: DataSetBuilderCurvilinear.h:88
#define VTKM_CONT_EXPORT
Definition: vtkm_cont_export.h:44
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
static vtkm::cont::DataSet Create(const CoordsType &coords, const vtkm::Id3 &dims, const std::string &coordsNm="coords")
Definition: DataSetBuilderCurvilinear.h:80
vtkm::IdComponent AddCoordinateSystem(const vtkm::cont::CoordinateSystem &cs)
Adds the given CoordinateSystem to the DataSet.
void SetPointDimensions(SchedulingRangeType dimensions)
Set the dimensions of the structured array of points.
Definition: CellSetStructured.h:58
This class is thrown when a VTKm function or method encounters an invalid value that inhibits progres...
Definition: ErrorBadValue.h:25
vtkm::cont::ArrayHandleBasic< T > make_ArrayHandle(const T *array, vtkm::Id numberOfValues, vtkm::CopyFlag copy)
A convenience function for creating an ArrayHandle from a standard C array.
Definition: ArrayHandleBasic.h:270
static vtkm::cont::DataSet Create(const std::vector< T > &xVals, const std::vector< T > &yVals, const vtkm::Id2 &dims, const std::string &coordsNm="coords")
Definition: DataSetBuilderCurvilinear.h:42
Definition: DataSetBuilderCurvilinear.h:22