VTK-m  2.2
Lagrangian.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_Lagrangian_h
12 #define vtk_m_filter_flow_Lagrangian_h
13 
14 #include <vtkm/Particle.h>
15 #include <vtkm/filter/Filter.h>
17 
18 namespace vtkm
19 {
20 namespace filter
21 {
22 namespace flow
23 {
24 
26 {
27 public:
28  VTKM_CONT
29  bool CanThread() const override { return false; }
30 
31  VTKM_CONT
32  void SetInitFlag(bool val) { this->InitFlag = val; }
33 
34  VTKM_CONT
35  void SetExtractFlows(bool val) { this->ExtractFlows = val; }
36 
37  VTKM_CONT
38  void SetResetParticles(bool val) { this->ResetParticles = val; }
39 
40  VTKM_CONT
41  void SetStepSize(vtkm::Float32 val) { this->StepSize = val; }
42 
43  VTKM_CONT
44  void SetWriteFrequency(vtkm::Id val) { this->WriteFrequency = val; }
45 
46  VTKM_CONT
47  void SetSeedResolutionInX(vtkm::Id val) { this->ResX = val; }
48 
49  VTKM_CONT
50  void SetSeedResolutionInY(vtkm::Id val) { this->ResY = val; }
51 
52  VTKM_CONT
53  void SetSeedResolutionInZ(vtkm::Id val) { this->ResZ = val; }
54 
55  VTKM_CONT
56  void SetCustomSeedResolution(vtkm::Id val) { this->CustRes = val; }
57 
58  VTKM_CONT
59  void SetSeedingResolution(vtkm::Id3 val) { this->SeedRes = val; }
60 
61  VTKM_CONT
62  void UpdateSeedResolution(vtkm::cont::DataSet input);
63 
64  VTKM_CONT
65  void InitializeSeedPositions(const vtkm::cont::DataSet& input);
66 
67  VTKM_CONT
68  void SetCycle(vtkm::Id cycle) { this->Cycle = cycle; }
69  VTKM_CONT
70  vtkm::Id GetCycle() const { return this->Cycle; }
71 
72  VTKM_CONT
74  {
75  this->BasisParticles = basisParticles;
76  }
77  VTKM_CONT
78  vtkm::cont::ArrayHandle<vtkm::Particle> GetBasisParticles() const { return this->BasisParticles; }
79 
80  VTKM_CONT
82  {
83  this->BasisParticlesOriginal = basisParticles;
84  }
85  VTKM_CONT
87  {
88  return this->BasisParticlesOriginal;
89  }
90 
91  VTKM_CONT
93  {
94  this->BasisParticlesValidity = valid;
95  }
96  VTKM_CONT
98  {
99  return this->BasisParticlesValidity;
100  }
101 
102 private:
103  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inData) override;
104 
108  vtkm::Id CustRes = 0;
109  vtkm::Id Cycle = 0;
110  bool ExtractFlows = false;
111  bool InitFlag = true;
112  bool ResetParticles = true;
113  vtkm::Id ResX = 1;
114  vtkm::Id ResY = 1;
115  vtkm::Id ResZ = 1;
117  vtkm::Id3 SeedRes = { 1, 1, 1 };
118  vtkm::Id WriteFrequency = 0;
119 };
120 
121 }
122 }
123 } //vtkm::filter::flow
124 
125 #endif // #define vtk_m_filter_flow_Lagrangian_h
vtkm::filter::flow::Lagrangian::GetBasisParticleValidity
vtkm::cont::ArrayHandle< vtkm::Id > GetBasisParticleValidity() const
Definition: Lagrangian.h:97
vtkm::cont::ArrayHandle< vtkm::Particle >
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::flow::Lagrangian::SetBasisParticles
void SetBasisParticles(const vtkm::cont::ArrayHandle< vtkm::Particle > &basisParticles)
Definition: Lagrangian.h:73
vtkm::filter::flow::Lagrangian::SetWriteFrequency
void SetWriteFrequency(vtkm::Id val)
Definition: Lagrangian.h:44
vtkm::filter::flow::Lagrangian::GetBasisParticlesOriginal
vtkm::cont::ArrayHandle< vtkm::Particle > GetBasisParticlesOriginal() const
Definition: Lagrangian.h:86
vtkm::filter::flow::Lagrangian::BasisParticles
vtkm::cont::ArrayHandle< vtkm::Particle > BasisParticles
Definition: Lagrangian.h:105
vtkm::filter::flow::Lagrangian::BasisParticlesValidity
vtkm::cont::ArrayHandle< vtkm::Id > BasisParticlesValidity
Definition: Lagrangian.h:107
vtkm::filter::flow::Lagrangian::StepSize
vtkm::FloatDefault StepSize
Definition: Lagrangian.h:116
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::flow::Lagrangian::BasisParticlesOriginal
vtkm::cont::ArrayHandle< vtkm::Particle > BasisParticlesOriginal
Definition: Lagrangian.h:106
vtkm::filter::flow::Lagrangian::SetResetParticles
void SetResetParticles(bool val)
Definition: Lagrangian.h:38
vtkm::filter::flow::Lagrangian::SetInitFlag
void SetInitFlag(bool val)
Definition: Lagrangian.h:32
vtkm::filter::flow::Lagrangian::SetSeedResolutionInX
void SetSeedResolutionInX(vtkm::Id val)
Definition: Lagrangian.h:47
vtkm::filter::flow::Lagrangian::SetStepSize
void SetStepSize(vtkm::Float32 val)
Definition: Lagrangian.h:41
vtkm::filter::flow::Lagrangian::GetBasisParticles
vtkm::cont::ArrayHandle< vtkm::Particle > GetBasisParticles() const
Definition: Lagrangian.h:78
vtkm::filter::flow::Lagrangian::SetBasisParticlesOriginal
void SetBasisParticlesOriginal(const vtkm::cont::ArrayHandle< vtkm::Particle > &basisParticles)
Definition: Lagrangian.h:81
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::filter::flow::Lagrangian::SetSeedResolutionInY
void SetSeedResolutionInY(vtkm::Id val)
Definition: Lagrangian.h:50
vtkm::filter::flow::Lagrangian
Definition: Lagrangian.h:25
vtkm::filter::flow::Lagrangian::GetCycle
vtkm::Id GetCycle() const
Definition: Lagrangian.h:70
VTKM_FILTER_FLOW_EXPORT
#define VTKM_FILTER_FLOW_EXPORT
Definition: vtkm_filter_flow_export.h:44
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::Lagrangian::SetBasisParticleValidity
void SetBasisParticleValidity(const vtkm::cont::ArrayHandle< vtkm::Id > &valid)
Definition: Lagrangian.h:92
vtkm_filter_flow_export.h
vtkm::Float32
float Float32
Base type to use for 32-bit floating-point numbers.
Definition: Types.h:157
vtkm::filter::flow::Lagrangian::SetCycle
void SetCycle(vtkm::Id cycle)
Definition: Lagrangian.h:68
vtkm::filter::flow::Lagrangian::SetSeedingResolution
void SetSeedingResolution(vtkm::Id3 val)
Definition: Lagrangian.h:59
vtkm::filter::flow::Lagrangian::CanThread
bool CanThread() const override
Returns whether the filter can execute on partitions in concurrent threads.
Definition: Lagrangian.h:29
vtkm::filter::flow::Lagrangian::SetSeedResolutionInZ
void SetSeedResolutionInZ(vtkm::Id val)
Definition: Lagrangian.h:53
vtkm::filter::flow::Lagrangian::SetCustomSeedResolution
void SetCustomSeedResolution(vtkm::Id val)
Definition: Lagrangian.h:56
vtkm::filter::flow::Lagrangian::SetExtractFlows
void SetExtractFlows(bool val)
Definition: Lagrangian.h:35
Particle.h
Filter.h