Commit Graph

21 Commits

Author SHA1 Message Date
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
83e73e4024 BREAKING: change in signature for {fa,fv}PatchField::patchInternalField()
Signature:

    void patchInternalField(UList<Type>& pfld) const;
    // OLD: void patchInternalField(Field<Type>& pfld) const;

    This change is necessary to allow collection into slices of a
    larger list.

ENH: add {fa,fv}PatchField::patchNeighbourField(UList<Type>&)

- a retrieval version similar to patchInternalField(...)

STYLE: adjust AMI patch field private method names

- rename private method

      patchNeighbourField(...) -> getNeighbourField(...)

  to avoid access clashes with public methods

- remove undefined method neighbourSideField()
2025-05-28 14:42:18 +02:00
72ce3eb4ef BREAKING: change in behaviour for faPatch/fvPatch patchInternalField()
- the output parameter was previously a field and resized according to
  the patch size. Now the output parameter must be pre-sized prior to
  calling, which makes it possible to collect the patch internal
  fields into slices of a larger list.

  Signatures:

      void patchInternalField
      (
          const UList<Type>& internalData,
          UList<Type>& pfld    // OLD: Field<Type>& pfld
      ) const;

      void patchInternalField
      (
          const UList<Type>& internalData,
          const labelUList& addressing,
          UList<Type>& pfld    // OLD: Field<Type>& pfld
      ) const;

  This low-level change is not expected to affect any user code,
  which would normally use a higher-level interface such as from
  fvPatchField etc.
2025-05-22 13:55:04 +00:00
0ba4f36c60 ENH: use List containers for Pstream read/write calls
- using the List containers, and not their low-level data_bytes(),
  size_bytes() methods is more convenient and allows future
  adjustments to be centralized

ENH: trivial intptr_t wrapper for MPI_Win

STYLE: minor adjustments to mpirunDebug
2025-02-11 11:09:30 +01:00
cf2b305b4f ENH: upgrade to use some C++17 constructs
- 'if constexpr (...)'
   * instead of std::enable_if
   * terminate template recursion
   * compile-time elimination of code

- use C++14 '_t', '_v' versions,
  eg, std::is_integral_v<T> instead of std::is_integral<T>::value

- std::begin, std::end, std::void_t instead of prev stdFoam versions

- provide is_contiguous_v<..> as short form of is_contiguous<..>::value
  with the additional benefit of removing any cv qualifiers.

ENH: include is_rotational_vectorspace trait

- tests for vector-space and nComponents > 1 (ie, not sphericalTensor)

ENH: improve robustness of pTraits_.. tests by removing cv qualifiers
2025-01-31 09:51:44 +01:00
97459771ad ENH: more consistent handling/documentation of 'value' entry (#2703)
- for boundary conditions such as uniformFixed, uniformMixed etc the
  optional 'value' entry (optional) is used for the initial values and
  restarts.  Otherwise the various Function1 or PatchFunction1 entries
  are evaluated and used determine the boundary condition values.

  In most cases this is OK, but in some case such coded or expression
  entries with references to other fields it can be problematic since
  they may reference fields (eg, phi) that have not yet been created.

  For these cases the 'value' entry will be needed: documentation
  updated accordingly.

STYLE: eliminate some unneeded/unused declaration headers
2023-06-19 17:47:03 +02:00
98c42479f6 ENH: relax processorField waiting requirements
- for interface polling previously required that both send and recv
  requests were completed before evaluating (values or matrix update).
  However, only the recv needs to be complete, which helps disentangle
  the inter-rank waiting.

  NB: this change is possible following (1f5cf3958b) that replaced
      UPstream::resetRequests() call in favour of UPstream::waitRequests()
2023-05-09 19:30:57 +02:00
9fbc484cdf ENH: use bundled MPI_Test when checking processor interface ready()
- fewer calls, potentially more consistent

ENH: update sendRequest state after recvRequest wait

- previously had this type of code:

    // Treat send as finished when recv is done
    UPstream::waitRequest(recvRequest_);
    recvRequest_ = -1;
    sendRequest_ = -1;

  Now refined as follows:

    // Require receive data. Update the send request state.
    UPstream::waitRequest(recvRequest_);
    recvRequest_ = -1;
    if (UPstream::finishedRequest(sendRequest_)) sendRequest_ = -1;

  Can potentially investigate with requiring both,
  but this may be over-contrained.
  Example,

    // Require receive data, but also wait for sends too
    UPstream::waitRequestPair(recvRequest_, sendRequest_);
2023-04-11 14:07:36 +02:00
42dba36832 ENH: consistent handling of "value" for faePatchField
- base level now explicity equivalent to LAZY_READ with overriding as
  required

- clearer documentation for reading of "value" for faPatchField
2023-03-08 12:02:41 +00:00
2641dc4c3a ENH: direct, non-blocking transfer for finiteArea processor patch
STYLE: pTraits::rank instead of std::is_arithmetic to suppress transform

- more consistent with doTransform() coding, potentially useful for
  complex
2023-01-12 21:19:12 +01:00
94a7945be3 ENH: make lduInterfaceField::updatedMatrix mutable
- simplifies code, consistent with other matrix transfer functions.
  Use a setter method.

STYLE: AMIInterpolation::upToDate(bool) setter method

ENH: add guards to avoid float-compressed transfer of integral types

STYLE: drop unused debug member from abstract interface classes
2023-01-12 21:19:12 +01:00
e346620a62 BUG: inconsistent finiteArea proc-boundary contributions (fixes #2672) 2023-01-11 12:31:16 +01:00
b95b24e4e7 ENH: improved isolation of MPI access in Pstreams
- refactor as an MPI-independent base class.

  Add bufferIPC{send,recv} private methods for construct/destruct.
  Eliminates code duplication from two constructor forms and reduces
  additional constructor definitions in dummy library.

- add PstreamBuffers access methods, refactor common finish sends
  code, tweak member packing

ENH: resize_nocopy for processorLduInterface buffers

- content is immediately overwritten

STYLE: cull unneeded includes in processorFa*

- handled by processorLduInterface
2022-03-04 17:49:23 +00:00
e9054ec636 COMP: consistent FatalError/FatalIOError exit types
STYLE: hostName() is short name, don't need parameter
2021-12-03 15:32:37 +01:00
53af23b9fb Implicit treatment of coupled boundary conditions 2021-08-03 20:08:49 +00:00
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
262faabd7c ENH: mixed precision solver infrastructure (#1086)
- lduSolver: solveScalar for coarse-level solve; normFactor etc

- lduMatrix: have smoother natively use solveScalarField
2019-02-10 14:53:13 +00:00
8aa7b1353f ENH: refCast: give better error messages. Fixes #953. 2018-07-26 16:55:49 +01:00
f187dd8aa3 ENH: finiteArea - integration updates 2017-12-19 17:07:08 +00:00
50d1ac15ef INT: Integration updates in preparation for merge into the develop branch 2017-09-27 09:30:59 +01:00
0c64622341 Finite area port, Hrvoje Jasak
- with sphereSurfactantFoam and sphereTransport test case
2017-09-15 12:02:25 +01:00