View Issue Details

IDProjectCategoryView StatusLast Update
0002942OpenFOAMContributionpublic2018-05-17 19:53
Reportertoliveira Assigned Tohenry  
PrioritylowSeveritytextReproducibilityalways
Status closedResolutionno change required 
PlatformGNU/LinuxOSUbuntuOS Version16.04
Summary0002942: Unclear error message if keyword not found due to Foam::IOobject::NO_READ
DescriptionIf the programmer inadvertently sets a fvMesh readOption as Foam::IOobject::NO_READ and then tries to construct a simpleControl passing this fvMesh as the argument, they receive the error:
   keyword SIMPLE is undefined in dictionary "/home/user/pitzDaily/system/fvSolution"
even though the keyword SIMPLE is defined in the file.

This error message does not correctly describes the problem and can mislead the programmer about their mistake.
Steps To Reproduce1 - In applications/solvers/incompressible/simpleFoam/simpleFoam.C, change Foam::fvMesh mesh's readOption from Foam::IOobject::MUST_READ to Foam::IOobject::NO_READ.
2 - recompile simpleFoam
3 - run it on tutorials/incompressible/simpleFoam/pitzDaily
Additional InformationI would suggest that the error message inform that the dictionary was not read because of the fvMesh readOption, if easy to implement.
TagsNo tags attached.

Activities

henry

2018-05-17 19:49

manager   ~0009599

It is not possible to run simpleFoam without reading the mesh so I would advise that you do not set the construction to NO_READ.

I do not see how you want your proposed change to work or why and your contribution is not attached to us to study.

henry

2018-05-17 19:53

manager   ~0009600

I don't think there is any need adding this kind of complexity of diagnostics to handle this extremely unusual case which does not cause a crash. I suggest that you do not set NO_READ for the mesh read constructor.

Issue History

Date Modified Username Field Change
2018-05-17 18:59 toliveira New Issue
2018-05-17 19:49 henry Note Added: 0009599
2018-05-17 19:53 henry Assigned To => henry
2018-05-17 19:53 henry Status new => closed
2018-05-17 19:53 henry Resolution open => no change required
2018-05-17 19:53 henry Note Added: 0009600