1. 29 Feb, 2016 2 commits
  2. 28 Feb, 2016 2 commits
  3. 27 Feb, 2016 1 commit
    • Henry Weller's avatar
      tmp: Limit the number of references to a temporary object to 2 · 0830ace9
      Henry Weller authored
      which reduces the number of potential problems with the reuse of
      temporary objects.
      
      In order to avoid unnecessary creation of tmp's referring to temporary
      objects the assignment operator now transfers ownership of the object
      and resets the argument.
      0830ace9
  4. 26 Feb, 2016 2 commits
  5. 25 Feb, 2016 3 commits
  6. 24 Feb, 2016 1 commit
    • Henry Weller's avatar
      tmp: Improved reference count checks to provide better error diagnostics · c02bf70e
      Henry Weller authored
      in case of tmp misuse.
      
      Simplified tmp reuse pattern in field algebra to use tmp copy and
      assignment rather than the complex delayed call to 'ptr()'.
      
      Removed support for unused non-const 'REF' storage of non-tmp objects due to C++
      limitation in constructor overloading: if both tmp(T&) and tmp(const T&)
      constructors are provided resolution is ambiguous.
      
      The turbulence libraries have been upgraded and '-DCONST_TMP' option
      specified in the 'options' file to switch to the new 'tmp' behavior.
      c02bf70e
  7. 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
  8. 20 Feb, 2016 1 commit
    • Henry Weller's avatar
      Boundary conditions: Added extrapolatedCalculatedFvPatchField · 99a10ece
      Henry Weller authored
      To be used instead of zeroGradientFvPatchField for temporary fields for
      which zero-gradient extrapolation is use to evaluate the boundary field
      but avoiding fields derived from temporary field using field algebra
      inheriting the zeroGradient boundary condition by the reuse of the
      temporary field storage.
      
      zeroGradientFvPatchField should not be used as the default patch field
      for any temporary fields and should be avoided for non-temporary fields
      except where it is clearly appropriate;
      extrapolatedCalculatedFvPatchField and calculatedFvPatchField are
      generally more suitable defaults depending on the manner in which the
      boundary values are specified or evaluated.
      
      The entire OpenFOAM-dev code-base has been updated following the above
      recommendations.
      
      Henry G. Weller
      CFD Direct
      99a10ece
  9. 12 Feb, 2016 4 commits
  10. 10 Feb, 2016 2 commits
    • Henry Weller's avatar
      Function1Types::Square: New square-wave Function1 with the same controls as Sine · 60281da4
      Henry Weller authored
      with optional specification of the mark/space ratio
      
          Templated square-wave function with support for an offset level.
      
              \f[
                  a square(f (t - t_0)) s + l
              \f]
      
          where
      
          \f$ square(t) \f$ is the square-wave function in range \f$ [-1, 1] \f$
          with a mark/space ratio of \f$ r \f$
      
          \vartable
              symbol  | Description       | Data type         | Default
              a       | Amplitude         | Function1<scalar> |
              f       | Frequency [1/s]   | Function1<scalar> |
              s       | Type scale factor | Function1<Type>   |
              l       | Type offset level | Function1<Type>   |
              t_0     | Start time [s]    | scalar            | 0
              r       | mark/space ratio  | scalar            | 1
              t       | Time [s]          | scalar
          \endvartable
      
          Example for a scalar:
          \verbatim
              <entryName> square;
              <entryName>Coeffs
              {
                  frequency 10;
                  amplitude 0.1;
                  scale     2e-6;
                  level     2e-6;
              }
          \endverbatim
      60281da4
    • Henry Weller's avatar
      Function1: Simplified files · d9c7c671
      Henry Weller authored
      d9c7c671
  11. 09 Feb, 2016 1 commit
  12. 08 Feb, 2016 5 commits
    • Henry Weller's avatar
      Function1: Rationalized the stream output · ef649ba9
      Henry Weller authored
      ef649ba9
    • Henry Weller's avatar
      Function1Types::Sine: Changed parameters to be of type Function1 for greater flexibility · 15cd7c14
      Henry Weller authored
          Templated sine function with support for an offset level.
      
              \f[
                  a sin(2 \pi f (t - t_0)) s + l
              \f]
      
          where
      
          \vartable
              symbol  | Description       | Data type
              a       | Amplitude         | Function1<scalar>
              f       | Frequency [1/s]   | Function1<scalar>
              s       | Type scale factor | Function1<Type>
              l       | Type offset level | Function1<Type>
              t_0     | Start time [s]    | scalar
              t       | Time [s]          | scalar
          \endvartable
      15cd7c14
    • 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
    • Henry Weller's avatar
      DataEntry/Sine: Corrected typo · c3f6a149
      Henry Weller authored
      c3f6a149
    • Henry Weller's avatar
      DataEntry/Sine: New DataEntryType which evaluates a sin function with offset · 96f2e3f3
      Henry Weller authored
      Description
          Templated sine function with support for an offset level.
      
              \f[
                  a sin(2 \pi f (t - t_0)) s + l
              \f]
      
          where
      
          \vartable
              a       | Amplitude
              f       | Frequency [1/s]
              s       | Type scale factor
              l       | Type offset level
              t_0     | Start time [s]
              t       | Time [s]
          \endvartable
      
          Example for a scalar:
          \verbatim
              <entryName> sine;
              <entryName>Coeffs
              {
                  frequency 10;
                  amplitude 0.1;
                  scale     2e-6;
                  level     2e-6;
              }
          \endverbatim
      
          Example for a vector:
          \verbatim
              <entryName> sine;
              <entryName>Coeffs
              {
                  frequency 10;
                  amplitude 1;
                  scale     (1 0.1 0);
                  level     (10 1 0);
              }
          \endverbatim
      96f2e3f3
  13. 07 Feb, 2016 2 commits
  14. 06 Feb, 2016 1 commit
  15. 04 Feb, 2016 1 commit
  16. 02 Feb, 2016 1 commit
  17. 20 Jan, 2016 2 commits
  18. 19 Jan, 2016 2 commits
  19. 17 Jan, 2016 1 commit
  20. 11 Jan, 2016 2 commits
  21. 10 Jan, 2016 3 commits