VTK: Common/DataModel/vtkPartitionedDataSetCollection.h Source File

| VTK 9.3.1

vtkPartitionedDataSetCollection.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
18 #ifndef vtkPartitionedDataSetCollection_h
19 #define vtkPartitionedDataSetCollection_h
20
21 #include "vtkCommonDataModelModule.h" // For export macro
22 #include "vtkDataObjectTree.h"
23
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkPartitionedDataSet;
26 class vtkDataAssembly;
27 class vtkDataSet;
28
29 class VTKCOMMONDATAMODEL_EXPORT vtkPartitionedDataSetCollection : public vtkDataObjectTree
30 {
31 public:
32 static vtkPartitionedDataSetCollection* New();
33 vtkTypeMacro(vtkPartitionedDataSetCollection, vtkDataObjectTree);
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
40 int GetDataObjectType() override { return VTK_PARTITIONED_DATA_SET_COLLECTION; }
41
47 void SetNumberOfPartitionedDataSets(unsigned int numDataSets);
48
52 unsigned int GetNumberOfPartitionedDataSets() const;
53
58 vtkPartitionedDataSet* GetPartitionedDataSet(unsigned int idx) const;
59
66 void SetPartitionedDataSet(unsigned int idx, vtkPartitionedDataSet* dataset);
67
71 void RemovePartitionedDataSet(unsigned int idx);
72
74
77 void SetPartition(unsigned int idx, unsigned int partition, vtkDataObject* object);
78 vtkDataSet* GetPartition(unsigned int idx, unsigned int partition);
79 vtkDataObject* GetPartitionAsDataObject(unsigned int idx, unsigned int partition);
81
85 unsigned int GetNumberOfPartitions(unsigned int idx) const;
86
91 void SetNumberOfPartitions(unsigned int idx, unsigned int numPartitions);
92
96 vtkTypeBool HasMetaData(unsigned int idx) { return this->Superclass::HasChildMetaData(idx); }
97
103 vtkInformation* GetMetaData(unsigned int idx) { return this->Superclass::GetChildMetaData(idx); }
104
106
111 vtkGetObjectMacro(DataAssembly, vtkDataAssembly);
112 void SetDataAssembly(vtkDataAssembly* assembly);
114
116
121 unsigned int GetCompositeIndex(unsigned int idx) const;
122 unsigned int GetCompositeIndex(unsigned int idx, unsigned int partition) const;
124
126
129 static vtkPartitionedDataSetCollection* GetData(vtkInformation* info);
130 static vtkPartitionedDataSetCollection* GetData(vtkInformationVector* v, int i = 0);
132
136 vtkInformation* GetMetaData(vtkCompositeDataIterator* iter) override
137 {
138 return this->Superclass::GetMetaData(iter);
139 }
140
144 vtkTypeBool HasMetaData(vtkCompositeDataIterator* iter) override
145 {
146 return this->Superclass::HasMetaData(iter);
147 }
148
152 vtkMTimeType GetMTime() override;
153
155
158 void CompositeShallowCopy(vtkCompositeDataSet* src) override;
159 void ShallowCopy(vtkDataObject* src) override;
160 void DeepCopy(vtkDataObject* src) override;
161 void CopyStructure(vtkCompositeDataSet* input) override;
162 void Initialize() override;
164 protected:
165 vtkPartitionedDataSetCollection();
166 ~vtkPartitionedDataSetCollection() override;
167
173 vtkDataObjectTree* CreateForCopyStructure(vtkDataObjectTree* other) override;
174
175 private:
176 vtkPartitionedDataSetCollection(const vtkPartitionedDataSetCollection&) = delete;
177 void operator=(const vtkPartitionedDataSetCollection&) = delete;
178
179 vtkDataAssembly* DataAssembly;
180 };
181
182 VTK_ABI_NAMESPACE_END
183 #endif
vtkCompositeDataIterator
superclass for composite data iterators
Definition: vtkCompositeDataIterator.h:28
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:51
vtkDataAssembly
hierarchical representation to use with vtkPartitionedDataSetCollection
Definition: vtkDataAssembly.h:123
vtkDataObjectTree
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
Definition: vtkDataObjectTree.h:49
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPartitionedDataSetCollection
Composite dataset that groups datasets as a collection.
Definition: vtkPartitionedDataSetCollection.h:30
vtkPartitionedDataSetCollection::GetNumberOfPartitionedDataSets
unsigned int GetNumberOfPartitionedDataSets() const
Returns the number of blocks.
vtkPartitionedDataSetCollection::CopyStructure
void CopyStructure(vtkCompositeDataSet *input) override
Overridden to handle vtkDataAssembly.
vtkPartitionedDataSetCollection::GetNumberOfPartitions
unsigned int GetNumberOfPartitions(unsigned int idx) const
Returns the number of partitions in a partitioned dataset at the given index.
vtkPartitionedDataSetCollection::RemovePartitionedDataSet
void RemovePartitionedDataSet(unsigned int idx)
Remove the given block from the dataset.
vtkPartitionedDataSetCollection::GetPartition
vtkDataSet * GetPartition(unsigned int idx, unsigned int partition)
API to get/set partitions using a tuple index.
vtkPartitionedDataSetCollection::GetCompositeIndex
unsigned int GetCompositeIndex(unsigned int idx, unsigned int partition) const
Returns the composite index (sometimes referred to as the flat-index) for either a partitioned datase...
vtkPartitionedDataSetCollection::HasMetaData
vtkTypeBool HasMetaData(unsigned int idx)
Returns true if meta-data is available for a given block.
Definition: vtkPartitionedDataSetCollection.h:96
vtkPartitionedDataSetCollection::SetNumberOfPartitionedDataSets
void SetNumberOfPartitionedDataSets(unsigned int numDataSets)
Set the number of blocks.
vtkPartitionedDataSetCollection::vtkPartitionedDataSetCollection
vtkPartitionedDataSetCollection()
vtkPartitionedDataSetCollection::GetPartitionAsDataObject
vtkDataObject * GetPartitionAsDataObject(unsigned int idx, unsigned int partition)
API to get/set partitions using a tuple index.
vtkPartitionedDataSetCollection::GetData
static vtkPartitionedDataSetCollection * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkPartitionedDataSetCollection::New
static vtkPartitionedDataSetCollection * New()
vtkPartitionedDataSetCollection::GetData
static vtkPartitionedDataSetCollection * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
vtkPartitionedDataSetCollection::HasMetaData
vtkTypeBool HasMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
Definition: vtkPartitionedDataSetCollection.h:144
vtkPartitionedDataSetCollection::ShallowCopy
void ShallowCopy(vtkDataObject *src) override
Overridden to handle vtkDataAssembly.
vtkPartitionedDataSetCollection::SetPartitionedDataSet
void SetPartitionedDataSet(unsigned int idx, vtkPartitionedDataSet *dataset)
Sets the data object as the given block.
vtkPartitionedDataSetCollection::DeepCopy
void DeepCopy(vtkDataObject *src) override
Overridden to handle vtkDataAssembly.
vtkPartitionedDataSetCollection::SetPartition
void SetPartition(unsigned int idx, unsigned int partition, vtkDataObject *object)
API to get/set partitions using a tuple index.
vtkPartitionedDataSetCollection::CreateForCopyStructure
vtkDataObjectTree * CreateForCopyStructure(vtkDataObjectTree *other) override
Overridden to create a vtkPartitionedDataSet whenever a vtkMultiPieceDataSet is encountered.
vtkPartitionedDataSetCollection::~vtkPartitionedDataSetCollection
~vtkPartitionedDataSetCollection() override
vtkPartitionedDataSetCollection::CompositeShallowCopy
void CompositeShallowCopy(vtkCompositeDataSet *src) override
Overridden to handle vtkDataAssembly.
vtkPartitionedDataSetCollection::GetPartitionedDataSet
vtkPartitionedDataSet * GetPartitionedDataSet(unsigned int idx) const
Returns the block at the given index.
vtkPartitionedDataSetCollection::SetDataAssembly
void SetDataAssembly(vtkDataAssembly *assembly)
DataAssembly provides a way to define hierarchical organization of partitioned-datasets.
vtkPartitionedDataSetCollection::GetCompositeIndex
unsigned int GetCompositeIndex(unsigned int idx) const
Returns the composite index (sometimes referred to as the flat-index) for either a partitioned datase...
vtkPartitionedDataSetCollection::GetMetaData
vtkInformation * GetMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
Definition: vtkPartitionedDataSetCollection.h:136
vtkPartitionedDataSetCollection::Initialize
void Initialize() override
Overridden to handle vtkDataAssembly.
vtkPartitionedDataSetCollection::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPartitionedDataSetCollection::SetNumberOfPartitions
void SetNumberOfPartitions(unsigned int idx, unsigned int numPartitions)
Set number of partitions at a given index.
vtkPartitionedDataSetCollection::GetMTime
vtkMTimeType GetMTime() override
Overridden to include DataAssembly MTime.
vtkPartitionedDataSetCollection::GetMetaData
vtkInformation * GetMetaData(unsigned int idx)
Returns the meta-data for the block.
Definition: vtkPartitionedDataSetCollection.h:103
vtkPartitionedDataSetCollection::GetDataObjectType
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
Definition: vtkPartitionedDataSetCollection.h:40
vtkPartitionedDataSet
composite dataset to encapsulates a dataset consisting of partitions.
Definition: vtkPartitionedDataSet.h:39
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkDataObjectTree.h
VTK_PARTITIONED_DATA_SET_COLLECTION
#define VTK_PARTITIONED_DATA_SET_COLLECTION
Definition: vtkType.h:103
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270