diff --git a/src/fileFormats/ensight/file/ensightWriterCaching.C b/src/fileFormats/ensight/file/ensightWriterCaching.C index 4d6ed044bc..7674415e81 100644 --- a/src/fileFormats/ensight/file/ensightWriterCaching.C +++ b/src/fileFormats/ensight/file/ensightWriterCaching.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2023 OpenCFD Ltd. + Copyright (C) 2016-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -203,7 +203,7 @@ bool Foam::ensightOutput::writerCaching::update const scalar timeValue, const bool geomChanged, const word& fieldName, - const word& fieldType, + const string& fieldType, // May contain spaces (eg, "tensor symm") const word& varName ) { diff --git a/src/fileFormats/ensight/file/ensightWriterCaching.H b/src/fileFormats/ensight/file/ensightWriterCaching.H index b9a1abfd88..40b56a20e8 100644 --- a/src/fileFormats/ensight/file/ensightWriterCaching.H +++ b/src/fileFormats/ensight/file/ensightWriterCaching.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2022 OpenCFD Ltd. + Copyright (C) 2016-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -139,6 +139,10 @@ public: //- Update time/geometry information and file cache. //- This routine should only be called from the master process + // + // Note that the ensight field type may contain spaces + // (eg, "tensor symm") + // // \return True if there is a state change, which is either a // geometry change or a new time interval bool update @@ -147,7 +151,7 @@ public: const scalar timeValue, //!< The current time value const bool geomChanged, //!< Monitored geometry changed const word& fieldName, //!< Name of field - const word& fieldType, //!< Type of field + const string& fieldType, //!< Ensight type of field const word& varName = word::null //!< Alternative field name ); }; diff --git a/src/meshTools/coordSet/writers/ensight/ensightCoordSetWriterCollated.C b/src/meshTools/coordSet/writers/ensight/ensightCoordSetWriterCollated.C index 3e378c2933..7e9303eced 100644 --- a/src/meshTools/coordSet/writers/ensight/ensightCoordSetWriterCollated.C +++ b/src/meshTools/coordSet/writers/ensight/ensightCoordSetWriterCollated.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2022-2023 OpenCFD Ltd. + Copyright (C) 2022-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -222,7 +222,7 @@ Foam::fileName Foam::coordSetWriters::ensightWriter::writeCollated { const dictionary& subDict = dEntry.dict(); - const word varType(subDict.get("type")); + const string varType(subDict.get("type")); const word varName ( subDict.getOrDefault @@ -233,7 +233,7 @@ Foam::fileName Foam::coordSetWriters::ensightWriter::writeCollated ); osCase - << varType + << varType.c_str() << ( true // this->isPointData() diff --git a/src/surfMesh/writers/ensight/ensightSurfaceWriterCollated.C b/src/surfMesh/writers/ensight/ensightSurfaceWriterCollated.C index 1d5595564e..6e27fe3bee 100644 --- a/src/surfMesh/writers/ensight/ensightSurfaceWriterCollated.C +++ b/src/surfMesh/writers/ensight/ensightSurfaceWriterCollated.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation - Copyright (C) 2015-2023 OpenCFD Ltd. + Copyright (C) 2015-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -236,7 +236,7 @@ Foam::fileName Foam::surfaceWriters::ensightWriter::writeCollated { const dictionary& subDict = dEntry.dict(); - const word varType(subDict.get("type")); + const string varType(subDict.get("type")); const word varName ( subDict.getOrDefault @@ -247,7 +247,7 @@ Foam::fileName Foam::surfaceWriters::ensightWriter::writeCollated ); osCase - << varType + << varType.c_str() << ( this->isPointData()