diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C index fef6c98ec0..8f0fa87822 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C @@ -47,14 +47,15 @@ namespace Foam template<> -const char* NamedEnum::names[] = +const char* NamedEnum::names[] = { "unknown", "rotational", - "translational" + "translational", + "noOrdering" }; -const NamedEnum +const NamedEnum cyclicPolyPatch::transformTypeNames; } @@ -1153,6 +1154,16 @@ bool Foam::cyclicPolyPatch::order << ". It is " << pp.size() << abort(FatalError); } + if (transform_ == NOORDERING) + { + if (debug) + { + Pout<< "cyclicPolyPatch::order : noOrdering mode." << endl; + } + return false; + } + + label halfSize = pp.size()/2; // Supplied primitivePatch already with new points. @@ -1630,7 +1641,7 @@ void Foam::cyclicPolyPatch::write(Ostream& os) const { case ROTATIONAL: { - os.writeKeyword("transform") << transformTypeNames[ROTATIONAL] + os.writeKeyword("transform") << transformTypeNames[transform_] << token::END_STATEMENT << nl; os.writeKeyword("rotationAxis") << rotationAxis_ << token::END_STATEMENT << nl; @@ -1640,12 +1651,18 @@ void Foam::cyclicPolyPatch::write(Ostream& os) const } case TRANSLATIONAL: { - os.writeKeyword("transform") << transformTypeNames[TRANSLATIONAL] + os.writeKeyword("transform") << transformTypeNames[transform_] << token::END_STATEMENT << nl; os.writeKeyword("separationVector") << separationVector_ << token::END_STATEMENT << nl; break; } + case NOORDERING: + { + os.writeKeyword("transform") << transformTypeNames[transform_] + << token::END_STATEMENT << nl; + break; + } default: { // no additional info to write diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H index 4f81975e60..3224eef799 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H @@ -42,7 +42,6 @@ Description SourceFiles cyclicPolyPatch.C - cyclicPolyPatchMorph.C \*---------------------------------------------------------------------------*/ @@ -72,11 +71,12 @@ public: enum transformType { - UNKNOWN, - ROTATIONAL, - TRANSLATIONAL + UNKNOWN, // unspecified; automatic ordering + ROTATIONAL, // rotation along coordinate axis + TRANSLATIONAL, // translation + NOORDERING // unspecified, no automatic ordering }; - static const NamedEnum transformTypeNames; + static const NamedEnum transformTypeNames; private: @@ -118,8 +118,6 @@ private: //- Find amongst selected faces the one with the largest area static label findMaxArea(const pointField&, const faceList&); - void calcTransforms(); - // Face ordering @@ -175,6 +173,9 @@ protected: // Protected Member functions + //- Recalculate the transformation tensors + virtual void calcTransforms(); + //- Initialise the calculation of the patch geometry virtual void initGeometry(PstreamBuffers&);