Commit Graph

27566 Commits

Author SHA1 Message Date
cb2a89fe08 WIP: AMI cache - further updates - TO SQUASH 2025-08-19 21:30:39 +01:00
47efb65ef9 WIP: cyclicAMIFvPatchField - disable cacheNeighbourField when using AMI cache 2025-08-14 17:25:24 +01:00
e5eb84514f TUT: mixerVesselAMI2D updated for MD24 cache weights and addressing 2025-08-14 17:25:24 +01:00
f17f2f1123 WIP: AMI caching - updates for parallel operation 2025-08-14 17:25:24 +01:00
6392c88f5f BUG: AMI local communicator allocated every step. Fixes #3372 2025-08-14 17:25:24 +01:00
38680d9c8c ENH: AMI - refactored caching 2025-08-14 17:25:23 +01:00
a206824335 ENH: FaceCellWave: enable through cyclicAMI 2025-08-14 17:25:23 +01:00
0078f86e81 ENH: AMI - added caching of weights and addressing
Applicable to rotational cases:

- stores AMI weights and addressing on the first revolution
- cached evaluations performed on subsequent revolutions to reduce computational
  costs

Cached values are stored in angular bins, specified using the [optional]
`cacheSize` entry when defining the patch in the polyMesh/boundary file, e.g.

    AMI1
    {
        type            cyclicAMI;
        AMIMethod       faceAreaWeightAMI;
        neighbourPatch  AMI2;

        cacheSize       360; // New entry
        transform       rotational;
        rotationAxis    (0 0 1);
        rotationCentre  (0 0 0);
    }

Note that the transform must also be set to rotational; the additional
`rotationAxis` and `rotationCentre` entries are used to construct a local AMI
co-ordinate system to determine the rotation angle as the mesh moves.

