From a79b45c6115abf706d6d3c0d8fac36e8ffade1c6 Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 29 Mar 2015 20:14:38 +0100 Subject: [PATCH] vtkPV?FoamMeshVolume: Corrected conversion of tetWedge to VTK_WEDGE Thanks to Bruno Santos for analysing and fixing this Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1633 --- .../PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C | 7 +++---- .../PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshVolume.C | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C index e8fdd0b8..8235b13d 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,6 @@ License #include "cellModeller.H" #include "vtkOpenFOAMPoints.H" #include "Swap.H" -#include "longLong.H" // VTK includes #include "vtkCellArray.h" @@ -222,14 +221,14 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh } else if (cellModel == tetWedge) { - // Treat as squeezed prism + // Treat as squeezed prism (VTK_WEDGE) nodeIds[0] = cellShape[0]; nodeIds[1] = cellShape[2]; nodeIds[2] = cellShape[1]; nodeIds[3] = cellShape[3]; nodeIds[4] = cellShape[4]; - nodeIds[5] = cellShape[4]; + nodeIds[5] = cellShape[3]; vtkmesh->InsertNextCell ( diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshVolume.C index 317b3700..70a7c04a 100644 --- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshVolume.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshVolume.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,6 @@ License #include "cellModeller.H" #include "vtkOpenFOAMPoints.H" #include "Swap.H" -#include "longLong.H" // VTK includes #include "vtkCellArray.h" @@ -222,14 +221,14 @@ vtkUnstructuredGrid* Foam::vtkPV4Foam::volumeVTKMesh } else if (cellModel == tetWedge) { - // Treat as squeezed prism + // Treat as squeezed prism (VTK_WEDGE) nodeIds[0] = cellShape[0]; nodeIds[1] = cellShape[2]; nodeIds[2] = cellShape[1]; nodeIds[3] = cellShape[3]; nodeIds[4] = cellShape[4]; - nodeIds[5] = cellShape[4]; + nodeIds[5] = cellShape[3]; vtkmesh->InsertNextCell (