VTK-m  2.2
WarpXStreamline.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_WarpXStreamline_h
12 #define vtk_m_filter_flow_WarpXStreamline_h
13 
17 
18 #include <vtkm/filter/flow/worklet/Analysis.h>
19 #include <vtkm/filter/flow/worklet/Field.h>
20 #include <vtkm/filter/flow/worklet/Termination.h>
21 
22 namespace vtkm
23 {
24 namespace filter
25 {
26 namespace flow
27 {
28 
29 class WarpXStreamline;
30 
31 template <>
33 {
35  using TerminationType = vtkm::worklet::flow::NormalTermination;
36  using AnalysisType = vtkm::worklet::flow::StreamlineAnalysis<ParticleType>;
38  using FieldType = vtkm::worklet::flow::ElectroMagneticField<ArrayType>;
39 };
40 
42 
47 {
48 public:
54 
55  VTKM_CONT WarpXStreamline() { this->SetSolverEuler(); }
56 
57  VTKM_CONT FieldType GetField(const vtkm::cont::DataSet& data) const;
58 
59  VTKM_CONT TerminationType GetTermination(const vtkm::cont::DataSet& data) const;
60 
61  VTKM_CONT AnalysisType GetAnalysis(const vtkm::cont::DataSet& data) const;
62 
63  VTKM_CONT void SetEField(const std::string& name) { this->SetActiveField(0, name); }
64 
65  VTKM_CONT void SetBField(const std::string& name) { this->SetActiveField(1, name); }
66 
67  VTKM_CONT std::string GetEField() const { return this->GetActiveFieldName(0); }
68 
69  VTKM_CONT std::string GetBField() const { return this->GetActiveFieldName(1); }
70 };
71 
72 }
73 }
74 } // namespace vtkm::filter::flow
75 
76 #endif // vtk_m_filter_flow_WarpXStreamline_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::WarpXStreamline::GetEField
std::string GetEField() const
Definition: WarpXStreamline.h:67
vtkm::filter::flow::FlowTraits
Definition: FilterParticleAdvectionSteadyState.h:26
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::flow::FlowTraits< WarpXStreamline >::AnalysisType
vtkm::worklet::flow::StreamlineAnalysis< ParticleType > AnalysisType
Definition: WarpXStreamline.h:36
vtkm::filter::flow::WarpXStreamline::AnalysisType
typename FlowTraits< WarpXStreamline >::AnalysisType AnalysisType
Definition: WarpXStreamline.h:51
vtkm::filter::flow::WarpXStreamline::SetEField
void SetEField(const std::string &name)
Definition: WarpXStreamline.h:63
vtkm::filter::flow::WarpXStreamline::ArrayType
typename FlowTraits< WarpXStreamline >::ArrayType ArrayType
Definition: WarpXStreamline.h:52
FilterParticleAdvectionSteadyState.h
vtkm::ChargedParticle
Definition: Particle.h:188
vtkm::filter::flow::WarpXStreamline::WarpXStreamline
WarpXStreamline()
Definition: WarpXStreamline.h:55
vtkm::filter::flow::FlowTraits< WarpXStreamline >::TerminationType
vtkm::worklet::flow::NormalTermination TerminationType
Definition: WarpXStreamline.h:35
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::flow::WarpXStreamline
Advect particles in a vector field.
Definition: WarpXStreamline.h:45
VTKM_FILTER_FLOW_EXPORT
#define VTKM_FILTER_FLOW_EXPORT
Definition: vtkm_filter_flow_export.h:44
vtkm::filter::flow::FilterParticleAdvectionSteadyState
Definition: FilterParticleAdvectionSteadyState.h:29
vtkm_filter_flow_export.h
vtkm::filter::flow::WarpXStreamline::GetBField
std::string GetBField() const
Definition: WarpXStreamline.h:69
vtkm::filter::flow::WarpXStreamline::ParticleType
typename FlowTraits< WarpXStreamline >::ParticleType ParticleType
Definition: WarpXStreamline.h:49
vtkm::filter::flow::FlowTraits< WarpXStreamline >::FieldType
vtkm::worklet::flow::ElectroMagneticField< ArrayType > FieldType
Definition: WarpXStreamline.h:38
vtkm::filter::flow::WarpXStreamline::FieldType
typename FlowTraits< WarpXStreamline >::FieldType FieldType
Definition: WarpXStreamline.h:53
FlowTypes.h
vtkm::filter::flow::WarpXStreamline::SetBField
void SetBField(const std::string &name)
Definition: WarpXStreamline.h:65
vtkm::filter::flow::WarpXStreamline::TerminationType
typename FlowTraits< WarpXStreamline >::TerminationType TerminationType
Definition: WarpXStreamline.h:50