Commit Graph

27610 Commits

Author SHA1 Message Date
c5b9d9b532 ENH: reduce overhead of decomposedBlockData IO
- OCharStream for serializing
- skip intermediate blocks without reading
- support string_view
- read and distribute with direct non-blocking send/recv
  instead of PstreamBuffers or with IPstream/OPstream streaming
  operators.
- non-blocking gather/write when using intermediate buffer space
2025-10-01 19:35:24 +02:00
23542cabc8 ENH: reduce overhead of masterOFstream
- use OCharStream instead of OStringStream to avoid copying char data.

- replace PstreamBuffers mechanism with a direct non-blocking PEX
  algorithm, which avoids unnecessary serialization/de-serialization
  of char data. Also reduces memory footprint and allocations somewhat.

- polling dispatch to write file contents as they become available
2025-10-01 19:35:23 +02:00
278ad6fb44 Merge branch 'modifiable-memory-streams' into 'develop'
Improve handling and sizing behaviour of memory streams

See merge request Development/openfoam!755
2025-10-01 15:43:01 +01:00
b0d29ba8d6 ENH: add UPstream interface for MPI/IO
- supports writing, but without overlapping (begin/end) semantics.
2025-09-30 10:16:23 +02:00
a42fa7949b ENH: provide Istream::rewind() implementation
- base implementation drops any putback token
2025-09-30 09:32:50 +02:00
c6fc90b629 ENH: add in-place modification for OCharStream
- enables partial overwriting of content
- make default construct zero-sized, add reserve_exact() method

- improve sizing behaviour of OCharStream.
  Since char buffers will approach the INT_MAX size more quickly than
  other content, adapt the following strategy:

    | Capacity range     | Strategy                     |
    |--------------------|------------------------------|
    | 0    < N <= 0.25)  | fast growth (2)              |
    | 0.25 < N <= 0.5)   | slower growth (1.5)          |
    | 0.5  < N <= 0.75)  | very slow growth (1.25)      |
    | 0.75 < N           | already large - use max      |
2025-09-30 09:21:29 +02:00
1d1e0c5f13 ENH: make List::resize_copy() a public method
- improves usability of List as a general dynamic container as member
  data without inheritance. Provide the same method for DynamicList
  to enable more efficient use.

- additional string_view support for charList: useful when being used
  as a character buffer

STYLE: improve allocation handling in List

- consolidate routines. Only assign size after allocation to ensure
  that states are always consistent.
2025-09-29 13:18:29 +02:00
462d04dcd4 ENH: minor cleanup of memory streams and IOstreamOption
- make memory streams header-only (simpler)
- add sub-views and direct seek for span streams

New IOobject convenience methods

- IOobject::instanceValue() : return the IOobject instance as a scalar
  value (or 0). Effectively the same as instant(io.instance()).value()
  but with far less typing.

- IOobject::fileModificationChecking_masterOnly() : combines checks for
  time-stamp and inotify variants

