mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: upgrade from NamedEnum to Enum (issue #515)
This commit is contained in:
@ -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();
|
||||
|
||||
|
||||
@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user