From 294a3d05ba501fa00d74726b4510855f576e5de1 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 23 Jan 2018 15:39:45 +0100 Subject: [PATCH] BUG: problems converting clouds to ensight or vtk format (closes #708) - problems when the cloud was not available on all processors. - NB: ensight measured data only allows a single cloud, but foamToEnsight writes all clouds. --- .../foamToEnsight/ensightOutputCloud.H | 4 +- .../ensightOutputCloudTemplates.C | 19 ++- .../foamToEnsight/findCloudFields.H | 15 +- .../foamToEnsight/foamToEnsight.C | 24 ++- .../foamToEnsightParts/findFields.H | 60 ++++---- .../foamToEnsightParts/foamToEnsightParts.C | 33 +++-- .../dataConversion/foamToVTK/findClouds.H | 26 ++-- .../dataConversion/foamToVTK/foamToVTK.C | 137 ++++++++++++------ .../foamToVTK/foamVtkLagrangianWriter.C | 15 +- .../foamToVTK/foamVtkLagrangianWriter.H | 14 +- .../foamVtkLagrangianWriterTemplates.C | 42 ++++-- .../HashTables/HashTableOps/HashTableOps.H | 92 ++++++++++++ 12 files changed, 335 insertions(+), 146 deletions(-) create mode 100644 src/OpenFOAM/containers/HashTables/HashTableOps/HashTableOps.H diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloud.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloud.H index d8b87935ee..b768f5180a 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloud.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloud.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,7 +74,7 @@ bool writeCloudField template bool writeCloudField ( - const IOobject& fieldObject, + IOobject& fieldObject, const bool exists, autoPtr& output ); diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloudTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloudTemplates.C index fcf68edc19..04fd865c2c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloudTemplates.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloudTemplates.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,8 +36,8 @@ License template bool Foam::ensightCloud::writeCloudField ( - const Foam::IOField& field, - Foam::ensightFile& os + const IOField& field, + ensightFile& os ) { const bool exists = (returnReduce(field.size(), sumOp