1. 15 Dec, 2021 5 commits
  2. 13 Dec, 2021 1 commit
  3. 10 Dec, 2021 5 commits
  4. 09 Dec, 2021 2 commits
  5. 06 Dec, 2021 1 commit
    • Andrew Heather's avatar
      ENH: particleTracks - updated to include field data · 0f155daf
      Andrew Heather authored and Mark OLESEN's avatar Mark OLESEN committed
      The utility will now add field data to all tracks (previous version only
      created the geometry)
      
      The new 'fields' entry can be used to output specific fields.
      
      Example
      
          cloud           reactingCloud1;
      
          sampleFrequency 1;
      
          maxPositions    1000000;
      
          fields          (d U); // includes wildcard support
      
      STYLE: minor typo fix
      0f155daf
  6. 03 Dec, 2021 2 commits
  7. 26 Nov, 2021 3 commits
    • Mark OLESEN's avatar
      ENH: add expression support for scalar/vector expression lookups · fc6239d9
      Mark OLESEN authored
      - similar idea to swak timelines/lookuptables but combined together
        and based on Function1 for more flexibility.
      
        Specified as 'functions<scalar>' or 'functions<vector>'.
        For example,
      
        functions<scalar>
        {
            intakeType table ((0 0) (10 1.2));
      
            p_inlet
            {
                type        sine;
                frequency   3000;
                scale       50;
                level       101325;
            }
        }
      
        These can be referenced in the expressions as a nullary function or a
        unary function.
      
        Within the parser, the names are prefixed with "fn:" (function).
        It is thus possible to define "fn:sin()" that is different than
        the builtin "sin()" function.
      
           * A nullary call uses time value
             - Eg, fn:p_inlet()
      
           * A unary call acts as a remapper function.
             - Eg, fn:intakeType(6.25)
      fc6239d9
    • Mark OLESEN's avatar
      ENH: robuster lemon parsing · e6697edb
      Mark OLESEN authored
      - previously simply reused the scan token, which works fine for
        non-nested tokenizations but becomes too fragile with nesting.
      
        Now changed to use tagged unions that can be copied about
        and still retain some rudimentary knowledge of their types,
        which can be manually triggered with a destroy() call.
      
      - provide an 'identifier' non-terminal as an additional catch
        to avoid potential leakage on parsing failure.
      
      - adjust lemon rules and infrastructure:
      
        - use %token to predefine standard tokens.
          Will reduce some noise on the generated headers by retaining the
          order on the initial token names.
      
        - Define BIT_NOT, internal token rename NOT -> LNOT
      
      - handle non-terminal vector values.
        Support vector::x, vector::y and vector::z constants
      
      - permit fieldExpr access to time().
        Probably not usable or useful for an '#eval' expression,
        but useful for a Function1.
      
      - provisioning for hooks into function calls. Establishes token
        names for next commit(s).
      e6697edb
    • Andrew Heather's avatar
      ENH: Function1's - added objectRegistry access · 098aec49
      Andrew Heather authored and Mark OLESEN's avatar Mark OLESEN committed
      098aec49
  8. 25 Nov, 2021 2 commits
    • Mark OLESEN's avatar
      f078643f
    • Mark OLESEN's avatar
      ENH: additional #word and #message dictionary directives (#2276) · 1804d3fe
      Mark OLESEN authored
      - use `#word` to concatenate, expand content with the resulting string
        being treated as a word token. Can be used in dictionary or
        primitive context.
      
        In dictionary context, it fills the gap for constructing dictionary
        names on-the-fly. For example,
      
        ```
        #word "some_prefix_solverInfo_${application}"
        {
            type    solverInfo;
            libs    (utilityFunctionObjects);
            ...
        }
        ```
      
        The '#word' directive will automatically squeeze out non-word
        characters. In the block content form, it will also strip out
        comments. This means that this type of content should also work:
      
        ```
        #word {
           some_prefix_solverInfo
           /* Appended with application name (if defined) */
           ${application:+_}  // Use '_' separator
           ${application}     // The application
        }
        {
            type    solverInfo;
            libs    (utilityFunctionObjects);
            ...
        }
        ```
        This is admittedly quite ugly, but illustrates its capabilities.
      
      - use `#message` to report expanded string content to stderr.
        For example,
      
        ```
        T
        {
           solver          PBiCG;
           preconditioner  DILU;
           tolerance       1e-10;
           relTol          0;
           #message "using solver: $solver"
        }
        ```
        Only reports on the master node.
      1804d3fe
  9. 23 Nov, 2021 1 commit
    • Mark OLESEN's avatar
      ENH: make expressions::FieldAssociation a common enum · fbd7b789
      Mark OLESEN authored
      - use FACE_DATA (was SURFACE_DATA) for similarity with polySurface
      
      ENH: add expression value enumerations and traits
      
      - simple enumeration of standard types (bool, label, scalar, vector)
        that can be used as a value type-code for internal bookkeeping.
      
      GIT: relocate pTraits into general traits/ directory
      fbd7b789
  10. 17 Nov, 2021 2 commits
  11. 15 Nov, 2021 2 commits
    • Mark OLESEN's avatar
      LINT: fix permissions · 28800dcb
      Mark OLESEN authored
      28800dcb
    • Mark OLESEN's avatar
      ENH: add refPtr release() method · effd69a0
      Mark OLESEN authored
      - releases ownership of the pointer. A no-op (and returns nullptr)
        for references.
      
        Naming consistent with unique_ptr and autoPtr.
      
      DOC: adjust wording for memory-related classes
      
      - add is_const() method for tmp, refPtr.
      
        Drop (ununsed and confusing looking) isTmp method from refPtr
        in favour of is_pointer() or movable() checks
      
      ENH: noexcept for some pTraits methods, remove redundant 'inline'
      
      - test for const first for tmp/refPtr (simpler logic)
      effd69a0
  12. 09 Nov, 2021 4 commits
    • Mark OLESEN's avatar
      ENH: additional dictionary controls, methods · 8638d823
      Mark OLESEN authored
      STYLE: declaration order of topoSet, resize_nocopy for sortedOrder
      
      STYLE: remove cstring dependency from SHA1
      
      STYLE: use Ostream endEntry()
      8638d823
    • Mark OLESEN's avatar
      ENH: additional decompose options · a78e7990
      Mark OLESEN authored
      - decomposePar: -no-fields to suppress decomposition of fields
      
      - makeFaMesh: -no-decompose to suppress creation of *ProcAddressing
        and fields, -no-fields to suppress decomposition of fields only
      a78e7990
    • Mark OLESEN's avatar
      ENH: simple detection for collapsed block descriptions · e8aa3aad
      Mark OLESEN authored
      - switch from default topology merge to point merge if degenerate
        blocks are detected. This should alleviate the problems noted in
        #1862.
      
        NB: this detection only works for blocks with duplicate vertex
            indices, not ones with geometrically duplicate points.
      
      ENH: add patch block/face summary in blockMesh generation
      
      - add blockMesh -verbose option to override the static or dictionary
        settings.  The -verbose option can be used multiple times to increase
        the verbosity.
      
      ENH: extend hexCell handling with more cellShape-type methods
      
      - allows better reuse in blockMesh.
        Remove blockMesh-local hex edge definitions that shadowed the
        hexCell values.
      
      ENH: simplify some of the block-edge internals
      e8aa3aad
    • Mark OLESEN's avatar
      ENH: add -verbose support into argList · 5a121119
      Mark OLESEN authored
      - similar to -dry-run handling, can be interrogated from argList,
        which makes it simpler to add into utilities.
      
      - support multiple uses of -dry-run and -verbose to increase the
        level. For example, could have
      
          someApplication -verbose -verbose
      
       and inside of the application:
      
          if (args.verbose() > 2) ...
      
      BUG: error with empty distributed roots specification (fixes #2196)
      
      - previously used the size of distributed roots to transmit if the
        case was running in distributed mode, but this behaves rather poorly
        with bad input. Specifically, the following questionable setup:
      
            distributed true;
            roots ( /*none*/ );
      
        Now transmit the ParRunControl distributed() value instead,
        and also emit a gentle warning for the user:
      
            WARNING: running distributed but did not specify roots!
      5a121119
  13. 05 Nov, 2021 2 commits
  14. 04 Nov, 2021 2 commits
  15. 03 Nov, 2021 3 commits
    • Mark OLESEN's avatar
      ENH: improve flexibility of error, messageStream output · c9333a5a
      Mark OLESEN authored
      - provide a plain stream() method on messageStream to reduce reliance
        on casting operators and slightly opaque operator()() calls etc
      
      - support alternative stream for messageStream serial output.
        This can be used to support local redirection of output.
        For example,
      
           refPtr<OFstream> logging;   // or autoPtr, unique_ptr etc
      
           // Later...
           Info.stream(logging.get())
              << "Detailed output ..." << endl;
      
        This will use the stdout semantics in the normal case, or allow
        redirection to an output file if a target output stream is defined,
        but still effectively use /dev/null on non-master processes.
      
        This is mostly the same as this ternary
      
            (logging ? *logging : Info())
      
        except that the ternary could be incorrect on sub-processes,
        requires more typing etc.
      
      ENH: use case-relative names of dictionary, IOstream for FatalIOError
      
      - normally yields more easily understandable information
      c9333a5a
    • Mark OLESEN's avatar
      ENH: argList improvements · b364a9e7
      Mark OLESEN authored
      - argList::envExecutable() static method.
        This is identical to getEnv("FOAM_EXECUTABLE"), where the name of
        the executable has typically been set from the argList construction.
      
        Provides a singleton access to this value from locations that
        do not have knowledge of the originating command args (argList).
        This is a similar rationale as for the argList::envGlobalPath() static.
      
      - additional argList::envRelativePath() static method.
      
      - make -dry-run handling more central and easier to use by adding into
        argList itself.
      
      STYLE: drop handling of -srcDoc (v1706 option)
      
      - replaced with -doc-source for 1712 and never used much anyhow
      b364a9e7
    • Mark OLESEN's avatar
      STYLE: additional storage checks, noexcept, spelling · a19f03a5
      Mark OLESEN authored
      - prune unneeded demandDrivenData.H includes
      a19f03a5
  16. 02 Nov, 2021 1 commit
  17. 29 Oct, 2021 2 commits
    • Mark OLESEN's avatar
      ENH: additional MPI gather/scatter routines, globalIndex gather methods · b6539cd0
      Mark OLESEN authored
      - UPstream::mpiGather (MPI_Gather)   - used by Pstream::listGatherValues
      - UPstream::mpiScatter (MPI_Scatter) - used by Pstream::listScatterValues
      
        These are much simpler forms for gather/scatter of fixed-sized
        contiguous types data types (eg, primitives, simple pairs etc).
      
        In the gather form, creates a list of gathered values on the master
        process. The subranks have a list size of zero.
      
        Similarly, scatter will distribute a list of values to single values
        on each process.
      
        Instead of
      
            labelList sendSizes(Pstream::nProcs());
            sendSizes[Pstream::myProcNo()] = sendData.size();
            Pstream::gatherList(sendSizes);
      
        Can write
      
            const labelList sendSizes
            (
                UPstream::listGatherValues<label>(sendData.size())
            );
      
        // Less code, lower overhead and list can be const.
      
        For scattering an individual value only,
        instead of
      
            labelList someValues;
            if (Pstream::master()) someValues = ...;
      
            Pstream::gatherList(sendSizes);
            const label localValue
            (
                someValues[Pstream::myProcNo()]
            );
      
        Can write
      
            labelList someValues;
            if (Pstream::master()) someValues = ...;
      
            Pstream::gatherList(sendSizes);
            const label localValue
            (
                UPstream::listScatterValues<label>(someValues)
            );
      
         Can of course also mix listGatherValues to assemble a list on master
         and use Pstream::scatterList to distribute.
      
      ENH: adjusted globalIndex gather methods
      
      - added mpiGather() method [contiguous data only] using MPI_Gatherv
      
      - respect localSize if gathering master data to ensure that a
        request for 0 master elements is properly handled.
      b6539cd0
    • Mark OLESEN's avatar
      ENH: additional 'nocopy' methods for List resize/reserve methods · b8a4b7e8
      Mark OLESEN authored
      - the size of a List often requires adjustment prior to an operation,
        but old values (if any) are not of interest and will be overwritten.
      
        In these cases can use the _nocopy versions to avoid additional memory
        overhead of the intermediate list and the copy/move overhead of
        retaining the old values (that we will subsequently discard anyhow).
      
        No equivalent for PtrList/UPtrList - this would be too fragile.
      
      - add swap DynamicField with DynamicList
      
      BUG: fixed Dynamic{Field,List} setCapacity corner case
      
      - for the case when the newly requested capacity coincides with the
        current addressable size, the resize of the underlying list would have
        been bypassed - ie, the real capacity was not actually changed.
      
      - remove (unused) PtrDynList setCapacity method as too fragile
      b8a4b7e8