1. 27 Mar, 2019 1 commit
  2. 06 Feb, 2019 1 commit
  3. 17 Jan, 2019 1 commit
  4. 11 Dec, 2018 2 commits
  5. 18 Oct, 2018 1 commit
    • Mark OLESEN's avatar
      ENH: cleanup of Enum class · 3b745122
      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 this class to enumerate
        other things since it internally uses an 'int' for its values.
      
        Changed volumeType accordingly to enumerate on its type (enum),
        not the class itself.
      3b745122
  6. 11 Oct, 2018 1 commit
  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. 01 Jun, 2018 1 commit
    • Mark OLESEN's avatar
      STYLE: reduced usage of Switch · 84b10921
      Mark OLESEN authored
      - Since 'bool' and 'Switch' use the _identical_ input mechanism
        (ie, both accept true/false, on/off, yes/no, none, 1/0), the main
        reason to prefer one or the other is the output.
      
        The output for Switch is as text (eg, "true"), whereas for bool
        it is label (0 or 1). If the output is required for a dictionary,
        Switch may be appropriate. If the output is not required, or is only
        used for Pstream exchange, bool can be more appropriate.
      84b10921
  9. 29 May, 2018 1 commit
  10. 14 Mar, 2018 1 commit
  11. 13 Mar, 2018 1 commit
    • Mark OLESEN's avatar
      ENH: code reduction in PackedList, PackedBoolList (issue #751) · 5d1fb235
      Mark OLESEN authored
      - eliminate iterators from PackedList since they were unused, had
        lower performance than direct access and added unneeded complexity.
      
      - eliminate auto-vivify for the PackedList '[] operator.
        The set() method provides any required auto-vivification and
        removing this ability from the '[]' operator allows for a lower
        when accessing the values. Replaced the previous cascade of iterators
        with simpler reference class.
      
      PackedBoolList:
      
      - (temporarily) eliminate logic and addition operators since
        these contained partially unclear semantics.
      
      - the new test() method tests the value of a single bit position and
        returns a bool without any ambiguity caused by the return type
        (like the get() method), nor the const/non-const access (like
        operator[] has). The name corresponds to what std::bitset uses.
      
      - more consistent use of PackedBoolList test(), set(), unset() methods
        for fewer operation and clearer code. Eg,
      
            if (list.test(index)) ...    |  if (list[index]) ...
            if (!list.test(index)) ...   |  if (list[index] == 0u) ...
            list.set(index);             |  list[index] = 1u;
            list.unset(index);           |  list[index] = 0u;
      
      - deleted the operator=(const labelUList&) and replaced with a setMany()
        method for more clarity about the intended operation and to avoid any
        potential inadvertent behaviour.
      5d1fb235
  12. 07 Mar, 2018 1 commit
    • Mark OLESEN's avatar
      ENH: new bitSet class and improved PackedList class (closes #751) · bac943e6
      Mark OLESEN authored
      - The bitSet class replaces the old PackedBoolList class.
        The redesign provides better block-wise access and reduced method
        calls. This helps both in cases where the bitSet may be relatively
        sparse, and in cases where advantage of contiguous operations can be
        made. This makes it easier to work with a bitSet as top-level object.
      
        In addition to the previously available count() method to determine
        if a bitSet is being used, now have simpler queries:
      
          - all()  - true if all bits in the addressable range are empty
          - any()  - true if any bits are set at all.
          - none() - true if no bits are set.
      
        These are faster than count() and allow early termination.
      
        The new test() method tests the value of a single bit position and
        returns a bool without any ambiguity caused by the return type
        (like the get() method), nor the const/non-const access (like
        operator[] has). The name corresponds to what std::bitset uses.
      
        The new find_first(), find_last(), find_next() methods provide a faster
        means of searching for bits that are set.
      
        This can be especially useful when using a bitSet to control an
        conditional:
      
        OLD (with macro):
      
            forAll(selected, celli)
            {
                if (selected[celli])
                {
                    sumVol += mesh_.cellVolumes()[celli];
                }
            }
      
        NEW (with const_iterator):
      
            for (const label celli : selected)
            {
                sumVol += mesh_.cellVolumes()[celli];
            }
      
            or manually
      
            for
            (
                label celli = selected.find_first();
                celli != -1;
                celli = selected.find_next()
            )
            {
                sumVol += mesh_.cellVolumes()[celli];
            }
      
      - When marking up contiguous parts of a bitset, an interval can be
        represented more efficiently as a labelRange of start/size.
        For example,
      
        OLD:
      
            if (isA<processorPolyPatch>(pp))
            {
                forAll(pp, i)
                {
                    ignoreFaces.set(i);
                }
            }
      
        NEW:
      
            if (isA<processorPolyPatch>(pp))
            {
                ignoreFaces.set(pp.range());
            }
      bac943e6
  13. 26 Feb, 2018 1 commit
    • 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
  14. 08 Jan, 2018 1 commit
    • 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
  15. 19 Nov, 2017 1 commit
  16. 10 Nov, 2017 1 commit
    • Mark OLESEN's avatar
      ENH: improved zone constructors · a59c87d5
      Mark OLESEN authored
      - constructor for empty cell/face/point Zones, with contents to be
        transferred in later.
      
      - ZoneMesh::operator(const word&) to return existing zone or a new empty one.
      a59c87d5
  17. 06 Sep, 2017 1 commit
  18. 16 Jan, 2018 1 commit
  19. 03 Jul, 2017 1 commit
  20. 16 Nov, 2016 1 commit
  21. 10 Aug, 2016 1 commit
  22. 18 May, 2016 1 commit
  23. 25 Apr, 2016 2 commits
  24. 24 Apr, 2016 1 commit
  25. 27 Jun, 2016 1 commit
  26. 02 Feb, 2016 1 commit
  27. 25 Jan, 2016 1 commit
    • mattijs's avatar
      ENH: glboal file handling: initial commit · e4240592
      mattijs authored
      Moved file path handling to regIOobject and made it type specific so
      now every object can have its own rules. Examples:
      - faceZones are now processor local (and don't search up anymore)
      - timeStampMaster is now no longer hardcoded inside IOdictionary
        (e.g. uniformDimensionedFields support it as well)
      - the distributedTriSurfaceMesh is properly processor-local; no need
        for fileModificationChecking manipulation.
      e4240592
  28. 10 Nov, 2015 1 commit
  29. 14 Oct, 2015 2 commits
    • mattijs's avatar
      ENH: snappyHexMesh: various improvements. See below or the default snappyHexMeshDict. · 4d1159e6
      mattijs authored
      Refinement:
      -----------
      // Optionally avoid patch merging - keeps hexahedral cells
      // (to be used with automatic refinement/unrefinement)
      //mergePatchFaces off;
      
      // Optional multiple locationsInMesh with corresponding optional cellZone
      // (automatically generates faceZones inbetween)
      locationsInMesh
      (
          ((-0.09 -0.039 -0.049)  bottomAir)  // cellZone bottomAir
          ((-0.09 0.009 -0.049)   topAir)     // cellZone topAir
      );
      
      // Optional faceType and patchType specification for these faceZones
      faceZoneControls
      {
          bottomAir_to_topAir
          {
              faceType baffle;
          }
      }
      
      / Optional checking of 'bleeding' of mesh through a specifying a locations
      // outside the mesh
      locationsOutsideMesh ((0 0 0)(12.3 101.17 3.98));
      
      // Improved refinement: refine all cells with all (or all but one) sides refined
      
      // Improved refinement: refine all cells with opposing faces with different
      // refinement level. These cells can happen on multiply curved surfaces.
      // Default on, can be switched off with
      //interfaceRefine false;
      
      Snapping
      --------
      // Optional smoothing of points at refinement interfaces. This will reduce
      // the non-orthogonality at refinement interfaces.
      //nSmoothInternal $nSmoothPatch;
      
      Layering
      --------
      
      // Layers can be added to patches or to any side of a faceZone.
      // (Any faceZone internally gets represented as two patches)
      
      // The angle to merge patch faces can be set independently of the
      // featureAngle. This is especially useful for large feature angles
      // Default is the same as the featureAngle.
      //mergePatchFacesAngle 45;
      
      // Optional mesh shrinking type 'displacementMotionSolver'. It uses any
      // displacementMotionSolver, e.g. displacementSBRStress
      // (default is the medial-axis algorithm, 'displacementMedialAxis')
      //meshShrinker displacementMotionSolver;
      4d1159e6
    • mattijs's avatar
      ENH: snappyHexMesh: various improvements. See below or the default snappyHexMeshDict. · 7b7967de
      mattijs authored and Andrew Heather's avatar Andrew Heather committed
      Refinement:
      -----------
      // Optionally avoid patch merging - keeps hexahedral cells
      // (to be used with automatic refinement/unrefinement)
      //mergePatchFaces off;
      
      // Optional multiple locationsInMesh with corresponding optional cellZone
      // (automatically generates faceZones inbetween)
      locationsInMesh
      (
          ((-0.09 -0.039 -0.049)  bottomAir)  // cellZone bottomAir
          ((-0.09 0.009 -0.049)   topAir)     // cellZone topAir
      );
      
      // Optional faceType and patchType specification for these faceZones
      faceZoneControls
      {
          bottomAir_to_topAir
          {
              faceType baffle;
          }
      }
      
      / Optional checking of 'bleeding' of mesh through a specifying a locations
      // outside the mesh
      locationsOutsideMesh ((0 0 0)(12.3 101.17 3.98));
      
      // Improved refinement: refine all cells with all (or all but one) sides refined
      
      // Improved refinement: refine all cells with opposing faces with different
      // refinement level. These cells can happen on multiply curved surfaces.
      // Default on, can be switched off with
      //interfaceRefine false;
      
      Snapping
      --------
      // Optional smoothing of points at refinement interfaces. This will reduce
      // the non-orthogonality at refinement interfaces.
      //nSmoothInternal $nSmoothPatch;
      
      Layering
      --------
      
      // Layers can be added to patches or to any side of a faceZone.
      // (Any faceZone internally gets represented as two patches)
      
      // The angle to merge patch faces can be set independently of the
      // featureAngle. This is especially useful for large feature angles
      // Default is the same as the featureAngle.
      //mergePatchFacesAngle 45;
      
      // Optional mesh shrinking type 'displacementMotionSolver'. It uses any
      // displacementMotionSolver, e.g. displacementSBRStress
      // (default is the medial-axis algorithm, 'displacementMedialAxis')
      //meshShrinker displacementMotionSolver;
      7b7967de
  30. 18 May, 2015 1 commit
  31. 04 May, 2015 2 commits
  32. 02 Jul, 2014 1 commit
  33. 21 May, 2013 1 commit
  34. 21 Feb, 2013 1 commit
  35. 04 Feb, 2013 1 commit
  36. 28 Jan, 2013 1 commit