Commit Graph

10 Commits

Author SHA1 Message Date
ccfb6e32a6 Corrected headers. 2010-06-23 16:54:54 +01:00
438a83fc81 Update experimental dictionary #calc for new Coco pragmas 2009-12-21 09:28:17 +01:00
28345f7e97 fixup #remove functionEntry and revert e15e32fdb7d515b
- forgot to use readList in removeEntry, which caused the test failure.

- remaining problem:

it doesn't work as might be expected
This is the problem:

dict
{
   foo xxx;
   bar yyy;
}

dict
{
   baz zzz;
   #remove foo
}

This only removes 'foo' from the current scope (the second dict), since
it occurs before the dictionary merge does.

To remove from the final, merged dictionary, we'd need a new
deleteEntry type that would do the right thing on the merge before
self-destructing (ie, removing itself too).
2009-12-01 13:50:51 +01:00
80a27fb9da Removed the "#remove" statements which do not appear to work. 2009-12-01 12:04:28 +00:00
0b7832e37c qualify exported FOAM_CASE
- avoid ambiguities caused by relative paths
2009-07-23 09:43:05 +02:00
4f6f570d6d versatility improvement: #includeIfPresent dictionary directive
- similar to the #include directive, but does not generate an error if the
  file does not exist.

Note: opted for an explicit naming #includeIfPresent rather than #cinclude
2009-07-21 08:44:25 +02:00
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
5e90a0ddc9 dictionary gets xfer constructor and transfer() method(s) 2009-01-02 15:50:32 +01:00
1e8d4b2a82 dictionary functionEntries cleanup
* added '#remove' function
  * changed insert() method name to more general execute()
  * using #inputMode or #remove within a primitiveEntry now provokes an error
  * adjusted the dictionaryTest accordingly
2008-06-13 10:43:31 +02:00
3170c7c0c9 Creation of OpenFOAM-dev repository 15/04/2008 2008-04-15 18:56:58 +01:00