1. 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
  2. 21 Mar, 2018 1 commit
  3. 26 Feb, 2018 3 commits
    • Mark Olesen's avatar
    • 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
    • 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 c...
      660f3e54
  4. 17 Jan, 2018 1 commit
  5. 16 Jan, 2018 1 commit
    • Andrew Heather's avatar
      ENH: residuals function object - extended to write residual fields · 6312f809
      Andrew Heather authored
      Residual fields can be written using the new 'writeFields' entry, e.g.
      
          functions
          {
              residual
              {
                  type            residuals;
                  libs            ("libutilityFunctionObjects.so");
                  fields          (".*");
                  writeControl    writeTime;
                  writeFields     true;
              }
          }
      
      Fields currently correspond to the initial residual for the last solver
      iteration.
      6312f809
  6. 03 Jul, 2017 1 commit
  7. 14 Jun, 2017 1 commit
    • mattijs's avatar
      ENH: overset: Initial release of overset capability. · fd665b4a
      mattijs authored
      Adds overset discretisation to selected physics:
      - diffusion : overLaplacianDyMFoam
      - incompressible steady : overSimpleFoam
      - incompressible transient : overPimpleDyMFoam
      - compressible transient: overRhoPimpleDyMFoam
      - two-phase VOF: overInterDyMFoam
      
      The overset method chosen is a parallel, fully implicit implementation
      whereby the interpolation (from donor to acceptor) is inserted as an
      adapted discretisation on the donor cells, such that the resulting matrix
      can be solved using the standard linear solvers.
      
      Above solvers come with a set of tutorials, showing how to create and set-up
      simple simulations from scratch.
      fd665b4a
  8. 26 May, 2017 1 commit
  9. 19 May, 2017 1 commit
  10. 18 Apr, 2017 1 commit
  11. 10 Mar, 2017 1 commit
  12. 03 Feb, 2017 1 commit
    • Henry Weller's avatar
      PBiCG: Suggest changing to the more robust PBiCGStab solver · 23809f7a
      Henry Weller authored
      if convergence is not achieved within the maximum number of iterations.
      
      Sometimes, particularly running in parallel, PBiCG fails to converge or diverges
      without warning or obvious cause leaving a solution field containing significant
      errors which can cause divergence of the application.  PBiCGStab is more robust
      and does not suffer from the problems encountered with PBiCG.
      23809f7a
  13. 05 Aug, 2016 1 commit
  14. 20 Jun, 2016 1 commit
  15. 08 Jun, 2016 1 commit
  16. 29 May, 2016 1 commit
  17. 25 Apr, 2016 1 commit
  18. 23 Mar, 2016 1 commit
  19. 22 Mar, 2016 1 commit
  20. 29 Feb, 2016 1 commit
  21. 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
  22. 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
  23. 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
  24. 10 Jan, 2016 1 commit
  25. 10 Nov, 2015 1 commit
  26. 08 Nov, 2015 1 commit
  27. 01 Nov, 2015 1 commit
  28. 30 Jun, 2015 1 commit
  29. 14 Feb, 2015 1 commit
  30. 02 Jan, 2015 1 commit
  31. 11 Dec, 2013 1 commit
  32. 03 Apr, 2013 1 commit
  33. 13 Mar, 2013 1 commit
  34. 27 Feb, 2013 1 commit
  35. 22 Feb, 2013 1 commit
  36. 06 Feb, 2013 1 commit
  37. 11 Dec, 2012 1 commit
  38. 02 May, 2012 1 commit