View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001034 | OpenFOAM | Bug | public | 2013-10-03 08:00 | 2013-10-03 10:45 |
Reporter | Assigned To | henry | |||
Priority | low | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | SUSE Linux Enterprise Server 11 | OS Version | 11.1 |
Summary | 0001034: READ_IF_PRESENT incompatible with wildcard entries for boundary field | ||||
Description | IOobject::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 Reproduce | Use 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. | ||||
Tags | No tags attached. | ||||