View Issue Details

IDProjectCategoryView StatusLast Update
0001034OpenFOAMBugpublic2013-10-03 10:45
Reporteruser528Assigned Tohenry  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSSUSE Linux Enterprise Server 11 OS Version11.1
Summary0001034: READ_IF_PRESENT incompatible with wildcard entries for boundary field
DescriptionIOobject::READ_IF_PRESENT is incompatible with specifying boundary field as wildcard entries in a dictionary. This seems to come from the fact that in Foam::GeometricField::GeometricBoundaryField::readField() wild-card entries are considered only if the corresponding patch field was not set yet, but in case of READ_IF_PRESENT all patch fields have been set before read of the field.
Steps To ReproduceUse simple code:
=======
#include "fvCFD.H"
int main(int argc, char *argv[])
{
    #include "setRootCase.H"
    #include "createTime.H"
    #include "createMesh.H"

    volScalarField test
    (
        IOobject
        (
            "test",
            runTime.timeName(),
            mesh,
            IOobject::READ_IF_PRESENT,
            IOobject::AUTO_WRITE
        ),
        mesh,
        dimensionedScalar("0",dimless,0)
    );
    Info << test << endl;
    return 0;
}
========
Create a standard case with a simple mesh and set "0/test" file to
========
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version 2.0;
    format ascii;
    class volScalarField;
    location "0";
    object scalarField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 1;

boundaryField
{
   "(.*)" {
       type fixedValue;
       value 1;
   }
}
==========
Run the code and notice that the boundary field has not been properly set.
TagsNo tags attached.

Activities

henry

2013-10-03 10:45

manager   ~0002530

Thanks for the detailed bug-report.
Resolved by commit 2898b36671ecc1a96612f34caa39590a8256cd32

Issue History

Date Modified Username Field Change
2013-10-03 08:00 user528 New Issue
2013-10-03 10:45 henry Note Added: 0002530
2013-10-03 10:45 henry Status new => resolved
2013-10-03 10:45 henry Resolution open => fixed
2013-10-03 10:45 henry Assigned To => henry