49 vtkInformationVector** inputVector,
50 vtkInformationVector* outputVector)
52 if (request->Has(vtkDemandDrivenPipeline::REQUEST_DATA()))
54 return this->
RequestData(request, inputVector, outputVector);
57 if (request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION()))
62 return this->Superclass::ProcessRequest(request, inputVector, outputVector);
66 vtkInformationVector** ,
67 vtkInformationVector* outputVector)
69 vtkSmartPointer<vtkInformation> outInfo =
70 outputVector->GetInformationObject(0);
71 vtkSmartPointer<vtkUnstructuredGrid> output =
72 vtkUnstructuredGrid::SafeDownCast(
73 outInfo->Get(vtkDataObject::DATA_OBJECT()));
75 if (outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()) >
86 vtkNew<vtkImplicitArray<MeshNodalCoordinatesBackend>> nodeCoords;
87 nodeCoords->ConstructBackend(backend);
88 nodeCoords->SetNumberOfComponents(3);
90 this->
Points->SetData(nodeCoords);
91 output->SetPoints(this->
Points.GetPointer());
95 output->Allocate(elems.size());
96 for (
auto& cell : elems)
103 vtkSmartPointer<vtkIdList> ptIds = vtkSmartPointer<vtkIdList>::New();
104 ptIds->SetNumberOfIds(numNodes);
106 for (
unsigned i = 0; i < numNodes; ++i)
108 ptIds->SetId(i, nodes[i]->getID());
111 if (cellType == VTK_WEDGE)
113 for (
unsigned i = 0; i < 3; ++i)
115 const auto prism_swap_id = ptIds->GetId(i);
116 ptIds->SetId(i, ptIds->GetId(i + 3));
117 ptIds->SetId(i + 3, prism_swap_id);
121 output->InsertNextCell(cellType, ptIds);
127 if (!property->is_for_output)
143 else if (
auto const* p =
152 else if (
auto const* p =
157 else if (
auto const* p =
162 else if (
auto const* p =
168 else if (
auto const* p =
177 else if (
auto const* p =
182 else if (
auto const* p =
190 "Mesh property '{:s}' of unhandled data type '{:s}'. Please "
191 "check the data type of the mesh properties. The available "
199 "\n\t unsigned long long,"
201 "\n\t unsigned char,",
203 property->getPropertyName(),
204 typeid(*property).name());
208 output->GetPointData()->ShallowCopy(this->
PointData.GetPointer());
209 output->GetCellData()->ShallowCopy(this->
CellData.GetPointer());
210 output->GetFieldData()->ShallowCopy(this->
FieldData.GetPointer());