1. 21 Feb, 2019 1 commit
  2. 13 Feb, 2019 1 commit
  3. 07 Jan, 2019 1 commit
  4. 03 Jan, 2019 1 commit
    • Mark Olesen's avatar
      ENH: additional read guards for dimensionedType. input consistency (#762, #1148) · 6a448016
      Mark Olesen authored
      - provide a lookupOrDefault constructor form, since this is a fairly
        commonly used requirement and simplifies the calling sequence.
      
        Before
      
            dimensionedScalar rhoMax
            (
                dimensionedScalar::lookupOrDefault
                (
                    "rhoMax",
                    pimple.dict(),
                    dimDensity,
                    GREAT
                )
           );
      
        After
      
            dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());
      
      - read, readIfPresent methods with alternative lookup names.
      
      - Mark the Istream related constructors with compile-time deprecated
        warnings.
      
      BUG: read, readIfPresent methods not handling optional dimensions (#1148)
      6a448016
  5. 20 Nov, 2018 1 commit
    • Mark Olesen's avatar
      ENH: add read guard for dimensionedType constructors (#762) · dd87c983
      Mark Olesen authored
      - deprecate dimensionedType constructors using an Istream in favour of
        versions accepting a keyword and a dictionary.
      
        Dictionary entries are almost the exclusive means of read
        constructing a dimensionedType. By construct from the dictionary
        entry instead of doing a lookup() first, we can detect possible
        input errors such as too many tokens as a result of a input syntax
        error.
      
        Constructing a dimensionedType from a dictionary entry now has
        two forms.
      
        1.  dimensionedType(key, dims, dict);
      
            This is the constructor that will normally be used.
      
            It accepts entries with optional leading names and/or
            dimensions. If the entry contains dimensions, they are
            verified against the expected dimensions and an IOError is
            raised if they do not correspond. On conclusion, checks the
            token stream for any trailing rubbish.
      
        2.  dimensionedType(key, dict);
      
            This constructor is used less frequently.
      
            ...
      dd87c983
  6. 12 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: avoid readScalar, readLabel etc from dictionary (#762, #1033) · 8eddcc07
      Mark Olesen authored
      - use the dictionary 'get' methods instead of readScalar for
        additional checking
      
           Unchecked:  readScalar(dict.lookup("key"));
           Checked:    dict.get<scalar>("key");
      
      - In templated classes that also inherit from a dictionary, an additional
        'template' keyword will be required. Eg,
      
           this->coeffsDict().template get<scalar>("key");
      
        For this common use case, the predefined getXXX shortcuts may be
        useful. Eg,
      
           this->coeffsDict().getScalar("key");
      8eddcc07
  7. 05 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: use dictionary::readEntry for detection of input errors (#762, #1033) · 13778f76
      Mark Olesen authored
      - instead of   dict.lookup(name) >> val;
        can use      dict.readEntry(name, val);
      
        for checking of input token sizes.
        This helps catch certain types of input errors:
      
        {
      
            key1 ;                // <- Missing value
            key2 1234             // <- Missing ';' terminator
            key3 val;
        }
      
      STYLE: readIfPresent() instead of 'if found ...' in a few more places.
      13778f76
  8. 30 May, 2018 1 commit
  9. 28 Mar, 2018 1 commit
  10. 21 Mar, 2018 1 commit
  11. 16 Mar, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: more consistent use of dimensioned Zero · 2f86cdc7
      Mark Olesen authored
      - when constructing dimensioned fields that are to be zero-initialized,
        it is preferrable to use a form such as
      
            dimensionedScalar(dims, Zero)
            dimensionedVector(dims, Zero)
      
        rather than
      
            dimensionedScalar("0", dims, 0)
            dimensionedVector("zero", dims, vector::zero)
      
        This reduces clutter and also avoids any suggestion that the name of
        the dimensioned quantity has any influence on the field's name.
      
        An even shorter version is possible. Eg,
      
            dimensionedScalar(dims)
      
        but reduces the clarity of meaning.
      
      - NB: UniformDimensionedField is an exception to these style changes
        since it does use the name of the dimensioned type (instead of the
        regIOobject).
      2f86cdc7
  12. 07 Nov, 2017 2 commits
  13. 13 Jul, 2018 1 commit
  14. 14 May, 2018 1 commit
  15. 11 May, 2018 1 commit
  16. 19 Jul, 2017 1 commit