VTK  9.6.20260605
vtkCellGridSummaryInformationQuery.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
27
28#ifndef vtkCellGridSummaryInformationQuery_h
29#define vtkCellGridSummaryInformationQuery_h
30
31#include "vtkCellGridQuery.h"
32#include "vtkCommonDataModelModule.h" // for export macro
33#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
34
35#include <array> // For std::array
36#include <limits> // For std::numeric_limits
37#include <unordered_map> // For std::unordered_map
38
39VTK_ABI_NAMESPACE_BEGIN
41
43 : public vtkCellGridQuery
44{
45public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
51 bool Initialize() override;
52
54
59 vtkSetStringMacro(AttributeName)
60 vtkGetStringMacro(AttributeName)
62
65 {
69 std::array<int, 2> OrderRange{ std::numeric_limits<int>::max(),
70 std::numeric_limits<int>::min() };
71
77 };
78
80 const std::unordered_map<vtkCellAttribute*, SummaryInformation>& GetSummaryInformationMap() const
81 {
82 return this->SummaryInformationMap;
83 }
84
87
89 void AddSummaryInformation(vtkCellAttribute* att, const SummaryInformation& summaryInformation);
90
91 // -----------------------------------------------------------------------
92 // Polynomial order range
93 // -----------------------------------------------------------------------
94
98 void GetOrderRange(vtkCellAttribute*, int* range) const VTK_SIZEHINT(2);
99 const std::array<int, 2>& GetOrderRange(vtkCellAttribute*) const;
100
101 // -----------------------------------------------------------------------
102 // Degrees of freedom
103 // -----------------------------------------------------------------------
104
107
108protected:
111
112private:
114 void operator=(const vtkCellGridSummaryInformationQuery&) = delete;
115
116 std::unordered_map<vtkCellAttribute*, SummaryInformation> SummaryInformationMap;
117
118 char* AttributeName = nullptr;
119};
120
121VTK_ABI_NAMESPACE_END
122#endif // vtkCellGridSummaryInformationQuery_h
A function defined over the physical domain of a vtkCellGrid.
vtkCellGridQuery()=default
static vtkCellGridSummaryInformationQuery * New()
const std::array< int, 2 > & GetOrderRange(vtkCellAttribute *) const
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const SummaryInformation & GetSummaryInformation(vtkCellAttribute *att) const
Return summary information.
const std::unordered_map< vtkCellAttribute *, SummaryInformation > & GetSummaryInformationMap() const
Return the full per-attribute DOF count map.
void AddSummaryInformation(vtkCellAttribute *att, const SummaryInformation &summaryInformation)
Called by responders to accumulate Summary Information per attribute.
bool Initialize() override
Reset all accumulators before responders are invoked.
void GetOrderRange(vtkCellAttribute *, int *range) const
Return the [min, max] range of polynomial orders found.
vtkIdType GetNumberOfDOF(vtkCellAttribute *att) const
Return the DOF count for a specific attribute (0 if not found).
a simple class to control print indentation
Definition vtkIndent.h:108
Information to collect on a per-vtkCellAttribute basis.
std::array< int, 2 > OrderRange
The range of polynomial interpolation orders this attribute employs.
vtkIdType DOFCount
The number of degrees of freedom used to represent the corresponding cell attribute.
int vtkIdType
Definition vtkType.h:363
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO