From 77bf5fbf9e44cfb6709abcc28cb175e4540527f4 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 9 Oct 2016 15:10:20 +0100 Subject: [PATCH] foamToTecplot360: Updated to use tmp.ref() Patch contributed by Bruno Santos Resolves bug-report http://bugs.openfoam.org/view.php?id=2288 --- .../dataConversion/foamToTecplot360/tecplotWriterTemplates.C | 2 +- .../postProcessing/dataConversion/foamToTecplot360/vtkMesh.H | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C index 9dfe7d497..7d8496faa 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C @@ -93,7 +93,7 @@ Foam::tmp> Foam::tecplotWriter::getFaceField const polyBoundaryMesh& patches = sfld.mesh().boundaryMesh(); tmp> tfld(new Field(faceLabels.size())); - Field& fld = tfld(); + Field& fld = tfld.ref(); forAll(faceLabels, i) { diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/vtkMesh.H b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/vtkMesh.H index c9ea6c4b1..ec6045b53 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/vtkMesh.H +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/vtkMesh.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -156,7 +156,7 @@ public: if (useSubMesh()) { tmp subFld = subsetter_.interpolate(fld); - subFld().rename(fld.name()); + subFld.ref().rename(fld.name()); return subFld; } else