Skip to content
Snippets Groups Projects
  1. Apr 08, 2023
  2. Apr 06, 2023
  3. Apr 05, 2023
    • Mark OLESEN's avatar
      ENH: improve suspend/resume handling of Pstream profiling (#2737) · 5de59417
      Mark OLESEN authored
      - allow reporting even when profiling is suspended
      
      - consolidate reporting into profilingPstream itself
        (avoids code scatter).
      
      Example of possible advanced use for timing only one section of
      code:
      
          ====
          // Profile local operations
          profilingPstream::enable();
      
          ... do something
      
          // Don't profile elsewhere
          profilingPstream::suspend();
          ====
      5de59417
    • Mark OLESEN's avatar
      ENH: extend parProfiling (#2737) · 9577a0f6
      Mark OLESEN authored
      - separate broadcast times from reduce/gather/scatter time
      - separate wait times from all-to-all time
      - support invocation counts, split off requests time/count
        from others to avoid flooding the counts
      
      - support 'detail' switch to increase the output information.
        Format may change in the future
      9577a0f6
  4. Apr 04, 2023
  5. Apr 03, 2023
  6. Mar 31, 2023
  7. Mar 29, 2023
  8. Mar 23, 2023
    • Mark OLESEN's avatar
      STYLE: Allwmake report api/patch directly from META-INFO · f903707e
      Mark OLESEN authored
      - avoid dependency on etc/openfoam (location may change)
      f903707e
    • Mark OLESEN's avatar
      ENH: robuster handling inv() of singular tensor for finite-area LSQ (#2724) · 66cae2b9
      Mark OLESEN authored
      - with the current handling of small edges (finite-area), the LSQ
        vectors can result in singular/2D tensors. However, the regular
        2D handling in field inv() only detects based on the first element.
      
        Provide a 'failsafe' inv() method for symmTensor and tensor that
        follows a similar logic for avoiding zero determinates, but it is
        applied on a per element basis, instead of deciding based on the
        first field element.
      
        The symmTensor::inv(bool) and tensor::inv(bool) methods have a
        fairly modest additional overhead.
      
      - unroll the field inv() function to avoid creating an intermediate
        field.  Reduce the number of operations when adjusting/re-adjusting
        the diagonal.
      66cae2b9
    • Mark OLESEN's avatar
      ENH: add 2D det() / inv() methods for Tensor/SymmTensor (#2724) · 4994456a
      Mark OLESEN authored
      - for cases where a 3D tensor is being used to represent 2D content,
        the determinant is zero. Can use inv2D(excludeDirection) to compensate
        and invert as if it were only 2D.
      
      ENH: consistent definitions for magSqr of symmTensors, diagSqr() norm
      
      COMP: return scalar not component type for magSqr
      
      - had inconsistent definitions with SymmTensor returning the component
        type and Tensor returning scalar. Only evident with complex.
      4994456a
    • Mark OLESEN's avatar
      BUG: remove overly optimistic short-cut when reading BCs · 726787b0
      Mark OLESEN authored
      - had an optimisation to skip attempted reading for zero-sized
        patches. But this leads to inconsistency in the code branching, thus
        removing it.
      726787b0
    • Mark OLESEN's avatar
      ENH: support optional upper limit for printStack · f6969631
      Mark OLESEN authored
      - when only a partial stacktrace is desirable.
      
      ENH: add stack trace decorators
      
      - the 0-th frame is always printStack(), so skip that and emit
        some headers/footers instead. Eg,
      
        [stack trace]
        =============
        #1  Foam::SymmTensor<double> Foam::inv<double>(...)
        #2  Foam::inv(Foam::UList<Foam::SymmTensor<double>> const&) ...
        ...
        =============
      f6969631
    • Mark OLESEN's avatar
      ENH: additional SHA1Digest constructors and methods · 81807646
      Mark OLESEN authored
      - data_bytes(), size_bytes() methods to support broadcasting or
        gather/scatter content. Additional construct from raw bytes
        to support transmitting content.
      81807646
    • Mark OLESEN's avatar
      ENH: support construct Geometric field from separate value/dimensions · 80a416d2
      Mark OLESEN authored
      - can be easier to specify than copying into a dimensioned type.
      
        Eg,
            volSymmTensorField(io, mesh, Zero, dimLength);
      
            fluxFieldType
            (
                io
                mesh,
                Zero,
                Uf.dimensions()*dimArea/dimTime
            );
      
        vs
            volSymmTensorField
            (
                io,
                mesh,
                dimensionedSymmTensor("0", dimLength, Zero)
            );
      
            fluxFieldType
            (
                io
                mesh,
                dimensioned<typename flux<Type>::type>
                (
                    Uf.dimensions()*dimArea/dimTime, Zero
                )
            );
      80a416d2
    • Mark OLESEN's avatar
      STYLE: check tmp with is_reference() or movable(), instead of isTmp() · e68acbe3
      Mark OLESEN authored
      - missed consistency in a few places.
      
      - return nullptr (with automatic conversion to tmp) on failures
        instead of tmp<....>(nullptr), for cleaner coding.
      
      INT: add support for an 'immovable' tmp pointer
      
      - this idea is from openfoam.org, to allow creation of a tmp that is
        protected from having its memory reclaimed in field operations
      
      ENH: tmp NewImmovable factory method, forwards as immovable/movable
      e68acbe3
  9. Mar 22, 2023
  10. Mar 16, 2023
    • mattijs's avatar
      ENH: initEvaluate()/evaluate() for faePatchField, fvsPatchField · 34e36b83
      mattijs authored and Mark OLESEN's avatar Mark OLESEN committed
      - no-op implementations, but makes the call to
        GeometricBoundaryField::evaluate() less dependent on PatchField type
      
      - add updated()/manipulatedMatrix() methods to faePatchField,
        fvsPatchField etc. These are mostly no-ops, but provide name
        compatible with fvPatchField etc.
      34e36b83
  11. Mar 10, 2023
  12. Mar 09, 2023
    • Mark OLESEN's avatar
      ENH: provide getter/setter interface to standard communicators · 20566a87
      Mark OLESEN authored
      - similar to UPstream::parRun(), the setter returns the previous value.
      
        The accessors are prefixed with 'comm':
        Eg, commGlobal(), commWarn(), commWorld(), commSelf().
        This distinguishes them from any existing variables (eg, worldComm)
        and arguably more similar to MPI_COMM_WORLD etc...
      
        If demand-driven communicators are added in the future, the function
        call syntax can help encapsulate that.
      
        Previously:
      
            const label oldWarnComm = UPstream::warnComm;
            const label oldWorldComm = UPstream::worldComm;
            UPstream::warnComm = myComm;
            UPstream::worldComm = myComm;
            ...
      
            UPstream::warnComm = oldWarnComm;
            UPstream::worldComm = oldWorldComm;
      
        Now:
            const label oldWarnComm = UPstream::commWarn(myComm);
            const label oldWorldComm = UPstream::commWorld(myComm);
            ...
      
            UPstream::commWarn(oldWarnComm);
            UPstream::commWorld(oldWorldComm);
      
      STYLE: check (warnComm >= 0) instead of (...
      20566a87
    • Mark OLESEN's avatar
      06df44a5
  13. Mar 08, 2023
  14. Mar 07, 2023
  15. Mar 03, 2023
  16. Mar 02, 2023