Skip to content
Snippets Groups Projects
Commit fa851dde authored by graham's avatar graham
Browse files

BUG: incompressibleUncoupledKinematicParcelFoam. Using headerOk to

exclude H and HdotGradH fields from being read if not present.
parent 35763926
Branches
Tags
No related merge requests found
......@@ -84,30 +84,34 @@
g
);
Info<< "\nReading field H\n" << endl;
volVectorField H
IOobject Hheader
(
IOobject
(
"H",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh
"H",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
);
Info<< "\nReading field HdotGradH\n" << endl;
volVectorField HdotGradH
if (Hheader.headerOk())
{
Info<< "\nReading field H\n" << endl;
volVectorField H(Hheader, mesh);
}
IOobject HdotGradHheader
(
IOobject
(
"HdotGradH",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh
"HdotGradH",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
);
if (HdotGradHheader.headerOk())
{
Info<< "\nReading field HdotGradH\n" << endl;
volVectorField HdotGradH(HdotGradHheader, mesh);
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment