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