STYLE: minor adjustments for Enum
2025-09-29 13:00:46 +02:00
d39b8a5c94 ENH: binField: remove an unused field
- skip the reduce operation for serial mode
- fix typos
2025-09-24 19:34:17 +01:00
b30d42c391 ENH: age: improve field access pattern
- cache the repeated evaluations
2025-09-24 11:55:42 +01:00
f3998b8833 TUT: scalarTransport: reorganise pitzDaily tutorial
- add application missing step to pimpleFoam/RAS/propeller1
2025-09-24 11:55:42 +01:00
1fa20428a8 STYLE: code cleanup for surfaceCourantNumber (#3422)
- simplify some handling. Use reference (not copy) for internalField
2025-09-23 17:02:01 +02:00
ac1c41a51b ENH: align zones writing pattern with polyBoundaryMesh, patchField etc.
STYLE: output the zone meta data (names) as an undecorated wordList

ENH: extra safety check in reorderZones to avoid any possible leaking
2025-09-23 12:57:02 +02:00
c378893bcb ENH: simplify direct creation of dictionary primitive entries
- can now create an empty entry and add/overwrite with tokens afterwards,
  or copy/move construct from a list of tokens.

ENH: provided named token setter methods (disambiguates bool/char/label)

COMP: use 'if constexpr' for FlatOutput

DOC: more description for Field
2025-09-23 12:53:30 +02:00
d4019e497d ENH: add/subtract/multiply: validate minimum field count requirement 2025-09-20 18:51:53 +01:00
8be698528a ENH: comfort: improve object performance and readability
- Cache wall patch metadata to avoid repeated computation
- Pre-calculate static dimensioned scalars
- Fix minor typos and enhance code readability
- Improve convergence checking with explicit loop vs max reduction
2025-09-19 20:14:21 +01:00
2d522e921f BUG: FriedrichModel: correct relative-speed calculation (fixes #3436) 2025-09-19 10:55:05 +01:00
f7fd9f8186 ENH: FA film models - added zonal Cf specification for Darcy model
Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2025-09-12 14:36:25 +01:00
1e715d3847 STYLE: coneNozzleInjection: use Umag instead of UMag for consistency (fixes #1168) 2025-09-11 09:35:02 +01:00
f4b50daa3c TUT: excess files 2025-09-10 16:38:20 +01:00
6d2a6a5ef9 GIT: MacOS: filter extraneous files 2025-09-10 09:44:05 +01:00
d6e75fb289 TUT: column: use MPPICDyMFoam instead of MPPICFoam 2025-09-08 17:23:21 +01:00
63ef1f20e8 COMP: git: support for Darwin builds 2025-09-08 15:25:41 +01:00
b9d8f99bc2 ENH: tutorials: demoing mesh alignment before shm. Fixes #3409 2025-09-08 13:33:39 +01:00
ec2b71f324 BUG: Lee: fix the sign for the solid-to-liquid mass transfer model (fixes #3429) 2025-09-08 13:21:32 +01:00
52f2c42e54 BUG: InjectionModelList: avoid an FPE instance while using spray cloud (fixes #3413) 2025-09-08 11:19:51 +01:00
aee63e7418 TUT: airfoil2D: improve convergence (fixes #3159) 2025-09-06 21:48:20 +01:00
a26f7c243a BUG: ensure check file not written if 'none' option is set 2025-09-04 09:23:33 +01:00
88ff32b713 ENH: MSwindows implementation for memInfo (#3396)
- based on code provided by Daniel Jasinski
2025-09-01 09:34:48 +02:00
4c13fd8658 ENH: provide extended fileOperation::detectProcessorPath()
- returns collated grouping as an output parameter
2025-09-01 09:34:48 +02:00
bd57627955 ENH: extend bitSet functionality
- num_blocks(), test_set() as per boost
- broadcast(), reduceAnd(), reduceOr() to simplify parallel operations
- matrix-like output for PackedList::writeList()

BUG: Pstream::broadcastList() missing resize on sub-ranks

- latent bug since it was unused in any OpenFOAM code
2025-09-01 09:34:48 +02:00
19caabbd56 CONFIG: add stub for config.sh/readline (#3427)
- add homebrew support for readline in foamConfigurePaths
2025-08-28 17:01:25 +02:00
d8250512f6 Merge branch 'feature-inplace-patchFields' into 'develop'
Extend patchFields to support non-allocating members

See merge request Development/openfoam!753
2025-08-28 14:34:41 +00:00
7fa861f09b ENH: extend faPatchField, fvPatchField to support non-allocating snGrad()
Co-authored-by: <Mark.Olesen@keysight.com>
2025-08-28 14:18:25 +00:00
202b448b8f ENH: enforce snGradTransformDiag() as zero for rotational-invariant
- the snGradTransformDiag() is used in this type of code:

  ```
  if constexpr (!is_rotational_vectorspace_v<Type>)
  {
      // Rotational-invariant type
      return tmp<Field<Type>>::New(this->size(), pTraits<Type>::one);
  }
  else
  {
      return pTraits<Type>::one - snGradTransformDiag();
  }
  ```

  This implies that a rotational-invariant form should return 0
  and not 1 like the pow(..., 0) does.
  This is a backstop for any code that may inadvertently hit it,
  but also allows the possibility of having integer indicator fields
  without upsetting the compiler.

STYLE: doTransform() logic now uses is_rotational_vectorspace
2025-08-28 14:18:25 +00:00
4cc8423c94 ENH: support zeroValue boundary condition
- a special case of fixedValue with a value of zero:
    * non-assignable
    * no mapping needed
    * value internal coeffs are zero
    * value boundary coeffs are zero
2025-08-28 14:18:25 +00:00
f96c5fafb0 Merge branch 'improve-IOobject_PtrList_CompactIOList_List' into 'develop'
general list cleanups

See merge request Development/openfoam!754
2025-08-28 08:44:32 +00:00
376674d568 STYLE: remove redundant template parameter for CompactIOField, CompactIOList
- the packed content type can be determined directly from
  List<T>::value_type without need for an additional template parameter.
2025-08-27 12:12:19 +02:00
b2135600a8 ENH: add readContents to CompactIOList, CompactIOField
- align some of the internal handling with each other and with
  CompactListList

ENH: add readContentsSize to IOList, IOField etc.

- sometimes just need to know how many elements are stored on disk
  without actually caring about the content. In those cases, can
  frequently just get that information from the first label token
  without needing to read anything else.
2025-08-27 12:12:19 +02:00
697b8a1436 ENH: improved handling of PtrList copies/cloning
- the logic has been revised to allow list copying with nullptr entries.
  These previously would have thrown an error.

- remove PtrList trimTrailingNull() method.
  It was unused and would result in inconsistent addressing sizes.

FIX: inconsistent sizing used for DynamicList/PtrDynList clearStorage()

- older code did not reset addressable size prior to clearStorage()
  or transfer(). Only a latent bug until memory pools are used.
2025-08-27 12:12:19 +02:00
a85b0f0736 STYLE: replace UList<char> specializations with 'if constexpr' handling 2025-08-27 11:59:36 +02:00
3ad17ddf5e ENH: extend UList<bool> specializations to include any(), all(), none()
- simplifies code with boolList vs. bitSet
2025-08-27 11:59:36 +02:00
2446f3f0c7 ENH: handle 'void' type in IOobject::typeHeaderOk
- can be used in most places where checkType=false is used

ENH: add non-const get() method to HashPtrTable

- allows checking and modification (symmetric with PtrList methods)

STYLE: improve annotations in fileOperations headers
2025-08-27 11:59:36 +02:00
f3c97d41bd ENH: support wmake -all=FILE option
- allows specialized versions of ./Allwmake in the local directory
2025-08-21 20:36:20 +02:00
8aa69ad976 BUG: shm: filter out duplicates. Fixes #3333
Problem was duplicates in list of patches to
add buffer layers to
2025-08-21 17:42:35 +01:00
9c13057b80 ENH: createPatch: do not remove added patches. Fixes #2726 2025-08-20 15:13:48 +01:00
8357b7e28b CONFIG: handle mpirunDebug stdin redirection before execution (#3389)
- previously handled stdin redirection as part of the run command but
  (as Alexey Matveichev noted) this meant the command would actually
  require an `eval` for this to work. Instead redirect before executing
  the run command.

- can always use 'echo -e' (bash builtin) in mpirunDebug

CONFIG: add removal of mpirun.files/ to CleanFunctions

- leave mpirun.log/ files untouched, since they may still be useful
  for later diagnosis
2025-08-19 15:34:27 +02:00
828693bc90 ENH: explicitly handle empty name lookup (objectRegistry, IOobjectList)
- provides some additional safety and precludes any recursive searching

ENH: support local directory handling in regionProperties

- allows alternative locations. Eg, for finite-area (#3419)
2025-08-19 14:42:01 +02:00
1f5eb55eeb Merge branch 'remove-mixed-precision-particle-streaming_issue3412' into 'develop'
DEFEATURE: remove mixed precision support for streaming particles (#3412)

See merge request Development/openfoam!752
2025-08-19 10:56:45 +00:00
3a78203863 DEFEATURE: remove mixed precision support for streaming particles (#3412)
- since direct streaming of particles is only ever used internally and
  never for disk I/O (which is collated by property), mixed precision
  will never occur when constructing a particle from a stream.

  Due to padding issues, the previous code would have been faulty anyhow.
  Thus remove that code and replace with a simple sanity check.
2025-08-19 10:56:23 +00:00