mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
setFields: If field is not found in the current time directory look in "constant"
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -54,6 +54,7 @@ bool setCellFieldType
|
|||||||
|
|
||||||
word fieldName(fieldValueStream);
|
word fieldName(fieldValueStream);
|
||||||
|
|
||||||
|
// Check the current time directory
|
||||||
IOobject fieldHeader
|
IOobject fieldHeader
|
||||||
(
|
(
|
||||||
fieldName,
|
fieldName,
|
||||||
@ -62,6 +63,18 @@ bool setCellFieldType
|
|||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Check the "constant" directory
|
||||||
|
if (!fieldHeader.headerOk())
|
||||||
|
{
|
||||||
|
fieldHeader = IOobject
|
||||||
|
(
|
||||||
|
fieldName,
|
||||||
|
mesh.time().constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Check field exists
|
// Check field exists
|
||||||
if (fieldHeader.headerOk())
|
if (fieldHeader.headerOk())
|
||||||
{
|
{
|
||||||
@ -193,6 +206,7 @@ bool setFaceFieldType
|
|||||||
|
|
||||||
word fieldName(fieldValueStream);
|
word fieldName(fieldValueStream);
|
||||||
|
|
||||||
|
// Check the current time directory
|
||||||
IOobject fieldHeader
|
IOobject fieldHeader
|
||||||
(
|
(
|
||||||
fieldName,
|
fieldName,
|
||||||
@ -201,6 +215,18 @@ bool setFaceFieldType
|
|||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Check the "constant" directory
|
||||||
|
if (!fieldHeader.headerOk())
|
||||||
|
{
|
||||||
|
fieldHeader = IOobject
|
||||||
|
(
|
||||||
|
fieldName,
|
||||||
|
mesh.time().constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Check field exists
|
// Check field exists
|
||||||
if (fieldHeader.headerOk())
|
if (fieldHeader.headerOk())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user