VTK  9.7.20260922
vtkCellGridChangeBasis.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3#ifndef vtkCellGridChangeBasis_h
4#define vtkCellGridChangeBasis_h
5
7
8#include "vtkFiltersCellGrid.h" // For export macro
9#include <map> // For ivar.
10
11VTK_ABI_NAMESPACE_BEGIN
12
50class VTKFILTERSCELLGRID_EXPORT vtkCellGridChangeBasis : public vtkCellGridAlgorithm
51{
52public:
54
60 void PrintSelf(ostream& os, vtkIndent indent) override;
62
67
71 class Query : public vtkCellGridQuery
72 {
73 public:
75
79 static Query* New();
81 void PrintSelf(ostream& os, vtkIndent indent) override;
83
86 ~Query() override;
87
92
94
98 vtkGetObjectMacro(CellAttribute, vtkCellAttribute);
100
102
108
110
116
118
121 vtkSetMacro(SourceOrder, int);
122 vtkGetMacro(SourceOrder, int);
124
126
132
134
140
142
145 vtkSetMacro(TargetOrder, int);
146 vtkGetMacro(TargetOrder, int);
148
152
160 std::map<vtkDataArray*, vtkSmartPointer<vtkDataArray>>& GetSharedOutputs()
161 {
162 return this->SharedOutputs;
163 }
164
166 bool Initialize() override;
167
168 protected:
172 int SourceOrder{ -1 };
175 int TargetOrder{ -1 };
176 int OutputPointsPrecision{ vtkAlgorithm::DesiredOutputPrecision::DEFAULT_PRECISION };
177 std::map<vtkDataArray*, vtkSmartPointer<vtkDataArray>> SharedOutputs;
178 };
179
183 void SetSourceFunctionSpace(const char* functionSpace);
184 void SetSourceBasis(const char* basis);
185 void SetSourceOrder(int order);
186 void SetTargetFunctionSpace(const char* functionSpace);
187 void SetTargetBasis(const char* basis);
188 void SetTargetOrder(int order);
190
191protected:
194
196
198
199private:
201 void operator=(const vtkCellGridChangeBasis&) = delete;
202};
203
204VTK_ABI_NAMESPACE_END
205#endif
basis[0]
Definition CellC0Basis.h:1
A function defined over the physical domain of a vtkCellGrid.
A cell-grid query for changing cell-attribute basis functions.
virtual void SetCellAttribute(vtkCellAttribute *)
Specify the cell-attribute to be converted.
bool Initialize() override
Forget the arrays from any previous invocation.
std::map< vtkDataArray *, vtkSmartPointer< vtkDataArray > > & GetSharedOutputs()
Output arrays holding shared degrees of freedom, keyed by the input array each one replaces.
vtkSetStringTokenMacro(TargetBasis)
Set/get the destination basis.
vtkSetStringTokenMacro(SourceBasis)
Set/get the basis that should be converted.
std::map< vtkDataArray *, vtkSmartPointer< vtkDataArray > > SharedOutputs
vtkSetStringTokenMacro(SourceFunctionSpace)
Set/get the function space that should be converted.
static Query * New()
Standard methods for instantiation, obtaining type information, and printing.
vtkSetStringTokenMacro(TargetFunctionSpace)
Set/get the destination function space.
Query()
Construct a query.
vtkGetStringTokenMacro(SourceFunctionSpace)
Set/get the function space that should be converted.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type information, and printing.
vtkGetStringTokenMacro(SourceBasis)
Set/get the basis that should be converted.
vtkGetStringTokenMacro(TargetFunctionSpace)
Set/get the destination function space.
vtkGetStringTokenMacro(TargetBasis)
Set/get the destination basis.
vtkMTimeType GetMTime() override
Return the MTime also considering the cell-attribute.
vtkDataArray * CreateNewDataArray(vtkDataArray *input) const
A convenience method for responders to create arrays at the requested output precision given an input...
void SetTargetOrder(int order)
~vtkCellGridChangeBasis() override
void SetSourceFunctionSpace(const char *functionSpace)
void SetTargetBasis(const char *basis)
void SetCellAttribute(vtkCellAttribute *att)
void SetTargetFunctionSpace(const char *functionSpace)
void SetSourceOrder(int order)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkCellGridChangeBasis * New()
Standard methods for instantiation, obtaining type information, and printing.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type information, and printing.
void SetSourceBasis(const char *basis)
vtkMTimeType GetMTime() override
Return the MTime also considering the query.
vtkCellGridQuery()=default
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allocate and hold a VTK object.
Definition vtkNew.h:168
Represent a string by its integer hash.
#define vtkDataArray
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318