Skip to content
Snippets Groups Projects
  1. Mar 05, 2024
    • Sergey Lesnik's avatar
      ENH: Enable coherent XiFoam/icoFoam parallel run · 49102357
      Sergey Lesnik authored
      - Enable parallel runs with XiFoam and icoFoam in coherent format.
        Reading and, thus, startup is supported only from uniform fields.
      
      - Refactor IOobject. Trait is_coherentIOobject is now used directly in
        typeHeaderOk() with SFINAE. Often the header and object type is
        checked via a base IOobject and the type is provided via the function
        template parameter:
      
          IOobject header
              (
              ...
              );
          header.typeHeaderOk<volScalarField>(true);
      
        The change allows to move the corresponding logic from GeometricField
        back to IOobject.
      
      - In the two solvers, disable processor directories check by argList
        that otherwise leads to a fatal error.
      49102357
  2. Feb 29, 2024
    • Sergey Lesnik's avatar
      INT: add foam-extend's coherent surface fields IO · 13c2bea3
      Sergey Lesnik authored
      Introduce the code only. Not compiling yet.
      13c2bea3
    • Sergey Lesnik's avatar
      ENH: enable reading volFields in coherent · 1818d838
      Sergey Lesnik authored
      - IFCstream: extract the type of the field from the compound token and
      not via the template parameter since boundary fields may be of different
      type. The corresponding functions are not templates anymore.
      
      - Field file reading for coherent is done directly in GeometricField.
      If file is not found or the format in the file header is not coherent,
      the standard reading is triggered.
      
      - BUG in OFCstream: write flat fields (label, scalar component type)
      with a flat shape consisting of a single element. Also close
      sliceStreamRepo instead of flush that performs close+open.
      
      - BUG: CoherentMesh tried to read boundary file although boundary
      information must be extracted from file "coherent". It's tied to
      constant and thus needs a fix in the future.
      
      - BUG: coherentMesh writes every time step. Check write option of the
      points to control the write behavior.
      1818d838
  3. Feb 07, 2024
    • Mark OLESEN's avatar
      ENH: improve coherent Field output, now supports multiple fields per patch · 231d965c
      Mark OLESEN authored
      - change base-level output interface
      
          OLD:  write(std::unique_ptr<uListProxyBase>)
          NEW:  write(const word&, std::unique_ptr<uListProxyBase>)
      
        Following the relocation of coherent output into Field instead of
        UList, this provides an interface which more symmetric with the
        usual writeEntry(key, val) semantics and eliminates the need to
        scan the incoming words for "List<scalar>" etc.
      
        This call is done directly from the Field::writeEntry() method
        with the possible compound token type now being originated from
        the UList information.
      
        The states are now managed by writeKeyword/endEntry
        and beginBlock/endBlock pairs.
      
      - use internal field synchronization points for the field output.
      
        The GeometricField output is now unwrapped and the boundary patches
        are walked manually. At the begin of each patch (as well as the
        internalField), a sync index is set on the output stream. This sync
        index provides context when creating the individual fieldDataEntry
        items (ie, a correspondence of fieldDataEntry and CoherentMesh
        entities).
      
      - Tracked fieldDataEntry outside of the collecting dictionary to allow
        directly pruning etc (also avoids recursive gathering).
      
      - Replace the list-based reduction of the uniformity tags/values in
        favour of a direct individual reduction (can be revisited).
      
      COMP: forward declare UListProxyBase, add OFCstream debug flag
      
      - cannot rely on DimensionedField::debug since this is not defined
        for triSurface fields (for example)
      231d965c
    • Mark OLESEN's avatar
    • Mark OLESEN's avatar
    • Mark OLESEN's avatar
      BUG: CoherentMesh not using qualified path when reading · 7a0d5408
      Mark OLESEN authored
      ENH: support reading with specified instance
      7a0d5408
    • Mark OLESEN's avatar
      DEFEATURE: cull unused/redundant sliceMeshHelper functions · e8f83e60
      Mark OLESEN authored
      - some functions (eg, Foam::zip) clash with existing OpenFOAM
        functions, even if they were unused
      e8f83e60
    • Sergey Lesnik's avatar
      INT: coherent: enable serial write of volFields · ce89701d
      Sergey Lesnik authored and Mark OLESEN's avatar Mark OLESEN committed
      - Tested by writing volFields with the icoFoam's cavity test case
      (boundary file is still needed in polyMesh)
      
      - ASCII field files have some formatting issues (writing is done with
      dictionary::write)
      
      - OFCstream now inherits from OCharStream; rename foam-extend flavored
      member functions to OF equivalents
      
      - New regIOobject virtual member function "writeToStream" allows to
      construct OFCstream within GeometricField
      
      - The heavy data is now given to an OFCstream in the Field class, not UList.
      Doing this makes it simple to ensure that every rank will call
      OFCstream::write for every field.
      ce89701d
    • Sergey Lesnik's avatar
      INT: initial integration of IFCstream, OFCstream code · daa92dde
      Sergey Lesnik authored and Mark OLESEN's avatar Mark OLESEN committed
      daa92dde
    • Mark OLESEN's avatar
    • Mark OLESEN's avatar
      ENH: CoherentMesh improvements · 16a8e596
      Mark OLESEN authored
      - reduced overhead and bookkeeping
      - non-blocking communication of slices and shared points
      - use globalIndex for all internal accounting
      16a8e596
    • Mark OLESEN's avatar
      ENH: update/extend coherentMeshPolyMapper · d095164b
      Mark OLESEN authored
      - extracts more relevant information during construct or reset
        to allow inexpensive queries such as the number of
        internal/boundary faces and (non-processor) patch sizes etc.
      
        By consolidating more bookkeeping and functionality can
        greatly reduce the number of scans of input data performed.
      d095164b
    • Mark OLESEN's avatar
      ENH: robuster coherentProcessorPatch handling · 9d8c89cd
      Mark OLESEN authored
      - avoid fragile instance counter in favour of construct with index
      
      - support two-stage construction, hide some functions, remove unused
        variables
      
      - align naming more with OpenFOAM conventions.
      9d8c89cd
    • Mark OLESEN's avatar
      INT: initial ideas for integrating polyMesh reading · ce219384
      Mark OLESEN authored
      - include sanity checks on boundary reading, PtrList management
      
      - ensure that "boundary" information does not have more patches
        than known from the coherent format
      
      - polyPatchList instead of List of raw pointers for additional safety.
        Avoids memory leaks, even if the caller doesn't use the data.
      ce219384
    • Gregor Weiss's avatar
      INT: initial polyMesh read construct from coherent (work-in-progress) · 9290a3c2
      Gregor Weiss authored and Mark OLESEN's avatar Mark OLESEN committed
      - integration notes (Mark Olesen):
      
        * left the MUST_READ/READ_IF_PRESENT flags untouched in the
          initializer to reduce noise of the commit (to be addressed)
      9290a3c2
    • Mark OLESEN's avatar
      dfc11464
    • Mark OLESEN's avatar
    • Mark OLESEN's avatar
      ENH: polyMeshCoherentMapper writing in parallel · 52e1e601
      Mark OLESEN authored
      - also generates a "polyMesh/coherent" dictionary with some boundary
        information etc. Can be useful for later detection of coherent vs
        non-coherent formats etc.
      52e1e601
    • Mark OLESEN's avatar
      ENH: SliceStream improvements · 2c1502a3
      Mark OLESEN authored
      General
      -------
      
      - avoid parameter copying, more stringent test on bad input
      
      - support writing primitives with globalIndex reference and labelPair
      
      - obtain underlying component type and number from VectorSpace members
        instead of assuming that these are only 'scalar' and that the data
        buffer is non-null!
      
      - add Reader(), Writer() factory methods for creating streams.
        * Simpler code and few header dependencies.
      
      - style: method name sync_buffer() instead of bufferSync()
      
      - support SYNC mode when reading/writing slice contents.
        Avoids using deferred and then sync on the entire buffer.
        Use get(), get_sync() methods instead of readToContainer helper
      
      Repo
      ----
      
      - make SliceStreamRepo singleton a std::unique_ptr.
        (avoids leakage on closure).
      
      - add closeInstance() and endInstance() for extra management
        of the singleton
      
      ENH: robuster handling of ADIOS config file
      
      - use "system/adios-config.xml" or "system/adios-config.yaml"
        (was "system/config.xml") to make its intended purpose more transparent.
      
      - although ADIOS does not require a config file, it will fail if the
        config file is specified and missing. Now check the availability of
        the config file(s) and unset if missing.
      
        NB: checks use the absolute global case-path for additional safety.
      
      ENH: split off read buffer creation and size querying
      
      - add missing totalSize() method
      
      - replace the size() method, which was actually the local size
        with a range() method for querying the local dimensions
      
        range()     : queries the first component of Start() and Count()
        totalSize() : queries the first component of the Shape()
      
      - add clear(), reset(), clone() methods to InitFromADIOS to simplify
        reuse and multiple queries etc.
      
      ENH: add version (api) and sizes (label,scalar) as attributes
      
      ENH: handle writing of multi-component types directly from SliceStream
      
      - the sliceWritePrimitives helper routines should now be redundant
      2c1502a3
    • Mark OLESEN's avatar
      ENH: code improvements to initialization strategies · 38c4eedc
      Mark OLESEN authored
      - cleaner integration of globalIndex:
        * support extract to globalIndex
        * use globalIndex at the components level (for gradual phase-out)
      
      - global end-offsets are directly calculated (using MPI Allgather)
      
      - global start-offsets are calculated with globalIndex::calcOffsets,
        without an intermediate list
      
      - provide constant() DataComponent functor
      
        * simply returns the constant value with which it was constructed.
          Replace special-purpose start_from_myProcNo, count_two functions
          with equivalent constant() functors
      
      - pass and return strings by reference
      
      ENH: use factory forwarding for InitStrategies to simplify code
      
      - std::unique_ptr ownership passed by move reference
      
      STYLE: place DataComponent functions into OffsetStrategies namespace
      
      - reduces clutter of the Foam namespace
      - document their functionality
      
      - replace internal labelPair typedef (std::pair<label,label>, not
        Foam::labelPair) with range_type to avoid possible confusion
      
      - use internal typedefs for OffsetStrategy and DataComponent::base_ptr
        to avoid additional clutter in Foam namespace.
      
      - use class instead of struct with private/protected content
      38c4eedc
    • Mark OLESEN's avatar
      ENH: combine sliceMap into Slice directly · 5121b73a
      Mark OLESEN authored
      - use OpenFOAM containers and naming conventions.
      
      INT: add transitional methods to Offsets
      
      - Offsets is slated for future removal since it is largely identically
        to what globalIndex provides, but provide compilation path for now
      
      STYLE: simplify/extend sliceMeshHelper
      5121b73a
    • Mark OLESEN's avatar
      ENH: introduce coherentMeshTools with various routines · 2b57e1d0
      Mark OLESEN authored
      - a namespace with some static functions and/or algorithms for
        handling some of the coherent mesh format details.
      
       * basic extraction for slice faces / points
      
       * categorization of upper-connected face neighbours
      
       * serialize/deserialize owners/faces :
         somewhat similar to CompactListList pack/unpack but
         templated on parameters to support std::vector etc.
      2b57e1d0
    • Mark OLESEN's avatar
      ENH: unify coherent namings · 97687233
      Mark OLESEN authored
        - partition-offsets  (was partitionStarts)
        - owner-offsets      (was ownerStarts)
        - neighbour          (was neighbours)
        - face-offsets       (was faceStarts)
        - face-points        (was faces)
      
      STYLE: adjust class naming to reflect (current/future) purpose
      
      - coherentMeshPolyMapper (old: FragmentPermutation)
      - coherentProcessorPatch (old: ProcessorPatch)
      - polyMeshCoherentMapper (old: SlicePermutation)
      
      STYLE: use contains() for slice maps
      97687233
    • Mark OLESEN's avatar
      COMP: compilation cleanup : SliceStreams, meshes/coherent · 23776af3
      Mark OLESEN authored
      - combine DataComponentFree into DataComponent
      
      - make sliceMap header-only (will be removed)
      
      GIT: remove remnant OffsetDecorator header
      23776af3
    • Gregor Weiss's avatar
      INT: initial integration of SliceStreams, meshes/coherent · eb868ef1
      Gregor Weiss authored and Mark OLESEN's avatar Mark OLESEN committed
      eb868ef1
    • Mark OLESEN's avatar
      COMP: add adios dependencies to libOpenFOAM · e9ae3003
      Mark OLESEN authored
      - this will presumably change again in the future
      e9ae3003
    • Mark OLESEN's avatar
      ENH: add IOstreamOption enumeration for COHERENT file format · 34c51766
      Mark OLESEN authored
      - provide is_coherentIOobject type trait
      34c51766
  4. Feb 06, 2024
  5. Feb 01, 2024
  6. Jan 19, 2024
  7. Jan 15, 2024
  8. Jan 08, 2024
  9. Jan 03, 2024
  10. Jan 02, 2024
    • Vaggelis Papoutsis's avatar
      TUT: changes in optimisation tutorials · 52ab1fc0
      Vaggelis Papoutsis authored
      - shape optimisation: SQP failed due to wrong divScheme for the adjoint
        equations
      - shape optimisation: tutorials designed to show the impact of different flow
        conditions were actually using the same U
      - topology optimisation: tutorials designed to show the impact of the
        flow rate distribution were actually using the same target
        fractions
      - topology optimisation: updated old fvSolution syntax
      52ab1fc0
  11. Dec 22, 2023
  12. Dec 21, 2023