diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 87e35d1d1b..5519810807 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -776,7 +776,11 @@ int main(int argc, char *argv[]) const cyclicPolyPatch& cycpp = refCast(pp); - if (cycpp.transform() != cyclicPolyPatch::TRANSLATIONAL) + if + ( + cycpp.transformType() + != cyclicPolyPatch::TRANSLATIONAL + ) { const cyclicPolyPatch& nbr = cycpp.neighbPatch(); diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C index 66c749431e..41395abee6 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,7 +48,7 @@ namespace Foam coupledPolyPatch::orderingTypeNames; template<> - const char* NamedEnum::names[] = + const char* NamedEnum::names[] = { "unspecified", "none", @@ -56,7 +56,7 @@ namespace Foam "translational" }; - const NamedEnum + const NamedEnum coupledPolyPatch::transformTypeNames; } @@ -315,7 +315,7 @@ Foam::coupledPolyPatch::coupledPolyPatch polyPatch(name, size, start, index, bm, patchType), matchTolerance_(defaultMatchTol_), ordering_(ordering), - transform_(UNSPECIFIED), + transformType_(UNSPECIFIED), parallel_(true), separated_(false) {} @@ -339,10 +339,10 @@ Foam::coupledPolyPatch::coupledPolyPatch ? orderingTypeNames.read(dict.lookup("ordering")) : ordering ), - transform_ + transformType_ ( - dict.found("transform") - ? transformTypeNames.read(dict.lookup("transform")) + dict.found("transformType") + ? transformTypeNames.read(dict.lookup("transformType")) : UNSPECIFIED ), parallel_(true), @@ -358,7 +358,7 @@ Foam::coupledPolyPatch::coupledPolyPatch : polyPatch(pp, bm), matchTolerance_(pp.matchTolerance_), - transform_(pp.transform_), + transformType_(pp.transformType_), parallel_(true), separated_(false) {} @@ -375,7 +375,7 @@ Foam::coupledPolyPatch::coupledPolyPatch : polyPatch(pp, bm, index, newSize, newStart), matchTolerance_(pp.matchTolerance_), - transform_(pp.transform_), + transformType_(pp.transformType_), parallel_(true), separated_(false) {} @@ -392,7 +392,7 @@ Foam::coupledPolyPatch::coupledPolyPatch : polyPatch(pp, bm, index, mapAddressing, newStart), matchTolerance_(pp.matchTolerance_), - transform_(pp.transform_), + transformType_(pp.transformType_), parallel_(true), separated_(false) {} @@ -411,7 +411,7 @@ void Foam::coupledPolyPatch::write(Ostream& os) const polyPatch::write(os); writeEntry(os, "matchTolerance", matchTolerance_); writeEntry(os, "ordering", orderingTypeNames[ordering_]); - writeEntry(os, "transform", transformTypeNames[transform_]); + writeEntry(os, "transformType", transformTypeNames[transformType_]); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H index c3c2cae9e2..37091325dd 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,7 +65,7 @@ public: static const NamedEnum orderingTypeNames; - enum transformType + enum transformTypes { UNSPECIFIED, // Unspecified -> automatic transformation NONE, // No tranformation @@ -73,7 +73,7 @@ public: TRANSLATIONAL // Translation }; - static const NamedEnum transformTypeNames; + static const NamedEnum transformTypeNames; protected: @@ -90,7 +90,7 @@ protected: orderingType ordering_; //- Type of transformation - transformType transform_; + transformTypes transformType_; //- Are coupled patches parallel mutable bool parallel_; @@ -259,9 +259,9 @@ public: } //- Type of transform - virtual transformType transform() const + virtual transformTypes transformType() const { - return transform_; + return transformType_; } //- Transform a patch-based position from other side to this side diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C index 6c3f11b025..ff2ebc7e27 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,7 @@ void Foam::cyclicPolyPatch::calcTransformTensors const scalarField& smallDist, const scalar absTol, const orderingType ordering, - const transformType transform + const transformTypes transform ) const { if (debug) @@ -328,14 +328,14 @@ void Foam::cyclicPolyPatch::calcTransforms << exit(FatalError); } - if (transform() != neighbPatch().transform()) + if (transformType() != neighbPatch().transformType()) { FatalErrorInFunction << "Patch " << name() - << " has transform type " << transformTypeNames[transform()] + << " has transform type " << transformTypeNames[transformType()] << ", neighbour patch " << neighbPatchName() << " has transform type " - << neighbPatch().transformTypeNames[neighbPatch().transform()] + << neighbPatch().transformTypeNames[neighbPatch().transformType()] << exit(FatalError); } @@ -421,7 +421,7 @@ void Foam::cyclicPolyPatch::calcTransforms // Calculate transformation - if (transform() == ROTATIONAL) + if (transformType() == ROTATIONAL) { // Calculate using the given rotation axis and centre. Do not // use calculated normals. @@ -464,7 +464,7 @@ void Foam::cyclicPolyPatch::calcTransforms forwardT_ = revT.T(); reverseT_ = revT; } - else if (transform() == TRANSLATIONAL) + else if (transformType() == TRANSLATIONAL) { if (debug) { @@ -530,7 +530,7 @@ void Foam::cyclicPolyPatch::calcTransforms half0Tols, matchTolerance(), ordering(), - transform() + transformType() ); } } @@ -565,7 +565,7 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors if (half0Ctrs.size()) { - switch (transform()) + switch (transformType()) { case ROTATIONAL: { @@ -827,7 +827,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch << exit(FatalIOError); } - switch (transform()) + switch (transformType()) { case ROTATIONAL: { @@ -997,7 +997,7 @@ void Foam::cyclicPolyPatch::transformPosition(pointField& l) const { if (!parallel()) { - if (transform() == ROTATIONAL) + if (transformType() == ROTATIONAL) { l = Foam::transform(forwardT(), l-rotationCentre_) @@ -1021,7 +1021,7 @@ void Foam::cyclicPolyPatch::transformPosition(point& l, const label facei) const { if (!parallel()) { - if (transform() == ROTATIONAL) + if (transformType() == ROTATIONAL) { l = Foam::transform(forwardT(), l - rotationCentre_) + rotationCentre_; @@ -1567,7 +1567,7 @@ void Foam::cyclicPolyPatch::write(Ostream& os) const writeEntry(os, "neighbourPatch", neighbPatchName_); } coupleGroup_.write(os); - switch (transform()) + switch (transformType()) { case ROTATIONAL: { diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H index ee5d176a86..fe21de890a 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -114,7 +114,7 @@ class cyclicPolyPatch const scalarField& smallDist, const scalar absTol, const orderingType = UNKNOWN, - const transformType = UNSPECIFIED + const transformTypes = UNSPECIFIED ) const; //- Find amongst selected faces the one with the largest area diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C index eabf36d8fc..5bf6f38603 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -301,7 +301,7 @@ void Foam::oldCyclicPolyPatch::getCentresAndAnchors anchors0 = getAnchorPoints(half0Faces, pp.points()); half1Ctrs = calcFaceCentres(half1Faces, pp.points()); - switch (transform()) + switch (transformType()) { case ROTATIONAL: { @@ -586,7 +586,7 @@ Foam::oldCyclicPolyPatch::oldCyclicPolyPatch dict.readIfPresent("featureCos", featureCos_); - switch (transform()) + switch (transformType()) { case ROTATIONAL: { @@ -1205,7 +1205,7 @@ void Foam::oldCyclicPolyPatch::write(Ostream& os) const writeEntry(os, "featureCos", featureCos_); - switch (transform()) + switch (transformType()) { case ROTATIONAL: { diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C index 3169032074..4de89e838c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -248,7 +248,7 @@ void Foam::processorCyclicPolyPatch::calcGeometry(PstreamBuffers& pBufs) matchTolerance()*calcFaceTol(*this, points(), faceCentres()), matchTolerance(), ordering(), - transform() + transformType() ); // Where do we store the calculated transformation? diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H index 6bf52fc3a8..fc09eaf52c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -321,9 +321,9 @@ public: } //- Type of transform - virtual transformType transform() const + virtual transformTypes transformType() const { - return referPatch().transform(); + return referPatch().transformType(); } //- Transform a patch-based position from other side to this side diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index f064bd6c72..76308db480 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -77,21 +77,21 @@ void Foam::cyclicAMIPolyPatch::calcTransforms const vectorField& half1Areas ) { - if (transform() != neighbPatch().transform()) + if (transformType() != neighbPatch().transformType()) { FatalErrorInFunction << "Patch " << name() - << " has transform type " << transformTypeNames[transform()] + << " has transform type " << transformTypeNames[transformType()] << ", neighbour patch " << neighbPatchName() << " has transform type " - << neighbPatch().transformTypeNames[neighbPatch().transform()] + << neighbPatch().transformTypeNames[neighbPatch().transformType()] << exit(FatalError); } // Calculate transformation tensors - switch (transform()) + switch (transformType()) { case ROTATIONAL: { @@ -560,7 +560,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch << exit(FatalIOError); } - switch (transform()) + switch (transformType()) { case ROTATIONAL: { @@ -874,7 +874,7 @@ void Foam::cyclicAMIPolyPatch::transformPosition(pointField& l) const { if (!parallel()) { - if (transform() == ROTATIONAL) + if (transformType() == ROTATIONAL) { l = Foam::transform(forwardT(), l - rotationCentre_) + rotationCentre_; @@ -901,7 +901,7 @@ void Foam::cyclicAMIPolyPatch::transformPosition { if (!parallel()) { - if (transform() == ROTATIONAL) + if (transformType() == ROTATIONAL) { l = Foam::transform(forwardT(), l - rotationCentre_) + rotationCentre_; @@ -939,7 +939,7 @@ void Foam::cyclicAMIPolyPatch::reverseTransformPosition { if (!parallel()) { - if (transform() == ROTATIONAL) + if (transformType() == ROTATIONAL) { l = Foam::transform(reverseT(), l - rotationCentre_) + rotationCentre_; @@ -1144,7 +1144,7 @@ void Foam::cyclicAMIPolyPatch::write(Ostream& os) const } coupleGroup_.write(os); - switch (transform()) + switch (transformType()) { case ROTATIONAL: { diff --git a/tutorials/incompressible/SRFSimpleFoam/mixer/system/blockMeshDict b/tutorials/incompressible/SRFSimpleFoam/mixer/system/blockMeshDict index cf5a3bf64d..493e4560f0 100644 --- a/tutorials/incompressible/SRFSimpleFoam/mixer/system/blockMeshDict +++ b/tutorials/incompressible/SRFSimpleFoam/mixer/system/blockMeshDict @@ -122,7 +122,7 @@ boundary { type cyclic; neighbourPatch cyclic_half1; - transform rotational; + transformType rotational; rotationAxis (0 0 1); rotationCentre (0 0 0); faces @@ -135,7 +135,7 @@ boundary { type cyclic; neighbourPatch cyclic_half0; - transform rotational; + transformType rotational; rotationAxis (0 0 1); rotationCentre (0 0 0); faces diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/system/blockMeshDict b/tutorials/incompressible/simpleFoam/pipeCyclic/system/blockMeshDict index e1a6f9b505..a534e20a59 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/system/blockMeshDict +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/system/blockMeshDict @@ -84,7 +84,7 @@ boundary (0 1 5 4) ); - transform rotational; + transformType rotational; rotationAxis (1 0 0); rotationCentre (0 0 0); } @@ -98,7 +98,7 @@ boundary (7 6 2 3) ); - transform rotational; + transformType rotational; rotationAxis (1 0 0); rotationCentre (0 0 0); }