1. 21 Mar, 2018 1 commit
  2. 26 Feb, 2018 1 commit
    • Mark Olesen's avatar
      ENH: cleanup tmp class (issue #639) · 52b36f84
      Mark Olesen authored
      Improve alignment of its behaviour with std::shared_ptr
      
        - element_type typedef
        - swap, reset methods
      
      * additional reference access methods:
      
      cref()
          returns a const reference, synonymous with operator().
          This provides a more verbose alternative to using the '()' operator
          when that is desired.
      
              Mnemonic: a const form of 'ref()'
      
      constCast()
          returns a non-const reference, regardless if the underlying object
          itself is a managed pointer or a const object.
          This is similar to ref(), but more permissive.
      
              Mnemonic: const_cast<>
      
          Using the constCast() method greatly reduces the amount of typing
          and reading. And since the data type is already defined via the tmp
          template parameter, the type deduction is automatically known.
      
          Previously,
      
              const tmp<volScalarField>& tfld;
      
              const_cast<volScalarField&>(tfld()).rename("name");
              volScalarField& fld = const_cast<volScalarField&>(tfld());
      
          Now,
      
              tfld.constCast().rename("name");
              auto& fld = tfld.constCast();
      
      --
      
      BUG: attempts to move tmp value that may still be shared.
      
      - old code simply checked isTmp() to decide if the contents could be
        transfered. However, this means that the content of a shared tmp
        would be removed, leaving other instances without content.
      
      * movable() method checks that for a non-null temporary that is
        unique (not shared).
      52b36f84
  3. 26 May, 2017 1 commit
  4. 07 Sep, 2017 1 commit
  5. 08 Aug, 2017 1 commit
  6. 22 Mar, 2016 1 commit
  7. 28 Feb, 2016 1 commit
  8. 22 Feb, 2016 1 commit
    • Henry Weller's avatar
      tmp: Updated to store and preserve the const-ness of the reference to a constant object · 15b7e87d
      Henry Weller authored
      This change requires that the de-reference operator '()' returns a
      const-reference to the object stored irrespective of the const-ness of
      object stored and the new member function 'ref()' is provided to return
      an non-const reference to stored object which throws a fatal error if the
      stored object is const.
      
      In order to smooth the transition to this new safer 'tmp' the now
      deprecated and unsafe non-const de-reference operator '()' is still
      provided by default but may be switched-off with the compilation switch
      'CONST_TMP'.
      
      The main OpenFOAM library has already been upgraded and '-DCONST_TMP'
      option specified in the 'options' file to switch to the new 'tmp'
      behavior.  The rest of OpenFOAM-dev will be upgraded over the following
      few weeks.
      
      Henry G. Weller
      CFD Direct
      15b7e87d
  9. 10 Feb, 2016 1 commit
  10. 08 Feb, 2016 1 commit
    • Henry Weller's avatar
      Rename DataEntry -> Function1 · 968c888f
      Henry Weller authored
      Function1 is an abstract base-class of run-time selectable unary
      functions which may be composed of other Function1's allowing the user
      to specify complex functions of a single scalar variable, e.g. time.
      The implementations need not be a simple or continuous functions;
      interpolated tables and polynomials are also supported.  In fact form of
      mapping between a single scalar input and a single primitive type output
      is supportable.
      
      The primary application of Function1 is in time-varying boundary
      conditions, it also used for other functions of time, e.g. injected mass
      is spray simulations but is not limited to functions of time.
      968c888f
  11. 06 Feb, 2016 1 commit
  12. 10 Jan, 2016 1 commit
  13. 01 Nov, 2015 1 commit
  14. 08 Apr, 2015 1 commit
  15. 13 Apr, 2012 1 commit
  16. 03 Feb, 2012 1 commit
  17. 02 Feb, 2012 1 commit
  18. 14 Aug, 2011 1 commit
  19. 15 Feb, 2011 1 commit
  20. 28 Jan, 2011 1 commit
  21. 19 Jan, 2011 1 commit
  22. 14 Jan, 2011 1 commit
  23. 07 Jan, 2011 1 commit
  24. 05 Jan, 2011 2 commits
  25. 20 Oct, 2010 1 commit
  26. 07 Apr, 2010 1 commit
  27. 29 Mar, 2010 1 commit
  28. 04 Mar, 2009 2 commits
  29. 31 Dec, 2008 1 commit
  30. 25 Jun, 2008 2 commits
  31. 15 May, 2008 1 commit
  32. 06 May, 2008 1 commit
  33. 15 Apr, 2008 1 commit