- convertPointField caused a seg-fault if the internal field was null
      - attempted to name the vtk object the name of the null field

+ minor clean-up
This commit is contained in:
andy
2009-01-28 15:54:42 +00:00
parent d0e99ff347
commit 5e20eeb0e9

View File

@ -190,16 +190,15 @@ void Foam::vtkPV3Foam::convertPointField
} }
vtkFloatArray *pointData = vtkFloatArray::New(); vtkFloatArray *pointData = vtkFloatArray::New();
pointData->SetNumberOfTuples( nPoints + addPointCellLabels.size() ); pointData->SetNumberOfTuples(nPoints + addPointCellLabels.size());
pointData->SetNumberOfComponents( nComp ); pointData->SetNumberOfComponents(nComp);
pointData->Allocate( nComp*(nPoints + addPointCellLabels.size()) ); pointData->Allocate(nComp*(nPoints + addPointCellLabels.size()));
pointData->SetName( tf.name().c_str() ); pointData->SetName(ptf.name().c_str());
if (debug) if (debug)
{ {
Info<< "convert convertPointField: " Info<< "convert convertPointField: "
<< tf.name() << ptf.name()
<< " size = " << nPoints << " size = " << nPoints
<< " nComp=" << nComp << " nComp=" << nComp
<< " nTuples = " << (nPoints + addPointCellLabels.size()) << " nTuples = " << (nPoints + addPointCellLabels.size())