foamToTecplot360: Updated to use tmp.ref()
Patch contributed by Bruno Santos Resolves bug-report http://bugs.openfoam.org/view.php?id=2288
This commit is contained in:
@ -384,7 +384,6 @@ void Foam::tecplotWriter::writeConnectivity(const fvMesh& mesh) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::tecplotWriter::writeConnectivity
|
void Foam::tecplotWriter::writeConnectivity
|
||||||
(
|
(
|
||||||
const indirectPrimitivePatch& pp
|
const indirectPrimitivePatch& pp
|
||||||
@ -394,7 +393,8 @@ void Foam::tecplotWriter::writeConnectivity
|
|||||||
INTEGER4 NumFaceNodes = 2*pp.nEdges();
|
INTEGER4 NumFaceNodes = 2*pp.nEdges();
|
||||||
|
|
||||||
// All faces (=edges) have 2 nodes
|
// All faces (=edges) have 2 nodes
|
||||||
List<INTEGER4> FaceNodeCounts(NumFaces, 2);
|
List<INTEGER4> FaceNodeCounts(NumFaces);
|
||||||
|
FaceNodeCounts = 2;
|
||||||
|
|
||||||
List<INTEGER4> FaceNodes(NumFaceNodes);
|
List<INTEGER4> FaceNodes(NumFaceNodes);
|
||||||
label nodeI = 0;
|
label nodeI = 0;
|
||||||
|
|||||||
@ -93,7 +93,7 @@ Foam::tmp<Field<Type>> Foam::tecplotWriter::getFaceField
|
|||||||
const polyBoundaryMesh& patches = sfld.mesh().boundaryMesh();
|
const polyBoundaryMesh& patches = sfld.mesh().boundaryMesh();
|
||||||
|
|
||||||
tmp<Field<Type>> tfld(new Field<Type>(faceLabels.size()));
|
tmp<Field<Type>> tfld(new Field<Type>(faceLabels.size()));
|
||||||
Field<Type>& fld = tfld();
|
Field<Type>& fld = tfld.ref();
|
||||||
|
|
||||||
forAll(faceLabels, i)
|
forAll(faceLabels, i)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -156,7 +156,7 @@ public:
|
|||||||
if (useSubMesh())
|
if (useSubMesh())
|
||||||
{
|
{
|
||||||
tmp<GeoField> subFld = subsetter_.interpolate(fld);
|
tmp<GeoField> subFld = subsetter_.interpolate(fld);
|
||||||
subFld().rename(fld.name());
|
subFld.ref().rename(fld.name());
|
||||||
return subFld;
|
return subFld;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user