Files
openfoam/applications/test/dictionary/testDict2
Mark Olesen 6e10b0defd adjusted dictionary #inputMode directive
- #inputMode error
  now issues a FatalError on duplicate entries

- #inputMode warn
  issues a warning on duplicate entries, corresponds to the
  old behaviour of 'error'

- #inputMode protect
  prevents overwriting existing entries

The 'protect' mode provides a simple mechanism for supplying default values.
eg,
    in file1:
        #inputMode  protect
        intensity       0.1;
        mixingLength    0.005;
        #inputMode  merge

        inlet
        {
            type        turbulentIntensityKineticEnergyInlet;
            intensity   $intensity;
        }

    which is included from file2:

        intensity   0.05;
        #include    "file1"
2009-05-05 13:18:29 +02:00

30 lines
1.0 KiB
C++

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: Any |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object testDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
boundaryField
{
Default_Boundary_Region
{
value $internalField;
note "actually a noslip wall";
}
inlet_3 "a primitiveEntry squashes directory entry";
}
#inputMode overwrite
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //