Skip to content
Snippets Groups Projects
  1. May 11, 2022
  2. May 10, 2022
    • Mark OLESEN's avatar
      ENH: reduce allocations/sorting when setting time (#2461) · dd560a6e
      Mark OLESEN authored
      - use DynamicList instead of List in the cache, which reduces the
        number of allocations occuring each time.
      
      - since the cached times are stored in sorted order, first check if the
        new time is greater than the last list entry. Can then simply append
        without performing a binary search and can obviously also skip any
        subsequent sorting.
      
      STYLE: add noexcept to Instant methods, declare in header (like Tuple2)
      dd560a6e
    • Mark OLESEN's avatar
      TUT: add constraint types for finiteArea tutorials · 525f77f8
      Mark OLESEN authored
      STYLE: accept '-proc' as shortcut in restore0Dir function
      525f77f8
    • Mark OLESEN's avatar
      BUG: probes not written to probes/0 output (fixes #2452) · de598751
      Mark OLESEN authored
      - as part of #2358 the writing was changed to be lazy.
        Which means that files are only created before they are actually
        written, which helps avoid flooding the filesystem if sample-only
        is required and also handles case such as "rho.*" where the sampled
        fields are not known from the objectRegistry at startup.
      
      - now create any new files using the startTime value, which means they
        are easier to find but still retains the lazy construct.
      
        Don't expect any file collisions with this, but there could be some
        corner cases where the user has edited to remove fields (during
        runtime) and then re-edits to add them back in. In this case the
        file pointers would be closed but reopened later and overwriting
        the old probed values. This could be considered a feature or a bug.
      
      BUG: bad indexing for streamlines (fixes #2454)
      
      - a cut-and-paste error
      de598751
    • Bernhard Gschaider's avatar
      COMP: WM_SCHEDULER breaks compilation (fixes #2439) · 762c095f
      Bernhard Gschaider authored and Mark OLESEN's avatar Mark OLESEN committed
      - only wrap compiler calls (not things like flex/bison)
      - avoid single quoted '&&' (causes syntax errors)
      
      STYLE: report WM_COMPILE_CONTROL value in top-level Allwmake
      762c095f
    • Andrew Heather's avatar
      Merge branch 'feature-reorganise' into 'develop' · ebc634a4
      Andrew Heather authored
      code style, bug fixes
      
      See merge request !535
      ebc634a4
    • Mark OLESEN's avatar
      ENH: consolidate processorTopology handling for volume and area meshes · 42de6243
      Mark OLESEN authored
      - relocate templating to factory method 'New'.
        Adds provisions for more general re-use.
      
      - expose processor topology in globalMesh as topology()
      
      - wrap proc->patch lookup as processorTopology::procPatchLookup method
        (failsafe). May consider using Map<label> for its storage in the
        future.
      42de6243
    • Mark OLESEN's avatar
      COMP: combine uindirectPrimitivePatch.H into indirectPrimitivePatch.H · dea2f23a
      Mark OLESEN authored
      - similarly combine typedef headers for primitiveFacePatch,
        foamVtkUIndPatchWriter, foamVtkUIndPatchGeoFieldsWriter etc
        (reduce file clutter)
      dea2f23a
    • Mark OLESEN's avatar
      ENH: wrapped IOField, IOList, IOmapDistributePolyMesh · 33693f32
      Mark OLESEN authored
      - Uses a refPtr to reference external content.
        Useful (for example) when writing data without copying.
        Reading into external locations is not implemented
        (no current requirement for that).
      
          * IOFieldRef -> IOField
          * IOListRef -> IOList
          * IOmapDistributePolyMeshRef -> IOmapDistributePolyMesh
      
        Eg,
      
          labelList addressing = ...;
      
          io.rename("cellProcAddressing");
          IOListRef<label>(io, addressing).write();
      
        Or,
          primitivePatch patch = ...;
          IOFieldRef<vector>(io, patch.localPoints()).write();
      33693f32
    • Mark OLESEN's avatar
      BUG: bitSet &= operation does not mask out non-overlapping (#2456) · 036abb8e
      Mark OLESEN authored
      - the values from non-overlapping blocks were simply ignored,
        which meant that ('111111111111' & '111111') would not mask out
        the unset values at all.
      
      - similar oddities in other operations (|=, ^= etc)
        where the original implementation tried hard to avoid touching the
        sizing at all, but now better resolved as follows:
      
        - '|=' : Set may grow to accommodate new 'on' bits.
        - '^=' : Set may grow to accommodate new 'on' bits.
        - '-=' : Never changes the original set size.
        - '&=' : Never changes the original set size.
                 Non-overlapping elements are considered 'off'.
      
        These definitions are consistent with HashSet behaviour
        and also ensures that (a & b) == (b & a)
      
      ENH: improve short-circuiting within bitSet ops
      
      - in a few places can optimise by checking for none() instead of
        empty() and avoid unnecessary block operations.
      
      ENH: added bitSet::resize_last() method
      
      - as the name says: resizes to the last bit set.
        A friendlier way of writing `resize(find_last()+1)`
      036abb8e
    • Mark OLESEN's avatar
      ENH: additional IndirectList static methods · a34357b1
      Mark OLESEN authored
      - uniq() : creates an IndirectList with duplicated entries
        filtered out
      
      - subset() : creates an IndirectList with positions that satisfy
        a condition predicate.
      
      - subset_if() : creates an IndirectList with values that satisfy a
        given predicate.
      
        An indirect subset will be cheaper than creating a subset copy
        of the original data, and also allows modification.
      
      STYLE: combine UIndirectList.H into UIndirectList.H (reduce file clutter)
      a34357b1
    • Mark OLESEN's avatar
      ENH: HashTable sorted() method · 7afebef5
      Mark OLESEN authored
      - the sorted() method fills a UPtrList with sorted entries. In some
        places this can provide a more convenient means of traversing a
        HashTable in consistent order, without the extra step of creating
        a sortedToc(). The sorted() method with a UPtrList will also have
        a lower overhead than creating any sortedToc() or toc() since it is
        list of pointers and not full copies of the keys.
      
        Instead of this:
      
            HashTable<someType> table = ...;
      
            for (const word& key : table.sortedToc())
            {
                Info<< key << " => " << table[key] << nl;
            }
      
        can write this:
      
            for (const auto& iter : table.sorted())
            {
                Info<< iter.key() << " => " << iter.val() << nl;
            }
      
      STYLE:
      
      - declare hash entry key 'const' since it is immutable
      7afebef5
    • Mark OLESEN's avatar
      ENH: relocate Foam::sort from PtrListOps to UPtrList.H · d68902f4
      Mark OLESEN authored
      - can sort directly without ListOps or other intermediates
        (eg labelList order).
      
      - PtrListOps::less/greater wrappers -> UPtrList::less/greater
      d68902f4
  3. May 09, 2022
    • Mark OLESEN's avatar
      STYLE: IOobject/regIOobject - noexcept methods, isolate local functions · cb6f9087
      Mark OLESEN authored
      - local writeHeaderEntry helper was not marked as file-scope static.
      
      - use do/while to simplify handling of padding spaces
      
      ENH: IOobject - copy construct, resetting name and local component
      
      - when copying with a new local component, this is simpler than
        constructing from all of the components, which was previously the
        only possibility for setting a new local component.
      cb6f9087
    • Mark OLESEN's avatar
      ENH: relocate sortedOrder from ListOps.H to List.H · bf0b3d88
      Mark OLESEN authored
      - commonly used, only depends on routines defined in UList
        (don't need the rest of ListOps for it).
      
      ENH: implement boolList::operator() const
      
      - allows use as a predicate functor, as per bitSet and labelHashSet
      
      GIT: combine SubList, UList into List directory (intertwined concepts)
      
      STYLE: default initialize DynamicList instead of with size 0
      bf0b3d88
    • Mark OLESEN's avatar
      ENH: add optional agglomeration coefficent to random decomposition · 0e01e530
      Mark OLESEN authored
      - specifies the number of consecutive cells to assign to the same
        randomly chosen processor. Can be used to have a less extremely
        random distribution for testing possible breaking points.
      
      Eg,
          method random;
      
          coeffs
          {
              agglom  4;
          }
      
      - Add finiteArea cellID (actually face ids) / faceLabel and procID
        for foamToVTK with -write-ids. Useful when this type of information
        is needed.
      0e01e530
    • mattijs's avatar
      ENH: checkMesh: weights on AMI patches. · 8ee4efc6
      mattijs authored
      8ee4efc6
  4. May 06, 2022
  5. May 04, 2022
  6. Apr 29, 2022