40 vtkInformationVector** inputVector,
41 vtkInformationVector* outputVector)
43 if (request->Has(vtkDemandDrivenPipeline::REQUEST_DATA()))
45 return this->
RequestData(request, inputVector, outputVector);
48 if (request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION()))
53 return this->Superclass::ProcessRequest(request, inputVector, outputVector);
57 vtkInformationVector** ,
58 vtkInformationVector* outputVector)
60 vtkSmartPointer<vtkInformation> outInfo =
61 outputVector->GetInformationObject(0);
62 vtkSmartPointer<vtkUnstructuredGrid> output =
63 vtkUnstructuredGrid::SafeDownCast(
64 outInfo->Get(vtkDataObject::DATA_OBJECT()));
66 if (outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()) >
77 vtkNew<vtkImplicitArray<MeshNodalCoordinatesBackend>> nodeCoords;
78 nodeCoords->ConstructBackend(backend);
79 nodeCoords->SetNumberOfComponents(3);
80 nodeCoords->SetNumberOfTuples(
_mesh->getNumberOfNodes());
81 this->
Points->SetData(nodeCoords);
82 output->SetPoints(this->
Points.GetPointer());
85 auto elems =
_mesh->getElements();
86 output->Allocate(elems.size());
87 for (
auto& cell : elems)
94 vtkSmartPointer<vtkIdList> ptIds = vtkSmartPointer<vtkIdList>::New();
95 ptIds->SetNumberOfIds(numNodes);
97 for (
unsigned i = 0; i < numNodes; ++i)
99 ptIds->SetId(i, nodes[i]->getID());
102 if (cellType == VTK_WEDGE)
104 for (
unsigned i = 0; i < 3; ++i)
106 const auto prism_swap_id = ptIds->GetId(i);
107 ptIds->SetId(i, ptIds->GetId(i + 3));
108 ptIds->SetId(i + 3, prism_swap_id);
112 output->InsertNextCell(cellType, ptIds);
116 for (
auto [name, property] :
_mesh->getProperties())
118 if (!property->is_for_output)
134 else if (
auto const* p =
143 else if (
auto const* p =
148 else if (
auto const* p =
153 else if (
auto const* p =
159 else if (
auto const* p =
168 else if (
auto const* p =
173 else if (
auto const* p =
181 "Mesh property '{:s}' of unhandled data type '{:s}'. Please "
182 "check the data type of the mesh properties. The available "
190 "\n\t unsigned long long,"
192 "\n\t unsigned char,",
194 property->getPropertyName(),
199 output->GetPointData()->ShallowCopy(this->
PointData.GetPointer());
200 output->GetCellData()->ShallowCopy(this->
CellData.GetPointer());
201 output->GetFieldData()->ShallowCopy(this->
FieldData.GetPointer());