From 21048d96005bb8371806eaa2ccc93a222a184d78 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 13 Jan 2010 19:10:54 +0000 Subject: [PATCH] Disabled writing zero-sized faceZones since upset tecio library --- .../foamToTecplot360/foamToTecplot360.C | 145 ++++++++++-------- 1 file changed, 77 insertions(+), 68 deletions(-) diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C index 6c1065a489..44384b7efe 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C @@ -1077,83 +1077,92 @@ int main(int argc, char *argv[]) { const faceZone& pp = zones[zoneI]; - const indirectPrimitivePatch ipp - ( - IndirectList(mesh.faces(), pp), - mesh.points() - ); + if (pp.size() > 0) + { + const indirectPrimitivePatch ipp + ( + IndirectList(mesh.faces(), pp), + mesh.points() + ); - writer.writePolygonalZone - ( - pp.name(), - strandID++, //1+patchIDs.size()+zoneI, //strandID, - ipp, - allVarLocation - ); + writer.writePolygonalZone + ( + pp.name(), + strandID++, //1+patchIDs.size()+zoneI, //strandID, + ipp, + allVarLocation + ); - // Write coordinates - writer.writeField(ipp.localPoints().component(0)()); - writer.writeField(ipp.localPoints().component(1)()); - writer.writeField(ipp.localPoints().component(2)()); + // Write coordinates + writer.writeField(ipp.localPoints().component(0)()); + writer.writeField(ipp.localPoints().component(1)()); + writer.writeField(ipp.localPoints().component(2)()); - // Write all volfields - forAll(vsf, i) - { - writer.writeField - ( - writer.getFaceField + // Write all volfields + forAll(vsf, i) + { + writer.writeField ( - linearInterpolate(vsf[i])(), - pp - )() - ); - } - forAll(vvf, i) - { - writer.writeField - ( - writer.getFaceField + writer.getFaceField + ( + linearInterpolate(vsf[i])(), + pp + )() + ); + } + forAll(vvf, i) + { + writer.writeField ( - linearInterpolate(vvf[i])(), - pp - )() - ); - } - forAll(vSpheretf, i) - { - writer.writeField - ( - writer.getFaceField + writer.getFaceField + ( + linearInterpolate(vvf[i])(), + pp + )() + ); + } + forAll(vSpheretf, i) + { + writer.writeField ( - linearInterpolate(vSpheretf[i])(), - pp - )() - ); - } - forAll(vSymmtf, i) - { - writer.writeField - ( - writer.getFaceField + writer.getFaceField + ( + linearInterpolate(vSpheretf[i])(), + pp + )() + ); + } + forAll(vSymmtf, i) + { + writer.writeField ( - linearInterpolate(vSymmtf[i])(), - pp - )() - ); - } - forAll(vtf, i) - { - writer.writeField - ( - writer.getFaceField + writer.getFaceField + ( + linearInterpolate(vSymmtf[i])(), + pp + )() + ); + } + forAll(vtf, i) + { + writer.writeField ( - linearInterpolate(vtf[i])(), - pp - )() - ); - } + writer.getFaceField + ( + linearInterpolate(vtf[i])(), + pp + )() + ); + } - writer.writeConnectivity(ipp); + writer.writeConnectivity(ipp); + } + else + { + Info<< " Skipping zero sized faceZone " << zoneI + << "\t" << pp.name() + << nl << endl; + } } }