VTK-m  2.1
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 
14 #include <vtkm/filter/Filter.h>
16 
17 namespace vtkm
18 {
19 namespace filter
20 {
21 namespace contour
22 {
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::filter::contour::MIRFilter::SetScalingDecay
void SetScalingDecay(vtkm::Float64 sc)
Definition: MIRFilter.h:65
vtkm::cont::ArrayHandle< vtkm::Id >
vtkm::filter::contour::MIRFilter::SetLengthCellSetName
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::filter::contour::MIRFilter::GetOutputFieldName
std::string GetOutputFieldName()
Gets the output cell-set field name for the filter.
Definition: MIRFilter.h:67
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::IdComponent
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::contour::MIRFilter::SetIDWholeSetName
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::SetErrorScaling
void SetErrorScaling(vtkm::Float64 sc)
Definition: MIRFilter.h:64
vtkm::filter::contour::MIRFilter::pos_name
std::string pos_name
Definition: MIRFilter.h:79
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::cont::Field
A Field encapsulates an array on some piece of the mesh, such as the points, a cell set,...
Definition: Field.h:31
VTKM_FILTER_CONTOUR_EXPORT
#define VTKM_FILTER_CONTOUR_EXPORT
Definition: vtkm_filter_contour_export.h:44
vtkm::filter::contour::MIRFilter::SetOutputFieldName
void SetOutputFieldName(std::string name)
Sets the output cell-set field name for the filter.
Definition: MIRFilter.h:69
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
vtkm::filter::contour::MIRFilter::SetPositionCellSetName
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_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::SetVFWholeSetName
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::Vec
A short fixed-length array.
Definition: Types.h:357
vtkm::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:161
vtkm::filter::contour::MIRFilter::SetMaxIterations
void SetMaxIterations(vtkm::IdComponent ma)
Definition: MIRFilter.h:63
vtkm::filter::contour::MIRFilter::SetMaxPercentError
void SetMaxPercentError(vtkm::Float64 ma)
Definition: MIRFilter.h:62
vtkm_filter_contour_export.h
Filter.h