ENH: upgrade from NamedEnum to Enum (issue #515)

This commit is contained in:
Mark Olesen
2017-07-03 21:43:33 +02:00
parent 575073890f
commit f55c568f13
179 changed files with 1595 additions and 2035 deletions

View File

@ -33,23 +33,14 @@ License
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
namespace Foam
{
template<>
const char* Foam::NamedEnum
<
Foam::vector::components,
3
>::names[] =
{
"x",
"y",
"z"
};
}
const Foam::NamedEnum<Foam::vector::components, 3>
Foam::channelIndex::vectorComponentsNames_;
const Foam::Enum
<
Foam::vector::components
>
Foam::channelIndex::vectorComponentsNames_
(
Foam::vector::components::X, { "x", "y", "z" }
);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -233,7 +224,7 @@ Foam::channelIndex::channelIndex
)
:
symmetric_(readBool(dict.lookup("symmetric"))),
dir_(vectorComponentsNames_.read(dict.lookup("component")))
dir_(vectorComponentsNames_.lookup("component", dict))
{
const polyBoundaryMesh& patches = mesh.boundaryMesh();

View File

@ -55,7 +55,7 @@ class channelIndex
// Private data
static const NamedEnum<vector::components, 3> vectorComponentsNames_;
static const Enum<vector::components> vectorComponentsNames_;
//- Is mesh symmetric
const bool symmetric_;