VTK-m  2.2
StreamSurface.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 
11 #ifndef vtk_m_filter_flow_StreamSurface_h
12 #define vtk_m_filter_flow_StreamSurface_h
13 
14 #include <vtkm/filter/Filter.h>
17 
18 namespace vtkm
19 {
20 namespace filter
21 {
22 namespace flow
23 {
24 
36 {
37 public:
44  VTKM_CONT void SetStepSize(vtkm::FloatDefault s) { this->StepSize = s; }
45 
50  VTKM_CONT void SetNumberOfSteps(vtkm::Id n) { this->NumberOfSteps = n; }
51 
56  template <typename ParticleType>
58  {
59  this->Seeds = seeds;
60  }
61 
63  template <typename ParticleType>
64  VTKM_CONT void SetSeeds(const std::vector<ParticleType>& seeds,
66  {
67  this->Seeds = vtkm::cont::make_ArrayHandle(seeds, copyFlag);
68  }
69 
70 private:
71  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inData) override;
72 
73  vtkm::Id NumberOfSteps = 0;
75  vtkm::FloatDefault StepSize = 0;
76 };
77 
78 }
79 }
80 } // namespace vtkm::filter::flow
81 
82 #endif // vtk_m_filter_flow_StreamSurface_h
vtkm::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:300
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::flow::StreamSurface
Generate stream surfaces from a vector field.
Definition: StreamSurface.h:35
vtkm::cont::UnknownArrayHandle
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:430
vtkm::filter::flow::StreamSurface::SetStepSize
void SetStepSize(vtkm::FloatDefault s)
Specifies the step size used for the numerical integrator.
Definition: StreamSurface.h:44
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::flow::StreamSurface::SetNumberOfSteps
void SetNumberOfSteps(vtkm::Id n)
Specifies the maximum number of integration steps for each particle.
Definition: StreamSurface.h:50
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::CopyFlag::On
@ On
VTKM_FILTER_FLOW_EXPORT
#define VTKM_FILTER_FLOW_EXPORT
Definition: vtkm_filter_flow_export.h:44
vtkm::FloatDefault
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:236
vtkm_filter_flow_export.h
vtkm::filter::flow::StreamSurface::Seeds
vtkm::cont::UnknownArrayHandle Seeds
Definition: StreamSurface.h:74
vtkm::CopyFlag
CopyFlag
Identifier used to specify whether a function should deep copy data.
Definition: Flags.h:17
vtkm::filter::flow::StreamSurface::SetSeeds
void SetSeeds(const std::vector< ParticleType > &seeds, vtkm::CopyFlag copyFlag=vtkm::CopyFlag::On)
Specify the seed locations for the particle advection.
Definition: StreamSurface.h:64
vtkm::filter::flow::StreamSurface::SetSeeds
void SetSeeds(vtkm::cont::ArrayHandle< ParticleType > &seeds)
Specify the seed locations for the particle advection.
Definition: StreamSurface.h:57
vtkm::cont::make_ArrayHandle
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
FlowTypes.h
Filter.h