VTK-m  2.0
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 
16 #include <vtkm/filter/flow/vtkm_filter_flow_export.h>
17 
18 namespace vtkm
19 {
20 namespace filter
21 {
22 namespace flow
23 {
24 
25 class VTKM_FILTER_FLOW_EXPORT LagrangianStructures : public vtkm::filter::FilterField
26 {
27 public:
28  VTKM_CONT
29  bool CanThread() const override { return false; }
30 
31  void SetStepSize(vtkm::FloatDefault s) { this->StepSize = s; }
32  vtkm::FloatDefault GetStepSize() { return this->StepSize; }
33 
34  void SetNumberOfSteps(vtkm::Id n) { this->NumberOfSteps = n; }
35  vtkm::Id GetNumberOfSteps() { return this->NumberOfSteps; }
36 
37  void SetAdvectionTime(vtkm::FloatDefault advectionTime) { this->AdvectionTime = advectionTime; }
38  vtkm::FloatDefault GetAdvectionTime() { return this->AdvectionTime; }
39 
40  void SetUseAuxiliaryGrid(bool useAuxiliaryGrid) { this->UseAuxiliaryGrid = useAuxiliaryGrid; }
41  bool GetUseAuxiliaryGrid() { return this->UseAuxiliaryGrid; }
42 
43  void SetAuxiliaryGridDimensions(vtkm::Id3 auxiliaryDims) { this->AuxiliaryDims = auxiliaryDims; }
44  vtkm::Id3 GetAuxiliaryGridDimensions() { return this->AuxiliaryDims; }
45 
46  void SetUseFlowMapOutput(bool useFlowMapOutput) { this->UseFlowMapOutput = useFlowMapOutput; }
47  bool GetUseFlowMapOutput() { return this->UseFlowMapOutput; }
48 
49  void SetOutputFieldName(std::string outputFieldName) { this->OutputFieldName = outputFieldName; }
50  std::string GetOutputFieldName() { return this->OutputFieldName; }
51 
53  {
54  this->FlowMapOutput = flowMap;
55  }
56  inline vtkm::cont::ArrayHandle<vtkm::Vec3f> GetFlowMapOutput() { return this->FlowMapOutput; }
57 
58 private:
59  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inData) override;
60 
64  std::string OutputFieldName = "FTLE";
65  vtkm::FloatDefault StepSize = 1.0f;
66  vtkm::Id NumberOfSteps = 0;
67  bool UseAuxiliaryGrid = false;
68  bool UseFlowMapOutput = false;
69 };
70 
71 }
72 }
73 } // namespace vtkm
74 
75 #endif // vtk_m_filter_flow_LagrangianStructures_h
vtkm::filter::flow::LagrangianStructures
Definition: LagrangianStructures.h:25
vtkm::cont::ArrayHandle< vtkm::Vec3f >
vtkm::filter::flow::LagrangianStructures::AuxiliaryDims
vtkm::Id3 AuxiliaryDims
Definition: LagrangianStructures.h:62
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::flow::LagrangianStructures::SetUseAuxiliaryGrid
void SetUseAuxiliaryGrid(bool useAuxiliaryGrid)
Definition: LagrangianStructures.h:40
vtkm::filter::flow::LagrangianStructures::SetNumberOfSteps
void SetNumberOfSteps(vtkm::Id n)
Definition: LagrangianStructures.h:34
vtkm::filter::flow::LagrangianStructures::SetAdvectionTime
void SetAdvectionTime(vtkm::FloatDefault advectionTime)
Definition: LagrangianStructures.h:37
vtkm::cont::DataSet
Definition: DataSet.h:34
vtkm::filter::flow::LagrangianStructures::GetFlowMapOutput
vtkm::cont::ArrayHandle< vtkm::Vec3f > GetFlowMapOutput()
Definition: LagrangianStructures.h:56
vtkm::filter::flow::LagrangianStructures::GetOutputFieldName
std::string GetOutputFieldName()
Definition: LagrangianStructures.h:50
vtkm::filter::flow::LagrangianStructures::GetUseAuxiliaryGrid
bool GetUseAuxiliaryGrid()
Definition: LagrangianStructures.h:41
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::filter::flow::LagrangianStructures::GetStepSize
vtkm::FloatDefault GetStepSize()
Definition: LagrangianStructures.h:32
vtkm::filter::flow::LagrangianStructures::GetNumberOfSteps
vtkm::Id GetNumberOfSteps()
Definition: LagrangianStructures.h:35
FilterField.h
vtkm::filter::FilterField
Definition: FilterField.h:21
vtkm::filter::flow::LagrangianStructures::FlowMapOutput
vtkm::cont::ArrayHandle< vtkm::Vec3f > FlowMapOutput
Definition: LagrangianStructures.h:63
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::flow::LagrangianStructures::AdvectionTime
vtkm::FloatDefault AdvectionTime
Definition: LagrangianStructures.h:61
vtkm::filter::flow::LagrangianStructures::SetOutputFieldName
void SetOutputFieldName(std::string outputFieldName)
Definition: LagrangianStructures.h:49
vtkm::filter::flow::LagrangianStructures::GetAuxiliaryGridDimensions
vtkm::Id3 GetAuxiliaryGridDimensions()
Definition: LagrangianStructures.h:44
vtkm::filter::flow::LagrangianStructures::SetFlowMapOutput
void SetFlowMapOutput(vtkm::cont::ArrayHandle< vtkm::Vec3f > &flowMap)
Definition: LagrangianStructures.h:52
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:198
vtkm::filter::flow::LagrangianStructures::CanThread
VTKM_CONT bool CanThread() const override
Definition: LagrangianStructures.h:29
vtkm::filter::flow::LagrangianStructures::GetAdvectionTime
vtkm::FloatDefault GetAdvectionTime()
Definition: LagrangianStructures.h:38
vtkm::filter::flow::LagrangianStructures::SetUseFlowMapOutput
void SetUseFlowMapOutput(bool useFlowMapOutput)
Definition: LagrangianStructures.h:46
vtkm::filter::flow::LagrangianStructures::GetUseFlowMapOutput
bool GetUseFlowMapOutput()
Definition: LagrangianStructures.h:47
vtkm::filter::flow::LagrangianStructures::SetAuxiliaryGridDimensions
void SetAuxiliaryGridDimensions(vtkm::Id3 auxiliaryDims)
Definition: LagrangianStructures.h:43
FlowTypes.h
vtkm::filter::flow::LagrangianStructures::SetStepSize
void SetStepSize(vtkm::FloatDefault s)
Definition: LagrangianStructures.h:31