diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertLagrangian.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertLagrangian.H index b0478d844c4789d658a351a1f035b426568f5e38..9500ee60703f6867b2ec149fdb32526b1bef18b8 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertLagrangian.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertLagrangian.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -48,12 +48,7 @@ if (doLagrangian) Info<< "Write " << cloudName << " ("; const bool cloudExists = - returnReduce - ( - currentCloudDirs.found(cloudName), - orOp<bool>() - ); - + returnReduce(currentCloudDirs.found(cloudName), orOp<bool>()); { autoPtr<ensightFile> os = ensCase.newCloud(cloudName); diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertVolumeFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertVolumeFields.H index 5490eec6d7ada452e30362ac06e6cbbc202672b1..f2d775a8042b8fcac6ae5082af0029d846c72f10 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertVolumeFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/convertVolumeFields.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -35,23 +35,8 @@ Description { Info<< "Write volume field ("; - writeAllVolFields - ( - ensCase, - ensMesh, - meshProxy, - objects, - nodeValues - ); - - writeAllDimFields - ( - ensCase, - ensMesh, - meshProxy, - objects, - nodeValues - ); + writeAllVolFields(ensCase, ensMesh, objects); + writeAllDimFields(ensCase, ensMesh, objects); Info<< " )" << nl; } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C index c440c3582526a32dfec527630b3037e8958f796f..552b0b62a85b9cbb03606763b7f54ced171a88fd 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -93,6 +93,7 @@ Note #include "HashOps.H" #include "fvc.H" +#include "fvMesh.H" #include "fieldTypes.H" #include "volFields.H" #include "scalarIOField.H" @@ -104,7 +105,6 @@ Note #include "ensightMesh.H" #include "ensightOutputCloud.H" #include "ensightOutputVolField.H" -#include "fvMeshSubsetProxy.H" // local files #include "readFields.H" @@ -115,16 +115,6 @@ Note using namespace Foam; -//- Get internal field and make it a zero-gradient volume field with subsetting -template<class GeoField> -tmp<GeoField> -getZeroGradInternalField(IOobject& io, const fvMeshSubsetProxy& proxy) -{ - auto tfield = tmp<typename GeoField::Internal>::New(io, proxy.baseMesh()); - return proxy.interpolateInternal(tfield); -} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) @@ -192,12 +182,20 @@ int main(int argc, char *argv[]) "Specify single or multiple fields to write (all by default)\n" "Eg, 'T' or '( \"U.*\" )'" ); +#if 0 argList::addOption ( - "cellZone", - "word", - "Specify cellZone to write" + "cellZones", + "wordRes", + "Specify single or multiple cellZones to write\n" + "Eg, 'cells' or '( slice \"mfp-.*\" )'.", + true // mark as an advanced option ); + argList::addOptionCompat("cellZone", {"cellZones", 1912}); +#else + argList::ignoreOptionCompat({"cellZones", 1912}, true); // has argument +#endif + argList::addOption ( "name", @@ -221,8 +219,6 @@ int main(int argc, char *argv[]) : IOstream::BINARY ); - const bool nodeValues = args.found("nodeValues"); - cpuTime timer; memInfo mem; Info<< "Initial memory " << mem.update().size() << " kB" << endl; @@ -286,22 +282,11 @@ int main(int argc, char *argv[]) wordRes fieldPatterns; args.readListIfPresent<wordRe>("fields", fieldPatterns); - word cellZoneName; - if (args.readIfPresent("cellZone", cellZoneName)) - { - Info<< "Converting cellZone " << cellZoneName - << " only, with new outside faces as \"oldInternalFaces\"." - << nl; - } - - // Ignored (unproxied) if cellZoneName is empty - fvMeshSubsetProxy meshProxy(mesh, fvMeshSubsetProxy::ZONE, cellZoneName); - // New ensight case file, initialize header etc. ensightCase ensCase(outputDir, args.globalCaseName(), caseOpts); - // Construct the Ensight mesh - ensightMesh ensMesh(meshProxy.mesh(), writeOpts); + // Construct ensight mesh + ensightMesh ensMesh(mesh, writeOpts); if (Pstream::master()) { @@ -350,7 +335,7 @@ int main(int argc, char *argv[]) wordList objectNames(objects.sortedNames()); // Check availability for all times... - checkData(meshProxy.baseMesh(), timeDirs, objectNames); + checkData(mesh, timeDirs, objectNames); testedObjectNames = objectNames; } @@ -366,7 +351,6 @@ int main(int argc, char *argv[]) polyMesh::readUpdateState meshState = mesh.readUpdate(); if (meshState != polyMesh::UNCHANGED) { - meshProxy.correct(); ensMesh.expire(); ensMesh.correct(); } @@ -378,7 +362,7 @@ int main(int argc, char *argv[]) } // Objects at this time - IOobjectList objects(meshProxy.baseMesh(), runTime.timeName()); + IOobjectList objects(mesh, runTime.timeName()); // Restrict to objects that are available for all times objects.filterObjects(testedObjectNames); @@ -386,7 +370,7 @@ int main(int argc, char *argv[]) // Volume, internal, point fields #include "convertVolumeFields.H" - // Write lagrangian data + // Lagrangian fields #include "convertLagrangian.H" Info<< "Wrote in " diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.H index d51ce30412dd5ce8dfb1f80a65dbc98ab9ffeea6..3d79fa6b467ebb74221e670f15798f7326e60b92 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/readFields.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,7 +27,8 @@ InNamespace Foam Description - Read fields from disk for foamToEnsight + Helper routines for reading a field or fields, + for foamToEnsight SourceFiles readFields.C @@ -46,30 +47,36 @@ SourceFiles namespace Foam { -//- Get the field and subset it, or return nullptr +//- Get the field or return nullptr template<class GeoField> -tmp<GeoField> getField(const IOobject* io, const fvMeshSubsetProxy& proxy) +tmp<GeoField> getField +( + const IOobject* io, + const typename GeoField::Mesh& mesh +) { if (io) { - auto tfield = tmp<GeoField>::New(*io, proxy.baseMesh()); - return proxy.interpolate(tfield); + return tmp<GeoField>::New(*io, mesh); } return nullptr; } -//- Get internal field and make it a zero-gradient volume field with subsetting +//- Get internal field and make it a zero-gradient volume field template<class GeoField> tmp<GeoField> -getZeroGradField(const IOobject* io, const fvMeshSubsetProxy& proxy) +getZeroGradField(const IOobject* io, const fvMesh& mesh) { if (io) { - auto tfield = - tmp<typename GeoField::Internal>::New(*io, proxy.baseMesh()); - return proxy.interpolateInternal(tfield); + auto tdimfield = tmp<typename GeoField::Internal>::New(*io, mesh); + + auto tfield = fvMeshSubsetProxy::zeroGradientField(tdimfield()); + tdimfield.clear(); + + return tfield; } return nullptr; diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/writeDimFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/writeDimFields.H index ae4d9c35506f960e67ab83dea1cfa136da408cb5..9e38b2f9d47cdbf3f8fb8880346c7958ee3eda5d 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/writeDimFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/writeDimFields.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef writeDimFields_H -#define writeDimFields_H +#ifndef ensight_writeDimFields_H +#define ensight_writeDimFields_H #include "writeVolFields.H" @@ -49,9 +49,7 @@ label writeDimFields ( ensightCase& ensCase, const ensightMesh& ensMesh, - const fvMeshSubsetProxy& proxy, - const IOobjectList& objects, - const bool nodeValues + const IOobjectList& objects ) { typedef GeometricField<Type, fvPatchField, volMesh> GeoField; @@ -63,6 +61,8 @@ label writeDimFields >::Internal DimField; + const fvMesh& mesh = ensMesh.mesh(); + label count = 0; for (const word& fieldName : objects.sortedNames<DimField>()) @@ -75,9 +75,7 @@ label writeDimFields ( ensCase, ensMesh, - proxy, - getZeroGradField<GeoField>(io, proxy), - nodeValues + getZeroGradField<GeoField>(io, mesh) ) ) { @@ -94,19 +92,16 @@ label writeAllDimFields ( ensightCase& ensCase, const ensightMesh& ensMesh, - const fvMeshSubsetProxy& proxy, - const IOobjectList& objects, - const bool nodeValues + const IOobjectList& objects ) { #undef foamToEnsight_WRITE_FIELD #define foamToEnsight_WRITE_FIELD(PrimitiveType) \ writeDimFields<PrimitiveType> \ ( \ - ensCase, ensMesh, \ - proxy, \ - objects, \ - nodeValues \ + ensCase, \ + ensMesh, \ + objects \ ) label count = 0; diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/writeVolFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/writeVolFields.H index d0b6655c5fe3eb1aa814f224363db425b9be66f7..a5da0ea9da7ab928477dfd8361780ec81b79078c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/writeVolFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/writeVolFields.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,11 +34,11 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef writeVolFields_H -#define writeVolFields_H +#ifndef ensight_writeVolFields_H +#define ensight_writeVolFields_H #include "readFields.H" -#include "fvMeshSubsetProxy.H" +#include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,9 +50,7 @@ bool writeVolField ( ensightCase& ensCase, const ensightMesh& ensMesh, - const fvMeshSubsetProxy& proxy, - const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfield, - const bool nodeValues + const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfield ) { if (!tfield.valid()) @@ -62,6 +60,9 @@ bool writeVolField const auto& field = tfield(); + // Forced use of node values? + const bool nodeValues = ensCase.nodeValues(); + autoPtr<ensightFile> os = ensCase.newData<Type>(field.name()); bool wrote = ensightOutput::writeVolField<Type> @@ -82,13 +83,13 @@ label writeVolFields ( ensightCase& ensCase, const ensightMesh& ensMesh, - const fvMeshSubsetProxy& proxy, - const IOobjectList& objects, - const bool nodeValues + const IOobjectList& objects ) { typedef GeometricField<Type, fvPatchField, volMesh> GeoField; + const fvMesh& mesh = ensMesh.mesh(); + label count = 0; for (const word& fieldName : objects.sortedNames<GeoField>()) @@ -99,9 +100,7 @@ label writeVolFields ( ensCase, ensMesh, - proxy, - getField<GeoField>(objects.findObject(fieldName), proxy), - nodeValues + getField<GeoField>(objects.findObject(fieldName), mesh) ) ) { @@ -118,19 +117,16 @@ label writeAllVolFields ( ensightCase& ensCase, const ensightMesh& ensMesh, - const fvMeshSubsetProxy& proxy, - const IOobjectList& objects, - const bool nodeValues + const IOobjectList& objects ) { #undef foamToEnsight_WRITE_FIELD #define foamToEnsight_WRITE_FIELD(PrimitiveType) \ writeVolFields<PrimitiveType> \ ( \ - ensCase, ensMesh, \ - proxy, \ - objects, \ - nodeValues \ + ensCase, \ + ensMesh, \ + objects \ ) label count = 0; diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/checkMeshMoving.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/checkMeshMoving.H index 8155d920cbc9a109d288d1381e485938c473b5b7..4849c9512876b16a2baf37f3b101373dd107559c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/checkMeshMoving.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/checkMeshMoving.H @@ -1,5 +1,4 @@ -// check for "points" in all of the result directories -// - could restrict to the selected times +// Check for "points" in any of the result directories bool meshMoving = false; @@ -9,14 +8,17 @@ if (timeDirs.size() > 1 && Pstream::master()) // See if any other "polyMesh/points" files exist too. Info<< "Search for moving mesh ... " << flush; - forAll(timeDirs, timeI) + for (const instant& inst : timeDirs) { + const word& timeName = inst.name(); + meshMoving = ( - IOobject + timeName != mesh.pointsInstance() + && IOobject ( "points", - timeDirs[timeI].name(), + timeName, polyMesh::meshSubDir, mesh, IOobject::NO_READ, @@ -33,8 +35,7 @@ if (timeDirs.size() > 1 && Pstream::master()) if (meshMoving) { - Info<< "found." << nl - << " Writing meshes for every timestep." << endl; + Info<< "found. Writing meshes for every timestep." << endl; } else { diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/convertLagrangian.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/convertLagrangian.H index 8eb554150e13fa6bc8de28ebd8316805464849fd..9500ee60703f6867b2ec149fdb32526b1bef18b8 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/convertLagrangian.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/convertLagrangian.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -48,11 +48,7 @@ if (doLagrangian) Info<< "Write " << cloudName << " ("; const bool cloudExists = - returnReduce - ( - currentCloudDirs.found(cloudName), - orOp<bool>() - ); + returnReduce(currentCloudDirs.found(cloudName), orOp<bool>()); { autoPtr<ensightFile> os = ensCase.newCloud(cloudName); diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/convertVolumeFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/convertVolumeFields.H index b5f39307dddbdc5a8e6852b7502a6ec59b5497e0..20dd8373ae856ce2264b166183425f496dc9879e 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/convertVolumeFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/convertVolumeFields.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -35,21 +35,8 @@ Description { Info<< "Write volume field ("; - writeAllVolFields - ( - ensCase, - ensParts, - mesh, - objects - ); - - writeAllDimFields - ( - ensCase, - ensParts, - mesh, - objects - ); + writeAllVolFields(ensCase, ensParts, mesh, objects); + writeAllDimFields(ensCase, ensParts, mesh, objects); Info<< " )" << nl; } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C index 4b221f349437afaccf719c20cbc1ef0836c83c7b..9903495d42d970eeddb46343799236e4b6ba2978 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -88,6 +88,7 @@ Note #include "PstreamCombineReduceOps.H" #include "HashOps.H" +#include "fvMesh.H" #include "fieldTypes.H" #include "volFields.H" #include "scalarIOField.H" @@ -99,7 +100,6 @@ Note #include "ensightParts.H" #include "ensightOutputCloud.H" #include "ensightOutputVolField.H" -#include "fvMeshSubsetProxy.H" // local files #include "readFields.H" @@ -215,23 +215,12 @@ int main(int argc, char *argv[]) // Define sub-directory name to use for EnSight data. // The path to the ensight directory is at case level only // - For parallel cases, data only written from master - fileName ensightDir = args.get<word>("name", "Ensight"); - if (!ensightDir.isAbsolute()) + fileName outputDir = args.get<word>("name", "Ensight"); + if (!outputDir.isAbsolute()) { - ensightDir = args.globalPath()/ensightDir; + outputDir = args.globalPath()/outputDir; } - // - // Open new ensight case file, initialize header etc. - // - ensightCase ensCase - ( - ensightDir, - "Ensight", // args.globalCaseName(), - caseOpts - ); - - // // Output configuration // @@ -251,19 +240,26 @@ int main(int argc, char *argv[]) wordRes fieldPatterns; args.readListIfPresent<wordRe>("fields", fieldPatterns); + // New ensight case file, initialize header etc. + ensightCase ensCase + ( + outputDir, + "Ensight", // args.globalCaseName(), + caseOpts + ); - // Construct the list of ensight parts for the entire mesh + // Construct ensight parts for the entire mesh ensightParts ensParts(mesh); // Write summary information if (Pstream::master()) { - Info<< "Converting " << timeDirs.size() << " time steps" << endl; + Info<< "Converting " << timeDirs.size() << " time steps" << nl; OFstream info(ensCase.path()/"partsInfo"); info - << "// summary of ensight parts" << nl << nl; + << "// Summary of ensight parts" << nl << nl; ensParts.writeSummary(info); } @@ -336,7 +332,7 @@ int main(int argc, char *argv[]) if (doGeometry) { autoPtr<ensightGeoFile> os = ensCase.newGeometry(meshMoving); - ensParts.write(os.ref()); + ensParts.write(os); } } @@ -361,7 +357,7 @@ int main(int argc, char *argv[]) Info<< "\nEnd: " << timer.elapsedCpuTime() << " s, " - << mem.update().peak() << " kB (peak)\n" << endl; + << mem.update().peak() << " kB (peak)" << nl << endl; return 0; } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/readFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/readFields.H index fe8288bd1fcb29a85a44cfa2f5bec8bc7e862ffe..22544563fb51c7cd3b856d3a1a7d4b4137e67ad1 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/readFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/readFields.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,7 +27,8 @@ InNamespace Foam Description - Read fields from disk for foamToEnsight + Helper routines for reading a field or fields, + for foamToEnsightParts SourceFiles readFields.C @@ -39,7 +40,6 @@ SourceFiles #include "instantList.H" #include "IOobjectList.H" -#include "fvMesh.H" #include "fvMeshSubsetProxy.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,29 +47,31 @@ SourceFiles namespace Foam { -//- Get the field and subset it, or return nullptr +//- Get the field or return nullptr template<class GeoField> -tmp<GeoField> getField(const IOobject* io, const fvMesh& mesh) +tmp<GeoField> getField +( + const IOobject* io, + const typename GeoField::Mesh& mesh +) { if (io) { - auto tfield = tmp<GeoField>::New(*io, mesh); - return tfield; + return tmp<GeoField>::New(*io, mesh); } return nullptr; } -//- Get internal field and make it a zero-gradient volume field with subsetting +//- Get internal field and make it a zero-gradient volume field template<class GeoField> tmp<GeoField> getZeroGradField(const IOobject* io, const fvMesh& mesh) { if (io) { - auto tdimfield = - tmp<typename GeoField::Internal>::New(*io, mesh); + auto tdimfield = tmp<typename GeoField::Internal>::New(*io, mesh); auto tfield = fvMeshSubsetProxy::zeroGradientField(tdimfield()); tdimfield.clear(); diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/writeDimFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/writeDimFields.H index cc3fa5f73074c5748177385e544e2f5fb63ede30..06b318474ff21731f203b2a2184308da4d7785ae 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/writeDimFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/writeDimFields.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef ensightParts_writeDimFields_H -#define ensightParts_writeDimFields_H +#ifndef foamToEnsightParts_writeDimFields_H +#define foamToEnsightParts_writeDimFields_H #include "writeVolFields.H" @@ -100,7 +100,8 @@ label writeAllDimFields #define foamToEnsight_WRITE_FIELD(PrimitiveType) \ writeDimFields<PrimitiveType> \ ( \ - ensCase, ensParts, \ + ensCase, \ + ensParts, \ mesh, \ objects \ ) diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/writeVolFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/writeVolFields.H index dbad2846351246c814185b7c1574d8d475b014a6..166408fed4509359d3edde3c71809d0d0aa76a9f 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/writeVolFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/writeVolFields.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef writeVolFields_H -#define writeVolFields_H +#ifndef ensightParts_writeVolFields_H +#define ensightParts_writeVolFields_H #include "readFields.H" #include "fvMesh.H"