VTK  9.5.20251201
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
17
18#ifndef vtkPartitionedDataSetCollection_h
19#define vtkPartitionedDataSetCollection_h
20
21#include "vtkCommonDataModelModule.h" // For export macro
22#include "vtkDataObjectTree.h"
23#include "vtkWrappingHints.h" // For VTK_MARSHALMANUAL
24
25VTK_ABI_NAMESPACE_BEGIN
27class vtkDataAssembly;
28class vtkDataSet;
29
31 : public vtkDataObjectTree
32{
33public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
42 int GetDataObjectType() VTK_FUTURE_CONST override { return VTK_PARTITIONED_DATA_SET_COLLECTION; }
43
49 void SetNumberOfPartitionedDataSets(unsigned int numDataSets);
50
54 unsigned int GetNumberOfPartitionedDataSets() const;
55
61
68 void SetPartitionedDataSet(unsigned int idx, vtkPartitionedDataSet* dataset);
69
73 void RemovePartitionedDataSet(unsigned int idx);
74
76
79 void SetPartition(unsigned int idx, unsigned int partition, vtkDataObject* object);
80 vtkDataSet* GetPartition(unsigned int idx, unsigned int partition);
81 vtkDataObject* GetPartitionAsDataObject(unsigned int idx, unsigned int partition);
83
87 unsigned int GetNumberOfPartitions(unsigned int idx) const;
88
93 void SetNumberOfPartitions(unsigned int idx, unsigned int numPartitions);
94
98 vtkTypeBool HasMetaData(unsigned int idx) { return this->Superclass::HasChildMetaData(idx); }
99
105 vtkInformation* GetMetaData(unsigned int idx) { return this->Superclass::GetChildMetaData(idx); }
106
108
113 vtkGetObjectMacro(DataAssembly, vtkDataAssembly);
116
118
123 unsigned int GetCompositeIndex(unsigned int idx) const;
124 unsigned int GetCompositeIndex(unsigned int idx, unsigned int partition) const;
126
128
134
139 {
140 return this->Superclass::GetMetaData(iter);
141 }
142
147 {
148 return this->Superclass::HasMetaData(iter);
149 }
150
155
157
161 void ShallowCopy(vtkDataObject* src) override;
162 void DeepCopy(vtkDataObject* src) override;
163 void CopyStructure(vtkCompositeDataSet* input) override;
164 void Initialize() override;
166protected:
169
176
177private:
179 void operator=(const vtkPartitionedDataSetCollection&) = delete;
180
181 vtkDataAssembly* DataAssembly;
182};
183
184VTK_ABI_NAMESPACE_END
185#endif
superclass for composite data iterators
hierarchical representation to use with vtkPartitionedDataSetCollection
vtkTypeBool HasChildMetaData(unsigned int index)
Returns if meta-data information is available for the given child index.
virtual vtkInformation * GetMetaData(vtkCompositeDataIterator *iter)
Returns the meta-data associated with the position pointed by the iterator.
virtual vtkTypeBool HasMetaData(vtkCompositeDataIterator *iter)
Returns if any meta-data associated with the position pointed by the iterator.
vtkInformation * GetChildMetaData(unsigned int index)
Returns the meta-data at a given index.
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
unsigned int GetNumberOfPartitionedDataSets() const
Returns the number of blocks.
void CopyStructure(vtkCompositeDataSet *input) override
Overridden to handle vtkDataAssembly.
vtkDataObjectTree * CreateForCopyStructure(vtkDataObjectTree *other) override
Overridden to create a vtkPartitionedDataSet whenever a vtkMultiPieceDataSet is encountered.
unsigned int GetNumberOfPartitions(unsigned int idx) const
Returns the number of partitions in a partitioned dataset at the given index.
void RemovePartitionedDataSet(unsigned int idx)
Remove the given block from the dataset.
vtkInformation * GetMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
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...
static vtkPartitionedDataSetCollection * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkTypeBool HasMetaData(unsigned int idx)
Returns true if meta-data is available for a given block.
void SetNumberOfPartitionedDataSets(unsigned int numDataSets)
Set the number of blocks.
vtkPartitionedDataSet * GetPartitionedDataSet(unsigned int idx) const
Returns the block at the given index.
vtkTypeBool HasMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
void ShallowCopy(vtkDataObject *src) override
Overridden to handle vtkDataAssembly.
void SetPartitionedDataSet(unsigned int idx, vtkPartitionedDataSet *dataset)
Sets the data object as the given block.
void DeepCopy(vtkDataObject *src) override
Overridden to handle vtkDataAssembly.
void SetPartition(unsigned int idx, unsigned int partition, vtkDataObject *object)
API to get/set partitions using a tuple index.
int GetDataObjectType() VTK_FUTURE_CONST override
Return class name of data type (see vtkType.h for definitions).
void CompositeShallowCopy(vtkCompositeDataSet *src) override
Overridden to handle vtkDataAssembly.
vtkInformation * GetMetaData(unsigned int idx)
Returns the meta-data for the block.
void SetDataAssembly(vtkDataAssembly *assembly)
DataAssembly provides a way to define hierarchical organization of partitioned-datasets.
unsigned int GetCompositeIndex(unsigned int idx) const
Returns the composite index (sometimes referred to as the flat-index) for either a partitioned datase...
static vtkPartitionedDataSetCollection * New()
void Initialize() override
Overridden to handle vtkDataAssembly.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetNumberOfPartitions(unsigned int idx, unsigned int numPartitions)
Set number of partitions at a given index.
vtkMTimeType GetMTime() override
Overridden to include DataAssembly MTime.
vtkDataSet * GetPartition(unsigned int idx, unsigned int partition)
API to get/set partitions using a tuple index.
static vtkPartitionedDataSetCollection * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
vtkDataObject * GetPartitionAsDataObject(unsigned int idx, unsigned int partition)
API to get/set partitions using a tuple index.
composite dataset to encapsulates a dataset consisting of partitions.
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:322
@ VTK_PARTITIONED_DATA_SET_COLLECTION
Definition vtkType.h:152
#define VTK_MARSHALMANUAL