Commit cce74d49 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: remove deprecated ensight output order (issue #523)

- Added for transition purposes only in 1612 but can now be removed.
parent ded09d64
......@@ -61,9 +61,6 @@ Usage
- \par -width \<n\>
Width of EnSight data subdir (default: 8)
- \par -deprecatedOrder
Use older ordering for volume cells (hex prism pyr tet poly)
Note
Writes to \a EnSight directory to avoid collisions with
foamToEnsightParts
......@@ -181,13 +178,6 @@ int main(int argc, char *argv[])
"n",
"width of ensight data subdir"
);
argList::addBoolOption
(
"deprecatedOrder",
"Use old ordering (hex prism pyr tet poly) "
"instead of the ascending number of points "
"(tet pyr prism hex poly)."
);
// The volume field types that we handle
const hashedWordList volFieldTypes
......@@ -261,7 +251,6 @@ int main(int argc, char *argv[])
//
ensightMesh::options writeOpts(format);
writeOpts.noPatches(args.optionFound("noPatches"));
writeOpts.deprecatedOrder(args.optionFound("deprecatedOrder"));
if (args.optionFound("patches"))
{
......
......@@ -2309,7 +2309,7 @@ _of_foamToEnsight()
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
local opts="-ascii -constant -deprecatedOrder -latestTime -newTimes -noFunctionObjects -noLagrangian -noPatches -noZero -nodeValues -parallel -srcDoc -doc -help "
local opts="-ascii -constant -latestTime -newTimes -noFunctionObjects -noLagrangian -noPatches -noZero -nodeValues -parallel -srcDoc -doc -help "
local optsWithArgs="-case -cellZone -decomposeParDict -faceZones -fields -name -patches -region -roots -time -width "
case ${prev} in
......
......@@ -293,9 +293,6 @@ public:
//- Using internalMesh?
inline bool useInternalMesh() const;
//- Using deprecated order? (hex prism pyr tet poly)
inline bool deprecatedOrder() const;
//- The volume cells (internalMesh)
inline const ensightCells& meshCells() const;
......@@ -369,9 +366,6 @@ class ensightMesh::options
//- Suppress patches
bool noPatches_;
//- Using deprecated order (hex prism pyr tet poly)
bool deprecatedOrder_;
//- Output selected patches only
autoPtr<wordReList> patchPatterns_;
......@@ -399,9 +393,6 @@ public:
//- Using internalMesh?
bool useInternalMesh() const;
//- Using deprecated order? (hex prism pyr tet poly)
bool deprecatedOrder() const;
//- Using patches?
bool usePatches() const;
......@@ -426,9 +417,6 @@ public:
//- Lazy creation - ensightMesh starts as needsUpdate.
void lazy(const bool);
//- Alter deprecated order.
void deprecatedOrder(const bool);
//- Alter the patches/no-patches state
void noPatches(const bool);
......
......@@ -49,12 +49,6 @@ inline bool Foam::ensightMesh::useInternalMesh() const
}
inline bool Foam::ensightMesh::deprecatedOrder() const
{
return options_->deprecatedOrder();
}
inline const Foam::ensightCells& Foam::ensightMesh::meshCells() const
{
return meshCells_;
......
......@@ -452,28 +452,6 @@ void Foam::ensightMesh::writeCellConnectivity
ensightGeoFile& os
) const
{
if (deprecatedOrder())
{
// element ordering used in older versions
ensightCells::elemType oldOrder[5] =
{
ensightCells::HEXA8,
ensightCells::PENTA6,
ensightCells::PYRAMID5,
ensightCells::TETRA4,
ensightCells::NFACED
};
for (label typei=0; typei < ensightCells::nTypes; ++typei)
{
const ensightCells::elemType& what = oldOrder[typei];
writeCellConnectivity(what, ensCells, pointToGlobal, os);
}
return;
}
for (label typei=0; typei < ensightCells::nTypes; ++typei)
{
const ensightCells::elemType what = ensightCells::elemType(typei);
......
......@@ -33,7 +33,6 @@ Foam::ensightMesh::options::options(IOstream::streamFormat format)
format_(format),
lazy_(false),
noPatches_(false),
deprecatedOrder_(false),
patchPatterns_(),
faceZonePatterns_()
{}
......@@ -59,12 +58,6 @@ bool Foam::ensightMesh::options::useInternalMesh() const
}
bool Foam::ensightMesh::options::deprecatedOrder() const
{
return deprecatedOrder_;
}
bool Foam::ensightMesh::options::usePatches() const
{
return !noPatches_;
......@@ -97,12 +90,6 @@ void Foam::ensightMesh::options::lazy(const bool b)
}
void Foam::ensightMesh::options::deprecatedOrder(const bool b)
{
deprecatedOrder_ = b;
}
void Foam::ensightMesh::options::noPatches(const bool b)
{
noPatches_ = b;
......
......@@ -91,8 +91,7 @@ class ensightOutput
(
const Field<Type>& fld,
const ensightCells&,
ensightFile& os,
const bool deprecatedOrder = false
ensightFile& os
);
......
......@@ -171,8 +171,7 @@ bool Foam::ensightOutput::writeCellField
(
const Field<Type>& vf,
const ensightCells& ensCells,
ensightFile& os,
const bool deprecatedOrder
ensightFile& os
)
{
if (ensCells.total())
......@@ -182,32 +181,6 @@ bool Foam::ensightOutput::writeCellField
os.beginPart(ensCells.index());
}
if (deprecatedOrder)
{
// element ordering used in older versions
ensightCells::elemType oldOrder[5] =
{
ensightCells::HEXA8,
ensightCells::PENTA6,
ensightCells::PYRAMID5,
ensightCells::TETRA4,
ensightCells::NFACED
};
for (label typei=0; typei < ensightCells::nTypes; ++typei)
{
const ensightCells::elemType& what = oldOrder[typei];
writeFieldContent
(
ensightCells::key(what),
Field<Type>(vf, ensCells.cellIds(what)),
os
);
}
return true;
}
for (label typei=0; typei < ensightCells::nTypes; ++typei)
{
const ensightCells::elemType what = ensightCells::elemType(typei);
......@@ -248,7 +221,7 @@ bool Foam::ensightOutput::writeField
//
if (ensMesh.useInternalMesh())
{
writeCellField(vf, meshCells, os, ensMesh.deprecatedOrder());
writeCellField(vf, meshCells, os);
}
//
......
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