1. 07 May, 2018 1 commit
    • Mark Olesen's avatar
      ENH: improvements in the surface sampling infrastructure · b0648f2b
      Mark Olesen authored
      - improvement documentation for surface sampling.
      
      - can now specify alternative sampling scheme for obtaining the
        face values instead of just using the "cell" value. For example,
      
            sampleScheme    cellPoint;
      
        This can be useful for cases when the surface is close to a boundary
        cell and there are large gradients in the sampled field.
      
      - distanceSurface now handles non-closed surfaces more robustly.
        Unknown regions (not inside or outside) are marked internally and
        excluded from consideration. This allows use of 'signed' surfaces
        where not previously possible.
      b0648f2b
  2. 16 Mar, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: more consistent use of dimensioned Zero · 2f86cdc7
      Mark Olesen authored
      - when constructing dimensioned fields that are to be zero-initialized,
        it is preferrable to use a form such as
      
            dimensionedScalar(dims, Zero)
            dimensionedVector(dims, Zero)
      
        rather than
      
            dimensionedScalar("0", dims, 0)
            dimensionedVector("zero", dims, vector::zero)
      
        This reduces clutter and also avoids any suggestion that the name of
        the dimensioned quantity has any influence on the field's name.
      
        An even shorter version is possible. Eg,
      
            dimensionedScalar(dims)
      
        but reduces the clarity of meaning.
      
      - NB: UniformDimensionedField is an exception to these style changes
        since it does use the name of the dimensioned type (instead of the
        regIOobject).
      2f86cdc7
  3. 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
  4. 01 Feb, 2017 1 commit
  5. 29 Nov, 2016 1 commit
    • Mark Olesen's avatar
      ENH: change from triSurface to meshedSurface storage for iso-surfaces · 3c41b80b
      Mark Olesen authored
      - this makes it easier to reuse the code, and sampledSurface expect
        a face (not a labelledFace), so this also eliminates a translation
        level and simplifies memory management.
      
      - before/after comparison of the sampled iso-surfaces tested with
        iso-surfaces from interFoam/RAS/angledDuct tutorial (serial and
        parallel)
      3c41b80b
  6. 20 Oct, 2016 1 commit
  7. 10 Aug, 2016 1 commit
    • Mark Olesen's avatar
      ENH: use meshedSurf API for surface writers (issue #104) · 1fc2a732
      Mark Olesen authored
      - Allows passing of additional information (per-face zone ids) or possibly
        other things, while reducing the number of arguments to pass.
      
      - In sampledTriSurfaceMesh, preserve the region information that was
        read in, passing it onwards via the UnsortedMeshSurface content.
      
        The Nastran surface writer is currently the only writer making use
        of this per-face zone information.
        Passing it through as a PSHELL attribute, which should retain the
        distinction for parts. (issue #204)
      1fc2a732
  8. 05 Aug, 2016 1 commit
  9. 30 Apr, 2016 2 commits
    • Henry Weller's avatar
      GeometricField: Renamed internalField() -> primitiveField() and... · 3c053c2f
      Henry Weller authored
      GeometricField: Renamed internalField() -> primitiveField() and dimensionedInternalField() -> internalField()
      
      These new names are more consistent and logical because:
      
      primitiveField():
      primitiveFieldRef():
          Provides low-level access to the Field<Type> (primitive field)
          without dimension or mesh-consistency checking.  This should only be
          used in the low-level functions where dimensional consistency is
          ensured by careful programming and computational efficiency is
          paramount.
      
      internalField():
      internalFieldRef():
          Provides access to the DimensionedField<Type, GeoMesh> of values on
          the internal mesh-type for which the GeometricField is defined and
          supports dimension and checking and mesh-consistency checking.
      3c053c2f
    • Henry Weller's avatar
      GeometricField::internalField() -> GeometricField::internalFieldRef() · 5df2b964
      Henry Weller authored
      Non-const access to the internal field now obtained from a specifically
      named access function consistent with the new names for non-canst access
      to the boundary field boundaryFieldRef() and dimensioned internal field
      dimensionedInternalFieldRef().
      
      See also commit 22f4ad32
      5df2b964
  10. 28 Apr, 2016 1 commit
    • Henry Weller's avatar
      GeometricField::GeometricBoundaryField -> GeometricField::Boundary · ea5401c7
      Henry Weller authored
      When the GeometricBoundaryField template class was originally written it
      was a separate class in the Foam namespace rather than a sub-class of
      GeometricField as it is now.  Without loss of clarity and simplifying
      code which access the boundary field of GeometricFields it is better
      that GeometricBoundaryField be renamed Boundary for consistency with the
      new naming convention for the type of the dimensioned internal field:
      Internal, see commit 4a57b9be
      
      This is a very simple text substitution change which can be applied to
      any code which compiles with the OpenFOAM-dev libraries.
      ea5401c7
  11. 24 Apr, 2016 1 commit
  12. 29 Feb, 2016 1 commit
  13. 10 Jan, 2016 1 commit
  14. 26 Nov, 2015 1 commit
  15. 11 Nov, 2015 1 commit
  16. 14 Feb, 2015 1 commit
  17. 11 Apr, 2013 2 commits
  18. 21 Feb, 2013 2 commits
  19. 29 Feb, 2012 1 commit
  20. 14 Aug, 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. 25 Nov, 2010 1 commit
  26. 11 Nov, 2010 1 commit
  27. 06 Oct, 2010 2 commits
    • graham's avatar
      ENH: Making nearestPointClassify query for triangle. · 6cdbd0ad
      graham authored
      This is to access the face/edge/point status of the nearest at the
      same time to ensure a consistent result.
      
      Using getVolumeType query in distanceSurface, not simple normal
      dot-product comparison, fails on edges.
      6cdbd0ad
    • graham's avatar
      ENH: Making nearestPointClassify query for triangle. · 665cb1ca
      graham authored
      This is to access the face/edge/point status of the nearest at the
      same time to ensure a consistent result.
      
      Using getVolumeType query in distanceSurface, not simple normal
      dot-product comparison, fails on edges.
      665cb1ca
  28. 04 Aug, 2010 1 commit
  29. 28 Jul, 2010 1 commit
  30. 12 Apr, 2010 1 commit
  31. 29 Mar, 2010 1 commit
  32. 09 Mar, 2010 1 commit
  33. 04 Mar, 2010 1 commit
  34. 10 Mar, 2009 1 commit
  35. 17 Jan, 2009 1 commit