diff --git a/src/fileFormats/ensight/file/ensightWriterCaching.C b/src/fileFormats/ensight/file/ensightWriterCaching.C index 4d6ed044bc262d0fb294473cddce628ac1e43126..7674415e81e9ceb9ab7cc775fe48fb310f7f0faf 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 b9a1abfd88eac536ea71e05f4ef932d2fdeacecf..40b56a20e8b85a154e7e39c01da62b968e333948 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 3e378c2933c88909de956a47b6a132f2c0e05cd8..7e9303eced8363ef945908e4b3524f93478c6b0f 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<word>("type")); + const string varType(subDict.get<string>("type")); const word varName ( subDict.getOrDefault<word> @@ -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 1d5595564ec992bcb34af0bf46ba573d0dbf1bdd..6e27fe3bee43f8c8169b665b6efc419a5b24097d 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<word>("type")); + const string varType(subDict.get<string>("type")); const word varName ( subDict.getOrDefault<word> @@ -247,7 +247,7 @@ Foam::fileName Foam::surfaceWriters::ensightWriter::writeCollated ); osCase - << varType + << varType.c_str() << ( this->isPointData()