Commit 5e20eeb0 authored by Andrew Heather's avatar Andrew Heather
Browse files

bugfix:

    - 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
parent d0e99ff3
......@@ -190,16 +190,15 @@ void Foam::vtkPV3Foam::convertPointField
}
vtkFloatArray *pointData = vtkFloatArray::New();
pointData->SetNumberOfTuples( nPoints + addPointCellLabels.size() );
pointData->SetNumberOfComponents( nComp );
pointData->Allocate( nComp*(nPoints + addPointCellLabels.size()) );
pointData->SetName( tf.name().c_str() );
pointData->SetNumberOfTuples(nPoints + addPointCellLabels.size());
pointData->SetNumberOfComponents(nComp);
pointData->Allocate(nComp*(nPoints + addPointCellLabels.size()));
pointData->SetName(ptf.name().c_str());
if (debug)
{
Info<< "convert convertPointField: "
<< tf.name()
<< ptf.name()
<< " size = " << nPoints
<< " nComp=" << nComp
<< " nTuples = " << (nPoints + addPointCellLabels.size())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment