VTK-m  2.2
LagrangianStructures.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_LagrangianStructures_h
12 #define vtk_m_filter_flow_LagrangianStructures_h
13 
14 #include <vtkm/filter/Filter.h>
17 
18 namespace vtkm
19 {
20 namespace filter
21 {
22 namespace flow
23 {
24 
32 {
33 public:
34  VTKM_CONT
35  bool CanThread() const override { return false; }
36 
43  void SetStepSize(vtkm::FloatDefault s) { this->StepSize = s; }
45  vtkm::FloatDefault GetStepSize() { return this->StepSize; }
46 
50  void SetNumberOfSteps(vtkm::Id n) { this->NumberOfSteps = n; }
52  vtkm::Id GetNumberOfSteps() { return this->NumberOfSteps; }
53 
58  void SetAdvectionTime(vtkm::FloatDefault advectionTime) { this->AdvectionTime = advectionTime; }
60  vtkm::FloatDefault GetAdvectionTime() { return this->AdvectionTime; }
61 
69  void SetUseAuxiliaryGrid(bool useAuxiliaryGrid) { this->UseAuxiliaryGrid = useAuxiliaryGrid; }
71  bool GetUseAuxiliaryGrid() { return this->UseAuxiliaryGrid; }
72 
77  void SetAuxiliaryGridDimensions(vtkm::Id3 auxiliaryDims) { this->AuxiliaryDims = auxiliaryDims; }
79  vtkm::Id3 GetAuxiliaryGridDimensions() { return this->AuxiliaryDims; }
80 
86  void SetUseFlowMapOutput(bool useFlowMapOutput) { this->UseFlowMapOutput = useFlowMapOutput; }
88  bool GetUseFlowMapOutput() { return this->UseFlowMapOutput; }
89 
93  void SetOutputFieldName(std::string outputFieldName) { this->OutputFieldName = outputFieldName; }
95  std::string GetOutputFieldName() { return this->OutputFieldName; }
96 
99  {
100  this->FlowMapOutput = flowMap;
101  }
103  inline vtkm::cont::ArrayHandle<vtkm::Vec3f> GetFlowMapOutput() { return this->FlowMapOutput; }
104 
105 private:
106  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inData) override;
107 
111  std::string OutputFieldName = "FTLE";
112  vtkm::FloatDefault StepSize = 1.0f;
113  vtkm::Id NumberOfSteps = 0;
114  bool UseAuxiliaryGrid = false;
115  bool UseFlowMapOutput = false;
116 };
117 
118 }
119 }
120 } // namespace vtkm
121 
122 #endif // vtk_m_filter_flow_LagrangianStructures_h
vtkm::filter::flow::LagrangianStructures
Compute the finite time Lyapunov exponent (FTLE) of a vector field.
Definition: LagrangianStructures.h:31
vtkm::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:300
vtkm::filter::flow::LagrangianStructures::AuxiliaryDims
vtkm::Id3 AuxiliaryDims
Definition: LagrangianStructures.h:109
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::flow::LagrangianStructures::SetUseAuxiliaryGrid
void SetUseAuxiliaryGrid(bool useAuxiliaryGrid)
Specify whether to use an auxiliary grid.
Definition: LagrangianStructures.h:69
vtkm::filter::flow::LagrangianStructures::SetNumberOfSteps
void SetNumberOfSteps(vtkm::Id n)
Specify the maximum number of steps each particle is allowed to traverse.
Definition: LagrangianStructures.h:50
vtkm::filter::flow::LagrangianStructures::SetAdvectionTime
void SetAdvectionTime(vtkm::FloatDefault advectionTime)
Specify the time interval for the advection.
Definition: LagrangianStructures.h:58
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::flow::LagrangianStructures::GetFlowMapOutput
vtkm::cont::ArrayHandle< vtkm::Vec3f > GetFlowMapOutput()
Specify the array representing the flow map output to be used for FTLE calculation.
Definition: LagrangianStructures.h:103
vtkm::filter::flow::LagrangianStructures::GetOutputFieldName
std::string GetOutputFieldName()
Specify the name of the output field in the data set returned.
Definition: LagrangianStructures.h:95
vtkm::filter::flow::LagrangianStructures::GetUseAuxiliaryGrid
bool GetUseAuxiliaryGrid()
Specify whether to use an auxiliary grid.
Definition: LagrangianStructures.h:71
vtkm::filter::flow::LagrangianStructures::GetStepSize
vtkm::FloatDefault GetStepSize()
Specifies the step size used for the numerical integrator.
Definition: LagrangianStructures.h:45
vtkm::filter::flow::LagrangianStructures::GetNumberOfSteps
vtkm::Id GetNumberOfSteps()
Specify the maximum number of steps each particle is allowed to traverse.
Definition: LagrangianStructures.h:52
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
vtkm::filter::flow::LagrangianStructures::FlowMapOutput
vtkm::cont::ArrayHandle< vtkm::Vec3f > FlowMapOutput
Definition: LagrangianStructures.h:110
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::flow::LagrangianStructures::AdvectionTime
vtkm::FloatDefault AdvectionTime
Definition: LagrangianStructures.h:108
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::filter::flow::LagrangianStructures::SetOutputFieldName
void SetOutputFieldName(std::string outputFieldName)
Specify the name of the output field in the data set returned.
Definition: LagrangianStructures.h:93
vtkm::filter::flow::LagrangianStructures::GetAuxiliaryGridDimensions
vtkm::Id3 GetAuxiliaryGridDimensions()
Specify the dimensions of the auxiliary grid for FTLE calculation.
Definition: LagrangianStructures.h:79
vtkm::filter::flow::LagrangianStructures::SetFlowMapOutput
void SetFlowMapOutput(vtkm::cont::ArrayHandle< vtkm::Vec3f > &flowMap)
Specify the array representing the flow map output to be used for FTLE calculation.
Definition: LagrangianStructures.h:98
VTKM_FILTER_FLOW_EXPORT
#define VTKM_FILTER_FLOW_EXPORT
Definition: vtkm_filter_flow_export.h:44
vtkm::filter::flow::LagrangianStructures::CanThread
bool CanThread() const override
Returns whether the filter can execute on partitions in concurrent threads.
Definition: LagrangianStructures.h:35
vtkm::Vec< vtkm::Id, 3 >
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::LagrangianStructures::GetAdvectionTime
vtkm::FloatDefault GetAdvectionTime()
Specify the time interval for the advection.
Definition: LagrangianStructures.h:60
vtkm::filter::flow::LagrangianStructures::SetUseFlowMapOutput
void SetUseFlowMapOutput(bool useFlowMapOutput)
Specify whether to use flow maps instead of advection.
Definition: LagrangianStructures.h:86
vtkm::filter::flow::LagrangianStructures::GetUseFlowMapOutput
bool GetUseFlowMapOutput()
Specify whether to use flow maps instead of advection.
Definition: LagrangianStructures.h:88
vtkm::filter::flow::LagrangianStructures::SetAuxiliaryGridDimensions
void SetAuxiliaryGridDimensions(vtkm::Id3 auxiliaryDims)
Specify the dimensions of the auxiliary grid for FTLE calculation.
Definition: LagrangianStructures.h:77
FlowTypes.h
vtkm::filter::flow::LagrangianStructures::SetStepSize
void SetStepSize(vtkm::FloatDefault s)
Specifies the step size used for the numerical integrator.
Definition: LagrangianStructures.h:43
Filter.h