vtkUnstructuredReader: corrected prism point ordering

Patch contributed by Mattijs Janssens
Resolves bug-report http://bugs.openfoam.org/view.php?id=1885
This commit is contained in:
Henry Weller 2016-07-01 14:45:18 +01:00
parent a623ab42a3
commit 139faa3cf0
2 changed files with 8 additions and 7 deletions

View File

@ -34,7 +34,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(vtkUnstructuredReader, 1); //0);
defineTypeNameAndDebug(vtkUnstructuredReader, 1);
template<>
const char*
@ -97,7 +97,6 @@ void Foam::vtkUnstructuredReader::warnUnhandledType
}
// Split cellTypes into cells, faces and lines
void Foam::vtkUnstructuredReader::extractCells
(
Istream& inFile,
@ -302,11 +301,11 @@ void Foam::vtkUnstructuredReader::extractCells
<< nRead << exit(FatalIOError);
}
prismPoints[0] = cellVertData[dataIndex++];
prismPoints[1] = cellVertData[dataIndex++];
prismPoints[2] = cellVertData[dataIndex++];
prismPoints[1] = cellVertData[dataIndex++];
prismPoints[3] = cellVertData[dataIndex++];
prismPoints[4] = cellVertData[dataIndex++];
prismPoints[5] = cellVertData[dataIndex++];
prismPoints[4] = cellVertData[dataIndex++];
cellMap_[celli] = i;
cells_[celli++] = cellShape(prism, prismPoints, true);
}
@ -356,7 +355,6 @@ void Foam::vtkUnstructuredReader::extractCells
}
// Read single field and stores it on the objectRegistry.
void Foam::vtkUnstructuredReader::readField
(
ISstream& inFile,
@ -434,6 +432,7 @@ void Foam::vtkUnstructuredReader::readField
);
// Consume current line.
inFile.getLine(fieldVals()[0]);
// Read without parsing
forAll(fieldVals(), i)
{
@ -457,8 +456,6 @@ void Foam::vtkUnstructuredReader::readField
}
// Reads fields, stores them on the objectRegistry. Returns a list of
// read fields
Foam::wordList Foam::vtkUnstructuredReader::readFieldArray
(
ISstream& inFile,

View File

@ -196,6 +196,7 @@ private:
labelHashSet& warningGiven
) const;
//- Split cellTypes into cells, faces and lines
void extractCells
(
Istream& inFile,
@ -203,6 +204,7 @@ private:
const labelList& cellVertData
);
//- Read single field and stores it on the objectRegistry.
void readField
(
ISstream& inFile,
@ -212,6 +214,8 @@ private:
const label size
) const;
//- Reads fields, stores them on the objectRegistry. Returns a list of
// read fields
wordList readFieldArray
(
ISstream& inFile,