Commit Graph

9 Commits

Author SHA1 Message Date
fb724ce113 MRG: Integrated Foundation code to commit 9f37c3c 2017-03-31 15:34:28 +01:00
04c3d535b0 MRG: Integrated Foundation code to commit 47bd8e1 2017-03-23 10:12:38 +00:00
2e2bfd237a Function1: Rationalized construction to support the simpler sub-dictionary format
e.g.
    ramp
    {
        type     quadratic;
        start    200;
        duration 1.6;
    }

but the old format is supported for backward compatibility:

    ramp linear;
    rampCoeffs
    {
        start    200;
        duration 1.6;
    }
2017-03-16 20:53:08 +00:00
126125c185 Rationalized the keyword to specify a file name in a dictionary to 'file'
e.g. in tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/T

    hot
    {
        type            externalCoupledTemperature;
        commsDir        "${FOAM_CASE}/comms";
        file            "data";
        initByExternal  yes;
        log             true;
        value           uniform 307.75; // 34.6 degC
    }

Previously both 'file' and 'fileName' were used inconsistently in different
classes and given that there is no confusion or ambiguity introduced by using
the simpler 'file' rather than 'fileName' this change simplifies the use and
maintenance of OpenFOAM.
2017-01-07 09:38:54 +00:00
00174405c6 ENH: noiseModels - enable models to accept lists of file names 2016-11-24 21:31:08 +00:00
06f22a9bf3 ENH: cleanup Ostream to ease usage (issue #254)
- Include newline in beginBlock/endBlock, since this corresponds to
  the standard usage. The beginBlock now takes keyType instead of word.

- Provide Ostream::writeEntry method to reduce clutter and simplify
  writing of entries.

  Before
  ======
      os << indent << "name" << nl
         << indent << token::BEGIN_BLOCK << incrIndent << nl;
      os.writeKeyword("key1") << val1 << token::END_STATEMENT << nl;
      os.writeKeyword("key2") << val2 << token::END_STATEMENT << nl;
      os << decrIndent << indent << token::END_BLOCK << nl;

  After
  =====
      os.beginBlock("name");
      os.writeEntry("key1", val1);
      os.writeEntry("key2", val2);
      os.endBlock();

- For completeness, support inline use of various Ostream methods.
  For example,

      os << beginBlock;
      os.writeEntry("key1", val1);
      os.writeEntry("key2", val2);
      os << endBlock;

- For those who wish to write in long form, can also use endEntry inline:

      os.beginBlock("name");
      os.writeKeyword("key1") << val2 << endEntry;
      os.writeKeyword("key2") << val2 << endEntry;
      os.endBlock();

The endEntry encapsulates a semi-colon, newline combination.
2016-06-06 11:51:05 +01:00
69fde6b831 ENH: provide Ostream virtual methods beginBlock, endBlock (fixes #112)
- eases creation of dictionary-like output.

- make keyWord() method virtual to allow adaptation for alternative
  outputs
2016-04-15 11:04:13 +02:00
d9c7c671d6 Function1: Simplified files 2016-02-10 09:43:45 +00:00
968c888fc4 Rename DataEntry -> Function1
Function1 is an abstract base-class of run-time selectable unary
functions which may be composed of other Function1's allowing the user
to specify complex functions of a single scalar variable, e.g. time.
The implementations need not be a simple or continuous functions;
interpolated tables and polynomials are also supported.  In fact form of
mapping between a single scalar input and a single primitive type output
is supportable.

The primary application of Function1 is in time-varying boundary
conditions, it also used for other functions of time, e.g. injected mass
is spray simulations but is not limited to functions of time.
2016-02-08 16:18:07 +00:00