VTK-m  2.0
MIRFilter.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 vtkm_m_filter_contour_MIRFilter_h
12 #define vtkm_m_filter_contour_MIRFilter_h
13 
15 #include <vtkm/filter/contour/vtkm_filter_contour_export.h>
16 
17 namespace vtkm
18 {
19 namespace filter
20 {
21 namespace contour
22 {
51 class VTKM_FILTER_CONTOUR_EXPORT MIRFilter : public vtkm::filter::FilterField
52 {
53 public:
55  VTKM_CONT void SetPositionCellSetName(std::string name) { this->pos_name = name; }
57  VTKM_CONT void SetLengthCellSetName(std::string name) { this->len_name = name; }
59  VTKM_CONT void SetIDWholeSetName(std::string name) { this->id_name = name; }
61  VTKM_CONT void SetVFWholeSetName(std::string name) { this->vf_name = name; }
62  VTKM_CONT void SetMaxPercentError(vtkm::Float64 ma) { this->max_error = ma; }
63  VTKM_CONT void SetMaxIterations(vtkm::IdComponent ma) { this->max_iter = ma; }
64  VTKM_CONT void SetErrorScaling(vtkm::Float64 sc) { this->error_scaling = sc; }
65  VTKM_CONT void SetScalingDecay(vtkm::Float64 sc) { this->scaling_decay = sc; }
67  VTKM_CONT std::string GetOutputFieldName() { return this->OutputFieldName; }
69  VTKM_CONT void SetOutputFieldName(std::string name) { this->OutputFieldName = name; }
70 
71 private:
72  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
73  VTKM_CONT bool DoMapField(vtkm::cont::DataSet& result,
74  const vtkm::cont::Field& field,
75  const vtkm::cont::ArrayHandle<vtkm::Id>& filterCellInterp,
78 
79  std::string pos_name;
80  std::string len_name;
81  std::string id_name;
82  std::string vf_name;
83  std::string OutputFieldName = std::string("cellMat");
84  vtkm::Float64 max_error = vtkm::Float64(1.0);
85  vtkm::Float64 scaling_decay = vtkm::Float64(1.0);
87  vtkm::Float64 error_scaling = vtkm::Float64(0.0);
88 };
89 } // namespace contour
90 } // namespace filter
91 } // namespace vtkm
92 
93 #endif // vtkm_m_filter_contour_MIRFilter_h
vtkm::filter::contour::MIRFilter::vf_name
std::string vf_name
Definition: MIRFilter.h:82
vtkm::cont::ArrayHandle< vtkm::Id >
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::contour::MIRFilter::SetMaxPercentError
VTKM_CONT void SetMaxPercentError(vtkm::Float64 ma)
Definition: MIRFilter.h:62
vtkm::IdComponent
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
vtkm::filter::contour::MIRFilter::SetMaxIterations
VTKM_CONT void SetMaxIterations(vtkm::IdComponent ma)
Definition: MIRFilter.h:63
vtkm::cont::DataSet
Definition: DataSet.h:34
vtkm::filter::contour::MIRFilter::pos_name
std::string pos_name
Definition: MIRFilter.h:79
vtkm::filter::contour::MIRFilter::SetVFWholeSetName
VTKM_CONT void SetVFWholeSetName(std::string name)
Sets the name of the VF whole-array set field in the dataset passed to the filter.
Definition: MIRFilter.h:61
vtkm::filter::contour::MIRFilter::SetErrorScaling
VTKM_CONT void SetErrorScaling(vtkm::Float64 sc)
Definition: MIRFilter.h:64
FilterField.h
vtkm::filter::FilterField
Definition: FilterField.h:21
vtkm::filter::contour::MIRFilter::len_name
std::string len_name
Definition: MIRFilter.h:80
vtkm::filter::contour::MIRFilter
Calculates and subdivides a mesh based on the material interface reconstruction algorithm.
Definition: MIRFilter.h:51
vtkm::filter::contour::MIRFilter::SetLengthCellSetName
VTKM_CONT void SetLengthCellSetName(std::string name)
Sets the name of the length cellset field in the dataset passed to the filter.
Definition: MIRFilter.h:57
vtkm::cont::Field
A Field encapsulates an array on some piece of the mesh, such as the points, a cell set,...
Definition: cont/Field.h:31
vtkm::filter::contour::MIRFilter::GetOutputFieldName
VTKM_CONT std::string GetOutputFieldName()
Gets the output cell-set field name for the filter.
Definition: MIRFilter.h:67
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::contour::MIRFilter::id_name
std::string id_name
Definition: MIRFilter.h:81
vtkm::filter::contour::MIRFilter::SetIDWholeSetName
VTKM_CONT void SetIDWholeSetName(std::string name)
Sets the name of the ID whole-array set field in the dataset passed to the filter.
Definition: MIRFilter.h:59
vtkm::filter::contour::MIRFilter::SetOutputFieldName
VTKM_CONT void SetOutputFieldName(std::string name)
Sets the output cell-set field name for the filter.
Definition: MIRFilter.h:69
vtkm::Vec
A short fixed-length array.
Definition: Types.h:767
vtkm::Float64
double Float64
Definition: Types.h:155
vtkm::filter::contour::MIRFilter::SetPositionCellSetName
VTKM_CONT void SetPositionCellSetName(std::string name)
Sets the name of the offset/position cellset field in the dataset passed to the filter.
Definition: MIRFilter.h:55
vtkm::filter::contour::MIRFilter::SetScalingDecay
VTKM_CONT void SetScalingDecay(vtkm::Float64 sc)
Definition: MIRFilter.h:65