hi, all
In Catalyst example "Fortran90FullExample" -> "FECxxAdaptor.cxx"->"
createcpimagedata_", the grid is new and has no coordinates. So, how to
transfer the simulation grid coordinates to this vtkImageData grid?
Thank you!
extern "C" void createcpimagedata_(int* nxstart, int* nxend, int* nx,
int* ny, int* nz)
{
if (!vtkCPPythonAdaptorAPI::GetCoProcessorData())
{
vtkGenericWarningMacro("Unable to access CoProcessorData.");
return;
}
// The simulation grid is a 3-dimensional topologically and geometrically
// regular grid. In VTK/ParaView, this is considered an image data set.
vtkSmartPointer<vtkImageData> grid = vtkSmartPointer<vtkImageData>::New();
grid->SetExtent(*nxstart-1, *nxend-1, 0, *ny-1, 0, *nz-1);
// Name should be consistent between here, Fortran and Python client
script.
vtkCPPythonAdaptorAPI::GetCoProcessorData()->GetInputDescriptionByName(
"input")->SetGrid(grid);
vtkCPPythonAdaptorAPI::GetCoProcessorData()->GetInputDescriptionByName(
"input")->SetWholeExtent(0, *nx-1, 0, *ny-1, 0, *nz-1);
}
--
中国空气动力研究与发展中心 计算空气动力研究所
Blog: http://blog.donews.com/frank777
MSN: [email protected]
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Search the list archives at: http://markmail.org/search/?q=ParaView
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview