mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
fvOptions: Support reading the fvOptions file from constant or system directories
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,7 +37,7 @@ Foam::IOobject Foam::fv::IOoptionList::createIOobject
|
||||
IOobject io
|
||||
(
|
||||
"fvOptions",
|
||||
mesh.time().system(),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
@ -45,7 +45,22 @@ Foam::IOobject Foam::fv::IOoptionList::createIOobject
|
||||
|
||||
if (io.headerOk())
|
||||
{
|
||||
Info<< "Creating finite volume options from " << io.name() << nl
|
||||
Info<< "Creating finite volume options from "
|
||||
<< io.instance()/io.name() << nl
|
||||
<< endl;
|
||||
|
||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
||||
return io;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if the fvOptions file is in system
|
||||
io.instance() = mesh.time().system();
|
||||
|
||||
if (io.headerOk())
|
||||
{
|
||||
Info<< "Creating finite volume options from "
|
||||
<< io.instance()/io.name() << nl
|
||||
<< endl;
|
||||
|
||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
||||
@ -58,6 +73,7 @@ Foam::IOobject Foam::fv::IOoptionList::createIOobject
|
||||
io.readOpt() = IOobject::NO_READ;
|
||||
return io;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user