STYLE: minor changes
- do not need STRINGIFY macros in ragel code - remove wordPairHashTable.H and use equivalent wordPairHashes.H instead STYLE: replace addDictOption with explicit option - the usage text is otherwise misleading GIT: combine Pair/Tuple2 directories
This commit is contained in:
parent
62ec2f2ddf
commit
2919c9b675
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -32,13 +32,13 @@ Description
|
||||
#include "ListOps.H"
|
||||
#include "FlatOutput.H"
|
||||
#include "IOstreams.H"
|
||||
#include "macros.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// For testing various pre-defined formatting
|
||||
#define printFlatOutput(Content, Format) \
|
||||
STRINGIFY(Format) << ": " << flatOutput(Content, FlatOutput::Format{})
|
||||
#define printFlatOutput(Content, Format) \
|
||||
Info<< nl << #Format << ": " \
|
||||
<< flatOutput(Content, FlatOutput::Format{}) << nl
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -77,20 +77,20 @@ int main(int argc, char *argv[])
|
||||
Info<< nl << "write: ";
|
||||
flatOutput(words1).write(Info) << nl;
|
||||
|
||||
Info<< nl << printFlatOutput(words1, BareComma) << nl;
|
||||
Info<< nl << printFlatOutput(words1, BareSpace) << nl;
|
||||
printFlatOutput(words1, BareComma);
|
||||
printFlatOutput(words1, BareSpace);
|
||||
|
||||
Info<< nl << printFlatOutput(words1, BraceComma) << nl;
|
||||
Info<< nl << printFlatOutput(words1, BraceSpace) << nl;
|
||||
printFlatOutput(words1, BraceComma);
|
||||
printFlatOutput(words1, BraceSpace);
|
||||
|
||||
Info<< nl << printFlatOutput(words1, ParenComma) << nl;
|
||||
Info<< nl << printFlatOutput(words1, ParenSpace) << nl;
|
||||
printFlatOutput(words1, ParenComma);
|
||||
printFlatOutput(words1, ParenSpace);
|
||||
|
||||
Info<< nl << printFlatOutput(words1, PointyComma) << nl;
|
||||
Info<< nl << printFlatOutput(words1, PointySpace) << nl;
|
||||
printFlatOutput(words1, PointyComma);
|
||||
printFlatOutput(words1, PointySpace);
|
||||
|
||||
Info<< nl << printFlatOutput(words1, SquareComma) << nl;
|
||||
Info<< nl << printFlatOutput(words1, SquareSpace) << nl;
|
||||
printFlatOutput(words1, SquareComma);
|
||||
printFlatOutput(words1, SquareSpace);
|
||||
}
|
||||
|
||||
|
||||
|
@ -126,10 +126,14 @@ int main(int argc, char *argv[])
|
||||
argList::noParallel();
|
||||
timeSelector::addOptions();
|
||||
#include "addRegionOption.H"
|
||||
#include "addDictOption.H"
|
||||
argList::addOption
|
||||
(
|
||||
"dict",
|
||||
"file",
|
||||
"Alternative particleTrackDict dictionary"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
#include "createNamedMesh.H"
|
||||
|
@ -145,7 +145,12 @@ int main(int argc, char *argv[])
|
||||
"implicit function."
|
||||
);
|
||||
|
||||
#include "addDictOption.H"
|
||||
argList::addOption
|
||||
(
|
||||
"dict",
|
||||
"file",
|
||||
"Alternative setAlphaFieldDict dictionary"
|
||||
);
|
||||
#include "addRegionOption.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
@ -7,7 +7,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -36,7 +36,7 @@ Description
|
||||
#include "fieldExprLemonParser.h"
|
||||
#include "fieldExprParser.H"
|
||||
#include "Enum.H"
|
||||
#include "macros.H"
|
||||
//#include "macros.H"
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#pragma GCC diagnostic ignored "-Wunused-const-variable"
|
||||
@ -163,7 +163,7 @@ static int driverTokenType
|
||||
|
||||
#define EMIT_TOKEN(T) \
|
||||
driver_.parsePosition() = (ts-buf); \
|
||||
DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \
|
||||
DebugInfo<< #T << " at " << driver_.parsePosition() << nl; \
|
||||
parser_->parse(TOKEN_OF(T)); \
|
||||
driver_.parsePosition() = (p-buf);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -34,7 +34,7 @@ Description
|
||||
#include "fieldExprLemonParser.h"
|
||||
#include "fieldExprParser.H"
|
||||
#include "Enum.H"
|
||||
#include "macros.H"
|
||||
//#include "macros.H"
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#pragma GCC diagnostic ignored "-Wunused-const-variable"
|
||||
@ -161,7 +161,7 @@ static int driverTokenType
|
||||
|
||||
#define EMIT_TOKEN(T) \
|
||||
driver_.parsePosition() = (ts-buf); \
|
||||
DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \
|
||||
DebugInfo<< #T << " at " << driver_.parsePosition() << nl; \
|
||||
parser_->parse(TOKEN_OF(T)); \
|
||||
driver_.parsePosition() = (p-buf);
|
||||
|
||||
|
@ -1,4 +1,9 @@
|
||||
#include "addDictOption.H"
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"dict",
|
||||
"file",
|
||||
"Read control dictionary from specified location"
|
||||
);
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"field",
|
||||
|
@ -42,8 +42,8 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef wordPairHashes_H
|
||||
#define wordPairHashes_H
|
||||
#ifndef Foam_wordPairHashes_H
|
||||
#define Foam_wordPairHashes_H
|
||||
|
||||
#include "wordPair.H"
|
||||
#include "HashSet.H"
|
@ -7,7 +7,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -36,7 +36,7 @@ Description
|
||||
#include "patchExprLemonParser.h"
|
||||
#include "patchExprParser.H"
|
||||
#include "Enum.H"
|
||||
#include "macros.H"
|
||||
//#include "macros.H"
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#pragma GCC diagnostic ignored "-Wunused-const-variable"
|
||||
@ -295,7 +295,7 @@ static int driverTokenType
|
||||
|
||||
#define EMIT_TOKEN(T) \
|
||||
driver_.parsePosition() = (ts-buf); \
|
||||
DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \
|
||||
DebugInfo<< #T << " at " << driver_.parsePosition() << nl; \
|
||||
parser_->parse(TOKEN_OF(T)); \
|
||||
driver_.parsePosition() = (p-buf);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -34,7 +34,7 @@ Description
|
||||
#include "patchExprLemonParser.h"
|
||||
#include "patchExprParser.H"
|
||||
#include "Enum.H"
|
||||
#include "macros.H"
|
||||
//#include "macros.H"
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#pragma GCC diagnostic ignored "-Wunused-const-variable"
|
||||
@ -293,7 +293,7 @@ static int driverTokenType
|
||||
|
||||
#define EMIT_TOKEN(T) \
|
||||
driver_.parsePosition() = (ts-buf); \
|
||||
DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \
|
||||
DebugInfo<< #T << " at " << driver_.parsePosition() << nl; \
|
||||
parser_->parse(TOKEN_OF(T)); \
|
||||
driver_.parsePosition() = (p-buf);
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -35,7 +35,7 @@ Description
|
||||
#include "volumeExprLemonParser.h"
|
||||
#include "volumeExprParser.H"
|
||||
#include "Enum.H"
|
||||
#include "macros.H"
|
||||
//#include "macros.H"
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#pragma GCC diagnostic ignored "-Wunused-const-variable"
|
||||
@ -314,7 +314,7 @@ static int driverTokenType
|
||||
|
||||
#define EMIT_TOKEN(T) \
|
||||
driver_.parsePosition() = (ts-buf); \
|
||||
DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \
|
||||
DebugInfo<< #T << " at " << driver_.parsePosition() << nl; \
|
||||
parser_->parse(TOKEN_OF(T)); \
|
||||
driver_.parsePosition() = (p-buf);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -33,7 +33,7 @@ Description
|
||||
#include "volumeExprLemonParser.h"
|
||||
#include "volumeExprParser.H"
|
||||
#include "Enum.H"
|
||||
#include "macros.H"
|
||||
//#include "macros.H"
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#pragma GCC diagnostic ignored "-Wunused-const-variable"
|
||||
@ -312,7 +312,7 @@ static int driverTokenType
|
||||
|
||||
#define EMIT_TOKEN(T) \
|
||||
driver_.parsePosition() = (ts-buf); \
|
||||
DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \
|
||||
DebugInfo<< #T << " at " << driver_.parsePosition() << nl; \
|
||||
parser_->parse(TOKEN_OF(T)); \
|
||||
driver_.parsePosition() = (p-buf);
|
||||
|
||||
|
@ -41,7 +41,7 @@ SourceFiles
|
||||
#include "dictionary.H"
|
||||
#include "pointField.H"
|
||||
#include "Switch.H"
|
||||
#include "wordPairHashTable.H"
|
||||
#include "wordPairHashes.H"
|
||||
#include "surfaceZonesInfo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -49,7 +49,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Class forward declarations
|
||||
// Forward Declarations
|
||||
class polyMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
@ -58,7 +58,7 @@ class polyMesh;
|
||||
|
||||
class refinementParameters
|
||||
{
|
||||
// Private data
|
||||
// Private Data
|
||||
|
||||
//- Total number of cells
|
||||
const label maxGlobalCells_;
|
||||
|
@ -1,14 +1 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Description
|
||||
Compatibility include.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef wordPairHashTable_H
|
||||
#define wordPairHashTable_H
|
||||
|
||||
#include "wordPairHashes.H"
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
#warning File removed - left for old dependency check only
|
||||
|
Loading…
Reference in New Issue
Block a user