mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: have transform mode without automatic ordering
Still has automatic transformation tensor calculation
This commit is contained in:
@ -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&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user