Viskores  1.0
WarpXStreamline.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_WarpXStreamline_h
20 #define viskores_filter_flow_WarpXStreamline_h
21 
25 
26 #include <viskores/filter/flow/worklet/Analysis.h>
27 #include <viskores/filter/flow/worklet/Field.h>
28 #include <viskores/filter/flow/worklet/Termination.h>
29 
30 namespace viskores
31 {
32 namespace filter
33 {
34 namespace flow
35 {
36 
37 class WarpXStreamline;
38 
39 template <>
41 {
43  using TerminationType = viskores::worklet::flow::NormalTermination;
44  using AnalysisType = viskores::worklet::flow::StreamlineAnalysis<ParticleType>;
46  using FieldType = viskores::worklet::flow::ElectroMagneticField<ArrayType>;
47 };
48 
50 
53 class VISKORES_FILTER_FLOW_EXPORT WarpXStreamline
55 {
56 public:
62 
63  VISKORES_CONT WarpXStreamline() { this->SetSolverEuler(); }
64 
65  VISKORES_CONT FieldType GetField(const viskores::cont::DataSet& data) const;
66 
67  VISKORES_CONT TerminationType GetTermination(const viskores::cont::DataSet& data) const;
68 
69  VISKORES_CONT AnalysisType GetAnalysis(const viskores::cont::DataSet& data) const;
70 
71  VISKORES_CONT void SetEField(const std::string& name) { this->SetActiveField(0, name); }
72 
73  VISKORES_CONT void SetBField(const std::string& name) { this->SetActiveField(1, name); }
74 
75  VISKORES_CONT std::string GetEField() const { return this->GetActiveFieldName(0); }
76 
77  VISKORES_CONT std::string GetBField() const { return this->GetActiveFieldName(1); }
78 };
79 
80 }
81 }
82 } // namespace viskores::filter::flow
83 
84 #endif // viskores_filter_flow_WarpXStreamline_h
viskores::filter::flow::FilterParticleAdvectionSteadyState
Definition: FilterParticleAdvectionSteadyState.h:37
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::flow::WarpXStreamline::WarpXStreamline
WarpXStreamline()
Definition: WarpXStreamline.h:63
viskores::filter::flow::WarpXStreamline::SetBField
void SetBField(const std::string &name)
Definition: WarpXStreamline.h:73
viskores::filter::flow::FlowTraits< WarpXStreamline >::TerminationType
viskores::worklet::flow::NormalTermination TerminationType
Definition: WarpXStreamline.h:43
viskores::filter::flow::WarpXStreamline::GetBField
std::string GetBField() const
Definition: WarpXStreamline.h:77
viskores::filter::flow::FlowTraits
Definition: FilterParticleAdvectionSteadyState.h:34
viskores::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:313
viskores::filter::flow::FlowTraits< WarpXStreamline >::AnalysisType
viskores::worklet::flow::StreamlineAnalysis< ParticleType > AnalysisType
Definition: WarpXStreamline.h:44
viskores::filter::flow::WarpXStreamline::ArrayType
typename FlowTraits< WarpXStreamline >::ArrayType ArrayType
Definition: WarpXStreamline.h:60
viskores::filter::flow::WarpXStreamline::FieldType
typename FlowTraits< WarpXStreamline >::FieldType FieldType
Definition: WarpXStreamline.h:61
viskores_filter_flow_export.h
viskores::filter::flow::WarpXStreamline::ParticleType
typename FlowTraits< WarpXStreamline >::ParticleType ParticleType
Definition: WarpXStreamline.h:57
viskores::filter::flow::WarpXStreamline::AnalysisType
typename FlowTraits< WarpXStreamline >::AnalysisType AnalysisType
Definition: WarpXStreamline.h:59
FilterParticleAdvectionSteadyState.h
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::WarpXStreamline::SetEField
void SetEField(const std::string &name)
Definition: WarpXStreamline.h:71
viskores::ChargedParticle
Definition: Particle.h:207
viskores::filter::flow::FlowTraits< WarpXStreamline >::FieldType
viskores::worklet::flow::ElectroMagneticField< ArrayType > FieldType
Definition: WarpXStreamline.h:46
viskores::filter::flow::WarpXStreamline::GetEField
std::string GetEField() const
Definition: WarpXStreamline.h:75
FlowTypes.h
viskores::filter::flow::WarpXStreamline::TerminationType
typename FlowTraits< WarpXStreamline >::TerminationType TerminationType
Definition: WarpXStreamline.h:58
viskores::filter::flow::WarpXStreamline
Advect particles in a vector field.
Definition: WarpXStreamline.h:53