Skip to content
Snippets Groups Projects
  1. Feb 05, 2019
  2. Jan 25, 2019
  3. Jan 24, 2019
  4. Jan 23, 2019
  5. Dec 12, 2018
  6. Oct 19, 2018
    • Mark OLESEN's avatar
      STYLE: use range-for when looping dictionary entries. · 07dafe7b
      Mark OLESEN authored
      - as part of the cleanup of dictionary access methods (c6520033)
        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;
            }
      07dafe7b
  7. Oct 15, 2018
    • Mark OLESEN's avatar
    • Mark OLESEN's avatar
      ENH: rationalize dictionary access methods · c6520033
      Mark OLESEN authored
      - use keyType::option enum to consolidate searching options.
        These enumeration names should be more intuitive to use
        and improve code readability.
      
          Eg,   lookupEntry(key, keyType::REGEX);
          vs    lookupEntry(key, false, true);
      
        or
      
          Eg,   lookupEntry(key, keyType::LITERAL_RECURSIVE);
          vs    lookupEntry(key, true, false);
      
      - new findEntry(), findDict(), findScoped() methods with consolidated
        search options for shorter naming and access names more closely
        aligned with other components. Behave simliarly to the
        methods lookupEntryPtr(), subDictPtr(), lookupScopedEntryPtr(),
        respectively. Default search parameters consistent with lookupEntry().
      
          Eg, const entry* e = dict.findEntry(key);
          vs  const entry* e = dict.lookupEntryPtr(key, false, true);
      
      - added '*' and '->' dereference operators to dictionary searchers.
      c6520033
  8. Aug 16, 2018
  9. Aug 09, 2018
  10. Aug 08, 2018
  11. Jul 30, 2018
  12. Jun 19, 2018
  13. May 29, 2018
  14. Dec 13, 2017
  15. Mar 14, 2018
  16. Feb 26, 2018
    • Mark OLESEN's avatar
      ENH: cleanup autoPtr class (issue #639) · 660f3e54
      Mark OLESEN authored
      Improve alignment of its behaviour with std::unique_ptr
      
        - element_type typedef
        - release() method - identical to ptr() method
        - get() method to get the pointer without checking and without releasing it.
        - operator*() for dereferencing
      
      Method name changes
      
        - renamed rawPtr() to get()
        - renamed rawRef() to ref(), removed unused const version.
      
      Removed methods/operators
      
        - assignment from a raw pointer was deleted (was rarely used).
          Can be convenient, but uncontrolled and potentially unsafe.
          Do allow assignment from a literal nullptr though, since this
          can never leak (and also corresponds to the unique_ptr API).
      
      Additional methods
      
        - clone() method: forwards to the clone() method of the underlying
          data object with argument forwarding.
      
        - reset(autoPtr&&) as an alternative to operator=(autoPtr&&)
      
      STYLE: avoid implicit conversion from autoPtr to object type in many places
      
      - existing implementation has the following:
      
           operator const T&() const { return operator*(); }
      
        which means that the following code works:
      
             autoPtr<mapPolyMesh> map = ...;
             updateMesh(*map);    // OK: explicit dereferencing
             updateMesh(map());   // OK: explicit dereferencing
             updateMesh(map);     // OK: implicit dereferencing
      
        for clarity it may preferable to avoid the implicit dereferencing
      
      - prefer operator* to operator() when deferenced a return value
        so it is clearer that a pointer is involve and not a function call
        etc    Eg,   return *meshPtr_;  vs.  return meshPtr_();
      660f3e54
  17. Feb 22, 2018
  18. Feb 21, 2018
  19. Jan 08, 2018
    • Mark OLESEN's avatar
      ENH: simplify method names for reading argList options and arguments · 345a2a42
      Mark OLESEN authored
      - use succincter method names that more closely resemble dictionary
        and HashTable method names. This improves method name consistency
        between classes and also requires less typing effort:
      
          args.found(optName)        vs.  args.optionFound(optName)
          args.readIfPresent(..)     vs.  args.optionReadIfPresent(..)
          ...
          args.opt<scalar>(optName)  vs.  args.optionRead<scalar>(optName)
          args.read<scalar>(index)   vs.  args.argRead<scalar>(index)
      
      - the older method names forms have been retained for code compatibility,
        but are now deprecated
      345a2a42
    • Mark OLESEN's avatar
      STYLE: avoid unnecessary use of optionLookup · 9dc361da
      Mark OLESEN authored
      - direct parsing of -funcs to ITstream.
      - use direct lookup when the option is a word/string
      9dc361da
  20. Nov 28, 2017
    • Mark OLESEN's avatar
      ENH: added functionObject::execute(int) method · 610c2909
      Mark OLESEN authored
      - this is a provision for defining execute actions that can be called
        largely independently of the normal time-loop constraints. This can
        be useful to provide hooks for sub-cycling, or to define an action
        that can be triggered manually or on some other event.
      610c2909
  21. Nov 22, 2017
  22. Aug 29, 2017
    • mattijs's avatar
      BUG: sampledTriSurfaceMesh: sampling outside of mesh. Fixes #575. · 0e7954c2
      mattijs authored
      There are a few issues:
      - error would only throw exceptions if not parallel
      - if we change this we also need to make sure the functionObjectList
        construction is synchronised
      - bounding box overlap was not returning the correct status so the code
        to avoid the issue of 'badly formed bounding box' was not triggered.
      0e7954c2
  23. Jun 06, 2018
  24. Aug 09, 2017
    • Andrew Heather's avatar
      ENH: Updated fieldAverage FO windowing. See #525 · 4fc4f49c
      Andrew Heather authored
      When specifying the averaging data, a new `windowType` option is
      available, taking the values:
      
      - none: no windowing
      - approximate: past functionality (v1706 and earlier)
      - exact: exact moving average - will store and write (for restart) all
        fields in the window
      4fc4f49c
  25. Oct 30, 2017
  26. Aug 02, 2017
    • Mark OLESEN's avatar
      ENH: consolidate, cleanup some string methods · e70fc616
      Mark OLESEN authored
      - consolidate word::validated() into word::validate() and also allow
        as short form for string::validate<word>(). Also less confusing than
        having similarly named methods that essentially do the same thing.
      
      - more consistent const access when iterating over strings
      
      - add valid(char) for keyType and wordRe
      e70fc616
  27. Jul 29, 2017
    • Mark OLESEN's avatar
      ENH: additional method for switching error throwing on/off (issue #552) · 797155f8
      Mark OLESEN authored
      - error::throwExceptions(bool) returning the previous state makes it
        easier to set and restore states.
      
      - throwing() method to query the current handling (if required).
      
      - the normal error::throwExceptions() and error::dontThrowExceptions()
        also return the previous state, to make it easier to restore later.
      797155f8
  28. Jul 20, 2017
  29. Jul 14, 2017
  30. Jul 21, 2017
  31. Sep 06, 2017
  32. Jul 07, 2017
    • Andrew Heather's avatar
      INT: Integration of Mattijs' collocated parallel IO additions · d8d6030a
      Andrew Heather authored
      Original commit message:
      ------------------------
      
      Parallel IO: New collated file format
      
      When an OpenFOAM simulation runs in parallel, the data for decomposed fields and
      mesh(es) has historically been stored in multiple files within separate
      directories for each processor.  Processor directories are named 'processorN',
      where N is the processor number.
      
      This commit introduces an alternative "collated" file format where the data for
      each decomposed field (and mesh) is collated into a single file, which is
      written and read on the master processor.  The files are stored in a single
      directory named 'processors'.
      
      The new format produces significantly fewer files - one per field, instead of N
      per field.  For large parallel cases, this avoids the restriction on the number
      of open files imposed by the operating system limits.
      
      The file writing can be threaded allowing the simulation to continue running
      while the data is being written to file.  NFS (Network File System) is not
      needed when using the the collated format and additionally, there is an option
      to run without NFS with the original uncollated approach, known as
      "masterUncollated".
      
      The controls for the file handling are in the OptimisationSwitches of
      etc/controlDict:
      
      OptimisationSwitches
      {
          ...
      
          //- Parallel IO file handler
          //  uncollated (default), collated or masterUncollated
          fileHandler uncollated;
      
          //- collated: thread buffer size for queued file writes.
          //  If set to 0 or not sufficient for the file size threading is not used.
          //  Default: 2e9
          maxThreadFileBufferSize 2e9;
      
          //- masterUncollated: non-blocking buffer size.
          //  If the file exceeds this buffer size scheduled transfer is used.
          //  Default: 2e9
          maxMasterFileBufferSize 2e9;
      }
      
      When using the collated file handling, memory is allocated for the data in the
      thread.  maxThreadFileBufferSize sets the maximum size of memory in bytes that
      is allocated.  If the data exceeds this size, the write does not use threading.
      
      When using the masterUncollated file handling, non-blocking MPI communication
      requires a sufficiently large memory buffer on the master node.
      maxMasterFileBufferSize sets the maximum size in bytes of the buffer.  If the
      data exceeds this size, the system uses scheduled communication.
      
      The installation defaults for the fileHandler choice, maxThreadFileBufferSize
      and maxMasterFileBufferSize (set in etc/controlDict) can be over-ridden within
      the case controlDict file, like other parameters.  Additionally the fileHandler
      can be set by:
      - the "-fileHandler" command line argument;
      - a FOAM_FILEHANDLER environment variable.
      
      A foamFormatConvert utility allows users to convert files between the collated
      and uncollated formats, e.g.
          mpirun -np 2 foamFormatConvert -parallel -fileHandler uncollated
      
      An example case demonstrating the file handling methods is provided in:
      $FOAM_TUTORIALS/IO/fileHandling
      
      The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
      d8d6030a
  33. Apr 06, 2017
  34. Mar 21, 2017
  35. Sep 29, 2016
  36. Sep 23, 2016
  37. Sep 09, 2016
  38. Aug 05, 2016