Compare commits
4 Commits
rpmbuild-1
...
issue-1946
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f50e60556 | |||
| 249314c0ea | |||
| fe1fe09ef3 | |||
| de55ada95d |
@ -2,8 +2,11 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -264,24 +267,81 @@ Foam::fileOperation::lookupAndCacheProcessorsPath
|
||||
return iter();
|
||||
}
|
||||
|
||||
DynamicList<dirIndex> procDirs;
|
||||
fileNameList dirEntries;
|
||||
|
||||
// Fast path for UNCOLLATED
|
||||
if
|
||||
(
|
||||
!syncPar
|
||||
&& numProcs == -1
|
||||
&& procPath.type(true) == fileName::Type::DIRECTORY
|
||||
)
|
||||
{
|
||||
// Found "processorDDD"
|
||||
dirEntries.resize(1);
|
||||
dirEntries.first() = pDir;
|
||||
}
|
||||
|
||||
// Read all directories to see any beginning with processor
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
DynamicList<dirIndex> procDirs;
|
||||
|
||||
// Note: use parallel synchronised reading so cache will be same
|
||||
// order on all processors
|
||||
fileNameList dirNames(readDir(path, fileName::Type::DIRECTORY));
|
||||
|
||||
const bool readDirMasterOnly
|
||||
(
|
||||
regIOobject::fileModificationChecking == IOobject::timeStampMaster
|
||||
|| regIOobject::fileModificationChecking == IOobject::inotifyMaster
|
||||
);
|
||||
|
||||
// As byproduct of the above selection, we exclude masterUncollated
|
||||
// from using read/send, but that doesn't matter since that is what
|
||||
// its own internals for readDir() do anyhow.
|
||||
|
||||
if (!dirEntries.empty())
|
||||
{
|
||||
// Fast-path invoked, skip readDir
|
||||
}
|
||||
else if (readDirMasterOnly && Pstream::parRun() /* && !distributed() */)
|
||||
{
|
||||
// Non-distributed.
|
||||
// Read on master only and send to subProcs
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
dirEntries = Foam::readDir(path, fileName::Type::DIRECTORY);
|
||||
|
||||
DebugInfo
|
||||
<< "readDir on master: send " << dirEntries.size()
|
||||
<< " names to sub-processes" << endl;
|
||||
}
|
||||
|
||||
Pstream::scatter(dirEntries, Pstream::msgType(), comm_);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Serial or distributed roots.
|
||||
// Handle readDir() with virtual method
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "readDir without special master/send treatment"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
dirEntries = readDir(path, fileName::Type::DIRECTORY);
|
||||
}
|
||||
|
||||
|
||||
// Extract info from processorsDDD or processorDDD:
|
||||
// - highest processor number
|
||||
// - directory+offset containing data for proci
|
||||
label maxProc = -1;
|
||||
|
||||
forAll(dirNames, i)
|
||||
for (const fileName& dirN : dirEntries)
|
||||
{
|
||||
const fileName& dirN = dirNames[i];
|
||||
|
||||
// Analyse directory name
|
||||
fileName rp, rd, rl;
|
||||
label rStart, rSize, rNum;
|
||||
|
||||
@ -152,7 +152,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
@ -178,7 +178,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
@ -191,7 +191,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
@ -204,7 +204,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
@ -217,7 +217,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,8 +2,11 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -70,7 +73,7 @@ void Foam::solidProperties::readIfPresent(const dictionary& dict)
|
||||
dict.readIfPresent("rho", rho_);
|
||||
dict.readIfPresent("Cp", Cp_);
|
||||
dict.readIfPresentCompat("kappa", {{"K", 1612}}, kappa_);
|
||||
dict.readIfPresent("Hf_", Hf_);
|
||||
dict.readIfPresent("Hf", Hf_);
|
||||
dict.readIfPresent("emissivity", emissivity_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user