Viskores  1.0
StreamSurface.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 
19 #ifndef viskores_filter_flow_StreamSurface_h
20 #define viskores_filter_flow_StreamSurface_h
21 
22 #include <viskores/filter/Filter.h>
25 
26 namespace viskores
27 {
28 namespace filter
29 {
30 namespace flow
31 {
32 
43 class VISKORES_FILTER_FLOW_EXPORT StreamSurface : public viskores::filter::Filter
44 {
45 public:
52  VISKORES_CONT void SetStepSize(viskores::FloatDefault s) { this->StepSize = s; }
53 
58  VISKORES_CONT void SetNumberOfSteps(viskores::Id n) { this->NumberOfSteps = n; }
59 
64  template <typename ParticleType>
66  {
67  this->Seeds = seeds;
68  }
69 
71  template <typename ParticleType>
72  VISKORES_CONT void SetSeeds(const std::vector<ParticleType>& seeds,
74  {
75  this->Seeds = viskores::cont::make_ArrayHandle(seeds, copyFlag);
76  }
77 
78 private:
79  VISKORES_CONT viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& inData) override;
80 
81  viskores::Id NumberOfSteps = 0;
83  viskores::FloatDefault StepSize = 0;
84 };
85 
86 }
87 }
88 } // namespace viskores::filter::flow
89 
90 #endif // viskores_filter_flow_StreamSurface_h
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:313
viskores::filter::flow::StreamSurface::SetStepSize
void SetStepSize(viskores::FloatDefault s)
Specifies the step size used for the numerical integrator.
Definition: StreamSurface.h:52
viskores_filter_flow_export.h
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::filter::flow::StreamSurface::SetNumberOfSteps
void SetNumberOfSteps(viskores::Id n)
Specifies the maximum number of integration steps for each particle.
Definition: StreamSurface.h:58
viskores::CopyFlag::On
@ On
viskores::filter::flow::StreamSurface::Seeds
viskores::cont::UnknownArrayHandle Seeds
Definition: StreamSurface.h:82
viskores::FloatDefault
viskores::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:244
viskores::filter::flow::StreamSurface
Generate stream surfaces from a vector field.
Definition: StreamSurface.h:43
viskores::filter::flow::StreamSurface::SetSeeds
void SetSeeds(viskores::cont::ArrayHandle< ParticleType > &seeds)
Specify the seed locations for the particle advection.
Definition: StreamSurface.h:65
viskores::cont::UnknownArrayHandle
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:451
viskores::CopyFlag
CopyFlag
Identifier used to specify whether a function should deep copy data.
Definition: Flags.h:25
FlowTypes.h
viskores::cont::make_ArrayHandle
viskores::cont::ArrayHandleBasic< T > make_ArrayHandle(const T *array, viskores::Id numberOfValues, viskores::CopyFlag copy)
A convenience function for creating an ArrayHandle from a standard C array.
Definition: ArrayHandleBasic.h:285
viskores::filter::flow::StreamSurface::SetSeeds
void SetSeeds(const std::vector< ParticleType > &seeds, viskores::CopyFlag copyFlag=viskores::CopyFlag::On)
Specify the seed locations for the particle advection.
Definition: StreamSurface.h:72
Filter.h