mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: glboal file handling: initial commit
Moved file path handling to regIOobject and made it type specific so now every object can have its own rules. Examples: - faceZones are now processor local (and don't search up anymore) - timeStampMaster is now no longer hardcoded inside IOdictionary (e.g. uniformDimensionedFields support it as well) - the distributedTriSurfaceMesh is properly processor-local; no need for fileModificationChecking manipulation.
This commit is contained in:
@ -293,27 +293,9 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions
|
||||
const word& cloudName
|
||||
) const
|
||||
{
|
||||
(void)srcMesh_.tetBasePtIs();
|
||||
(void)tgtMesh_.tetBasePtIs();
|
||||
|
||||
// Temporarily: override master-only checking
|
||||
regIOobject::fileCheckTypes oldCheckType =
|
||||
regIOobject::fileModificationChecking;
|
||||
|
||||
if (oldCheckType == regIOobject::timeStampMaster)
|
||||
{
|
||||
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
||||
}
|
||||
else if (oldCheckType == regIOobject::inotifyMaster)
|
||||
{
|
||||
regIOobject::fileModificationChecking = regIOobject::inotify;
|
||||
}
|
||||
|
||||
// Load cloud and send particle
|
||||
passiveParticleCloud lpi(srcMesh_, cloudName, false);
|
||||
|
||||
regIOobject::fileModificationChecking = oldCheckType;
|
||||
|
||||
return redistributeLagrangianPositions(lpi);
|
||||
}
|
||||
|
||||
|
||||
@ -1440,7 +1440,7 @@ void readProcAddressing
|
||||
// mesh,
|
||||
// IOobject::MUST_READ
|
||||
//);
|
||||
//if (io.headerOk())
|
||||
//if (io.typeHeaderOk<labelIOList>(true))
|
||||
//{
|
||||
// Pout<< "Reading addressing from " << io.name() << " at "
|
||||
// << mesh.facesInstance() << nl << endl;
|
||||
@ -1793,28 +1793,12 @@ void readLagrangian
|
||||
|
||||
forAll(cloudNames, i)
|
||||
{
|
||||
{
|
||||
// Note: disable master-only reading of uniform/cloudProperties
|
||||
regIOobject::fileCheckTypes oldCheckType =
|
||||
regIOobject::fileModificationChecking;
|
||||
|
||||
if (oldCheckType == regIOobject::timeStampMaster)
|
||||
{
|
||||
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
||||
}
|
||||
else if (oldCheckType == regIOobject::inotifyMaster)
|
||||
{
|
||||
regIOobject::fileModificationChecking = regIOobject::inotify;
|
||||
}
|
||||
|
||||
clouds.set
|
||||
(
|
||||
i,
|
||||
new unmappedPassiveParticleCloud(mesh, cloudNames[i], false)
|
||||
);
|
||||
|
||||
regIOobject::fileModificationChecking = oldCheckType;
|
||||
}
|
||||
//Pout<< "Loading cloud " << cloudNames[i] << endl;
|
||||
clouds.set
|
||||
(
|
||||
i,
|
||||
new unmappedPassiveParticleCloud(mesh, cloudNames[i], false)
|
||||
);
|
||||
|
||||
|
||||
//forAllConstIter
|
||||
@ -2441,7 +2425,7 @@ int main(int argc, char *argv[])
|
||||
meshSubDir,
|
||||
runTime,
|
||||
IOobject::READ_IF_PRESENT
|
||||
).headerOk();
|
||||
).typeHeaderOk<labelIOList>(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user