1. 31 Jan, 2019 1 commit
  2. 25 Jan, 2019 1 commit
  3. 21 Jan, 2019 1 commit
  4. 10 Jan, 2019 1 commit
    • Mark Olesen's avatar
      BUG: incorrect dimensions for surfaceTensionForce · 25559af1
      Mark Olesen authored
      - accidentally introduced by 59ae80c5
      
      STYLE: trial use of brace-initialized dimensionSet
      
      - instead of writing
      
            dimensionedScalar(dimensionSet(1, -2, -2, 0, 0, 0), Zero);
      
        we can use C++11 brace-initialization to bundle the parameters
        for the dimensionSet construction and simply write
      
            dimensionedScalar({1, -2, -2, 0, 0, 0}, Zero);
      
        Note the following is incorrect syntax (extra brackets):
      
            dimensionedScalar(({1, -2, -2, 0, 0, 0}), Zero);
      25559af1
  5. 09 Jan, 2019 2 commits
  6. 07 Jan, 2019 4 commits
  7. 21 Dec, 2018 1 commit
    • Mark Olesen's avatar
      ENH: use Zero when zero-initializing types · e23bd3bb
      Mark Olesen authored
      - makes the intent clearer and avoids the need for additional
        constructor casting. Eg,
      
            labelList(10, Zero)    vs.  labelList(10, 0)
            scalarField(10, Zero)  vs.  scalarField(10, scalar(0))
            vectorField(10, Zero)  vs.  vectorField(10, vector::zero)
      e23bd3bb
  8. 13 Dec, 2018 1 commit
    • Mark Olesen's avatar
      ENH: consolidate handling of mandatory/optional command arguments · 4aeb97b5
      Mark Olesen authored
      - for some special cases we wish to mark command-line arguments as
        being optional, in order to do our own treatment. For example,
        when an arbitrary number of arguments should be allowed.
      
        Now tag this situation with argList::noMandatoryArgs().
        The argList::argsMandatory() query can then be used in any further
        logic, including the standard default argument checking.
      
      - with the new default check, can consolidate the special-purpose
      
            "setRootCaseNonMandatoryArgs.H"
      
        into the regular
      
            "setRootCase.H"
      
      - revert to a simple "setRootCase.H" and move all the listing related
        bits to a "setRootCaseLists.H" file. This leaves the information
        available for solvers, or whoever else wishes, without being
        introduced everywhere.
      
      - add include guards and scoping to the listing files and rename to
        something less generic.
      
           listOptions.H -> setRootCaseListOptions.H
           listOutput.H  -> setRootCaseListOutput.H
      4aeb97b5
  9. 11 Dec, 2018 1 commit
  10. 07 Dec, 2018 1 commit
  11. 26 Nov, 2018 1 commit
  12. 20 Nov, 2018 1 commit
    • Mark Olesen's avatar
      ENH: add read guard for dimensionedType constructors (#762) · 1cc0e66f
      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.
      
            Similar to the previous description, except that it is initially
            dimensionless. If entry contains dimensions, they are used
            without further verification. The constructor also includes a
            token stream check.
      
            This constructor is useful when the dimensions are entirely
            defined from the dictionary input, but also when handling
            transition code where the input dimensions are not obvious from
            the source.
      
            This constructor can also be handy when obtaining values from
            a dictionary without needing to worry about the input dimensions.
            For example,
      
               Info<< "rho: " << dimensionedScalar("rho", dict).value() << nl;
      
            This will accept a large range of inputs without hassle.
      
      ENH: consistent handling of dimensionedType for inputs (#1083)
      
      BUG: incorrect Omega dimensions (fixes #2084)
      1cc0e66f
  13. 04 Nov, 2018 1 commit
  14. 01 Nov, 2018 1 commit
  15. 19 Oct, 2018 3 commits
    • Mark Olesen's avatar
      STYLE: use range-for when looping dictionary entries. · 28b3ae77
      Mark Olesen authored
      - as part of the cleanup of dictionary access methods (489b778b)
        made the dictionary class single inheritance from IDLList<entry>.
      
        This eliminates any ambiguities for iterators and allows
        for simple use of range-for looping.
      
        Eg,
            for (const entry& e : topDict))
            {
                Info<< "entry:" << e.keyword() << " is dict:" << e.isDict() << nl;
            }
      
         vs
      
            forAllConstIter(dictionary, topDict, iter))
            {
                Info<< "entry:" << iter().keyword()
                    << " is dict:" << iter().isDict() << nl;
            }
      28b3ae77
    • Mark Olesen's avatar
    • Mark Olesen's avatar
      ENH: cleanup of Enum class · 9fd7e9fc
      Mark Olesen authored
      - more dictionary-like methods, enforce keyType::LITERAL for all
        lookups to avoid any spurious keyword matching.
      
      - new readEntry, readIfPresent methods
      
      - The get() method replaces the now deprecate lookup() method.
      
      - Deprecate lookupOrFailsafe()
        Failsafe behaviour is now an optional parameter for lookupOrDefault,
        which makes it easier to tailor behaviour at runtime.
      
      - output of the names is now always flatted without line-breaks.
        Thus,
      
           os << flatOutput(someEnumNames.names()) << nl;
           os << someEnumNames << nl;
      
        both generate the same output.
      
      - Constructor now uses C-string (const char*) directly instead of
        Foam::word in its initializer_list.
      
      - Remove special enum + initializer_list constructor form since
        it can create unbounded lookup indices.
      
      - Removd old hasEnum, hasName forms that were provided during initial
        transition from NamedEnum.
      
      - Added static_assert on Enum contents to restrict to enum or
        integral values.  Should not likely be using ...
      9fd7e9fc
  16. 17 Oct, 2018 2 commits
    • sergio's avatar
      ENH: · 3d4cb235
      sergio authored
      Update of overRhoPimpleDyMFoam and overInterDyMFoam solvers.
      Adding corresponding tutorials with best possible settings
      The main effort was put on reducing pressure spikes as the
      stencil change with hole cells on the background mesh.
      3d4cb235
    • Mark Olesen's avatar
      ENH: simplify objectRegistry access names (issue #322) · 3a3e954b
      Mark Olesen authored
        New name:  findObject(), cfindObject()
        Old name:  lookupObjectPtr()
      
            Return a const pointer or nullptr on failure.
      
        New name:  findObject()
        Old name:  --
      
            Return a non-const pointer or nullptr on failure.
      
        New name:  getObjectPtr()
        Old name:  lookupObjectRefPtr()
      
            Return a non-const pointer or nullptr on failure.
            Can be called on a const object and it will perform a
            const_cast.
      
      - use these updated names and functionality in more places
      
      NB: The older methods names are deprecated, but continue to be defined.
      3a3e954b
  17. 16 Oct, 2018 1 commit
  18. 12 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: avoid readScalar, readLabel etc from dictionary (#762, #1033) · efe02691
      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");
      efe02691
  19. 05 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: use dictionary::readEntry for detection of input errors (#762, #1033) · 392ef54c
      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.
      392ef54c
  20. 11 Sep, 2018 1 commit
  21. 27 Aug, 2018 2 commits
    • Will Bainbridge's avatar
      fileHandler: Added flush method · c985887b
      Will Bainbridge authored
      This method waits until all the threads have completed IO operations and
      then clears any cached information about the files on disk. This
      replaces the deactivation of threading by means of zeroing the buffer
      size when writing and reading of a file happen in sequence. It also
      allows paraFoam to update the list of available times.
      
      Patch contributed by Mattijs Janssens
      Resolves bug report https://bugs.openfoam.org/view.php?id=2962
      c985887b
    • Will Bainbridge's avatar
      twoPhaseMixtureThermo: Fix for collated file operation · da9c92ac
      Will Bainbridge authored
      twoPhaseMixtureThermo writes the temperatures during construction only
      for them to be read again immediately after by construction of the
      individual phases' thermo models. When running with collated file
      handling this behaviour is not thread safe. This change deactivates
      threading for the duration of this behaviour.
      
      Patch contributed by Mattijs Janssens
      da9c92ac
  22. 13 Aug, 2018 1 commit
  23. 09 Aug, 2018 1 commit
    • Mark Olesen's avatar
      ENH: add missing Hash function for List/UList (issue #966) · 10029b20
      Mark Olesen authored
      - there were previously no hashing mechanisms for lists so they
        would fall back to the definition for primitives and hash the
        memory location of the allocated List object.
      
      - provide a UList::Hash<> sub-class for inheritance, and also a global
        specialization for UList<T>, List<T> such that the hash value for
        List<List<T>> cascades properly.
      
      - provide similar function in triFace to ensure that it remains
        similar in behaviour to face.
      
      - added SymmHash to Pair, for use when order is unimportant.
      
      STYLE: use string::hash() more consistently
      
      - no particular reason to use Hash<word>() which forwards to
        string::hash() anyhow
      10029b20
  24. 31 Jul, 2018 1 commit
  25. 30 Jul, 2018 1 commit
  26. 24 Jul, 2018 1 commit
  27. 20 Jul, 2018 2 commits
  28. 13 Jul, 2018 1 commit
  29. 11 Jul, 2018 1 commit
  30. 05 Jul, 2018 1 commit
    • Mark Olesen's avatar
      ENH: improve controls for Time (issue #910) · 1fe7a4f5
      Mark Olesen authored
      - relocate some standard functionality to TimePaths to allow a lighter
        means of managing time directories without using the entire Time
        mechanism.
      
      - optional enableLibs for Time construction (default is on)
        and a corresponding argList::noLibs() and "-no-libs" option
      
      STYLE:
      
      - mark Time::outputTime() as deprecated MAY-2016
      
      - use pre-increment for runTime, although there is no difference in
        behaviour or performance.
      1fe7a4f5
  31. 25 Jun, 2018 1 commit