mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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
This commit is contained in:
@ -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())
|
||||
|
||||
Reference in New Issue
Block a user