360 bins are created in the example above, equating to a uniform bin width
of 1 degree.
2025-08-14 17:25:23 +01:00
f000a8e43d BUG: missed removal of pointMesh/boundaryProcAddressing (fixes #3412) 2025-08-14 10:56:18 +02:00
24b79d3469 ENH: surfaceHookUp: add maximum-iteration option (fixes #3401) 2025-08-13 16:43:53 +01:00
821cdf6681 ENH: energyTransport: transfer write control from controlDict to function object (#3303) 2025-08-13 16:30:51 +01:00
eaf17337aa ENH: support prefix and log-dir for RunFunctions (#3386)
- these new options permit alternative naming conventions.
  For example,

      runApplication -prefix 0001_ -suffix log blockMesh

      -> 0001_blockMesh.log
2025-08-13 12:39:42 +02:00
1642841868 ENH: allow modifiable access to IOobject local(), as per instance()
ENH: simplify code by using fieldTypes::is_xxx() tests
2025-08-13 11:57:15 +02:00
891ac808de FIX: robuster blockMesh, face::centre with SP mode (#3411)
- appears to hit single precision overflow with clang-15 in
  face::center(), cellModel::center() and blockMesh createPoints().

  The blockMesh might be particularly sensitive, since the points are
  frequently defined in millimeters (scaled later), which results
  in large intermediate summations.

  Similar to primitiveMesh checks, use double precision for these
  calculations.

ENH: support vector += and -= from compatible types

- eg, doubleVector += floatVector is now supported.
  This streamlines some coding for mixed precision.

- To avoid lots of boilerplate, do not yet attempt to support general
  operations such as `operator+(doubleVector, floatVector)`
  until they become necessary.
2025-08-12 09:24:47 +02:00
fe7006acd7 ENH: support mixed-precision reading for pointConstraintList (#3405)
- since pointConstraint is a tuple of (label, vector) not simply use
  readRawLabel, readRawScalar since the tuple will also include
  trailing padding and/or padding between its members

FIX: remove flawed handling of non-native precision for directionInfo

- packing of (label, vector) makes handling of non-native content
  non-trivial (#3412). Content is only streamed, not written to disk,
  so replace with a fatalCheck.
2025-08-12 09:24:47 +02:00
0483e4826a ENH: cleaner coding for low-level readRawLabel, readRawScalar (#1378)
- local templates and 'if constexpr' to simplify logic and reduce
  reliance on pre-processor defines.

FIX: readScalarOrDefault used scalarToken() not number() token

- will rarely (or never) be triggered, but was inconsistent
2025-08-12 09:24:46 +02:00
6a72b0e607 DEFEATURE: remove OStringStream::count() method (issue #3281)
- as seen in #3201, using count() based on the ostringstream tellp
  is not reliable since it is not updated with reset or copying.

STYLE: minor changes to string/char/span streams

- update docs to only mention string_view
- use auto return, without extra trailing 'decltype'

ENH: add IOstream size check helper methods

  * checkNativeSizes() : test only
  * fatalCheckNativeSizes() : an assert with FatalIOError
2025-08-12 09:24:46 +02:00
fcc8e62e47 ENH: add cfindPatch() method to boundary meshes
- find patch by name and return pointer to it. Similar to cfindZone()

ENH: robuster PatchFunction1 handling for uniformFixedValuePointPatchField

COMP: use 'if constexpr' with is_contiguous check

STYLE: consistent patch slicing parameters

- slice UList values, not List values
2025-08-12 09:24:46 +02:00
631b6e5111 ENH: add convenience fieldTypes tests for volume/area etc fields 2025-08-12 09:24:46 +02:00
83107a192c COMP: add forward declaration for UPstream::File
BUG: typo in UPstream::Window::put() code
2025-08-12 09:24:46 +02:00
233da9adaa TUT: bubbleColumnIATE: correct Crc-coefficient value (fixes #3362) 2025-08-11 21:32:49 +01:00
954a54ea73 BUG: heatTransferCoeff: correct the radiation-contribution sign (fixes #3325) 2025-08-08 15:35:00 +01:00
9cbf544ecd ENH: AMIInterpolation: make matching more robust 2025-08-06 11:11:37 +01:00
1bcad518c6 ENH: pointConstraint: work in binary mode 2025-07-31 14:53:21 +01:00
a32493778a ENH: surfaceSlip: allow use on stand-alone pointPatches. Fixes #3404 2025-07-31 11:39:06 +01:00
e4c1a252c6 Merge branch 'GeometricField-tweaks' into 'develop'
preliminary infrastructure for sliced/unified fields

See merge request Development/openfoam!751
2025-07-30 12:13:50 +01:00
c108153d06 ENH: DimensionedField/GeometricField provision for additional storage
- base DimensionedField on DynamicField instead of Field to allow
  convenient resizing

- initial infrastructure for unified GeometricField handling with
  the boundaryEvaluate() method

Co-authored-by: <Mark.Olesen@keysight.com>
2025-07-30 09:43:57 +02:00
53af711c6a ENH: simplify assign zero for Dimensioned and Geometric fields (#3402)
- regular or forced assignment from `zero` does not need dimension
  checking:

    Old:  U = dimensionedVector(U.dimensions(), Zero);
    New:  U = Zero;

  this eliminates a fair bit of clutter and simplifies new coding
  without losing general dimension checking capabilities.
2025-07-30 09:29:53 +02:00
a68ed1371f FIX: incorrect DynamicList resizing logic (memory pool)
- reserve() did not set the addressable size to the current capacity
  before resizing, which meant that the delete[] would not have the
  true allocated size. Only affects memory-pool usage (#3381), which
  is not yet integrated

ENH: remove unused DynamicList '*_unsafe()' methods

- can result in a mismatch between allocated and addressed sizes,
  which becomes important for memory-pool usage.
2025-07-28 14:58:08 +02:00
6ac50a3307 ENH: Added onStart option to timeControl for function object control
Triggers function object to execute on the first time step.

Example usage:

    minMax1
    {
        type            fieldMinMax;
        libs            (fieldFunctionObjects);
        writeControl    onStart;
        fields          (".*");
    }

Ref: EP2608
2025-07-24 15:09:58 +01:00
0a421c99ab ENH: checkMesh -writeChecks : support multi-region - see EP10:599 2025-07-24 15:09:58 +01:00
20e04a88f7 BUG: cylinderToCell: avoid large-number subtraction (fixes #3378) 2025-07-23 14:17:57 +01:00
9629ae8aa9 ENH: mapDistribute: add separate input and output
To avoid making initial copy of input to output field.
2025-07-17 09:59:46 +01:00
7a8089e076 ENH: extrudeMesh: excess code 2025-07-16 16:48:17 +01:00
4cd1912e4c BUG: AMIInterpolation: keep old geomComm. See #3372
Correcting bug introduced when trying to keep the old communicator.
We do not need local communicator if all ranks of comm have
some faces. Not all ranks of the already local communicator.
2025-07-14 14:43:50 +01:00
9eede215b0 BUG: argList: print excess. Fixes #3384 2025-07-14 14:43:50 +01:00
d37c685523 ENH: holeToFace: corrected documentation 2025-07-14 11:13:00 +01:00
bbef1bc289 ENH: report best dictionary context for failed foamDictionary search (#3379) 2025-07-03 14:35:54 +01:00
615aae61d7 RELEASE: Updated config to v2506 OpenFOAM-v2506 2025-06-27 09:47:59 +01:00
fabb1c2ce5 RELEASE: Updated headers to v2506 2025-06-27 09:46:28 +01:00
9f47957df5 CONFIG: updated completions cache 2025-06-27 09:45:58 +01:00
50b1c0be53 ENH: refine handling of AMI local communicator
- previous handling of forced inclusion of the master would taint the
  logic about single vs multiple ranks.

- be fussier about avoing creation of a local communicator when not
  needed.

STYLE: rename internal switch from localComm_ to useLocalComm_

- less confusing (it is a switch, not the communicator itself)
2025-06-27 09:43:15 +01:00
2e475793bc FIX: avoid setting warnComm for single-world mappedPatches
- setting the warnComm is useful for diagnosing multi-world issues but
  triggers many false warnings when used in combination with AMI local
  communicators.
2025-06-27 09:43:08 +01:00
b46b3356bc FIX: hard-coded communicator in mappedPatchFieldBase (fixes #3375) 2025-06-27 09:42:58 +01:00
453efa7ca8 COMP: minor changes for gcc-15
COMP: unresolved pTraits<long int> for reductions on i586 systems

- now always just use int64_t instead of off_t and time_t
  for master reductions.

  Note that this is not the only place where the off_t definition
  causes compilation issues (cf. fileOperation::broadcastCopy)
2025-06-27 09:42:51 +01:00
4d702d25a6 Merge remote-tracking branch 'origin/master' into develop 2025-06-27 09:41:03 +01:00
bf0eb9bede TUT: mixerVessel2D: avoid sensitivity issues when writing mesh data to disk 2025-06-26 14:05:24 +01:00
1cdf7d0b00 Merge branch 'feature-field-statistics' into 'develop'
ENH: fieldStatistics: New function object for statistics of input fields

See merge request Development/openfoam!732
2025-06-24 16:11:29 +00:00
053f895b2e ENH: fieldStatistics: new function object
- calculates various statistics (min, max, mean, variance)
  of specified fields
2025-06-24 15:52:32 +02:00
ec7ab996c5 CONFIG: set API level to 2506 (initial pre-release state)
- README updated to v2506, project-version updated to v2506
2025-06-23 16:56:30 +02:00