Commit 263e9e33 authored by mattijs's avatar mattijs
Browse files

ENH: have transform mode without automatic ordering

Still has automatic transformation tensor calculation
parent 1f88dac9
......@@ -47,14 +47,15 @@ namespace Foam
template<>
const char* NamedEnum<cyclicPolyPatch::transformType, 3>::names[] =
const char* NamedEnum<cyclicPolyPatch::transformType, 4>::names[] =
{
"unknown",
"rotational",
"translational"
"translational",
"noOrdering"
};
const NamedEnum<cyclicPolyPatch::transformType, 3>
const NamedEnum<cyclicPolyPatch::transformType, 4>
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
......
......@@ -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<transformType, 3> transformTypeNames;
static const NamedEnum<transformType, 4> 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&);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment