mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: make polyMesh constructor explicit
- use polyMesh::defaultRegion instead of fvMesh::defaultRegion and others via static inheritance. (92 vs ~25 occurrences)
This commit is contained in:
@ -33,7 +33,7 @@ Foam::fvMesh mesh
|
||||
(
|
||||
Foam::IOobject
|
||||
(
|
||||
Foam::fvMesh::defaultRegion,
|
||||
Foam::polyMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017, 2020 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -325,7 +325,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Read construct from IOobject
|
||||
polyMesh(const IOobject& io, const bool doInit = true);
|
||||
explicit polyMesh(const IOobject& io, const bool doInit = true);
|
||||
|
||||
//- Construct from IOobject or as zero-sized mesh
|
||||
// Boundary is added using addPatches() member function
|
||||
|
||||
@ -154,7 +154,7 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
dynamicFvMesh::defaultRegion,
|
||||
polyMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
IOobject::MUST_READ
|
||||
@ -168,7 +168,7 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
dynamicFvMesh::defaultRegion,
|
||||
polyMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
IOobject::MUST_READ
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Foam::word regionName = Foam::fvMesh::defaultRegion;
|
||||
Foam::word regionName = Foam::polyMesh::defaultRegion;
|
||||
|
||||
if (args.readIfPresent("region", regionName))
|
||||
{
|
||||
|
||||
@ -1756,7 +1756,7 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshDistribute::receiveMesh
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
fvMesh::defaultRegion,
|
||||
polyMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
IOobject::NO_READ
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
engineMesh::defaultRegion,
|
||||
polyMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
Foam::IOobject::MUST_READ
|
||||
|
||||
@ -103,7 +103,7 @@ bool Foam::simplifiedMeshes::columnFvMeshInfo::setPatchEntries
|
||||
(
|
||||
runTime,
|
||||
runTime.timeName(),
|
||||
(regionName_ == fvMesh::defaultRegion ? "" : regionName_)
|
||||
(regionName_ == polyMesh::defaultRegion ? "" : regionName_)
|
||||
);
|
||||
|
||||
if (objects.empty())
|
||||
@ -411,7 +411,7 @@ Foam::simplifiedMeshes::columnFvMeshInfo::columnFvMeshInfo
|
||||
regionName_(regionName),
|
||||
regionPrefix_
|
||||
(
|
||||
regionName_ == fvMesh::defaultRegion
|
||||
regionName_ == polyMesh::defaultRegion
|
||||
? ""
|
||||
: regionName_ + '/'
|
||||
),
|
||||
|
||||
@ -149,7 +149,7 @@ public:
|
||||
columnFvMesh
|
||||
(
|
||||
const Time& runTime,
|
||||
const word& regionName = fvMesh::defaultRegion
|
||||
const word& regionName = polyMesh::defaultRegion
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -663,7 +663,7 @@ bool Foam::functionObjects::streamLineBase::writeToFile()
|
||||
(
|
||||
time_.globalPath()/functionObject::outputPrefix/"sets"/name()
|
||||
);
|
||||
if (mesh_.name() != fvMesh::defaultRegion)
|
||||
if (mesh_.name() != polyMesh::defaultRegion)
|
||||
{
|
||||
vtkPath = vtkPath/mesh_.name();
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ Foam::sampledSets::sampledSets
|
||||
mesh_.time().globalPath()/functionObject::outputPrefix/name
|
||||
);
|
||||
|
||||
if (mesh_.name() != fvMesh::defaultRegion)
|
||||
if (mesh_.name() != polyMesh::defaultRegion)
|
||||
{
|
||||
outputPath_ = outputPath_/mesh_.name();
|
||||
}
|
||||
@ -137,7 +137,7 @@ Foam::sampledSets::sampledSets
|
||||
mesh_.time().globalPath()/functionObject::outputPrefix/name
|
||||
);
|
||||
|
||||
if (mesh_.name() != fvMesh::defaultRegion)
|
||||
if (mesh_.name() != polyMesh::defaultRegion)
|
||||
{
|
||||
outputPath_ = outputPath_/mesh_.name();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user