Skip to content
Snippets Groups Projects
  1. Feb 10, 2017
  2. Feb 20, 2017
  3. Feb 15, 2017
  4. Feb 10, 2017
  5. Feb 09, 2017
  6. Feb 08, 2017
  7. Feb 06, 2017
  8. Feb 03, 2017
  9. Feb 01, 2017
  10. Jan 26, 2017
  11. Jan 25, 2017
    • Mark Olesen's avatar
    • Mark Olesen's avatar
      ENH: additional methods/operators for boundBox (related to #196) · 722d23f5
      Mark Olesen authored
      - Constructor for bounding box of a single point.
      
      - add(boundBox), add(point) ...
        -> Extend box to enclose the second box or point(s).
      
        Eg,
            bb.add(pt);
        vs.
            bb.min() = Foam::min(bb.min(), pt);
            bb.max() = Foam::max(bb.max(), pt);
      
      Also works with other bounding boxes.
        Eg,
            bb.add(bb2);
            // OR
            bb += bb2;
        vs.
            bb.min() = Foam::min(bb.min(), bb2.min());
            bb.max() = Foam::max(bb.max(), bb2.max());
      
      '+=' operator allows the reduction to be used in parallel
      gather/scatter operations.
      
      A global '+' operator is not currently needed.
      
      Note: may be useful in the future to have a 'clear()' method
      that resets to a zero-sized (inverted) box.
      
      STYLE: make many bounding box constructors explicit
      722d23f5
    • Mark Olesen's avatar
      ENH: boundBox 'reduce' method (related to #196) · 17d76e62
      Mark Olesen authored
      reduce()
      - parallel reduction of min/max values.
        Reduces coding for the callers.
      
        Eg,
            bb.reduce();
      
        instead of the previous method:
            reduce(bb.min(), minOp<point>());
            reduce(bb.max(), maxOp<point>());
      
      STYLE:
      
      - use initializer list for creating static content
      - use point::min/point::max when defining standard boxes
      17d76e62