Skip to content
Snippets Groups Projects
  1. Jun 21, 2021
  2. Jun 11, 2021
  3. Jun 08, 2021
  4. May 12, 2021
    • Mark OLESEN's avatar
      ENH: improve edge access for face/triFace · 8eef91c5
      Mark OLESEN authored
      - additional rcEdge(), rcEdges() methods for reverse order walk
      
      - accept generic edge() method as alternative to faceEdge() for
        single edge retrieval.
      
      - edge() method with points -> returns the vector
      
      - reduce the number of operations in edgeDirection methods
      
      DEFEATURE: remove longestEdge global function
      
      - deprecated and replaced by face::longestEdge() method (2017-04)
      8eef91c5
  5. May 10, 2021
    • Mark OLESEN's avatar
      ENH: introduce intermediate vtk::polyWriter class · 0a78e685
      Mark OLESEN authored
      - reduces code, simplifies creation of new, specialized polyData
        writers.
      
      - new templated vtk::GenericPatchWriter, which adds support for
        writing both uindirectPrimitivePatch + indirectPrimitivePatch types.
      
      - handle geometric fields separately from regular fields with
          * vtk:GenericPatchGeoFieldsWriter
          * vtk:indirectPatchGeoFieldsWriter
          * vtk:uindirectPatchGeoFieldsWriter
      0a78e685
  6. Apr 26, 2021
  7. Apr 19, 2021
  8. Mar 17, 2021
  9. Mar 09, 2021
    • Mark OLESEN's avatar
      ENH: improvements for token methods · 51cd7cee
      Mark OLESEN authored
      - direct check of punctuation.
        For example,
      
            while (!tok.isPunctuation(token::BEGIN_LIST)) ..
      
        instead of
      
        while (!(tok.isPunctuation() && tok.pToken() == token::BEGIN_LIST)) ..
      
        Using direct comparison (tok != token::BEGIN_LIST) can be fragile
        when comparing int values:
      
            int c = readChar(is);
            while (tok != c) ..  // Danger, uses LABEL comparison!
      
      - direct check of word.
        For example,
      
            if (tok.isWord("uniform")) ..
      
        instead of
      
            if (tok.isWord() && tok.wordToken() == "uniform") ..
      
      - make token lineNumber() a setter method
      
      ENH: adjust internal compound method empty() -> moved()
      
      - support named compound tokens
      
      STYLE: setter method for stream indentation
      51cd7cee
  10. Feb 16, 2021
    • Kutalmış Berçin's avatar
      ENH: 'Math' namespace for mathematical functions · 66d1b54a
      Kutalmış Berçin authored and Mark OLESEN's avatar Mark OLESEN committed
      - centralises existing functions (erfInv, incGamma*, invIncGamma*).
        Provides a location for additional functions in the future.
      
      - adjusted existing models to use these functions
        (e.g. distributionModels::normal)
      66d1b54a
    • Mark OLESEN's avatar
      ENH: replace base implementation of Foam::Swap with std::swap · f8a0677a
      Mark OLESEN authored
      - eliminates a potentially invalid code branch.
        Since it essentially had the same internals as std::swap anyhow,
        make that more evident.
      
      ENH: use std::swap for basic types
      
      - makes it clearer that they do not rely on any special semantics
      f8a0677a
    • Mark OLESEN's avatar
      ENH: improve surfaceFieldValue sampling and writing (#1999) · 2954f55f
      Mark OLESEN authored
      - ensure surface writing is time-step and nFields aware.
        This avoids overwriting (ignoring) previous output fields.
      
      - allow sampled surfaces to be used for weight fields as well.
        Not sure why this restriction was still there.
      
      - remove old compatibility reading of orientedFields.
        Last used in v1612, now removed.
      
      - only use face sampling. For surfaceFieldValue we can only do
        something meaningful with face values.
      
      ENH: modify interface methods for surfaceWriter
      
      - replace direct modification of values with setter methods.
        Eg,
           old: writer.isPointData() = true;
           new: writer.isPointData(true);
      
        This makes it possible to add internal hooks to catch state changes.
      
      ENH: allow post-construction change to sampledSurface interpolation
      
      - rename interpolate() method to isPointData() for consistency with
        other classes and to indicate that it is a query.
      
      - additional isPointData(bool) setter method to change the expected
        representation type after construction
      
      - remove 'interpolate' restriction on isoSurfacePoint which was
        previously flagged as an error but within sampledSurfaces can use
        sampleScheme cellPoint and obtain representative samples.
        Relax this restriction since this particular iso-surface algorithm
        is slated for removal in the foreseeable future.
      2954f55f
  11. Feb 15, 2021
  12. Feb 09, 2021
  13. Feb 08, 2021
  14. Dec 18, 2020
  15. Dec 17, 2020
  16. Dec 15, 2020
  17. Dec 14, 2020
  18. Dec 11, 2020
  19. Dec 10, 2020
    • Andrew Heather's avatar
      ENH: Lagrangian - added new PatchInteractionFields cloud function object · 9d765ada
      Andrew Heather authored and Andrew Heather's avatar Andrew Heather committed
      Creates volume fields whose boundaries are used to store patch interaction
      statistics.
      
      Current field output per patch face:
      - \<cloud\>\<model\>:count - cumulative particle hits
      - \<cloud\>\<model\>:mass - cumuluative mass of hitting particles
      
      Fields can be reset according to:
      - none: fields are not reset
      - timeStep: reset at each time step
      - writeTime: reset at each write time
      
      Usage
      
          patchInteractionFields1
          {
              type            patchInteractionFields;
              resetMode       writeTime;
          }
      9d765ada
  20. Dec 04, 2020
  21. Nov 19, 2020
    • Mark OLESEN's avatar
      STYLE: prefix zero/one with Foam:: qualifier · 98d05fa8
      Mark OLESEN authored
      ENH: support construction of zero-sized IndirectList
      
      - useful when addressing is to be generated in-place after construction.
        Eg,
      
            indirectPrimitivePatch myPatches
            (
                IndirectList<face>(mesh.faces(), Zero),
                mesh.points()
            );
            labelList& patchFaces = myPatches.addressing();
      
            patchFaces.resize(...);
            // populate patchFaces
      
      STYLE: add noexcept for zero/one fields and remove old dependency files
      
      COMP: correct typedefs for geometricOneField, geometricZeroField
      98d05fa8
  22. Nov 13, 2020
    • Kutalmış Berçin's avatar
      ENH: PatchParticleHistogram: add a new cloud FO · 2a64d98d
      Kutalmış Berçin authored
        Computes a histogram for the distribution of particle diameters
        and corresponding number of particles hitting on a given list of patches.
      
        A minimal example by using `constant/reactingCloud1Properties.cloudFunctions`:
      
        ```
        patchParticleHistogram1
        {
            // Mandatory entries (unmodifiable)
            type             patchParticleHistogram;
            patches          (<patch1> <patch2> ... <patchN>);
            nBins            10;
            min              0.1;
            max              10.0;
            maxStoredParcels 20;
        }
        ```
      2a64d98d
  23. Nov 11, 2020
  24. Nov 10, 2020
  25. Oct 28, 2020
    • Mark OLESEN's avatar
      ENH: use static to define default blockMesh verbosity · f999013f
      Mark OLESEN authored
      - make handling of verbosity more consistent.
      
        Make all setter return the old value, remove (unused) default
        parameter as being counter-intuitive.  This makes it easier to
        restore the original values.
      
        For example,
      
           const bool oldVerbose = sampler.verbose(false);
           ...
           sampler.verbose(oldVerbose);
      f999013f
  26. Sep 28, 2020
    • Mark OLESEN's avatar
      ENH: add UPstream::subProcs() static method · 5dc5ea92
      Mark OLESEN authored
      - returns a range of `int` values that can be iterated across.
        For example,
      
            for (const int proci : Pstream::subProcs()) { ... }
      
        instead of
      
            for
            (
                int proci = Pstream::firstSlave();
                proci <= Pstream::lastSlave();
                ++proci
            )
            {
                ...
            }
      5dc5ea92