Viskores  1.0
MIRFilter.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_m_filter_contour_MIRFilter_h
20 #define viskores_m_filter_contour_MIRFilter_h
21 
22 #include <viskores/filter/Filter.h>
24 
25 namespace viskores
26 {
27 namespace filter
28 {
29 namespace contour
30 {
59 class VISKORES_FILTER_CONTOUR_EXPORT MIRFilter : public viskores::filter::Filter
60 {
61 public:
63  VISKORES_CONT void SetPositionCellSetName(std::string name) { this->pos_name = name; }
65  VISKORES_CONT void SetLengthCellSetName(std::string name) { this->len_name = name; }
67  VISKORES_CONT void SetIDWholeSetName(std::string name) { this->id_name = name; }
69  VISKORES_CONT void SetVFWholeSetName(std::string name) { this->vf_name = name; }
70  VISKORES_CONT void SetMaxPercentError(viskores::Float64 ma) { this->max_error = ma; }
71  VISKORES_CONT void SetMaxIterations(viskores::IdComponent ma) { this->max_iter = ma; }
72  VISKORES_CONT void SetErrorScaling(viskores::Float64 sc) { this->error_scaling = sc; }
73  VISKORES_CONT void SetScalingDecay(viskores::Float64 sc) { this->scaling_decay = sc; }
75  VISKORES_CONT std::string GetOutputFieldName() { return this->OutputFieldName; }
77  VISKORES_CONT void SetOutputFieldName(std::string name) { this->OutputFieldName = name; }
78 
79 private:
80  VISKORES_CONT viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& input) override;
81  VISKORES_CONT bool DoMapField(
83  const viskores::cont::Field& field,
84  const viskores::cont::ArrayHandle<viskores::Id>& filterCellInterp,
87 
88  std::string pos_name;
89  std::string len_name;
90  std::string id_name;
91  std::string vf_name;
92  std::string OutputFieldName = std::string("cellMat");
94  viskores::Float64 scaling_decay = viskores::Float64(1.0);
96  viskores::Float64 error_scaling = viskores::Float64(0.0);
97 };
98 } // namespace contour
99 } // namespace filter
100 } // namespace viskores
101 
102 #endif // viskores_m_filter_contour_MIRFilter_h
viskores::filter::contour::MIRFilter::SetScalingDecay
void SetScalingDecay(viskores::Float64 sc)
Definition: MIRFilter.h:73
viskores::filter::contour::MIRFilter::id_name
std::string id_name
Definition: MIRFilter.h:90
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::contour::MIRFilter::len_name
std::string len_name
Definition: MIRFilter.h:89
viskores::filter::contour::MIRFilter::SetMaxIterations
void SetMaxIterations(viskores::IdComponent ma)
Definition: MIRFilter.h:71
viskores::filter::contour::MIRFilter::GetOutputFieldName
std::string GetOutputFieldName()
Gets the output cell-set field name for the filter.
Definition: MIRFilter.h:75
viskores::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:69
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores::filter::contour::MIRFilter::SetMaxPercentError
void SetMaxPercentError(viskores::Float64 ma)
Definition: MIRFilter.h:70
viskores::cont::ArrayHandle< viskores::Id >
viskores::filter::contour::MIRFilter::SetOutputFieldName
void SetOutputFieldName(std::string name)
Sets the output cell-set field name for the filter.
Definition: MIRFilter.h:77
viskores::IdComponent
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
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_contour_export.h
viskores::filter::contour::MIRFilter
Calculates and subdivides a mesh based on the material interface reconstruction algorithm.
Definition: MIRFilter.h:59
viskores::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:67
viskores::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:63
viskores::filter::contour::MIRFilter::pos_name
std::string pos_name
Definition: MIRFilter.h:88
viskores::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:169
viskores::cont::Field
A Field encapsulates an array on some piece of the mesh, such as the points, a cell set,...
Definition: Field.h:39
viskores::Vec
A short fixed-length array.
Definition: Types.h:365
viskores::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:65
viskores::filter::contour::MIRFilter::vf_name
std::string vf_name
Definition: MIRFilter.h:91
viskores::filter::contour::MIRFilter::SetErrorScaling
void SetErrorScaling(viskores::Float64 sc)
Definition: MIRFilter.h:72
Filter.h