BUG: Mach.C: file check

This commit is contained in:
mattijs
2011-03-14 10:23:24 +00:00
parent a16bf9e85f
commit 550b84739a

View File

@ -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) 2004-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -63,7 +63,15 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
volVectorField U(Uheader, mesh); volVectorField U(Uheader, mesh);
if (isFile(runTime.constantPath()/"thermophysicalProperties")) if
(
IOobject
(
"thermophysicalProperties",
runTime.constant(),
mesh
).headerOk()
)
{ {
// thermophysical Mach // thermophysical Mach
autoPtr<basicPsiThermo> thermo autoPtr<basicPsiThermo> thermo