Skip to content
Snippets Groups Projects
  1. Sep 22, 2022
    • Mark OLESEN's avatar
      ENH: avoid undefined method in temperatureCoupledBase · a8057c4b
      Mark OLESEN authored
      - old constructor interface allowed arbitrary strings to specify the
        method enumeration. If actually used at runtime, they could/would
        raise a FatalError (unknown enumeration).
        Define a simpler default constructor instead.
      a8057c4b
    • Mark OLESEN's avatar
      TUT: use simpler faMeshDefinition · 1695f2f5
      Mark OLESEN authored
      1695f2f5
    • Mark OLESEN's avatar
      ENH: improved bookkeeping for finite-area to volume mesh correspondence · 84db37f6
      Mark OLESEN authored
      - whichPolyPatches() = the polyPatches related to the areaMesh.
      
        This helps when pre-calculating (and caching) any patch-specific
        content.
      
      - whichPatchFaces() = the poly-patch/patch-face for each of the faceLabels.
      
        This allows more convenient lookups and, since the list is cached on
        the area mesh, reduces the number of calls to whichPatch() etc.
      
      - whichFace() = the area-face corresponding to the given mesh-face
      
      ENH: more flexible/consistent volume->area mapper functions
      84db37f6
    • Mark OLESEN's avatar
      ENH: extend polyBoundaryMesh patch/face query · e8863cd0
      Mark OLESEN authored
      - whichPatchFace() returns the (patchi, patchFacei) tuple,
        whichPatch() simply wraps whichPatchFace()
      
      - groupNames() : similar to zones
      
      ENH: simplify calls to faPatch/fvPatch patchField, lookupPatchField
      
      - make second (ununsed) template parameter optional.
        Was previously needed for old compilers (2008 and earlier).
      e8863cd0
    • Mark OLESEN's avatar
      ENH: template invariant base classes for {fa,fae,fv,fvs,point}PatchField · 4393ffa8
      Mark OLESEN authored
      - simplifies construction/inheritance
      
      ENH: add {fa,fv}PatchField::zeroGradientType() static
      
      - can be used to avoid literal "zeroGradient" in places
      
      STYLE: adjust naming of pointPatch runtime selection table
      
      - simply use 'patch' as per fa/fv fields
      
      STYLE: add zero-size guard to patch constraintType(const word&)
      4393ffa8
    • Mark OLESEN's avatar
      ENH: support assign or construct Field from primitiveEntry · 88f5be47
      Mark OLESEN authored
      For example, instead of
      
         if (dict.found("value"))
         {
             fvScalarField::operator=
             (
                 Field<scalar>("value", dict, p.size())
             );
         }
      
      can use more precise specifications, and also eliminate searching
      the dictionary multiple times:
      
         const auto* eptr = dict.findEntry("value", keyType::LITERAL);
      
         //or:  dict.findCompat("value", {{"oldName" ... }}, keyType::LITERAL);
      
         if (eptr)
         {
             fvScalarField::assign(*eptr, p.size());
         }
      
      STYLE: combine declaration of FieldBase into Field.H
      88f5be47
    • Mark OLESEN's avatar
      ENH: improved argList handling of libs, functionObjects · 88061f3b
      Mark OLESEN authored
      - include -no-libs option by default, similar to '-lib',
        which makes it available to all solvers/utilities.
        Add argList allowLibs() method to query it.
      
      - relocate with/no functionObjects logic from Time to argList
        itself as argList allowFunctionObjects()
      
      - add libs/functionObjects override handling to decomposePar etc
      
      ENH: report the stream relativeName for IOerrors (see c9333a5a)
      88061f3b
    • Mark OLESEN's avatar
      ENH: improve autoPtr/refPtr/tmp consistency (#2571) · c031f7d0
      Mark OLESEN authored
      - disallow inadvertant casting and hidden copy constructions etc
      c031f7d0
    • Mark OLESEN's avatar
      ENH: support tuple (pair) indexing into FieldField · 052d8b13
      Mark OLESEN authored
      - can use a (patchi, elemi) pair to access an element of a FieldField
      052d8b13
    • Mark OLESEN's avatar
      ENH: prefer PtrList set/get/test instead of PtrList::operator() access · a0282c7e
      Mark OLESEN authored
      - clearer coding intent. Mark operator() as 'deprecated'
      
      - add bounds checking to get(label) and set(label) methods.
      
        This gives failsafe behaviour for get() that is symmetric with
        HashPtrTable, autoPtr etc and aligns the set(label) methods
        for UPtrList, PtrList and PtrDynList.
      
      - use top-level PtrList::clone() instead of cloning individual elements
      
      ENH: support HashPtrTable set with refPtr/tmp (flexibility)
      a0282c7e
    • Mark OLESEN's avatar
      ENH: use pointer checks for dynamicCast, refCast · b9ca63b1
      Mark OLESEN authored
      - avoids try/catch exception handling
      
      STYLE: prefer refCast (shorter) to dynamicCast where possible
      b9ca63b1
    • Mark OLESEN's avatar
      COMP: native MPI reduce not triggered (fixes #2569) · 512f5585
      Mark OLESEN authored
      - define returnReduce *after* defining all specializations for reduce
        so that the compiler does not take the generic templated reduce.
      
      ENH: add UPstream::reduceAnd, UPstream::reduceOr
      
      - direct wrapper of MPI_LAND, MPI_LOR intrinsics
      
      ENH: provide special purpose returnReduce for logical operations
      
      - returnReduceAnd(bool), returnReduceOr(bool) as a inline wrappers
        for returnReduce with andOp<bool>(), orOp<bool>() operators,
        respectively.
      
        These forms are more succinct and force casting of the parameter
        into a bool. Using MPI bool operations allows vendor/hardware MPI
        optimisations.
      
        * Test for existence on any rank:
      
            1.  if (returnReduceOr(list.size()) { ... }
            1b. if (returnReduceOr(!list.empty()) { ... }
      
            2.  if (returnReduce(bool(list.size(), orOp<bool>())) { ... }
            3.  if (returnReduce(list.size(), sumOp<label>()) != 0) { ... }
            3b. if (returnReduce(list.size(), sumOp<label>()) > 0) { ... }
      
        * Test for non-existence on all ranks:
      
            1.  if (returnReduceAnd(list.empty()) { ... }
            1b. if (!returnReduceOr(list.size()) { ... }
      
            2.  if (returnReduce(list.empty(), andOp<bool>())) { ... }
            3.  if (returnReduce(list.size(), sumOp<label>()) == 0) { ... }
      
        Notes:
            Form 1. succinct
            Form 2. may require explicit bool() for correct dispatch
            Form 3. more expensive sumOp<label> just for testing size!
            There are also some places using maxOp<label> instead of sumOp<label>
      512f5585
    • Mark OLESEN's avatar
      ENH: use combined &=, |=, ^= forms for bitAndEqOp, bitOrEqOp, bitXorEqOp · 968c1db1
      Mark OLESEN authored
      - these also work for bitSet, HashSet with slightly lower overhead
      
      ENH: locate FOAM_NODISCARD attribute macro in stdFoam.H
      968c1db1
    • Mark OLESEN's avatar
      ENH: add internal parRun guards to some UPstream methods · 47e172e6
      Mark OLESEN authored
      - simplifies coding
        * finishedRequest(), waitRequest(), waitRequests() with parRun guards
        * nRequests() is noexcept
      
      - more consistent use of UPstream::defaultCommsType in branching
      47e172e6
    • Mark OLESEN's avatar
      716d3305
    • mattijs's avatar
      ENH: checkMesh: check patches across processors · 6f764c8d
      mattijs authored
      6f764c8d
  2. Sep 20, 2022
  3. Sep 14, 2022
  4. Sep 12, 2022
  5. Sep 09, 2022
  6. Sep 07, 2022
  7. Aug 19, 2022
    • Mark OLESEN's avatar
      COMP: avoid cpp replacement of linux,unix,... in Make/options (fixes #2548) · 4730c381
      Mark OLESEN authored
      - the cpp command is used to process Make/{files,options}, but builtin
        defines such as `linux` will cause problems (macro replacement) if
        these is present in the Make/{files,options}.
      
        Solve by undefining -Ulinux, -Uunix macros, which will leave directory
        names such as "/usr/lib/x86_64-linux-gnu/..." intact.
      
        Directories with _linux, __linux__ content (for example), could
        still pose future issues.
      4730c381