diff --git a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C index 2c2ca26139476e1715c093dfecf8c83f7160032e..2ac1d40f51d98ee07c626e53c529b04e56ccc914 100644 --- a/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C +++ b/src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -80,7 +80,7 @@ Foam::functionObjects::fieldCoordinateSystemTransform::transformFieldName const word& fieldName ) const { - return fieldName + ":Transformed"; + return IOobject::scopedName(fieldName, "Transformed"); } @@ -90,7 +90,7 @@ Foam::functionObjects::fieldCoordinateSystemTransform::srotTensor() const typedef surfaceTensorField FieldType; typedef surfaceTensorField::Boundary BoundaryType; - if (!rotTensorSurface_.valid()) + if (!rotTensorSurface_) { tensorField rotations(csysPtr_->R(mesh_.faceCentres())); @@ -135,7 +135,7 @@ Foam::functionObjects::fieldCoordinateSystemTransform::vrotTensor() const typedef volTensorField FieldType; typedef volTensorField::Boundary BoundaryType; - if (!rotTensorVolume_.valid()) + if (!rotTensorVolume_) { tensorField rotations(csysPtr_->R(mesh_.cellCentres())); diff --git a/src/functionObjects/field/momentum/momentum.H b/src/functionObjects/field/momentum/momentum.H index d0e963e83e5158e1f31d84d568823ee9ff528a77..12472f8a002ca22d79d086fa32e71f5e2840cbce 100644 --- a/src/functionObjects/field/momentum/momentum.H +++ b/src/functionObjects/field/momentum/momentum.H @@ -135,7 +135,7 @@ SourceFiles namespace Foam { -// Forward declarations +// Forward Declarations class dimensionSet; namespace functionObjects @@ -225,6 +225,15 @@ protected: //- Write momentum data void writeValues(Ostream& os); + // Protected Member Functions + + //- Return a scoped name + // TODO - revisit issue #1675 + word scopedName(const word& base) const + { + return IOobject::scopedName(this->name(), base); + } + public: diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/0.orig/U b/tutorials/incompressible/simpleFoam/pipeCyclic/0.orig/U index 62ae5ee479d8736e5613ff57f530b052048656cd..dfe87e3b570a889cf9a46e8a2206830951d059e1 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/0.orig/U +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/0.orig/U @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v1912 | +| \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -29,12 +29,16 @@ boundaryField code #{ + // Uncomment for testing on non-windows systems [fragile] + // IOobject::scopeSeparator = '_'; + const vector axis(1, 0, 0); vectorField v(2.0*this->patch().Cf() ^ axis); v.replace(vector::X, 1.0); operator==(v); #}; + value $internalField; }