Compare commits

...

354 Commits

Author SHA1 Message Date
b050cd9480 BUG: missed removal of pointMesh/boundaryProcAddressing (fixes #3412) 2025-08-14 11:00:09 +02:00
e73c13466b ENH: pointConstraint: work in binary mode 2025-07-31 14:55:39 +01:00
d2c145d7a4 COMP: resolve label 64 compilation ambiguity for Mingw (fixes #3390)
COMP: restrict HashTable maxTableSize to int32 range

- avoids compiler warning about possible overflow (left-shift
  operation) for label 64 compilations and we don't need anything
  larger than int32 HashTable capacity anyhow.

ENH: make nearest power-of-two non-branching (previously brute-force)
2025-07-31 11:36:50 +02:00
95a5dfacc7 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-15 13:53:54 +01:00
615aae61d7 RELEASE: Updated config to 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
5f580f547f ENH: reuse AMI local communicator between timesteps (#3372)
- in many cases the local communicator has the same communication
  pattern for several timesteps so it can be reused instead of being
  recreated. Avoids repeated MPI_Comm_free()/MPI_Comm_group() calls

- STYLE: eliminate bitSet intermediate when determining the sub-ranks
2025-06-23 16:51:50 +02:00
36d1d9b79d SUBMODULE: update cfmesh (SLList changes) 2025-06-23 13:09:11 +02:00
9e9c90ddb2 SUBMODULE: update data-community and turbulence-community 2025-06-20 14:32:34 +01:00
45f8d847b0 Merge branch 'feature-bladeForces' into 'develop'
ENH: Added new bladeForces function object

See merge request Development/openfoam!746
2025-06-20 11:27:00 +00:00
1078234f18 ENH: Added new bladeForces function object
Calculates thrust, drag, torque and lift/drag/pressure coefficients
of single or multiple blades (eg, propeller, turbine blades)

This function object differs from the propellerInfo and forces
function objects in that all forces are calculated within the local
cylindrical coordinate system, which yields thrust and drag values
within the expected reference frame.

The output comprises:
- coefficients per radial bin
- area-weighted total coefficients
- integrated forces and torque

For convenient post-processing, the results are also written in a VTK
(.vtp) output format. All surface results are registered internally,
which makes them available for other function objects.
2025-06-18 21:16:03 +02:00
3c4e226130 COMP: reduce off_t as int64 for windows compilation
- avoids unresolved pTraits<long int> for reductions
2025-06-18 20:28:58 +02:00
7021b073cf DOC: repeat the documentation about function objects "error" enums
- originally only listed in functionObjectList, now also list the same
  information under namespace functionObjects so it is more likely to
  be found.  Document the behaviour as a table to make it more
  immediately visible than the text form.
2025-06-18 20:28:58 +02:00
cdd1e19f68 Merge branch 'feature-GAMGAgglomeration-name' into 'develop'
ENH: GAMGAgglomeration: optional name. Fixes #3332

See merge request Development/openfoam!749
2025-06-18 18:25:48 +00:00
09beb5571a ENH: GAMGAgglomeration: optional name. Fixes #3332 2025-06-18 18:23:37 +00:00
23adebdb86 FIX: missing specialisations for transformF[av]PatchField
- fix for 25139e492e
2025-06-18 11:07:28 +01:00
2b0e4dc97a ENH: potentialFoam: allow swirl bc. See #3211
Bypasses the constraint override. Contentious -
does field algebra or boundary constraints take
priority.
2025-06-16 17:13:31 +01:00
e803646228 Merge branch 'consistent-handling-of-filtered-names' into 'develop'
consistent handling of filtered patch/zone names. More inGroups handling for utilities etc.

See merge request Development/openfoam!748
2025-06-13 14:17:48 +01:00
be278abcc0 ENH: revise patch group selection to ensightMesh
- supports inGroup while also respecting allow/deny semantics

- support inGroup for cellZone/faceZone selection
2025-06-13 10:29:32 +02:00
93f980834b ENH: support patch group selection
- vtkWrite, foamToVTK, surfaceMeshExtract
2025-06-13 10:29:32 +02:00
e8dce32b0a ENH: consistent handling of filtered patch/zone names
- the indices(const wordRes& allow, const wordRes& deny) methods
  were not defined consistently with the wordRes::filter handling.

  wordRes::filter - allow/deny both empty:
      = no filtering (ie, accept everything)

  indices(allow,deny) - allow/deny both empty:
     = return identity list (NEW behaviour)
     = return empty list (OLD behaviour)

  Consider the old behaviour a minor bug since the limited number of
  callers had their own checks that avoided the poor behaviour.

  Example of the inconsistent behaviour:

     pbm.indices(wordRes(), wordRes({"non-existent"}))
        --> identity list (old, new behaviour)

     pbm.indices(wordRes(), wordRes())
         --> identity list (new behaviour)
         --> empty list    (old behaviour)
2025-06-13 09:15:58 +02:00
91925871d9 Merge branch 'fix-3374-questionable-const_cast' into 'develop'
avoid casting workarounds for syncTools::syncBoundaryFaceList

See merge request Development/openfoam!747
2025-06-12 12:49:26 +00:00
a5090c37a3 ENH: minor improvements to UPstream::communicator wrapper class
- robuster reset() method that handles self-assignment
- additional swap() and constCast() methods

STYLE: relocate UPstream::communicator declarations within header
2025-06-12 13:13:26 +02:00
0d7816b7fd ENH: avoid questionable const_cast of SubList (#3374) 2025-06-12 13:13:26 +02:00
9bdb75eeef ENH: add ListOps::equal() function
- tests for list equality with different but compatible data types.
  Eg, when comparing lists of int32 and int64 values.

STYLE: pass UList instead of List references into ListOps functors
2025-06-12 13:13:26 +02:00
a860d48637 ENH: make some vectorTensorTransform methods inplace
- avoids intermediate allocation and re-assignment to self (#3374)

BUG: checkMesh (application) with questionable memory handling (#3374)

- move the contents of the new points instead of attempting to transfer
  the entire list

COMP: replace mapDistribute specializations with if constexpr handling

- simplify future maintenance
2025-06-12 13:13:26 +02:00
97296043c0 ENH: snappyHexMesh: more warnings. See #3377
This one only tackles the per-region for refinementSurfaces.
Other ones tbd.
2025-06-12 10:10:16 +01:00
6bdceaf29f BUG: AMI: local communicators. Fixes #3376 2025-06-11 16:39:48 +01:00
34df4eaf40 ENH: ensightWrite: allow inGroup names in patches and excludePatches 2025-06-11 13:36:14 +01:00
75b2d0b656 BUG: masterStream forwards without communicator (fixes #3373)
- in messageStream::masterStream(int), it forwarded to stream()
  without the communicator, which meant it would incorrectly check
  UPstream::master(worldComm) and possibly not produce any output (or
  block).
2025-06-10 15:20:11 +02:00
9bc6f2f91f ENH: support 'rpm' input for propeller functionObject (as per rotorDisk)
- update code style for forces/propeller.
- simplify coordinate handling in propeller functionObject
2025-06-10 10:32:03 +02:00
96872f031f Merge branch 'feature-orientedSurface' into 'develop'
ENH: snappyHexMesh: work better on non-manifold. Fixes ##3361

See merge request Development/openfoam!740
2025-06-09 15:12:47 +00:00
55d89ac4d6 ENH: snappyHexMesh: work better on non-manifold. Fixes ##3361 2025-06-09 15:12:47 +00:00
fe0ba07a7a SUBMODULE: update OpenQBMM for v2506 2025-06-05 16:06:56 +02:00
164a3e8330 ENH: IOstream::unsetf() now returns old flags (eg, for toggling)
ENH: align MPI_Probe non-blocking handling with header description

- the header states that the commsType is non-blocking or not,
  but the implementation actually checked for 'buffered' or not.

STYLE: fix some spacing and some documentation
2025-06-05 16:06:56 +02:00
2f6581133c ENH: preserve matrix manipulation state in boundary consistency check
- add placeholder methods in faPatchField and move setter functions
  from protected to public access.
2025-06-05 15:09:25 +02:00
9e8e14e448 TUT: minor tutorial cleanup
- use functionObject writeInterval not timeInterval.
  No change in behaviour since the missing writeInterval is treated
  as '1' anyhow when using 'timeStep' for the writeControl

- consistent use of 'adjustable' vs 'adjustableRunTime'

- prefer '#eval{ vector(...) }' to calling '#eval' multiple times
2025-06-04 16:39:34 +02:00
ffea136955 BUG: correct constant definition in sigma LES model (fixes #3371) 2025-06-03 20:04:17 +01:00
5dbc2e5890 Merge branch 'patch_specializations' into 'develop'
Simplify specialization of patch fields, consolidate boundary evaluation

See merge request Development/openfoam!743
2025-05-29 11:20:25 +00:00
1be6991d3f CONFIG: set API level to 2502
- changes in patchField signatures
2025-05-28 17:50:55 +02:00
25139e492e ENH: replace patchField specializations with if constexpr
- simplifies future code changes

STYLE: noexcept access for wedgePatch methods
2025-05-28 17:50:55 +02:00
0189311026 ENH: avoid unneeded transform operations for scalar pointField BCs 2025-05-28 17:50:55 +02:00
d6e6450834 ENH: add missing construct GeometricField from primitive field (tmp)
ENH: improvements for GeometricBoundaryField evaluation

- early termination from evaluate_if() and evaluateCoupled().

- evaluateCoupled() now forwards to evaluate_if() and receives
  additional handling for a 'void' parameter type.

BREAKING: extra template parameter for overset correctBoundaryCondition

- the true/false flag as a template parameter instead of as an
  argument to use 'if constexpr' code
2025-05-28 17:50:55 +02:00
1d6c77f8f4 ENH: complement lookupPatchField with cfindPatchField
- encapsulates (foundObject && lookupPatchField) together,
  similar to cfindObject

STYLE: remove unnecessary dummy parameters from lookupPatchField

- these were a workaround for a very old gcc bug and are no longer
  needed. However, retain the (unneeded) second template parameter to
  continue with not breaking existing old code - it has no overhead.
2025-05-28 14:42:27 +02: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
0bb0c1db74 BUG: plicRDF: reconstructing distance func for point neighbours (fixes #3279) 2025-05-28 12:13:52 +01:00
8d9f4c54f3 COMP: suppress false positives from -Wdangling-reference (gcc)
- the number of false positives has reduced, but in a few remaining
  cases, the compiler cannot possibly "know" that the pointer stored
  on the registry will outlive the scope of the method (for example)

  gcc-13: suppressing these spurious warnings needs to be done at each
  caller, which is simply not worth it, since later compiler versions
  provide a cleaner solution.

  gcc-14: the [[gnu::no_dangling]] attribute on the declaration
  lets the compiler know the intent.

- additional FOAM_REAL_GNUC macro (defined in stdFoam.H) to define
  the "real" gcc version and ignoring other compilers masquerading
  as gcc.

COMP: rename MeshObject code to {cxx,txx}

- avoids issues on case-insensitive filesystems (#3316)
2025-05-27 18:25:58 +02:00
f7c8bfdce0 STYLE: retrieve tensor diagonal directly instead of via diagTensor 2025-05-27 11:09:27 +02:00
6ca0c59519 Merge branch 'feature-patchField-adjustments' into 'develop'
ENH: extend GeoMesh interface, prepare for in-place patch slices

See merge request Development/openfoam!741
2025-05-22 13:55:29 +00: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
a9b59ad27e ENH: control local boundary consistency checks from FieldBase settings
- avoids multiple definitions for various template specializations
2025-05-22 13:55:04 +00:00
4668d0e886 ENH: extend GeoMesh interface to include boundary_size() static method
- can be used to pre-allocate space for internal+boundary field for
  flat addressing (issue #3364).

  For example:

      DynamicField<Type> fld
      (
          std::pair<label,label>
          (
              GeoMesh::size(mesh),
              GeoMesh::size(mesh)
            + (extra ? GeoMesh::boundary_size(mesh) : label(0))
          )
      );

ENH: base changes for GeometricField flags

- FieldBase 'localBoundaryConsistency_' and 'localBoundaryTolerance_'
  for central handling of local boundary consistency checks.

- FieldBase 'unifiedGeometricField' for future extensions to GeometricField
2025-05-22 13:55:04 +00:00
c78f25035d Merge branch 'feature-memory_pool.pre' into 'develop'
basic hooks for alternative List/Matrix allocators

See merge request Development/openfoam!742
2025-05-22 13:46:49 +00:00
82e0d76748 ENH: provide basic hooks for alternative List/Matrix allocators
- include "contiguous.H" in ListPolicy, which makes it available
  whenever UList.H has been included

ENH: return plain List instead of shrinking the DynamicList
2025-05-22 14:41:05 +02:00
4e513cec18 ENH: DimensionedField, GeometricField enhancements and style changes
- constCast() convenience methods.
  This simplies coding in places, especially in solvers

- inline some methods within headers, for better overview/maintenance

- only set DimensionedField default value on construct if not read

- storeOldTimes() does not require const_cast
2025-05-21 14:19:36 +02:00
ae3adc1007 ENH: add fvPatch::offset() as pass-through to polyPatch::offset()
- makes fvPatch consistent with faPatch etc and can simplify coding

ENH: handle sizing within extrapolateInternal() patch field methods

- reduces reliance on any sub-components

ENH: extend polyBoundaryMesh patch selectors

- indices_if() method with a predicate, or with a patch-type
  behaves similarly to findPatchIDs(), but returns a sorted
  labelList instead of a labelHashSet

- nFaces_if() method with a predicate return the number of boundary
  faces for patches matching the given predicate.
2025-05-21 14:19:36 +02:00
a0bba74950 STYLE: remove old (__cplusplus >= 201703L) checks
- now using c++17 throughout
2025-05-21 14:19:36 +02:00
535a4fccb4 Merge branch 'fix-3360-wrong-addressing' into 'master'
BUG: wrong cellZone addressing in uniformityCellZone (fixes #3360)

Closes #3360

See merge request Development/openfoam!738
2025-05-13 10:36:26 +00:00
e1b04cb6a7 BUG: wrong cellZone addressing in uniformityCellZone (fixes #3360)
The mean value, variance and volume fields for each zone were accessed
using the wrong indices
2025-05-13 11:29:18 +03:00
a3f74d832a COMP: default construct Matrix is constexpr 2025-05-12 11:35:02 +02:00
a92143400d TUT: bubbleColumnPolydisperse: update the function object library (fixes #3321) 2025-05-09 16:25:47 +01:00
c6220c162e BUG: RosinRammler: correct the order of scale and shape parameters (fixes #3342)
Co-authored-by:Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2025-05-09 13:25:54 +01:00
e5f147a211 STYLE: report active/inactive state flag for fvOptions (fixes #3356) 2025-05-08 12:23:04 +01:00
ebbeef27b4 ENH: avoid the build-up of the background solver dictionary
The solverPerformanceDict gets larger due to the addition of a SolverPerformance
data per field at every outer iteration within the same main iteration/time
step.

However, the subsequent functionalities seem to use only the first and last
element of this dictionary per field; therefore, storing the interim values
was revealed to be redundant.

The change removes the interim values by transforming the `List` container
into the `Pair` container, and modifying the relevant algorithms.
2025-05-06 15:20:45 +01:00
5bb030480d Merge branch 'feature-mui-support' into 'develop'
add -mpi-split-by-appnum option (issue #3127)

See merge request Development/openfoam!735
2025-04-30 15:33:32 +00:00
4334aa43a0 ENH: add -mpi-split-by-appnum option (issue #3127)
- this can be used as an alternative to the (-world) multi-world
  option. For example, for calling OpenFOAM applications with MUI
  (https://github.com/MxUI/MUI)
2025-04-30 12:38:48 +02:00
34143b433a ENH: allow disabling of initial MPI_Comm_dup(MPI_COMM_WORLD,...)
- can use -mpi-no-comm-dup to suppress the initial communicator
  duplication (to avoid potential deadlock with coupled processes).
  This is partly related to comments in merge-request !735

ENH: simplify parsing/removal of local -world option

- can extract the world name in a single pass and also makes the
  parsing robuster.

ENH: support regular MPI_Comm_split()

- the two-step method of Allgather + Comm_create_group may not be
  expected by other applications (issue #3127) and that can lead to
  deadlock, so also add in code for the regular MPI_Comm_split.
  Does not support re-sorting keys!

FIX: faulty logic for splitting communicators

- only affected more recent develop branch
2025-04-30 12:38:45 +02:00
c5ceec3c73 Merge branch 'improved-list-sizing' into 'develop'
ENH: refine handling of DynamicList/DynamicField resizing

See merge request Development/openfoam!737
2025-04-30 08:22:01 +00:00
91e7870ee8 ENH: extend patch/boundary methods: faces(), faceOwner()
- similar to polyBoundaryMesh
2025-04-29 15:42:39 +02:00
1d62b6274e COMP: add <numeric> to stdFoam.H
- useful to have std::reduce(), std::transform_reduce() available in
  more places, so treat like <algorithm> and include in "stdFoam.H"

STYLE: add 'stricter' detection markers for cast of SubList to List etc.

STYLE: remove 'const' qualifier from Foam:one/Foam::zero (in Field)
2025-04-29 15:42:39 +02:00
5ee8f19bdd ENH: refine handling of DynamicList/DynamicField resizing
- previously had special resizing treatment for the corner case when
  the addressable size and the new capacity are identical. However,
  that particular approach (to minimize copying) meant that the exact
  deallocation size would likely be incorrect.
  Having the correct deallocation size becomes more important with
  alternative allocators.

  Introduce resize_copy() protected function to limit the number
  of elements copied during the resize.

ENH: provide DynamicList/DynamicField constructor with sizing

- allows fine-grained creation of a DynamicList/DynamicField with a
  given size/capacity without an initial value.

COMP: typo in code for DynamicList::push_back() with IndirectList
2025-04-29 15:42:39 +02:00
2d77f7ae26 ENH: add face/triFace/triangle magSqr() method (as per edge, boundBox etc) 2025-04-25 09:50:09 +02:00
5c44f360fe ENH: processorColour: unused code 2025-04-24 20:24:23 +01:00
735b701006 BUG: lduMesh: fix cell-cell addressing. Fixes #3357 2025-04-23 17:04:53 +01:00
fd41930377 Merge branch 'namespace-qualify_code-style' into 'develop'
Improve namespace qualification of min/max, other minor code improvements

See merge request Development/openfoam!736
2025-04-10 10:49:36 +00:00
59f3c55871 STYLE: avoid implicit cast of UList to List 2025-04-09 15:58:30 +02:00
0be19b7fae COMP: namespace qualify min/max functions (#3348)
FIX: missing patch face index writeFields (#3347)
2025-04-09 15:58:30 +02:00
01727c84f1 ENH: use gMinMax() instead of separate gMin(), gMax()
- for reciprocal values, gMinMax() first and then calculate the
  reciprocal, which avoids creating temporaries

STYLE: prefer MinMax to separate min/max accounting

COMP: namespace qualify min/max for deltaT, CourantNo, etc (#3348)
2025-04-09 15:58:30 +02:00
80d7fe97f0 TUT: clarify use of Antal parameters (#3353)
TUT: simplify example of coded motion solver
2025-04-09 15:58:29 +02:00
a7e8a43f4a ENH: add writeContents() static methods for IOList etc.
- encapsulates IOListRef etc into a simpler syntax

ENH: use UList instead of refPtr for IOListRef (avoids List cast etc)
2025-04-09 15:58:29 +02:00
6c20df2808 ENH: additional in-place clamp_min(), clamp_max() field methods
- these already existed for a single value, but now handle the full
  field. This is more memory-friendly.

      fld.clamp_min(lower);  OLD: fld = max(fld, lower);
      fld.clamp_max(upper);  OLD: fld = min(fld, upper);
2025-04-09 15:58:29 +02:00
b8a0706e72 ENH: add ListPolicy::reserve_size() helper (related to #3348)
- central way to calculate reverse sizes for dynamic containers.

  For example;
      reserve_size<16, 2>(len, cap);     // min-size=16, ratio=2
      reserve_size<16, 3, 2>(len, cap);  // min-size=16, ratio=1.5

  replaces this type of code that was used in several places:
      max(SizeMin, max(len, label(2*capacity_)));

  The caller will have already checked (len < cap) before deciding
  to make this call.

ENH: updates for DynamicList/DynamicField handling

- add reserve_exact() method, which is like reserve() but without any
  extra sizing heuristics

- add DynamicField 'reuse' constructors, consistent with Field constructors

- sync allocated size before list destruction.
  This may help when using aligned allocation strategies.
2025-04-09 08:10:48 +02:00
7f062a8f5e ENH: return plain List instead of shrinking the DynamicList
Using 'return List<T>(std::move(dynList))' for transfer of content
  (with implicit shrinking) into a plain List, and leave copy elision
  to do the rest. The implicit transfer (move construct List from
  DynamicList) will normally invoke resize (new/delete and moving
  elements).

  With 'return dynList.shrink()', it will first invoke an internal
  resize (new/delete and moving elements), followed by a copy
  construct as a plain list.

STYLE: avoid implicit cast to 'const List&' in constructors
2025-04-08 11:26:11 +02:00
f13a05375c STYLE: promote ListPolicy to Foam namespace
- previously under Foam::Detail::ListPolicy, now as Foam::ListPolicy
2025-04-07 18:28:46 +02:00
eb56c75c4b ENH: provide edge::sorted() static constructor
- avoids min(a,b), max(a,b) free functions (#3348)
2025-04-07 18:28:46 +02:00
cb6d11d39b CONFIG: add LIBO_LIBS support into wmake rules
- provides an additional hook when linking OSspecific

CONFIG: apply quiet flag to wmkdepend

- suppresses "could not open FileName" warnings in quiet mode

FIX: reinstate selection of strict/non-strict deprecation

- accidentally removed in cf2b305b4f.
- extend with a _STRICTER version as well.
2025-04-07 18:28:42 +02:00
ad037ac744 Merge branch 'issue-3313-SVD-pinv_tensors' into 'develop'
avoid heap allocations for pseudo-inverse of tensor/symmTensor (#3313)

See merge request Development/openfoam!734
2025-04-01 16:19:01 +00:00
e3c93a9c85 ENH: refactor SVD to support tensors directly (#3313) 2025-04-01 17:52:13 +02:00
a2df607998 CONFIG: set API level to 2501
- Pstream changes (one-sided), local AMI communicators,
  other adjustments
2025-03-31 18:53:43 +02:00
e121db6e86 ENH: extend sigFpe::fillNan() interfaces
- provide separate float/double UList interfaces, which improves
  flexibility (eg, with SPDP)

- sigFpe::fillNan_if() interface, for filling in when using alternative
  memory allocators
2025-03-31 18:50:29 +02:00
e720f823d3 ENH: simplify SubStrings class/handling (remove template parameters)
- previous code used derived string iterators, but these would
  be largely ignored anyhow since the underlying std::sub_match
  str() method would just yields a std::string anyhow.

  The SubStrings::str(size_t) method wasn't used in any code, so now
  just use std::string iterators only.

  This change simplfies overall handling, since it removes an unneeded
  template dependency.
2025-03-31 16:00:07 +02:00
bdac68ebc7 CONFIG: add Gcc rules for MacOS (darwin)
- /usr/bin/{gcc,g++} normally just symlinks to clang/clang++
  and may have unknown default flags.
  For a gcc toolchain, it would be better to use a homebrew
  installation.

  For these cases, the compiler will need to be specified with
  version=.. in WM_COMPILE_CONTROL.

  For example, with "version=14", to select gcc-14, g++-14 from the
  homebrew installation.

- needs a slight hack for locating the FlexLexer.h header.
  Added into src/OSspecific/POSIX similar to how it is handled
  in src/OSspecific/MSwindows

CONFIG: add simple config/detection support for libumpire (Linux)
2025-03-31 16:00:07 +02:00
edf9621ebe ENH: add foamConfigurePaths support for homebrew
- new options to set components specified by homebrew.
  Sets version as system, path from brew --prefix

    -adios-brew, -adios2-brew, -boost-brew, -cgal-brew,
    -fftw-brew, -kahip-brew, -metis-brew, -scotch-brew,
    -gmp-brew, -mpfr-brew

    -with-homebrew
     Shortcut for selecting all the above (except gmp, mpfr)

* additional special treatment for GMP and MPFR.

  If using non-system locations and not part of the ThirdParty
  compiler, they can additionally be set in the CGAL config file:

    -gmp-brew, -gmp-path
    -mpfr-brew, -mpfr-path
2025-03-31 16:00:07 +02:00
a9863d9a3f ENH: add size_type to Matrix and VectorSpace
- easier to create type-specific looping in templated code

STYLE: pass 'direction' and 'label' by value instead of reference

COMP: qualify Foam::min() in dense matrix classes
2025-03-31 15:58:55 +02:00
bdb890d4e2 COMP: disambiguate pTraits for long/unsigned long on Darwin 2025-03-25 16:02:42 +01:00
707db0b65b COMP: avoid deprecated headers for CGAL-6.0 2025-03-24 16:27:02 +01:00
8716795d86 COMP: more int/label consistency for communicator parameter 2025-03-24 16:27:02 +01:00
8bbfe6eb44 Merge branch 'remove-posix-regex' into 'develop'
DEFEATURE: remove POSIX regex interface (#3343)

See merge request Development/openfoam!733
2025-03-24 10:33:15 +00:00
aaa9af9ee8 DEFEATURE: remove POSIX regex interface (#3343)
- compiler versions are now sufficient that only the C++ regex
  interface is now being used. Can remove the old POSIX code
  accordingly.

  This change also removes any dependency on the SubStrings class to
  manage the matching results.

ENH: remove OpenFOAM dependencies from MacOS addr2line utility
2025-03-21 14:41:43 +01:00
4de0b84c2f Merge branch 'pstream-topo-aware' into 'develop'
additional topology-aware handling for Pstream

See merge request Development/openfoam!731
2025-03-20 12:02:45 +00:00
db871856c0 CONFIG: add named topoControls 2025-03-20 10:51:43 +00:00
a01f3ed8b7 ENH: add node-based gatherList() 2025-03-20 10:51:43 +00:00
c4b261c615 ENH: add node-based gather(), listGather(), mapGather() 2025-03-20 10:51:43 +00:00
7b0ab0dbb3 ENH: add node-based broadcasting and reduction 2025-03-20 10:51:43 +00:00
b9b0d1b3aa STYLE: use weighted average/sum in a few places
- minor adjustments to some BCs construction:
  * ensure origin/axis are zero-initialized
  * use dictionary get<> instead of lookup
2025-03-20 11:14:39 +01:00
b7ce6bf69d CONFIG: inject -no-recursion into the argument list (#3198)
- sourcing a file with '-no-recursion "$@"' does not work with dash.
  Need to modify the argument list directly.
2025-03-19 15:28:57 +01:00
034a0524af ENH: add weighted average and weighted sum functions (local and global)
- convenience, avoids creating intermediate fields and for
  gWeightedAverage() requires one fewer reduction

ENH: combine loops for FieldField averaging

STYLE: remove clip() function, superseded by clamp_range() - JAN-2023
2025-03-19 12:10:27 +01:00
eaa65913f4 CONFIG: combine flex/flex++ rules (minor cleanup)
- generate .cc (instead of .C) intermediate files, consistent with how
  we manage other generated code and makes them less case sensitive
2025-03-19 12:10:12 +01:00
6dd8804acb BUG: fixup. See #3334 2025-03-17 15:07:25 +00:00
a77aaa7582 BUG: AMIInterpolation: reset cached data. Fixes #3334 2025-03-17 14:11:38 +00:00
5cc36dc5b7 Merge branch 'issue-3211-fan-jumpCyclic' into 'develop'
BUG: fan: bc value not updated. See #3211

See merge request Development/openfoam!701
2025-03-17 14:11:12 +00:00
d4a959a93f BUG: fan: bc value not updated. See #3211 2025-03-17 14:11:12 +00:00
09e04003c4 CONFIG: support Allwmake with -bear-output-dir (#3322) 2025-03-17 11:58:25 +01:00
0a53013499 BUG: foamReport mesh quantities are not parallel (fixes #3338) 2025-03-17 11:53:23 +01:00
47f2ff618d COMP: remove obsolete -fsimdmath flag for ARM64 (#3326) 2025-03-17 09:59:42 +01:00
47575aabf2 COMP: compilation with clang (c++17) and older flex files (fixes #3337)
- The register keyword has been removed from c++17 but old flex
  versions (version < 2.6.0) produce code including it, leading to
  compilation errors when using clang (despite disabling the diagnostic).
  gcc compiles but issues warnings.

- use '#define register' as empty as a workaround
2025-03-17 09:58:20 +01:00
dcbd546d51 FIX: incorrect parameters for IN_PLACE MPI_Gather, MPI_Scatter
STYLE: mark Pstream::scatterList() as deprecated

- this entry point is not directly used anywhere, only the
  scatterList_algorithm backend is actually used.

  The scatterList() routine is misnomer since it actually works like a
  broadcast that skips overwriting the local rank, but only if used in
  combination with the gatherList() manual implementation that uses
  the same walk pattern.
2025-03-14 17:55:12 +01:00
d64c6371f1 ENH: foamDictionary now respects header format [ascii/binary] (#3329) 2025-03-14 09:08:04 +01:00
2d246cd5d1 ENH: add token::read(Istream&) method
- can be used to simplify some logic. For example,

      if
      (
          (tok.read(is) && tok.isWord("FoamFile"))
       && (tok.read(is) && tok.isPunctuation(token::BEGIN_BLOCK))
      )
      ...
  vs
      if
      (
          (is.good() && (is >> tok) && tok.isWord("FoamFile")) ...
       && (is.good() && (is >> tok) && tok.isPunctuation(token::BEGIN_BLOCK))
      ) ...
2025-03-12 20:09:00 +01:00
51bb06764a ENH: add polyBoundaryMesh::nNonProcessorFaces()
- the number boundary faces before the first processor patch.
  This approximately equals the 'real' number of boundary faces
2025-03-12 19:14:48 +01:00
795bce4519 COMP: suppress old-style cast warning (boost/cgal) 2025-03-12 12:14:58 +01:00
db0709f957 ENH: use DynamicList to SLList for ansysToFoam, kivaToFoam
- also fixes a compilation issue introduced by f13be4f62c
  (where the direct assignment from SLList to List was removed)
2025-03-12 11:50:58 +01:00
38e08fc092 COMP: avoid constructor ambiguity for ISpanStream
- compiler cannot decide between std::string and std::string_view
  when creating from 'const char*' without also supplying the size,
  so also supply a 'const char*' constructor.

ENH: additional string_view handling for ITstream and SubStrings
2025-03-12 10:04:43 +01:00
36ae93d017 ENH: components to support one-sided communication 2025-03-10 16:32:35 +01:00
ab7cfdcf49 ENH: add UList move construct and move assignment (shallow copy)
- the 'move' treatment performs a shallow copy but does not alter
  the passed parameter. Identical semantics as per std::span.

ENH: constexpr for basic HashTable constructors

STYLE: 'Foam::zero' instead of 'const Foam::zero' for containers

- this is simply a compiler dispatch flag, so the additional 'const'
  qualifier is unnecessary
2025-03-10 16:32:23 +01:00
f13be4f62c DEFEATURE: remove old/unused SLList -> List construct/assignment
- should ideally avoid SLList in most cases, since it is allocation
  intensive and most places can easily use DynamicList or
  CircularBuffer instead.

STYLE: use push_uniq instead of deprecated appendUniq method

- mark with a 'normal' deprecation instead of 'strict' deprecation
2025-03-10 16:32:22 +01:00
ae638c2b9c CONFIG: improvements to mpirunDebug
- the '-no-core' to limit coredumps to zero size
- the '-quick' option, which changes valgrind --leak-check from "full"
  to "summary", and implies -no-core as well.
- enforce tcp libfabrics provider under valgrind since valgrind
  does not otherwie work nicely with RMA
2025-03-10 16:29:47 +01:00
9cd0aa8816 COMP: avoid in-place reduce for OPEN-MPI as well (#3331)
- fails with MPI_ARG_ERR.
  Do not assume that any vendors actually support in-place handling
  for MPI_Reduce(), regardless of what their documentation may claim.
2025-03-07 09:29:28 +01:00
939ca03495 Merge branch 'pstream-typed-handling' into 'develop'
increased use of intrinsic data types and ops for communication

See merge request Development/openfoam!730
2025-03-06 16:16:01 +00:00
28818c73f9 COMP: workaround for broken in-place reduce INTEL-MPI (#3331)
- since that particular vendor version of MPI_Reduce() does not work
  with MPI_IN_PLACE, create a local copy of the data to pass into the
  routine.
2025-03-06 16:54:32 +01:00
20b2f46315 STYLE: prefer listReduce() to using listCombineReduce() when possible
- potentially allows access into the builtin MPI operations
2025-03-06 16:54:31 +01:00
5d9f8e9a9d ENH: remove gatherv/scatterv direct coding
- includes intrinsic MPI types, but no component aggregates since we
  barely wish to use gatherv/scatterv (slow!) in the first place
  and it makes no sense to recalculate the list of counts for
  component aggregates which we will never use.
2025-03-06 16:54:31 +01:00
3bf1399098 ENH: generalize mpiGather/mpiScatter/mpiAllGather
- include MPI and component aggregates
2025-03-06 16:54:31 +01:00
20b6aeb4dd ENH: generalize reduce/all-reduce to include MPI types
- for known data types (and component aggregates),
  and intrisic reduction operation can now use

     UPstream::mpiReduce(), UPstream::mpiAllReduce().

  This change permits more operations to use MPI calls directly.
  eg,

      reduce(vec, sumOp<vector>);

   now calls mpiAllReduce(..., op_sum) instead of point-to-point,
   followed by a broadcast.

   Similarly, when called as a simple reduction (not all-reduce)

      Pstream::gather(vec, sumOp<vector>);

   now calls mpiReduce(..., op_sum) instead of point-to-point

- extend use of MPI calls to list-wise reductions as well

- extend sumReduce() to bundle/unbundle vector-space types,
  which lowers overall communication.

  Before:
    1) send/recv + binary op through a communication tree
    2) broadcast
    3) all-reduce of the count

  Now:
    1) pack into a local bundle
    2) all-reduce
    3) unpack the bundle
2025-03-06 16:54:31 +01:00
c7fc9d4ddc ENH: extend MPI send/recv types
- support send/recv of basic types (int32, float, double, ...) in
  addition to common OpenFOAM vectorspace types (floatVector,
  doubleVector, ...)

  This permits sending NUM items of the given types instead of sending
  NUM sizeof() bytes.
  For a vector (as double): 1 item instead of 24 items (3*8 bytes).
  For a tensor (as double): 1 item instead of 72 items (9*8 bytes).
2025-03-06 16:54:31 +01:00
f0b844eb47 ENH: generalize MPI broadcast to basic and user-defined MPI types
- simplify and rationalize some of the broadcast methods for more code
  reuse.

  The bottom level UPstream::broadcast is now always to/from "root=0".
  This was previously passed as a default parameter, but never used
  anything other than '0' in the code. Fixing it as '0' makes it
  consistent with the 'top-down' logical for node-based broadcast.
2025-03-06 16:54:31 +01:00
151f4df546 ENH: add opaque data types to UPstream bridge code
- permits more flexible handling at the caller level
2025-03-06 16:54:31 +01:00
7ac83f22c7 ENH: refine the dataTypes handling
- now distinguish between basic MPI types and user-defined types.

  The new front-facing trait UPstream_basic_dataType unwinds components
  and other types, but only for MPI fundamental types
  (including any aliases)

- additional helper to combine a test for binary operator validity and
  basic data type validity, which better expresses intent:

     template<class BinaryOp, class T>
     UPstream_data_opType;

- relax bit-wise operators to also accept signed integrals
  and 'void' generic
2025-03-06 16:54:31 +01:00
8c395357f3 STYLE: more consistency in communicator types (int vs label) 2025-03-06 16:54:31 +01:00
d4b5280742 ENH: cleanup broadcast streams
- remove unused/unusable broadcast stream constructors/methods

- provide OPBstream::sends() and IPBstream::recvs() methods,
  refactored from Pstream::broadcasts. These will always use
  serializations, even for contiguous content.

- additional methods to support special handling of zero-sized lists.
  For example,

    if (UPstream::master(comm))
    {
        if (list.empty()) OPBstream::send(Foam::zero, comm);
        else              OPBstream::send(list, comm);
    }
    else
    {
        IPBstream is(comm);
        if (is.remaining()) { is >> list; }
        else { list.clear(); }
    }

   This avoids serialization of an empty list and the resulting double
   broadcast (size + content), using instead a single broadcast (size).

STYLE: more consistency in communicator types (int vs label)
2025-03-06 16:54:31 +01:00
be30598e3d ENH: add UPstream::localNode_parentProcs() method
- returns the (start/size) range of the commLocalNode ranks in terms
  of the (const) world communicator processors. This allows mapping
  back into lists defined in terms of the world ranks.
2025-03-06 16:54:30 +01:00
d64682a7af ENH: expand VectorSpaceOps to include copy_n/fill_n methods
- similar to what std::copy_n and std::fill_n would do, except with
  templated loops. This allows compile-time transcribing with loop
  unrolling. For example,

     vector vec1 = ..., vec2 = ...;

     FixedList<scalar, 6> values;

     VectorSpaceOps<3>::copy_n(vec1.begin(), values.begin());
     VectorSpaceOps<3>::copy_n(vec2.begin(), values.begin(3))

     // do something with all of these values

STYLE: make start index of VectorSpaceOps optional

ENH: add clamped begin(int) versions to FixedList as per UList
2025-03-06 16:54:30 +01:00
cf9fa16788 COMP: add pTraits for int16/uint16 types (simplifies messages) 2025-03-06 16:54:30 +01:00
9437e8d068 ENH: simplify operator calls for error, messageStream
- use move semantics for string parameters and reuse more code
2025-03-06 16:54:30 +01:00
dd09aa1289 ENH: PatchTools: version with supplied local points 2025-03-06 13:05:20 +00:00
56c52fd69e COMP: fix up merg e 2025-02-27 12:04:58 +00:00
34c933c1ce ENH: AMIInterpolation: use local communicator
- allocate communicator with only those ranks that have
patch faces
- use this communicator everywhere
- communicator preserved during mesh motion
2025-02-27 12:04:58 +00:00
f276016896 SUBMODULE: runTime postProcessing updated for change in minMaxOp 2025-02-27 12:48:34 +01:00
e3703c7626 Merge branch 'pstream-types' into 'develop'
add compile-time type system for MPI data/ops

See merge request Development/openfoam!729
2025-02-25 14:51:21 +00:00
dccdb263e8 ENH: add UPstreamTraits support to map data types and opcodes
The front-end traits:

- UPstream_dataType trait:
  This wrapper is unwinds the type to check against base/alias, but also
  checks if it is a component aggregate of a supported UPstream data type.
  This will be that main entry point for usage.

- UPstream_opType trait:
  Provides a mapping of OpenFOAM ops to their MPI equivalent.
  The \c opcode_id is the corresponding internal representation.

The lower-level traits (not normally used within coding)

- UPstream_base_dataType trait:
  Tests true/false if the specified data type has an internal MPI equivalent.
  The \c datatype_id is the corresponding internal enumeration.
  Even if this tests as false, it will always return \c type_byte as the
  fallback for general contiguous data

- UPstream_alias_dataType trait:
  Provides mapping for <int/long/long long,...> to the fundamental 32/64
  integrals, since <int/long/long long,...> may not otherwise directly map
  on all systems.

NOTE: can use the updates Test-machine-sizes test application to
determine if all data types and aliases are properly defined on
different systems
2025-02-25 10:09:38 +01:00
bf60a124ab ENH: add mapping for fundamental and OpenFOAM types -> MPI data types
- this will allow send/recv/broadcast of various data types directly
  without reinterpreting as bytes. No performance benefit, but makes
  programming more flexible. In addition to the normal MPI types, also
  provide some convenient groupings such as double[3], double[9] etc.

- the additional user-defined data types are created on the start of
  MPI and removed before shutdown
2025-02-25 09:52:12 +01:00
c448ea2a11 ENH: add simple handling for point-to-point barriers
- provides an additional means of process synchronization
2025-02-25 09:44:44 +01:00
d41c644a49 Merge branch 'pstream-cleanups' into 'develop'
various cleanup and add support for non-worldComm reduction of DimensionedField, GeometricField

See merge request Development/openfoam!728
2025-02-24 12:38:40 +00:00
d2dfd115be ENH: provide isolated "*_algorithm" versions of Pstream gather routines
- enables better selection of linear vs tree and improves future reuse.

ENH: optimize listReduce/listCombineReduce for single-value lists
2025-02-24 09:06:21 +01:00
8f3d29c1b7 ENH: retain linear vs tree state in commsStructList
- previously there were two places that used nProcsSimpleSum for
  defining the communication pattern. However, this meant in practice
  that filling of linearCommunication_ and treeCommunication_ themselves
  where globally controlled.

  Now retain the state within commsStructList and use linear/tree
  when populating.
2025-02-24 09:06:12 +01:00
e67fffac3f STYLE: use UPstream::reduceAnd(), UPstream::reduceOr() instead of longer forms 2025-02-24 09:04:04 +01:00
2783e78ae2 STYLE: unify some handling of warn communicator, minor code cleanup 2025-02-24 09:03:56 +01:00
e041af9481 DEFEATURE: remove non-blocking reduce() with global request tracking
- deprecated and replaced (JAN-2023) with a version that uses
  UPstream::Request to track the request. This avoids placing a
  request on the global list and then having difficulty isolating it
  later (or having it cleared out by someone else).

ENH: UPstream::addRequest() now ignores null requests

- avoids placing useless requests on the global list
2025-02-24 09:03:47 +01:00
e8e90a8de3 ENH: support non-worldComm for Dimensioned/Geometric field functions 2025-02-24 09:03:31 +01:00
0aecb25024 ENH: update MinMax to accept multiple values for add()
- now also provide its own member data (previously inherited from
  Tuple2) to provide better isolation from future changes
2025-02-24 09:03:19 +01:00
14b2302b38 COMP: remove 'special purpose' minMaxOp (#3326)
- replace with plusOp for reductions. The old use didn't necessarily work
  well with compiler resolution in all cases.
  Simplify to use plusOp (and removed the old version).
  [Does not affect very much code...]

COMP: incorrect include ordering for GeometricFieldFunctions

- header was included after the template code

REGRESSION: combineAllGather mapped to incorrect method (81fa7d08ee)

STYLE: use UPstream::commWarn(...) setter method
2025-02-24 08:57:36 +01:00
d655c2d343 ENH: print node/topology information in human-readable form at startup 2025-02-24 08:56:25 +01:00
533d3b58f8 TUT: backwardFacingStep2D: add missing probes (fixes #3319) 2025-02-21 16:49:36 +00:00
0c282bda65 Merge branch 'pstream-adjustments' into 'develop'
Additional refinements for Pstream and minor restructuring of combine vs reduce operations

See merge request Development/openfoam!727
2025-02-19 14:47:27 +00:00
4720b61313 REGRESSION: globalIndex::gatherInplaceOp was not forwarding to gatherInplace
- regression introduced by 512ec01328 (recent develop only)
2025-02-17 13:40:44 +01:00
a66be057c2 GIT: relocate Pstream template '.C' files to '.txx' prior to further changes
- reduces confusion about 'real' code vs template code
2025-02-17 13:40:44 +01:00
eae448c7aa CONFIG: handle embedded WM_COMPILE_CONTROL flags in wmakeLnInclude
- with WM_COMPILE_CONTROL="... lnInclude-extra ..." will treat like
  'wmakeLnInclude -extra' and include all source files into the
  lnInclude/ directory
2025-02-17 13:40:44 +01:00
81fa7d08ee ENH: extend Pstream gather templates to support combine or assign operation
- eliminates nearly identical code between 'gather' and 'combineGather'

  * Normal gather updates by assigning the result of the binary operation.
  * Combine gather updates by using a binary operator that modifies
    its first parameter in-place

  By-product of this refactoring are these new variants:

      listGather(), listGatherReduce()
      mapGather(), mapGatherReduce()

  that mirror the previously existing ones

      listCombineGather(), listCombineReduce()
      mapCombineGather(), mapCombineReduce()

  except that they use the 'regular' binary operator
2025-02-17 13:40:44 +01:00
0ce5053c75 ENH: mpiGather/mpiScatter now also support in-place use
- the general OpenFOAM way of collecting data often looks like this:

      List<scalar> allValues(numProcs);
      allValues[myProc] = localValue;

      Pstream::gatherList(allValues);

      // Now possible like this

      List<scalar> allValues(numProcs);
      allValues[myProc] = localValue;

      UPstream::mpiGather(nullptr, allValues.data_bytes(), sizeof(scalar));

- adjusted Pstream::gatherList accordingly.
  Split out the manual implementations, give them new names
  (..._tree_algorithm) and make them private.

STYLE: rename UPstream::gather -> UPstream::mpiGatherv

- easier to identify and establishes the connection to the MPI call
2025-02-17 13:40:44 +01:00
eb4345ed44 ENH: misc Pstream adjustments
- additional startup guard for inter-node/local-node queries (UPstream)

- impose linear communication tree for inter-node/local-node
  communicators. Was previously defaulted to a basic tree, but more
  consistent to have flat addressing for these types of connections.

- demand-driven UPstream::interNode_offsets() for walking
  inter-node ranges instead of creating it manually in various places.

- (style): List<int> instead of labelList for internal commsStruct
  since the communication structures are tied to MPI sizes
  and not to the OpenFOAM label sizes

- reduce the number of intermediate buffer allocations within
  gatherList, scatterList.
2025-02-17 13:40:44 +01:00
15ac0bc30b BUG: GAMG: processor agglomeration. Fixes #3323 2025-02-17 12:33:14 +00:00
21f36b18e5 Merge branch 'feature-UPstream-startup' into 'develop'
enhance UPstream communicator support

See merge request Development/openfoam!725
2025-02-13 15:12:42 +00:00
3852f7c5b7 ENH: add node-based globalIndex::gather (topology-aware handling) 2025-02-13 12:31:16 +01:00
a3e1376117 ENH: combine gathers of sizes in GAMGAgglomeration
- replace two listGatherValues with listGatherValues of labelPair and
  calculate offsets from the corresponding tuple members.
2025-02-13 12:31:16 +01:00
512ec01328 ENH: rationalize some globalIndex gather routines
- replace gatherValues() with listGatherValues(), which returns the
  gathered values instead of passing by argument. This makes it less
  fragile and more convenient. Naming as per
  Pstream::listGatherValues(), but still retaining the original
  parameter order.

- rename inplace 'gather' variant as 'gatherInplace' for clarity.

- changed signature of lowest-level globalIndex::gather routines from
  List<Type> to UList<Type> for the output and removed any resizing.
  This means that the caller is responsible for ensuring that the
  receiving field is adequately sized (on master). This change allows
  potential reuse of 'work' arrays etc.

  The only code change for using this low-level gather was in
  GAMGAgglomeration.
2025-02-13 12:31:16 +01:00
3e8b0a2c73 ENH: introduce UPstream::commsStructList class
- was previously simply a List<commsStruct>, but now wrap it into a
  class so that the associated communicator index can be easily
  recovered etc.
2025-02-13 12:31:16 +01:00
831a55f1ba ENH: expand UPstream communicator support
- split/duplicate functionality

- rework inter-node/intra-node handling to allow selection of
  splitting based on 'shared' or hostname (default).

- always creates node communicators at startup:
  * commInterNode() - between nodes
  * commLocalNode() - within a node

- world-comm is now always a duplicate of MPI_COMM_WORLD to provide
  better separation from other processes.

NB:
   the inter-node comm is a slight exception to other communicators
   in that we always retain its list of (global) ranks, even if the
   local process is not in that communicator.
   This can help when constructing topology-aware patterns.

FIX: non-participating ranks still had knowledge of their potential siblings

- after create by group, the procIDs_ of non-participating ranks
  should be empty (except for the inter-node exception)
2025-02-13 12:31:12 +01:00
579f8ef7c6 ENH: respect stdout/stderr preference for "Finalising parallel run" info
STYLE: namespace qualify macros use of Info, InfoErr, ...
2025-02-13 11:28:06 +01: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
0adc745b50 CONFIG: mpirunDebug 2025-02-10 14:27:51 +01:00
3b40dd8c29 ENH: add prescan handling of -debug-switch etc
- allows use of registered switches before startup of UPstream etc.
2025-02-10 14:27:51 +01:00
6f2fadb48f ENH: extrudeToRegionMesh: ignore zone boundaries. Fixes #3318 2025-02-10 12:01:48 +00:00
559ed6c464 SUBMODULE: update adios module (fixes compilation change) 2025-02-07 14:49:28 +01:00
0cb812f6ac Merge branch 'feature-assignable' into 'develop'
ENH: assignable: extend to pointPatchFields and fvsPatchFields

See merge request Development/openfoam!726
2025-02-05 15:47:55 +00:00
4ae8ce3f0c ENH: assignable: extend to pointPatchFields and fvsPatchFields 2025-02-05 15:47:55 +00:00
9f0d1c7121 Merge branch 'style-demand-driven-memory' into 'develop'
ENH: use unique_ptr instead of raw pointers for demand-driven data

See merge request Development/openfoam!697
2025-02-05 09:44:26 +00:00
e1d40646cc ENH: use unique_ptr instead of raw pointers for demand-driven data
- simplifies construct/destruct and any later code extensions
2025-02-05 09:43:52 +00:00
9013c9941d STYLE: mark SHA1Digest as having is_contiguous content
- send/recv List<SHA1Digest> without serialization
2025-02-04 11:21:11 +01:00
0cc5273d0a GIT: cleanup old 'removed' files (ones left only for dependency checks)
GIT: minor directory structure cleanup
2025-02-04 08:27:55 +01:00
8f83ed786c Merge branch 'c++17-updates' into 'develop'
upgrade code to use some C++17 constructs

See merge request Development/openfoam!724
2025-01-31 14:17:34 +00: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
b9f05bdc01 ENH: refineMesh: user-specified coordinate system 2025-01-29 09:25:40 +00:00
0b831572f3 ENH: refineMesh: tutorial to demo directional refinement 2025-01-27 17:24:35 +00:00
6dc57a1a8b STYLE: consistent parameter naming 2025-01-27 15:41:06 +00:00
a18c15a4cf ENH: add VectorSpace component fill() method
- as per std::array and FixedList

STYLE: rename Scalar.[CH] -> scalarImpl.[CH] (these are internal files)

- added inclusion guards to protect against bad use
2025-01-27 10:31:09 +01:00
39e1eb9dc6 Merge remote-tracking branch 'origin/master' into develop 2025-01-27 09:45:18 +01:00
97c8e62fe4 COMP: disambiguate some reactingEuler/multiphaseSystem file names
- poor naming (eg, 'exponential.[CH]') within the same set of library
  files means that the lnInclude/ contents are inconsistent or partly
  meaningless (related to #2520 and !542).
  Remedied by adding model-type qualifiers to the file names.
2025-01-27 09:39:18 +01:00
297fee00f1 COMP: adjustments for nvc++ compiler
- remove unneeded -Wno-old-style flags with boost/cgal elements
- add nvc equivalent to gcc/clang -Wno-invalid-offsetof
- avoid warnings about set-but-unused variable and change of scoping

STYLE: remove wmake 'CGAL' rule
- was a transitional forward to 'cgal' rule since DEC-2020
2025-01-24 10:46:06 +00:00
c987ac228c SUBMODULE: update visualization for v2412 (with c++17 standand) 2025-01-24 11:40:32 +01:00
c77b0e14a1 MISC: extend foamGrep...Targets tools 2025-01-16 16:30:37 +01:00
77cdf22eac STYLE: cellDecomposer: print operand fields in rows 2025-01-13 11:29:44 +00:00
4fe3f55e4d BUG: Fixes bug in plicRDF interface reconstruction across cyclic boundaries (fixes #3279)
Description:
The plicRDF interface reconstruction scheme calculates a reconstructed distance
function (RDF) in all interface cells and their point neighbours.
In point neighbours to interface cells, the RDF is calculated as a weighted
average of the distances to all adjacent interface cell centres with the weight
being the inverse distance to the cell centre.
By using the zoneDistribute class written by Henning Scheufler, the required
stencil data is communicated efficiently for stencil cells living on different
sides of one or more processor patches.
Some of the data required for the RDF reconstruction are cell centre and
interface centre positions. When a stencil extends across a cyclic patch these
positions have so far not been properly transformed in OpenFOAM. This issue is
fixed by the current contribution.
The fix is done by modifying the zoneDistribute class to hold the required
information about zone cells adjacent to cyclic patches. Positions are then
communicated with a new getPosition function which replaces getValue for
position data in the reconstructedDistanceFunction and plicRDF classes.
The implementation does not change the behaviour for cells not on
a cyclic patch and should have insignificant effect on efficiency for these.
The implementation can probably be optimised in terms of efficiency for zone
cells on cyclic patches, but we note that there are generally only very few of
these (interface cells and their point neighbours on cyclic patches) and so
the potential for speedup is expected to be limited.

Current limitations:

- In parallel, the user must constrain the decomposition to preserve cyclic
patches on the same processor, for the implementation to work properly.
  - See an example here: tutorials/discInConstantFlowCyclicBCs/system/decomposeParDict
- In the case of parallel rotational cyclics that are split by the decomposition
the current bugfix does not work and therefore throws an error. This is ongoing
work and should be reported and fixed by a future patch.

For further details, please see the modified files and the comments therein:
- $FOAM_SRC/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.H
- $FOAM_SRC/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.C
- $FOAM_SRC/finiteVolume/fvMesh/zoneDistribute/zoneDistributeI.H
- $FOAM_SRC/transportModels/geometricVoF/reconstructedDistanceFunction/reconstructedDistanceFunction.C
- $FOAM_SRC/src/transportModels/geometricVoF/reconstructionSchemes/plicSchemes/plicRDF/plicRDF.C

Co-authored-by: David Müller <> KIT
Co-authored-by: Konstantinos Missios <> Roskilde University
Co-authored-by: Johan Roenby <> Roskilde University and STROMNING
2025-01-10 15:52:52 +00:00
cb1aa273fd SUBMODULE: update external-solver, OpenQBMM for v2412 2025-01-09 11:45:11 +01:00
2e1552dd30 Merge branch 'style-pointSmoothing' into 'develop'
STYLE: update code style for point-smoothing

See merge request Development/openfoam!723
2025-01-08 19:32:21 +00:00
d072ad0e3f STYLE: update code style for point-smoothing 2025-01-08 15:04:12 +01:00
0a99702f9e ENH: lowerCSR: ignore lowerCSR for matrix type.
Reverting 267bd1af36 since makes it hard
to run cell-based algorithm on symmetric matrix.

- might become a problem if all discretisation
becomes lowerCSR based and lower() is never
constructed ...
2025-01-08 11:53:16 +00:00
5aa40389c2 BUG: snappyHexMesh: update dependent vars. Fixes #3297 2025-01-06 17:40:45 +00:00
7904a2734f BUG: twoPhaseEuler: incorrect phase. Fixes #3295. 2025-01-06 11:30:02 +00:00
b86ba60d35 ENH: lduMatrix: pass through dictionary 2025-01-03 14:48:38 +00:00
392aa56f23 COMP: dllexport symbols for conversion/ccm (fixes #3199)
- normally mingw will export *all* symbols, but since the ADF library
  explicitly uses __declspec(dllexport) itself we must do the same
  otherwise none of our library symbols are exported and linking fails.

- update some code style for conversion/ccm
2025-01-02 12:38:22 +01:00
6520d8e061 BUG: jumpCyclic: avoid neighbourField cache. Fixes #3292
- no caching of neighbour field
- no overlap of comms so not as efficient as cyclicAMI
2024-12-31 15:50:30 +00:00
45e7c4a005 Merge branch 'develop' into 'master'
RELEASE: develop branch to master

Closes #3291, #3278, #3286, #3193, #3276, #2457, #3269, #3271, #3267, #3265, #3258, #3259, #3218, #3255, #3088, #3241, #3192, #3204, #3217, and #3191

See merge request Development/openfoam!722
2024-12-24 11:57:24 +00:00
71d3f2344a Merge branch 'openfoam-v2412-rc' into 'develop'
Openfoam v2412 rc

See merge request Development/openfoam!721
2024-12-24 11:50:24 +00:00
d3949086ce RELEASE: Updated headers to v2412 2024-12-24 11:17:31 +00:00
03b470bec0 ENH: Updated completions 2024-12-24 11:17:30 +00:00
131bbaf476 TUT: v2412: optional backwards-compatibility setting 2024-12-24 09:05:49 +00:00
f6f6ffe055 ENH: mesh: added new tutorials 2024-12-24 08:39:39 +00:00
639e87b52f BUG: extrude: handle internal faces. See #3162 2024-12-23 17:53:31 +00:00
18f73c211d TUT: cylinder2D: avoid runtime errors due to the fix b0b1d0f8b2 2024-12-23 15:33:10 +00:00
6eae520af7 BUG: pointBoundaryMesh: use correct db. Fixes #3291 2024-12-23 14:48:43 +00:00
25de821e93 COMP: snappyHexMesh: extraneous code 2024-12-23 12:03:16 +00:00
0733d1cded Merge branch 'feature-distributedTriSurfaceMesh-noFill' into 'develop'
ENH: distributedTriSurfaceMesh: improvements

See merge request Development/openfoam!720
2024-12-23 09:56:50 +00:00
4fdeae66d5 ENH: distributedTriSurfaceMesh: improvements 2024-12-23 09:56:50 +00:00
8bf1108677 Merge branch 'feature-reporting' into 'develop'
Reporting tools

See merge request Development/openfoam!716
2024-12-20 12:46:56 +00:00
cddfe0e324 TUT: motorBike - added example for foamReport 2024-12-20 09:51:42 +00:00
dffb5774d5 ENH: Added new foamReport functionObject
Replaces user-supplied keywords by run-time computed values in a text file.

Usage
    Example using system/controlDict.functions:

    foamReport1
    {
        // Mandatory entries (unmodifiable)
        type            foamReport;
        libs            (foamUtilityFunctionObjects);

        template        "<system>/myTemplate.md";

        substitutions
        {
            divSchemes1
            {
                type        dictionaryValue;
                object      fvSchemes;

                entries
                {
                    divSchemes      "divSchemes";
                }
            }
            fvSolution1
            {
                type        dictionaryValue;
                path        "<system>/fvSolution";

                entries
                {
                    solver_p        "solvers/p/solver";
                    solver_p_tol    "solvers/p/tolerance";
                    solver_p_reltol "solvers/p/relTol";
                    solver_U        "solvers/U/solver";
                    solver_U_tol    "solvers/U/tolerance";
                    solver_U_reltol "solvers/U/relTol";
                }
            }
            controlDict1
            {
                type        dictionaryValue;
                path        "<system>/controlDict";

                entries
                {
                    initial_deltaT       "deltaT";
                }
            }
            continuityErrors
            {
                type        functionObjectValue;
                functionObject continuityError1;

                entries
                {
                    cont_error_local    local;
                    cont_error_global   global;
                    cont_error_cumulative cumulative;
                }
            }
        }
2024-12-20 09:51:42 +00:00
c926f146d4 TUT: motorBike - added example for graphFunctionObject 2024-12-20 09:51:42 +00:00
82e471e045 ENH: Added new graphFunctionObject function object
Accumulates function object result values and renders into a graph in SVG format

Minimal example by using system/controlDict.functions to plot the residuals from
the solverInfo function Object:

    residualGraph
    {
        type            graphFunctionObject;
        libs            (utilityFunctionObjects);
        writeControl    writeTime;

        logScaleX       no;
        logScaleY       yes;

        xlabel          "Iteration";
        ylabel          "log10(Initial residual)";

        functions
        {
            line1
            {
                object      solverInfo1;
                entry       Ux_initial;
            }
            line2
            {
                object      solverInfo1;
                entry       Uy_initial;
            }
            line3
            {
                object      solverInfo1;
                entry       Uz_initial;
            }
            line4
            {
                object      solverInfo1;
                entry       p_initial;
            }
        }
    }
2024-12-20 09:51:42 +00:00
3bc2b5fd74 Merge branch 'feature-deck-renard' into 'develop'
INT: S-A turbulence model - added enhanced DDES shielding function

See merge request Development/openfoam!717
2024-12-19 16:18:13 +00:00
af6e5e75fd INT: S-A turbulence model - added enhanced DDES shielding function
Activated using the [optional] 'shielding' keyword having the options:

- standard: [default] same as v2406 and earlier
- ZDES2020: new option based on the reference:

    Deck, S., Renard, N. (2020).
    Towards an enhanced protection of attached boundary layers in hybrid
    RANS/LES methods.
    Journal of Computational Physics, 400, 108970.
    DOI:10.1016/j.jcp.2019.108970

Contribution from Marian Fuchs at UpstreamCFD GmbH

Integrated by Andrew Heather OpenCFD Ltd.
2024-12-19 16:17:51 +00:00
8a8c2482d7 Merge branch 'feature-cone-nozzle-with-angular-segments' into 'develop'
ENH: ConeNozzle: add injector velocity and angular-segmented disc options

See merge request Development/openfoam!719
2024-12-19 13:43:13 +00:00
29c8a77e04 ENH: ConeNozzle: add injector velocity and angular-segmented disc options 2024-12-19 11:45:00 +00:00
8e98779d70 Merge branch 'feature-schemes-zoneBlended' into 'develop'
ENH: Added new zoneBlended scheme

See merge request Development/openfoam!718
2024-12-19 10:53:12 +00:00
1eb904fc68 ENH: Added new zoneBlended scheme
Multi-faceZone based blending differencing scheme.

Schemes are set in dictonary format according to:

    divSchemes
    {
        .
        .
        div(phi,U)      Gauss zoneBlended
        {
            default         defaultScheme;
            faceZone1       scheme1;
            faceZone2       scheme2;
            ...
            faceZoneN       schemeN;
        }
        .
        .
    }

The default entry specifies the background scheme; additional schemes
can be set per faceZone, e.g. scheme1 is applied to facZone1,
scheme2 is applied to facZone2 etc.
2024-12-19 10:52:43 +00:00
45ee161f23 Merge branch 'feature-film-separation-models' into 'develop'
ENH: regionFaModels: new filmSeparation models for finite-area framework

See merge request Development/openfoam!714
2024-12-19 10:09:57 +00:00
1e6d8d73a0 BUG: OwenRyley: correct the modelling constant (fixes #3278) 2024-12-19 10:09:46 +00:00
51d1050339 ENH: regionFaModels: new filmSeparation models for finite-area framework 2024-12-19 10:09:46 +00:00
83b9c60a88 Merge branch 'fa-parallel-consistency-improvements' into 'develop'
ENH: processorFaPatch: use internal-edge algos for processor edges to ensure parallel consistency

See merge request Development/openfoam!708
2024-12-19 10:09:31 +00:00
2d731e1af3 ENH: processorFaPatch: use internal-edge algos for processor edges to ensure parallel consistency
- The edgeInterpolation::makeCorrectionVectors() disables the non-orthogonality
correction if the calculated non-orthogonality coefficient is below 0.1.
However, this activation routine only considers internal edges, and excludes
any processor edges, resulting in inconsistent parallel calculations. This
routine is removed.
- Fatal errors are replaced with zero-valued fields for non-orthogonality-
and skewness-correction routines.
2024-12-19 10:09:16 +00:00
528ea551ec Merge branch 'feature-write-objects' into 'develop'
ENH: writeObjects: add flag to report registered objects

See merge request Development/openfoam!705
2024-12-18 17:45:47 +00:00
c77cc498d7 ENH: writeObjects: add flag to report registered objects
Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2024-12-18 17:45:15 +00:00
5d0058bc85 STYLE: rename 2024-12-18 17:08:58 +00:00
f265fcc8d0 Merge branch 'feature-moving_source' into 'develop'
Feature moving source

See merge request Development/openfoam!693
2024-12-18 17:05:54 +00:00
e33fb8d0db Feature moving source 2024-12-18 17:05:54 +00:00
3d35bb920f COMP: plugins: updated cfMesh 2024-12-18 15:48:32 +00:00
4423efd313 ENH: fanFvPatchField - refactored; added flowRate option
The basis of the table is specified according to the mode:

- velocity: deltap = F(velocity per face) \[DEFAULT\]
- uniformVelocity: deltap = F(patch area-averaged velocity)
- volumeFlowRate:  deltap = F(patch volume flow rate)
- nonDimensional:  non-dim deltap = F(non-dim volume flow rate)

Example of the boundary condition specification:

    <patchName>
    {
        type            fan;
        patchType       cyclic;
        jumpTable       csvFile;
        mode            velocity; // New entry

        jumpTableCoeffs
        {
            nHeaderLine     1;
            refColumn       0;
            componentColumns 1(1);
            separator       ",";
            mergeSeparators no;
            file            "<constant>/UvsPressure";
        }
        value           uniform 0;
    }
2024-12-18 15:28:11 +00:00
b0b1d0f8b2 ENH: fieldAverage - allow averaging on internal fields - see #3242
BUG: fieldAverage - handle duplicate entries
2024-12-18 15:11:40 +00:00
ed99546b8a ENH: tabulated6DoFMotion: add optional linear interpolation scheme 2024-12-18 15:01:18 +00:00
a2b3187188 ENH: rho/psiReactionThermos: add PengRobinsonGas to the thermos 2024-12-18 13:32:02 +00:00
30d29f2303 COMP: fix SPDP compilation (fixes #3286) 2024-12-18 12:15:48 +00:00
207806e55d COMP: explicitly declare copy construct for (point) symmetry field
- fixes -Wdeprecated-copy complaints
2024-12-18 10:09:49 +01:00
da09e9203f ENH: extraneous file 2024-12-17 18:22:42 +00:00
57b250963d ENH: damBreakLeakage: showcasing cyclicACMI with scale factor
scale factor is
- coded
- time varying
- spatial varying
2024-12-16 16:46:25 +00:00
ea4508c079 ENH: polyDualMesh: demonstrate cellDecomposer,polyDualMesh 2024-12-16 12:24:20 +00:00
1462a5effa BUG: decomposePar: only write pointBoundaryMesh if needed 2024-12-16 12:14:02 +00:00
bd5d32035e CONFIG: set API level to 2412 (initial pre-release state)
- README updated to v2412, project-version updated to v2412
2024-12-16 13:00:09 +01:00
d4d2e4af3d DEFEATURE: remove obsolete optionalData container
- unused and superseded by c++17 std::optional
2024-12-16 12:57:42 +01:00
8a4e3526c3 ENH: improve parsing robustness for foamInstallationTest (#3263) 2024-12-16 12:37:18 +01:00
8340317a46 COMP: missing dynamicMesh,dynamicFvMesh linkage for simpleFoam (#3269) 2024-12-16 10:49:29 +01:00
e64d93ffdb COMP: support compilation with CGAL-6.0 (#3234)
- CGAL-6 uses c++17 std::optional, std::variant instead of boost versions
2024-12-16 10:47:49 +01:00
4c21ad3d3f Merge remote-tracking branch 'origin/master' into develop 2024-12-16 10:07:54 +01:00
011f730309 COMP: SPDP compilation 2024-12-15 11:53:03 +00:00
009faad912 ENH: Test-GAMG: not normalise agglomeration unless specified 2024-12-14 16:58:28 +00:00
462fd687d2 BUG: reconstructParMesh: support for no finite-area. See #3276 2024-12-14 16:30:59 +00:00
1401ce02b5 ENH: badMove: missing directory creation 2024-12-12 16:58:49 +00:00
15059f78b8 Merge branch 'issue-3193-READ_IF_PRESENT' into 'develop'
BUG: READ_IF_PRESENT: return false if not read. Fixes #3193

See merge request Development/openfoam!698
2024-12-12 16:21:59 +00:00
aaaa80589f BUG: READ_IF_PRESENT: return false if not read. Fixes #3193 2024-12-12 16:21:59 +00:00
ab30b0301c Merge branch 'feature-pointMeshIO-shm-bufferlayers' into 'develop'
ENH: snappyHexMesh: add buffer layers before snapping

See merge request Development/openfoam!715
2024-12-12 16:13:32 +00:00
de5d34787c ENH: snappyHexMesh: add buffer layers before snapping 2024-12-12 16:13:32 +00:00
e7cf8a1d59 COMP: missing include. 2024-12-12 15:08:34 +00:00
44f7a7268a CONFIG: update c++ standard to c++17. 2024-12-12 11:56:39 +00:00
59c74e53ff ENH: objectRegistry - allow recurse into time db 2024-12-11 11:13:46 +00:00
bba45b3022 ENH: caseInfo function object - store data in IOdictionary for external lookup 2024-12-11 11:13:46 +00:00
6c60b19c4a ENH: caseInfo function object - set file extension to output file type 2024-12-11 11:12:46 +00:00
697e6147f4 ENH: writeFile - enable setting of file extension 2024-12-11 11:12:45 +00:00
c37a3f530d Merge branch 'feature-reconstructParMesh-finiteArea' into 'develop'
ENH: reconstructParMesh: support for finite-area. Fixes #3276

See merge request Development/openfoam!711
2024-12-11 09:26:01 +00:00
429d8d0522 ENH: reconstructParMesh: support for finite-area. Fixes #3276 2024-12-11 09:22:44 +00:00
3e80552244 BUG: isoAdvection: conserve volume of fluid across cyclic patches (fixes #2457)
Co-authored-by: David Müller <>
Co-authored-by: Konstantinos Missios <>
2024-12-10 14:32:04 +00:00
96660cdfac Merge branch 'feature-fusedDiscretisation' into 'develop'
ENH: fused: 'fused' variants of explicit discretisation

See merge request Development/openfoam!712
2024-12-10 09:31:53 +00:00
e65d720164 ENH: fused: 'fused' variants of explicit discretisation 2024-12-10 09:31:53 +00:00
ff6ef5bdf8 Merge branch 'feature-csr-MERGE' into 'develop'
ENH: CSR: cell-cell addressing

See merge request Development/openfoam!713
2024-12-10 09:30:32 +00:00
267bd1af36 ENH: CSR: cell-cell addressing 2024-12-10 09:30:06 +00:00
23f8480af6 Merge branch 'adjoint-update-pre2412' into 'develop'
ENH: updates in the adjoint library

See merge request Development/openfoam!710
2024-12-10 09:27:50 +00:00
d061be643e TUT: change 'normalize' to 'normalise' in optimisation tutorials 2024-12-10 09:27:24 +00:00
8d0f4eb87a TUT: additional topology optimisation tutorials
- 1_Inlet_2_Outlet/porosityBased/R_10x-init/reEval: showcases the
  initialization of the design variables using topoSet and setFields
- 3DBox/losses-mass-uniformity-SQP-extraVars: showcases the use of the
  so-called 'extra variables' in the QP problem which relax it,
  allowing its solution even if there is no feasible one
2024-12-10 09:27:24 +00:00
f90c7b17fc ENH: Allow setting the initial values of the design variables
in topology optimisation, through a volScalarfield named alpha.
The order of precedence is (top to bottom):
- values read from time/uniform/topOVars (used also for continuation)
- values read from 0/alpha (can be easily set with topoSet + setFields)
- uniform zero
2024-12-10 09:27:24 +00:00
9c5ce8e4f2 ENH: compatibility read for normalise in objective 2024-12-10 09:27:24 +00:00
8d6efa9f1b ENH: added the option to disable damping in ISQP
Can accelerate convergence in cases without constraints
2024-12-10 09:27:24 +00:00
91fb7456a5 ENH: changed the c coefficients in ISQP and MMA
to Function1, to be able to change their value at runtime.  Useful when
constraints are not feasible at the beginning of the optimisation
(frequent in topology optimisation) and we want to leave some room to
the optimiser to not focus heavily on them at the beginning, but respect
them during the last optimisation cycles.

Has a big impact, especially in MMA, when dealing with volume
constraints in topology optimisation.
2024-12-10 09:27:24 +00:00
3ab7d6a088 ENH: outletMappedUniformInletHeatAddition: add Function1-type Q input 2024-12-09 09:45:43 +00:00
a445dd10e1 BUG: simpleFoam: side-effect of reading dynamicMeshDict. See #3269 2024-12-05 09:08:54 +00:00
f0f915b932 BUG: simpleFoam: side-effect of reading dynamicMeshDict. Fixes #3269 2024-12-04 09:40:31 +00:00
86fda799ec BUG: decomposePar: support finiteArea. Fixes #3271 2024-12-02 19:11:53 +00:00
e45b26eaf0 ENH: simpleFoam: add dynamicFvMesh. Fixes #3269 2024-11-28 11:58:48 +00:00
6ad75fe141 Merge branch 'issue-3238-nbx-failure' into 'develop'
ENH: more unique tags to avoid overlapping comms

See merge request Development/openfoam!704
2024-11-27 12:33:29 +00:00
96db337a99 ENH: more unique tags to avoid overlapping comms 2024-11-27 12:33:28 +00:00
0fa5062c7d ENH: GAMG: update some fvSolution for updateInterval settings. See !707 2024-11-27 11:07:11 +00:00
3e00e05e33 Merge branch 'feature-updateInterval' into 'develop'
ENH: GAMGAgglomeration: optional updateInterval for moving mesh cases.

See merge request Development/openfoam!707
2024-11-25 13:38:01 +00:00
e54791019a ENH: GAMGAgglomeration: optional updateInterval for moving mesh cases. 2024-11-25 13:38:00 +00:00
96ccae977e ENH: surfaceFeatureExtract: do simple non-manifold. Fixes #3267 2024-11-21 13:36:46 +00:00
19601c0976 STYLE: consistent naming 2024-11-20 20:57:47 +00:00
3fb8f5ed69 BUG: thermalBaffle: allow for offset. See also #3260
- extrudePatchMesh holding reference to original patches
- offset not compensated for
2024-11-18 15:57:27 +00:00
f5310ca48c ENH: cyclicAMI-topoChange: allow restart. Fixes #3265 2024-11-18 14:41:46 +00:00
7f1120f6ed BUG: solarCalculator: time wraparound. Fixes #3258 2024-11-14 16:45:49 +00:00
96ada1dd54 COMP: Intel: compilation rule. Fixes #3259 2024-11-14 11:07:39 +00:00
6b08c346f1 Merge branch 'feature-cornerWeights' into 'develop'
ENH: wallFunctions: use cornerWeights linear. Fixes #3218.

See merge request Development/openfoam!703
2024-11-13 14:31:12 +00:00
f321fc73ef ENH: wallFunctions: use cornerWeights linear. Fixes #3218. 2024-11-13 14:29:11 +00:00
791796c67f BUG: cellReduce: use boundary values. Fixes #3255 2024-11-07 15:55:09 +00:00
b73de97f97 ENH: createPatch: demo case 2024-11-06 20:25:39 +00:00
cfdc2330eb ENH: polyBoundaryMesh: use patchID() if available. See #3233 2024-11-04 16:16:05 +00:00
cc580fc108 STYLE: limitFields: correct output for multiple variables
Signed-off-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2024-10-25 10:45:59 +01:00
77ba7ca4d4 Merge branch 'feature-createPatch-cyclicACMI' into 'develop'
ENH: createPatch: allow duplicating face (for ACMI)

See merge request Development/openfoam!702
2024-10-24 14:51:01 +00:00
ceb2151094 ENH: createPatch: allow duplicating face (for ACMI) 2024-10-24 14:04:55 +00:00
e4f4c73b98 Merge branch 'feature-surface-courant-number' into 'develop'
ENH: surfaceCourantNumber: new finite-area function object

See merge request Development/openfoam!706
2024-10-23 15:32:31 +00:00
1a6f0f997a ENH: surfaceCourantNumber: new finite-area function object
Computes the surface Courant number field at finite-area face centres.
Note: the calculation is performed at face centers, not edge centers.
2024-10-23 15:30:13 +00:00
4f1e7f6343 ENH: DILUPreconditioner: Speedup. Fixes #3088 2024-10-23 11:20:28 +01:00
53052a5eb3 BUG: extrudeToRegionMesh: incorrect bounding box. Fixes #3241 2024-10-21 12:57:43 +01:00
fe0b71280e ENH: octree: avoid copy 2024-10-16 15:05:32 +01:00
5836d280b9 ENH: fvMatrix: avoid whichPatch. See #3233 2024-10-03 18:22:42 +01:00
cd2d81b79a ENH: extrudePatchMesh: support for features. See #2103
Optional 'featureAngle' entry to disable extrusion on
sharp corners
2024-10-03 16:06:03 +01:00
4df27f8be6 GIT: extraneous files. Fixes #3192 2024-10-03 10:19:47 +01:00
4167aababe ENH: phaseModels: add pureMovingSolidPhaseModel 2024-09-20 10:25:33 +01:00
d6b8b49da8 STYLE: mapFields, ensightWrite: print operand fields in rows 2024-09-19 16:29:17 +01:00
a9cc444b79 ENH: switch: move to OptimisationSwitches. See #3215 2024-09-18 14:39:17 +01:00
782f22feb8 ENH: continuity: avoid excess evaluations. See #3225 2024-09-18 14:01:26 +01:00
13146891fe Merge branch 'issue-3215-pointConnectedCells' into 'develop'
Issue 3215 point connected cells

See merge request Development/openfoam!700
2024-09-18 11:07:42 +00:00
d72f51ac23 Issue 3215 point connected cells 2024-09-18 11:07:41 +00:00
1d6396dd3f Merge branch 'feature-solver-function-objects-solution-control' into 'develop'
ENH: solver function objects: add outer-loop convergence checks

See merge request Development/openfoam!699
2024-09-06 10:02:29 +00:00
0ff5eb5687 STYLE: scalarTransport/energyTransport: modernise the code
- Remove redundant copy ctor and assignment operator (already deleted in base class)
- Remove unused header files
- Use default destructor
- Reorder member variables
2024-09-06 10:01:43 +00:00
559f13d450 DOC: scalarTransport/energyTransport: improve header file documentation 2024-09-06 10:01:43 +00:00
fd77d7d9b5 INT: solver function objects: add outer-loop convergence checks
Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2024-09-06 10:01:43 +00:00
050f27910e ENH: advectionDiffusionPatch: default mesh checking. Fixes #3204 2024-09-04 09:34:25 +01:00
483e9892ee BUG: blockMesh: incorrect sqrt. Fixes #3217 2024-09-04 09:31:23 +01:00
60e5f0e0ae BUG: wall distance: select wall-point connected cells. See #3215 2024-08-22 16:50:51 +01:00
14fcd08f86 DOC: symplectic: add some comment 2024-08-22 16:23:43 +01:00
f72670edff BUG: overset: out-of-date lduAddressing. Fixes #3204
Was triggering update of cell-cell stencil (=meshObject) without
corresponding rebuilding of lduAddressing (= oversetFvMeshBase storage).
- added clearOut to oversetFvMesh(Base)
- added call to clearOut when rebuilding stencil
2024-08-19 15:49:21 +01:00
aacd99c030 ENH: transformPoints: added comment. See #3206 2024-07-31 14:40:01 +01:00
303c3135aa COMP: shm: missing bit. parallel consistency. See #2331 2024-07-18 09:40:11 +01:00
f97f715f66 ENH: shm: parallel consistency. See #2331 2024-07-17 09:14:02 +01:00
bb8f7799d9 ENH: vtkUnstructuredToFoam: construct&write fields. See #3195. 2024-07-10 15:20:54 +01:00
7ec78f6d6d BUG: interpolation: handling of bounds. Fixes #3191 2024-07-04 15:53:06 +01:00
dce009cef1 ENH: make Nastran PLOAD2,PLOAD4 field mappings optional
- PLOAD2 is a reasonable default and PLOAD4 output
  (currently misused for vectors/tensors) is the exception.

- simplify the specification by using optional PLOAD4, PLOAD2 wordRes
  lists to act as allow/deny selectors. In the regular case won't need
  to specify anything or perhaps only the PLOAD4 list.

ENH: atomic creation of Nastran files

FIX: inconsistent Nastran surface output format

- use FREE format by default. Previously had an odd mix of SHORT
  format when created without options and LONG format (as default)
  when created with format options.
2024-06-26 16:53:13 +02:00
d8d3e34d5c COMP: fix dangling references (gcc13+: -Wdangling-reference) 2024-06-26 16:53:05 +02:00
d300fab63a ENH: reduce some allocations in rawTopoChangerFvMesh
- cache and reuse the zero field

STYLE: use templated form of objectRegistry::names<..>
2024-06-26 16:51:12 +02:00
11453 changed files with 124163 additions and 32840 deletions

View File

@ -49,7 +49,7 @@
<!--
Providing details of your set-up can help us identify any issues, e.g.
OpenFOAM version : v2406|v2312|v2306|v2212|v2206 etc
OpenFOAM version : v2506|v2412|v2406|v2312|v2306 etc
Operating system : ubuntu|openSUSE|RedHat etc
Hardware info : any info that may help?
Compiler : gcc|clang etc

View File

@ -1,13 +1,15 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
set -- -no-recursion "$@" # Parse arguments only
# Run from OPENFOAM top-level directory only
cd "${0%/*}" || exit
wmake -check-dir "$WM_PROJECT_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR"
echo " Check your OpenFOAM environment and installation"
exit 1
}
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ]
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments -no-recursion "$@" || \
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments || \
echo "Argument parse error"
else
echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect"

View File

@ -1,13 +1,15 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
set -- -no-recursion "$@" # Parse arguments only
# Run from OPENFOAM top-level directory only
cd "${0%/*}" || exit
wmake -check-dir "$WM_PROJECT_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR"
echo " Check your OpenFOAM environment and installation"
exit 1
}
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ]
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments -no-recursion "$@" || \
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments || \
echo "Argument parse error"
else
echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect"

View File

@ -27,6 +27,7 @@ It is likely incomplete...
- Bernhard Gschaider
- Andrew Heather
- David Hill
- Crist<73>bal Ib<49><62>ez
- Yoshiaki Inoue
- Mattijs Janssens
- Andrew Jackson

View File

@ -1,2 +1,2 @@
api=2406
api=2506
patch=0

View File

@ -40,9 +40,9 @@ Violations of the Trademark are monitored, and will be duly prosecuted.
If OpenFOAM has already been compiled on your system, simply source
the appropriate `etc/bashrc` or `etc/cshrc` file and get started.
For example, for the OpenFOAM-v2406 version:
For example, for the OpenFOAM-v2506 version:
```
source /installation/path/OpenFOAM-v2406/etc/bashrc
source /installation/path/OpenFOAM-v2506/etc/bashrc
```
## Compiling OpenFOAM
@ -127,8 +127,8 @@ These 3rd-party sources are normally located in a directory parallel
to the OpenFOAM directory. For example,
```
/path/parent
|-- OpenFOAM-v2406
\-- ThirdParty-v2406
|-- OpenFOAM-v2506
\-- ThirdParty-v2506
```
There are, however, many cases where this simple convention is inadequate:
@ -136,7 +136,7 @@ There are, however, many cases where this simple convention is inadequate:
operating system or cluster installation provides it)
* When we have changed the OpenFOAM directory name to some arbitrary
directory name, e.g. openfoam-sandbox2406, etc..
directory name, e.g. openfoam-sandbox2412, etc..
* When we would like any additional 3rd party software to be located
inside of the OpenFOAM directory to ensure that the installation is
@ -156,9 +156,9 @@ when locating the ThirdParty directory with the following precedence:
2. PREFIX/ThirdParty-VERSION
* this corresponds to the traditional approach
3. PREFIX/ThirdParty-vAPI
* allows for an updated value of VERSION, *eg*, `v2406-myCustom`,
* allows for an updated value of VERSION, *eg*, `v2506-myCustom`,
without requiring a renamed ThirdParty. The API value would still
be `2406` and the original `ThirdParty-v2406/` would be found.
be `2412` and the original `ThirdParty-v2506/` would be found.
4. PREFIX/ThirdParty-API
* same as the previous example, but using an unadorned API value.
5. PREFIX/ThirdParty-common

View File

@ -13,7 +13,14 @@ volVectorField U
);
// Initialise the velocity internal field to zero
U = dimensionedVector(U.dimensions(), Zero);
// Note: explicitly bypass evaluation of contraint patch overrides
// (e.g. swirlFanVelocity might lookup phi,rho)
//U = dimensionedVector(U.dimensions(), Zero);
{
const dimensionedVector dt(U.dimensions(), Zero);
U.internalFieldRef() = dt;
U.boundaryFieldRef() = dt.value();
}
surfaceScalarField phi
(

View File

@ -36,11 +36,13 @@ Description
if (adjustTimeStep)
{
scalar maxDeltaTFact = maxCo/(CoNum + StCoNum + SMALL);
scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
const scalar deltaTFact =
Foam::min(Foam::min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
runTime.setDeltaT
(
min
Foam::min
(
deltaTFact*runTime.deltaTValue(),
maxDeltaT

View File

@ -1,5 +1,6 @@
if (adjustTimeStep)
{
runTime.setDeltaT(min(dtChem, maxDeltaT));
runTime.setDeltaT(Foam::min(dtChem, maxDeltaT));
Info<< "deltaT = " << runTime.deltaTValue() << endl;
}

View File

@ -54,9 +54,18 @@ if (adjustTimeStep)
runTime.setDeltaT
(
min
Foam::min
(
dt0*min(min(TFactorFluid, min(TFactorFilm, TFactorSolid)), 1.2),
dt0
* Foam::min
(
Foam::min
(
TFactorFluid,
Foam::min(TFactorFilm, TFactorSolid)
),
1.2
),
maxDeltaT
)
);

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
Copyright (C) 2020,2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -57,10 +57,22 @@ License
// (relative to reference value)
scalar alphaY(pimpleDict.getOrDefault<scalar>("alphaY", 1.0));
Info<< "Time scales min/max:" << endl;
// Cache old reciprocal time scale field
volScalarField rDeltaT0("rDeltaT0", rDeltaT);
// The old reciprocal time scale field, with any damping factor
tmp<volScalarField> rDeltaT0_damped;
// Calculate damped value before applying any other changes
if
(
rDeltaTDampingCoeff < 1
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
)
{
rDeltaT0_damped = (scalar(1) - rDeltaTDampingCoeff)*(rDeltaT);
}
Info<< "Time scales min/max:" << endl;
// Flow time scale
{
@ -70,12 +82,14 @@ License
/((2*maxCo)*mesh.V()*rho())
);
// Limit the largest time scale
rDeltaT.max(1/maxDeltaT);
// Limit the largest time scale (=> smallest reciprocal time)
rDeltaT.clamp_min(1/maxDeltaT);
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< " Flow = "
<< 1/gMax(rDeltaT.primitiveField()) << ", "
<< 1/gMin(rDeltaT.primitiveField()) << endl;
<< limits.min() << ", " << limits.max() << endl;
}
// Heat release rate time scale
@ -86,11 +100,13 @@ License
mag(Qdot)/(alphaTemp*rho*thermo.Cp()*T)
);
Info<< " Temperature = "
<< 1/(gMax(rDeltaTT.field()) + VSMALL) << ", "
<< 1/(gMin(rDeltaTT.field()) + VSMALL) << endl;
rDeltaT.primitiveFieldRef().clamp_min(rDeltaTT);
rDeltaT.ref() = max(rDeltaT(), rDeltaTT);
auto limits = gMinMax(rDeltaTT.field());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< " Temperature = "
<< limits.min() << ", " << limits.max() << endl;
}
// Reaction rate time scale
@ -138,11 +154,13 @@ License
if (foundY)
{
Info<< " Composition = "
<< 1/(gMax(rDeltaTY.field()) + VSMALL) << ", "
<< 1/(gMin(rDeltaTY.field()) + VSMALL) << endl;
rDeltaT.primitiveFieldRef().clamp_min(rDeltaTY);
rDeltaT.ref() = max(rDeltaT(), rDeltaTY);
auto limits = gMinMax(rDeltaTY.field());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< " Composition = "
<< limits.min() << ", " << limits.max() << endl;
}
else
{
@ -161,28 +179,22 @@ License
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
}
// Limit rate of change of time scale
// Limit rate of change of time scale (=> smallest reciprocal time)
// - reduce as much as required
// - only increase at a fraction of old time scale
if
(
rDeltaTDampingCoeff < 1
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
)
if (rDeltaT0_damped)
{
rDeltaT = max
(
rDeltaT,
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
);
rDeltaT.clamp_min(rDeltaT0_damped());
}
// Update tho boundary values of the reciprocal time-step
rDeltaT.correctBoundaryConditions();
auto limits = gMinMax(rDeltaT.field());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< " Overall = "
<< 1/gMax(rDeltaT.primitiveField())
<< ", " << 1/gMin(rDeltaT.primitiveField()) << endl;
<< limits.min() << ", " << limits.max() << endl;
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
Copyright (C) 2020,2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -106,7 +106,7 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
if (!this->readValueEntry(dict))
{
// Fallback: set to the internal field
fvPatchField<scalar>::patchInternalField(*this);
this->extrapolateInternal();
}
refValue() = *this;

View File

@ -23,7 +23,11 @@
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
{
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< "Flow time scale min/max = "
<< limits.min() << ", " << limits.max() << endl;
}
}

View File

@ -52,18 +52,26 @@
// Update the boundary values of the reciprocal time-step
rDeltaT.correctBoundaryConditions();
Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
{
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< "Flow time scale min/max = "
<< limits.min() << ", " << limits.max() << endl;
}
if (rDeltaTSmoothingCoeff < 1.0)
{
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
}
Info<< "Smoothed flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
{
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< "Smoothed flow time scale min/max = "
<< limits.min() << ", " << limits.max() << endl;
}
// Limit rate of change of time scale
// - reduce as much as required
@ -78,8 +86,10 @@
rDeltaT0
*max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff);
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< "Damped flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< limits.min() << ", " << limits.max() << endl;
}
}

View File

@ -1,7 +1,7 @@
scalar CoNum = -GREAT;
forAll(fluidRegions, regionI)
{
CoNum = max
CoNum = Foam::max
(
compressibleCourantNo
(

View File

@ -78,8 +78,8 @@
}
rho = thermo.rho();
rho = max(rho, rhoMin[i]);
rho = min(rho, rhoMax[i]);
rho.clamp_range(rhoMin[i], rhoMax[i]);
rho.relax();
Info<< "Min/max rho:" << min(rho).value() << ' '

View File

@ -387,15 +387,18 @@ updateCoeffs()
{
scalar Q = gSum(kappa(Tp)*patch().magSf()*snGrad());
Info<< "T solid : " << nl << endl;
auto limits = gMinMax(Tp);
auto avg = gAverage(Tp);
Info
<< " heat transfer rate from solid:" << Q
<< " walltemperature "
<< " min:" << gMin(Tp)
<< " max:" << gMax(Tp)
<< " avg:" << gAverage(Tp) << nl
<< endl;
Info<< "T solid : " << nl << endl;
Info
<< " heat transfer rate from solid:" << Q
<< " walltemperature "
<< " min:" << limits.min()
<< " max:" << limits.max()
<< " avg:" << avg << nl
<< endl;
}
}
else if (regionType_ == fluid)
@ -445,10 +448,16 @@ updateCoeffs()
scalarField qLiq((Tp - Tc)*KdeltaLiq);
scalarField qVap((Tp - Tv.patchInternalField())*KdeltaVap);
auto infoT = gMinMax(Tp);
auto avgT = gAverage(Tp);
auto infoLiq = gMinMax(qLiq);
auto infoVap = gMinMax(qVap);
Info<< "T flow : " << nl << endl;
Info<< " qLiq: " << gMin(qLiq) << " - " << gMax(qLiq) << endl;
Info<< " qVap: " << gMin(qVap) << " - " << gMax(qVap) << endl;
Info<< " qLiq: " << infoLiq.min() << " - " << infoLiq.max() << nl
<< " qVap: " << infoVap.min() << " - " << infoVap.max() << nl;
scalar QLiq = gSum(qLiq*patch().magSf());
scalar QVap = gSum(qVap*patch().magSf());
@ -457,9 +466,9 @@ updateCoeffs()
Info<< " Heat transfer to Vap: " << QVap << endl;
Info<< " walltemperature "
<< " min:" << gMin(Tp)
<< " max:" << gMax(Tp)
<< " avg:" << gAverage(Tp)
<< " min:" << infoT.min()
<< " max:" << infoT.max()
<< " avg:" << avgT
<< endl;
}
}

View File

@ -31,7 +31,7 @@
);
CoNum =
scalar regionCoNum =
0.5*gMax
(
sumPhi/fluidRegions[regioni].V().field()
@ -41,9 +41,9 @@
(
fvc::surfaceSum(mag(phi1 - phi2))().primitiveField()
/ fluidRegions[regioni].V().field()
)*runTime.deltaTValue(),
)*runTime.deltaTValue();
CoNum = max(UrCoNum, CoNum);
CoNum = Foam::max(CoNum, Foam::max(regionCoNum, UrCoNum));
}
}

View File

@ -8,11 +8,13 @@
volVectorField& U1 = phase1.URef();
surfaceScalarField& phi1 = phase1.phiRef();
const surfaceScalarField& alphaPhi1 = phase1.alphaPhi();
const tmp<surfaceScalarField> talphaPhi1 = phase1.alphaPhi();
const auto& alphaPhi1 = talphaPhi1();
volVectorField& U2 = phase2.URef();
surfaceScalarField& phi2 = phase2.phiRef();
const surfaceScalarField& alphaPhi2 = phase2.alphaPhi();
const tmp<surfaceScalarField> talphaPhi2 = phase2.alphaPhi();
const auto& alphaPhi2 = talphaPhi2();
surfaceScalarField& phi = fluid.phi();

View File

@ -2,7 +2,7 @@
forAll(fluidRegions, regioni)
{
CoNum = max
CoNum = Foam::max
(
compressibleCourantNo
(
@ -17,7 +17,7 @@
/*
forAll(porousFluidRegions, porousi)
{
CoNum = max
CoNum = Foam::max
(
compressibleCourantNo
(

View File

@ -47,10 +47,10 @@ if (adjustTimeStep)
runTime.setDeltaT
(
min
Foam::min
(
min(maxCo/CoNum, maxDi/DiNum)*runTime.deltaTValue(),
min(runTime.deltaTValue(), maxDeltaT)
Foam::min(maxCo/CoNum, maxDi/DiNum)*runTime.deltaTValue(),
Foam::min(runTime.deltaTValue(), maxDeltaT)
)
);
Info<< "deltaT = " << runTime.deltaTValue() << endl;

View File

@ -48,18 +48,14 @@ if (adjustTimeStep)
scalar maxDeltaTFluid = maxCo/(CoNum + SMALL);
scalar maxDeltaTSolid = maxDi/(DiNum + SMALL);
scalar deltaTFluid =
min
(
min(maxDeltaTFluid, 1.0 + 0.1*maxDeltaTFluid),
1.2
);
const scalar deltaTFluid =
Foam::min(Foam::min(maxDeltaTFluid, 1.0 + 0.1*maxDeltaTFluid), 1.2);
runTime.setDeltaT
(
min
Foam::min
(
min(deltaTFluid, maxDeltaTSolid)*runTime.deltaTValue(),
Foam::min(deltaTFluid, maxDeltaTSolid)*runTime.deltaTValue(),
maxDeltaT
)
);

View File

@ -22,7 +22,7 @@ forAll(solidRegions, i)
tmp<volScalarField> trho = thermo.rho();
const volScalarField& rho = trho();
DiNum = max
DiNum = Foam::max
(
solidRegionDiffNo
(

View File

@ -17,7 +17,7 @@ scalar DiNum = -GREAT;
tmp<volScalarField> trho = thermo.rho();
const volScalarField& rho = trho();
DiNum = max
DiNum = Foam::max
(
solidRegionDiffNo
(

View File

@ -60,13 +60,10 @@ template<class Type>
void zeroCells
(
GeometricField<Type, fvPatchField, volMesh>& vf,
const labelList& cells
const labelUList& cells
)
{
forAll(cells, i)
{
vf[cells[i]] = Zero;
}
UIndirectList<Type>(vf.primitiveField(), cells) = Zero;
}

View File

@ -103,8 +103,8 @@ dimensionedScalar alphaMax
laminarTransport
);
const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
//const labelList& outletCells = mesh.boundary()["outlet"].faceCells();
const labelUList& inletCells = mesh.boundary()["inlet"].faceCells();
//const labelUList& outletCells = mesh.boundary()["outlet"].faceCells();
volScalarField alpha
(

View File

@ -33,7 +33,12 @@ Description
\*---------------------------------------------------------------------------*/
{
volScalarField contErr(interpolatedCells*cellMask*fvc::div(phi));
const DimensionedField<scalar, volMesh> contErr
(
interpolatedCells.internalField()
*cellMask.internalField()
*fvc::div(phi)().internalField()
);
scalar sumLocalContErr = runTime.deltaTValue()*
mag(contErr)().weightedAverage(mesh.V()).value();

View File

@ -55,7 +55,7 @@ if (mesh.changing())
dimensionedScalar rAUf("rAUf", dimTime, 1.0);
const cellCellStencilObject& overlap = Stencil::New(mesh);
const labelList& cellTypes = overlap.cellTypes();
const labelUList& cellTypes = overlap.cellTypes();
const labelIOList& zoneIDs = overlap.zoneID();
while (pimple.correctNonOrthogonal())

View File

@ -36,18 +36,26 @@
// Update the boundary values of the reciprocal time-step
rDeltaT.correctBoundaryConditions();
Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
{
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< "Flow time scale min/max = "
<< limits.min() << ", " << limits.max() << endl;
}
if (rDeltaTSmoothingCoeff < 1.0)
{
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
}
Info<< "Smoothed flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
{
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< "Smoothed flow time scale min/max = "
<< limits.min() << ", " << limits.max() << endl;
}
// Limit rate of change of time scale
// - reduce as much as required
@ -62,8 +70,10 @@
rDeltaT0
*max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff);
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< "Damped flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< limits.min() << ", " << limits.max() << endl;
}
}

View File

@ -5,13 +5,17 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lsampling \
-ldynamicMesh \
-ldynamicFvMesh \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \

View File

@ -33,7 +33,12 @@ Description
\*---------------------------------------------------------------------------*/
{
volScalarField contErr(interpolatedCells*cellMask*fvc::div(phi));
const DimensionedField<scalar, volMesh> contErr
(
interpolatedCells.internalField()
*cellMask.internalField()
*fvc::div(phi)().internalField()
);
scalar sumLocalContErr = runTime.deltaTValue()*
mag(contErr)().weightedAverage(mesh.V()).value();

View File

@ -64,6 +64,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "simpleControl.H"
@ -83,7 +84,7 @@ int main(int argc, char *argv[])
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createDynamicFvMesh.H"
#include "createControl.H"
#include "createFields.H"
#include "initContinuityErrs.H"
@ -98,6 +99,14 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
// Do any mesh changes
mesh.controlledUpdate();
if (mesh.changing())
{
MRF.update();
}
// --- Pressure-velocity SIMPLE corrector
{
#include "UEqn.H"

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
Copyright (C) 2020,2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -54,10 +54,21 @@ License
scalar alphaTemp(pimpleDict.getOrDefault("alphaTemp", 0.05));
Info<< "Time scales min/max:" << endl;
// The old reciprocal time scale field, with any damping factor
tmp<volScalarField> rDeltaT0_damped;
// Cache old reciprocal time scale field
volScalarField rDeltaT0("rDeltaT0", rDeltaT);
// Calculate damped value before applying any other changes
if
(
rDeltaTDampingCoeff < 1
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
)
{
rDeltaT0_damped = (scalar(1) - rDeltaTDampingCoeff)*(rDeltaT);
}
Info<< "Time scales min/max:" << endl;
// Flow time scale
{
@ -67,12 +78,14 @@ License
/((2*maxCo)*mesh.V()*rho())
);
// Limit the largest time scale
rDeltaT.max(1/maxDeltaT);
// Limit the largest time scale (=> smallest reciprocal time)
rDeltaT.clamp_min(1/maxDeltaT);
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< " Flow = "
<< gMin(1/rDeltaT.primitiveField()) << ", "
<< gMax(1/rDeltaT.primitiveField()) << endl;
<< limits.min() << ", " << limits.max() << endl;
}
// Reaction source time scale
@ -93,15 +106,13 @@ License
)
);
Info<< " Temperature = "
<< gMin(1/(rDeltaTT.field() + VSMALL)) << ", "
<< gMax(1/(rDeltaTT.field() + VSMALL)) << endl;
rDeltaT.primitiveFieldRef().clamp_min(rDeltaTT);
rDeltaT.ref() = max
(
rDeltaT(),
rDeltaTT
);
auto limits = gMinMax(rDeltaTT.field());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< " Temperature = "
<< limits.min() << ", " << limits.max() << endl;
}
// Update tho boundary values of the reciprocal time-step
@ -113,25 +124,19 @@ License
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
}
// Limit rate of change of time scale
// Limit rate of change of time scale (=> smallest reciprocal time)
// - reduce as much as required
// - only increase at a fraction of old time scale
if
(
rDeltaTDampingCoeff < 1.0
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
)
if (rDeltaT0_damped)
{
rDeltaT = max
(
rDeltaT,
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
);
rDeltaT.clamp_min(rDeltaT0_damped());
}
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< " Overall = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< limits.min() << ", " << limits.max() << endl;
}

View File

@ -36,13 +36,18 @@ Description
if (adjustTimeStep)
{
const scalar maxDeltaTFact =
min(maxCo/(CoNum + SMALL), maxCo/(surfaceFilm.CourantNumber() + SMALL));
Foam::min
(
maxCo/(CoNum + SMALL),
maxCo/(surfaceFilm.CourantNumber() + SMALL)
);
const scalar deltaTFact =
min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
Foam::min(Foam::min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
runTime.setDeltaT
(
min
Foam::min
(
deltaTFact*runTime.deltaTValue(),
maxDeltaT

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
Copyright (C) 2020,2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -54,10 +54,21 @@ License
scalar alphaTemp(pimpleDict.getOrDefault("alphaTemp", 0.05));
Info<< "Time scales min/max:" << endl;
// The old reciprocal time scale field, with any damping factor
tmp<volScalarField> rDeltaT0_damped;
// Cache old reciprocal time scale field
volScalarField rDeltaT0("rDeltaT0", rDeltaT);
// Calculate damped value before applying any other changes
if
(
rDeltaTDampingCoeff < 1
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
)
{
rDeltaT0_damped = (scalar(1) - rDeltaTDampingCoeff)*(rDeltaT);
}
Info<< "Time scales min/max:" << endl;
// Flow time scale
{
@ -67,12 +78,14 @@ License
/((2*maxCo)*mesh.V()*rho())
);
// Limit the largest time scale
rDeltaT.max(1/maxDeltaT);
// Limit the largest time scale (=> smallest reciprocal time)
rDeltaT.clamp_min(1/maxDeltaT);
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< " Flow = "
<< gMin(1/rDeltaT.primitiveField()) << ", "
<< gMax(1/rDeltaT.primitiveField()) << endl;
<< limits.min() << ", " << limits.max() << endl;
}
// Reaction source time scale
@ -92,15 +105,13 @@ License
)
);
Info<< " Temperature = "
<< gMin(1/(rDeltaTT.field() + VSMALL)) << ", "
<< gMax(1/(rDeltaTT.field() + VSMALL)) << endl;
rDeltaT.primitiveFieldRef().clamp_min(rDeltaTT);
rDeltaT.ref() = max
(
rDeltaT(),
rDeltaTT
);
auto limits = gMinMax(rDeltaTT.field());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< " Temperature = "
<< limits.min() << ", " << limits.max() << endl;
}
// Update the boundary values of the reciprocal time-step
@ -112,25 +123,22 @@ License
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
}
// Limit rate of change of time scale
// Limit rate of change of time scale (=> smallest reciprocal time)
// - reduce as much as required
// - only increase at a fraction of old time scale
if
(
rDeltaTDampingCoeff < 1.0
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
)
if (rDeltaT0_damped)
{
rDeltaT = max
(
rDeltaT,
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
);
rDeltaT.clamp_min(rDeltaT0_damped());
}
// Update the boundary values of the reciprocal time-step
rDeltaT.correctBoundaryConditions();
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< " Overall = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< limits.min() << ", " << limits.max() << endl;
}

View File

@ -48,8 +48,7 @@ U.correctBoundaryConditions();
fvOptions.correct(U);
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.clamp_range(rhoMin, rhoMax);
rho.relax();
Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;

View File

@ -49,8 +49,7 @@
fvOptions.correct(U);
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.clamp_range(rhoMin, rhoMax);
rho.relax();
Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;

View File

@ -1,6 +1,5 @@
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.clamp_range(rhoMin, rhoMax);
rho.relax();
volScalarField rAU(1.0/UEqn.A());
@ -94,8 +93,7 @@ p.relax();
// Recalculate density from the relaxed pressure
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.clamp_range(rhoMin, rhoMax);
rho.relax();
Info<< "rho min/max : " << min(rho).value() << " " << max(rho).value() << endl;

View File

@ -1,6 +1,5 @@
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.clamp_range(rhoMin, rhoMax);
rho.relax();
volScalarField rAU(1.0/UEqn.A());
@ -94,8 +93,7 @@ p.relax();
// Recalculate density from the relaxed pressure
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.clamp_range(rhoMin, rhoMax);
rho.relax();
Info<< "rho min/max : " << min(rho).value() << " " << max(rho).value() << endl;

View File

@ -36,13 +36,14 @@ Description
if (adjustTimeStep)
{
scalar maxDeltaTFact =
min(maxCo/(CoNum + SMALL), maxAlphaCo/(alphaCoNum + SMALL));
Foam::min(maxCo/(CoNum + SMALL), maxAlphaCo/(alphaCoNum + SMALL));
scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
const scalar deltaTFact =
Foam::min(Foam::min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
runTime.setDeltaT
(
min
Foam::min
(
deltaTFact*runTime.deltaTValue(),
maxDeltaT

View File

@ -53,6 +53,21 @@
pimpleDict.getOrDefault<scalar>("maxDeltaT", GREAT)
);
// The old reciprocal time scale field, with any damping factor
tmp<volScalarField> rDeltaT0_damped;
// Calculate damped value before applying any other changes
if
(
rDeltaTDampingCoeff < 1
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
)
{
rDeltaT0_damped = (scalar(1) - rDeltaTDampingCoeff)*(rDeltaT);
}
volScalarField rDeltaT0("rDeltaT0", rDeltaT);
// Set the reciprocal time-step from the local Courant number
@ -83,10 +98,13 @@
// Update tho boundary values of the reciprocal time-step
rDeltaT.correctBoundaryConditions();
Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
{
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< "Flow time scale min/max = "
<< limits.min() << ", " << limits.max() << endl;
}
if (rDeltaTSmoothingCoeff < 1.0)
{
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
@ -110,27 +128,25 @@
fvc::sweep(rDeltaT, alpha1, nAlphaSweepIter, alphaSpreadDiff);
}
Info<< "Smoothed flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
{
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
// Limit rate of change of time scale
Info<< "Smoothed flow time scale min/max = "
<< limits.min() << ", " << limits.max() << endl;
}
// Limit rate of change of time scale (=> smallest reciprocal time)
// - reduce as much as required
// - only increase at a fraction of old time scale
if
(
rDeltaTDampingCoeff < 1.0
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
)
if (rDeltaT0_damped)
{
rDeltaT = max
(
rDeltaT,
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
);
rDeltaT.clamp_min(rDeltaT0_damped());
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< "Damped flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< limits.min() << ", " << limits.max() << endl;
}
}

View File

@ -36,13 +36,14 @@ Description
if (adjustTimeStep)
{
scalar maxDeltaTFact =
min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL));
Foam::min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL));
scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
const scalar deltaTFact =
Foam::min(Foam::min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
runTime.setDeltaT
(
min
Foam::min
(
deltaTFact*runTime.deltaTValue(),
maxDeltaT

View File

@ -37,11 +37,15 @@ if (adjustTimeStep)
if (CoNum > SMALL)
{
scalar maxDeltaTFact =
min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL));
Foam::min
(
maxCo/(CoNum + SMALL),
maxAcousticCo/(acousticCoNum + SMALL)
);
runTime.setDeltaT
(
min
Foam::min
(
maxDeltaTFact*runTime.deltaTValue(),
maxDeltaT

View File

@ -74,8 +74,11 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
const volScalarField& alpha1(mixture_.alpha1());
const volScalarField& alpha2(mixture_.alpha2());
const volScalarField& rho1 = mixture_.thermo1().rho();
const volScalarField& rho2 = mixture_.thermo2().rho();
const tmp<volScalarField> trho1 = mixture_.thermo1().rho();
const tmp<volScalarField> trho2 = mixture_.thermo2().rho();
const auto& rho1 = trho1();
const auto& rho2 = trho2();
alphaRhoPhi1_ =
(
@ -185,8 +188,8 @@ void Foam::compressibleInterPhaseTransportModel::correctPhasePhi()
{
if (twoPhaseTransport_)
{
const volScalarField& rho1 = mixture_.thermo1().rho();
const volScalarField& rho2 = mixture_.thermo2().rho();
const tmp<volScalarField> rho1 = mixture_.thermo1().rho();
const tmp<volScalarField> rho2 = mixture_.thermo2().rho();
alphaRhoPhi1_.ref() = fvc::interpolate(rho1)*alphaPhi10_;
alphaRhoPhi2_.ref() = fvc::interpolate(rho2)*(phi_ - alphaPhi10_);

View File

@ -26,12 +26,12 @@ forAll(dgdt, celli)
{
if (dgdt[celli] > 0.0)
{
Sp[celli] -= dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
Su[celli] += dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
Sp[celli] -= dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4);
Su[celli] += dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4);
}
else if (dgdt[celli] < 0.0)
{
Sp[celli] += dgdt[celli]/max(alpha1[celli], 1e-4);
Sp[celli] += dgdt[celli]/Foam::max(alpha1[celli], 1e-4);
}
}

View File

@ -210,7 +210,7 @@ void VoFPatchTransfer::correct
film().toRegion(patchi, Vp);
const polyPatch& pp = pbm[patchi];
const labelList& faceCells = pp.faceCells();
const labelUList& faceCells = pp.faceCells();
// Accumulate the total mass removed from patch
scalar dMassPatch = 0;

View File

@ -26,12 +26,12 @@ forAll(dgdt, celli)
{
if (dgdt[celli] > 0.0)
{
Sp[celli] -= dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
Su[celli] += dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
Sp[celli] -= dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4);
Su[celli] += dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4);
}
else if (dgdt[celli] < 0.0)
{
Sp[celli] += dgdt[celli]/max(alpha1[celli], 1e-4);
Sp[celli] += dgdt[celli]/Foam::max(alpha1[celli], 1e-4);
}
}

View File

@ -26,12 +26,12 @@ forAll(dgdt, celli)
{
if (dgdt[celli] > 0.0)
{
Sp[celli] -= dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
Su[celli] += dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
Sp[celli] -= dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4);
Su[celli] += dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4);
}
else if (dgdt[celli] < 0.0)
{
Sp[celli] += dgdt[celli]/max(alpha1[celli], 1e-4);
Sp[celli] += dgdt[celli]/Foam::max(alpha1[celli], 1e-4);
}
}

View File

@ -135,7 +135,7 @@ public:
virtual volScalarField& he()
{
NotImplemented;
return const_cast<volScalarField&>(volScalarField::null());
return volScalarField::null().constCast();
}
//- Enthalpy/Internal energy [J/kg]

View File

@ -243,7 +243,7 @@ public:
virtual volScalarField& he()
{
NotImplemented;
return const_cast<volScalarField&>(volScalarField::null());
return volScalarField::null().constCast();
}
//- Enthalpy/Internal energy [J/kg]

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2023 OpenCFD Ltd.
Copyright (C) 2017-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -679,7 +679,7 @@ void Foam::radiation::laserDTRM::calculate()
}
}
scalar totalQ = gSum(Q_.primitiveFieldRef()*mesh_.V());
scalar totalQ = gWeightedSum(mesh_.V(), Q_.primitiveField());
Info << "Total energy absorbed [W]: " << totalQ << endl;
if (mesh_.time().writeTime())

View File

@ -36,13 +36,13 @@ Description
if (adjustTimeStep)
{
scalar maxDeltaTFact =
min
Foam::min
(
maxCo/(CoNum + SMALL),
min
Foam::min
(
maxAlphaCo/(alphaCoNum + SMALL),
min
Foam::min
(
maxAlphaDdt/(ddtAlphaNum + SMALL),
maxDi/(DiNum + SMALL)
@ -50,16 +50,18 @@ if (adjustTimeStep)
)
);
scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
const scalar deltaTFact =
Foam::min(Foam::min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
runTime.setDeltaT
(
min
Foam::min
(
deltaTFact*runTime.deltaTValue(),
maxDeltaT
)
);
Info<< "deltaT = " << runTime.deltaTValue() << endl;
}

View File

@ -86,7 +86,7 @@ public:
virtual volScalarField& he()
{
NotImplemented;
return const_cast<volScalarField&>(volScalarField::null());
return volScalarField::null().constCast();
}
//- Return access to the internal energy field [J/Kg]

View File

@ -33,7 +33,12 @@ Description
\*---------------------------------------------------------------------------*/
{
volScalarField contErr(interpolatedCells*cellMask*fvc::div(phi));
const DimensionedField<scalar, volMesh> contErr
(
interpolatedCells.internalField()
*cellMask.internalField()
*fvc::div(phi)().internalField()
);
scalar sumLocalContErr = runTime.deltaTValue()*
mag(contErr)().weightedAverage(mesh.V()).value();

View File

@ -65,7 +65,7 @@
dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0);
const cellCellStencilObject& overlap = Stencil::New(mesh);
const labelList& cellTypes = overlap.cellTypes();
const labelUList& cellTypes = overlap.cellTypes();
const labelIOList& zoneIDs = overlap.zoneID();
while (pimple.correctNonOrthogonal())

View File

@ -12,8 +12,11 @@ for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
phaseModel& phase = fluid.anisothermalPhases()[anisothermalPhasei];
const volScalarField& alpha = phase;
const volScalarField& rho = phase.rho();
const volVectorField& U = phase.U();
const tmp<volScalarField> trho = phase.rho();
const tmp<volVectorField> tU = phase.U();
const auto& rho = trho();
const auto& U = tU();
fvScalarMatrix EEqn
(

View File

@ -11,7 +11,9 @@
UPtrList<volScalarField>& Y = phase.YActiveRef();
const volScalarField& alpha = phase;
const volScalarField& rho = phase.rho();
const tmp<volScalarField> trho = phase.rho();
const auto& rho = trho();
forAll(Y, i)
{

View File

@ -14,9 +14,11 @@ PtrList<fvVectorMatrix> UEqns(phases.size());
phaseModel& phase = fluid.movingPhases()[movingPhasei];
const volScalarField& alpha = phase;
const volScalarField& rho = phase.rho();
const tmp<volScalarField> trho = phase.rho();
volVectorField& U = phase.URef();
const auto& rho = trho();
UEqns.set
(
phase.index(),

View File

@ -17,9 +17,11 @@ PtrList<fvVectorMatrix> UEqns(phases.size());
phaseModel& phase = fluid.movingPhases()[movingPhasei];
const volScalarField& alpha = phase;
const volScalarField& rho = phase.rho();
const tmp<volScalarField> trho = phase.rho();
volVectorField& U = phase.URef();
const auto& rho = trho();
UEqns.set
(
phase.index(),

View File

@ -38,7 +38,9 @@
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< limits.min() << ", " << limits.max() << endl;
}

View File

@ -8,5 +8,5 @@
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
CoNum = max(CoNum, UrCoNum);
CoNum = Foam::max(CoNum, UrCoNum);
}

View File

@ -6,11 +6,13 @@ const volScalarField& alpha2 = phase2;
volVectorField& U1 = phase1.URef();
surfaceScalarField& phi1 = phase1.phiRef();
const surfaceScalarField& alphaPhi1 = phase1.alphaPhi();
const tmp<surfaceScalarField> talphaPhi1 = phase1.alphaPhi();
const auto& alphaPhi1 = talphaPhi1();
volVectorField& U2 = phase2.URef();
surfaceScalarField& phi2 = phase2.phiRef();
const surfaceScalarField& alphaPhi2 = phase2.alphaPhi();
const tmp<surfaceScalarField> talphaPhi2 = phase2.alphaPhi();
const auto& alphaPhi2 = talphaPhi2();
surfaceScalarField& phi = fluid.phi();

View File

@ -31,7 +31,9 @@
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
auto limits = gMinMax(rDeltaT.primitiveField());
limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< limits.min() << ", " << limits.max() << endl;
}

View File

@ -8,5 +8,5 @@
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
CoNum = max(CoNum, UrCoNum);
CoNum = Foam::max(CoNum, UrCoNum);
}

View File

@ -50,7 +50,7 @@
+ (
he2.name() == thermo2.phasePropertyName("e")
? fvc::div(fvc::absolute(alphaPhi2, alpha2, U2), p)
+ p*fvc::ddt(alpha1)
+ p*fvc::ddt(alpha2)
: -alpha2*dpdt
)

View File

@ -1,6 +1,7 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments -no-recursion "$@"
cd "${0%/*}" || exit # Run from this directory
set -- -no-recursion "$@" # Parse arguments only
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
#------------------------------------------------------------------------------

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -25,9 +25,12 @@ License
Description
Test the sizeof for basic types.
Also tests how the data mapping of OpenFOAM types to UPstream (MPI)
type ids are handled.
Can be compiled and run without any OpenFOAM libraries.
g++ -std=c++11 -oTest-machine-sizes Test-machine-sizes.cpp
g++ -std=c++17 -oTest-machine-sizes Test-machine-sizes.cpp
\*---------------------------------------------------------------------------*/
@ -37,6 +40,134 @@ Description
#include <iostream>
#include <limits>
#include <typeinfo>
#include <type_traits>
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Partial copy from UPstream.H
//- Some MPI data types
//
//- Mapping of some fundamental and aggregate types to MPI data types
enum class dataTypes : int
{
// Fundamental Types [10]:
Basic_begin,
type_byte = Basic_begin,
type_int16,
type_int32,
type_int64,
type_uint16,
type_uint32,
type_uint64,
type_float,
type_double,
type_long_double,
invalid,
Basic_end = invalid
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Partial copy from UPstreamTraits.H
//- UPstream data type corresponding to an intrinsic (MPI) type
template<class T>
struct UPstream_mpi_dataType : std::false_type
{
static constexpr auto datatype_id = dataTypes::invalid;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Specializations to match elements of UPstream::dataTypes
#undef defineUPstreamDataTraits
#define defineUPstreamDataTraits(TypeId, Type) \
template<> struct UPstream_mpi_dataType<Type> : std::true_type \
{ \
static constexpr auto datatype_id = dataTypes::TypeId; \
};
defineUPstreamDataTraits(type_byte, char);
defineUPstreamDataTraits(type_byte, unsigned char);
defineUPstreamDataTraits(type_int16, int16_t);
defineUPstreamDataTraits(type_int32, int32_t);
defineUPstreamDataTraits(type_int64, int64_t);
defineUPstreamDataTraits(type_uint16, uint16_t);
defineUPstreamDataTraits(type_uint32, uint32_t);
defineUPstreamDataTraits(type_uint64, uint64_t);
defineUPstreamDataTraits(type_float, float);
defineUPstreamDataTraits(type_double, double);
defineUPstreamDataTraits(type_long_double, long double);
#undef defineUPstreamDataTraits
//- Explicit handling of data type aliases. This is necessary since
//- different systems map things like 'unsigned long' differently but we
//- restrict ourselves to int32/int64 types
template<class T>
struct UPstream_alias_dataType
:
std::bool_constant
<
// Basic MPI type
UPstream_mpi_dataType<std::remove_cv_t<T>>::value ||
(
// Or some int 32/64 type to re-map
std::is_integral_v<T>
&& (sizeof(T) == sizeof(int32_t) || sizeof(T) == sizeof(int64_t))
)
>
{
using base = std::conditional_t
<
UPstream_mpi_dataType<std::remove_cv_t<T>>::value,
std::remove_cv_t<T>, // <- using mpi type (no alias)
std::conditional_t // <- using alias
<
(
std::is_integral_v<T>
&& (sizeof(T) == sizeof(int32_t) || sizeof(T) == sizeof(int64_t))
),
std::conditional_t
<
(sizeof(T) == sizeof(int32_t)),
std::conditional_t<std::is_signed_v<T>, int32_t, uint32_t>,
std::conditional_t<std::is_signed_v<T>, int64_t, uint64_t>
>,
char // Fallback is a byte (eg, arbitrary contiguous data)
>
>;
static constexpr auto datatype_id =
UPstream_mpi_dataType<base>::datatype_id;
};
// Handle int8_t/uint8_t as aliases since 'signed char' etc may be
// ambiguous
//- Map \c int8_t to UPstream::dataTypes::type_byte
template<>
struct UPstream_alias_dataType<int8_t> : std::true_type
{
using base = char;
static constexpr auto datatype_id = dataTypes::type_byte;
};
//- Map \c uint8_t to UPstream::dataTypes::type_byte
template<>
struct UPstream_alias_dataType<uint8_t> : std::true_type
{
using base = unsigned char;
static constexpr auto datatype_id = dataTypes::type_byte;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class T>
void print(const char* name, bool showLimits = true)
@ -47,28 +178,84 @@ void print(const char* name, bool showLimits = true)
if (showLimits)
{
std::cout
<< " \"max\"=" << std::numeric_limits<T>::max();
<< " max=<";
if constexpr (sizeof(T) == 1)
{
std::cout << int(std::numeric_limits<T>::max());
}
else
{
std::cout << std::numeric_limits<T>::max();
}
std::cout << '>';
}
// A declared or deduced MPI type, or aliased
if constexpr (UPstream_mpi_dataType<T>::value)
{
std::cout
<< " is_mpi=("
<< int(UPstream_mpi_dataType<T>::datatype_id) << ')';
}
else
{
std::cout << " is_mpi=(null)";
}
// Any aliases?
if constexpr (UPstream_alias_dataType<T>::value)
{
if constexpr (UPstream_mpi_dataType<T>::value)
{
std::cout << " alias=base";
}
else
{
std::cout
<< " alias=("
<< int(UPstream_alias_dataType<T>::datatype_id) << ')';
}
}
std::cout<< '\n';
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int main(int argc, char *argv[])
{
std::cout<< "c++ = " << __cplusplus << '\n';
std::cout<< "machine sizes\n---\n\n";
std::cout<< "machine sizes (and some MPI traits)\n---\n\n";
print<int8_t>("int8_t");
print<uint8_t>("uint8_t");
print<int16_t>("int16_t");
print<uint16_t>("uint16_t");
print<int32_t>("int32_t");
print<uint32_t>("uint32_t");
print<int64_t>("int64_t");
print<uint64_t>("uint64_t");
std::cout << '\n';
print<char>("char");
print<signed char>("signed char");
print<unsigned char>("unsigned char");
print<short>("short");
print<int>("int");
print<unsigned>("unsigned");
print<long>("long");
print<unsigned long>("unsigned long");
print<std::size_t>("std::size_t");
print<long long>("long long");
std::cout << '\n';
print<std::size_t>("std::size_t");
print<std::streamsize>("std::streamsize");
std::cout << '\n';
print<float>("float");
print<double>("double");
print<long double>("long double");

View File

@ -1,3 +1,3 @@
Test-CircularBuffer.C
Test-CircularBuffer.cxx
EXE = $(FOAM_USER_APPBIN)/Test-CircularBuffer

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020-2022 OpenCFD Ltd.
Copyright (C) 2020-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -38,12 +38,11 @@ Description
\*---------------------------------------------------------------------------*/
#include "complex.H"
#include "Tensor.H"
#include "SymmTensor.H"
#include "SphericalTensor.H"
#include "DiagTensor.H"
#include "scalar.H"
#include "complex.H"
using namespace Foam;
@ -57,45 +56,11 @@ unsigned nTest_ = 0;
unsigned nFail_ = 0;
// Compare two floating point types, and print output.
// Do ++nFail_ if values of two objects are not equal within a given tolerance.
// The function is converted from PEP-485.
template<class Type>
typename std::enable_if<pTraits<Type>::rank == 0, void>::type
cmp
(
const word& msg,
const Type& x,
const Type& y,
const scalar relTol = 1e-8, //<! are values the same within 8 decimals
const scalar absTol = 0 //<! useful for cmps near zero
)
{
Info<< msg << x << endl;
unsigned nFail = 0;
if (max(absTol, relTol*max(mag(x), mag(y))) < mag(x - y))
{
++nFail;
}
if (nFail)
{
Info<< nl
<< " #### Fail in " << nFail << " comps ####" << nl << endl;
++nFail_;
}
++nTest_;
}
// Compare two containers elementwise, and print output.
// Do ++nFail_ if two components are not equal within a given tolerance.
// The function is converted from PEP-485
template<class Type>
typename std::enable_if<pTraits<Type>::rank != 0, void>::type
cmp
void cmp
(
const word& msg,
const Type& x,
@ -104,18 +69,37 @@ cmp
const scalar absTol = 0
)
{
Info<< msg << x << endl;
const auto notEqual = [=](const auto& a, const auto& b) -> bool
{
return
(
Foam::max(absTol, relTol*Foam::max(Foam::mag(a), Foam::mag(b)))
< Foam::mag(a - b)
);
};
unsigned nFail = 0;
for (direction i = 0; i < pTraits<Type>::nComponents; ++i)
if constexpr (is_vectorspace_v<Type>)
{
if (max(absTol, relTol*max(mag(x[i]), mag(y[i]))) < mag(x[i] - y[i]))
for (direction i = 0; i < pTraits<Type>::nComponents; ++i)
{
if (notEqual(x[i], y[i]))
{
++nFail;
}
}
}
else
{
if (notEqual(x, y))
{
++nFail;
}
}
Info<< msg << x << endl;
if (nFail)
{
Info<< nl
@ -368,27 +352,26 @@ void test_global_opers(Type)
// Do compile-time recursion over the given types
template<std::size_t I = 0, typename... Tp>
inline typename std::enable_if<I == sizeof...(Tp), void>::type
run_tests(const std::tuple<Tp...>& types, const List<word>& typeID){}
template<std::size_t I = 0, typename... Tp>
inline typename std::enable_if<I < sizeof...(Tp), void>::type
run_tests(const std::tuple<Tp...>& types, const List<word>& typeID)
void run_tests(const std::tuple<Tp...>& types, const List<word>& names)
{
Info<< nl << " ## Test constructors: "<< typeID[I] <<" ##" << nl;
test_constructors(std::get<I>(types));
if constexpr (I < sizeof...(Tp))
{
const auto& name = names[I];
Info<< nl << " ## Test member functions: "<< typeID[I] <<" ##" << nl;
test_member_funcs(std::get<I>(types));
Info<< nl << " ## Test constructors: " << name << " ##" << nl;
test_constructors(std::get<I>(types));
Info<< nl << " ## Test global functions: "<< typeID[I] << " ##" << nl;
test_global_funcs(std::get<I>(types));
Info<< nl << " ## Test member functions: " << name << " ##" << nl;
test_member_funcs(std::get<I>(types));
Info<< nl << " ## Test global operators: "<< typeID[I] <<" ##" << nl;
test_global_opers(std::get<I>(types));
Info<< nl << " ## Test global functions: " << name << " ##" << nl;
test_global_funcs(std::get<I>(types));
run_tests<I + 1, Tp...>(types, typeID);
Info<< nl << " ## Test global operators: " << name << " ##" << nl;
test_global_opers(std::get<I>(types));
run_tests<I + 1, Tp...>(types, names);
}
}
@ -403,8 +386,8 @@ int main()
const List<word> typeID
({
"DiagTensor<floatScalar>",
"DiagTensor<doubleScalar>",
"DiagTensor<float>",
"DiagTensor<double>",
"DiagTensor<complex>"
});

View File

@ -1,3 +0,0 @@
Test-Dictionary.C
EXE = $(FOAM_USER_APPBIN)/Test-Dictionary

View File

@ -1,3 +1,3 @@
Test-DynamicList.C
Test-DynamicList.cxx
EXE = $(FOAM_USER_APPBIN)/Test-DynamicList

View File

@ -1,3 +1,3 @@
Test-DynamicList2.C
Test-DynamicList2.cxx
EXE = $(FOAM_USER_APPBIN)/Test-DynamicList2

View File

@ -52,7 +52,8 @@ void printInfo
if (showSize)
{
Info<< " size=\"" << list.size()
<< "\" capacity=\"" << list.capacity() << "\"";
<< "\" capacity=\"" << list.capacity() << "\""
<< "\" min=\"" << SizeMin << "\"" ;
if (list.cdata())
{
Info<< " ptr=\"" << name(list.cdata()) << "\"";
@ -79,7 +80,8 @@ void printInfo
if (showSize)
{
Info<< " size=\"" << list.size()
<< "\" capacity=\"" << list.capacity() << "\"";
<< "\" capacity=\"" << list.capacity() << "\""
<< "\" min=\"" << SizeMin << "\"" ;
if (list.cdata())
{
Info<< " ptr=\"" << name(list.cdata()) << "\"";
@ -168,6 +170,22 @@ int main(int argc, char *argv[])
printInfo("", list2);
}
{
DynamicList<float, 32> list1(std::pair<label,label>(16,0));
list1 = -1;
Info<< "construct with specified size/capacity" << nl;
printInfo("", list1);
}
{
DynamicList<float, 32> list1(std::pair<label,label>(8,16));
list1 = -1;
Info<< "construct with specified size/capacity" << nl;
printInfo("", list1);
}
Info<< "\nEnd\n";
return 0;

View File

@ -1,3 +1,3 @@
Test-FixedList.C
Test-FixedList.cxx
EXE = $(FOAM_USER_APPBIN)/Test-FixedList

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2023 OpenCFD Ltd.
Copyright (C) 2019-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -41,7 +41,6 @@ See also
#include "List.H"
#include "IPstream.H"
#include "OPstream.H"
#include <numeric>
using namespace Foam;
@ -85,8 +84,7 @@ void compileInfo()
template<class FixedListType>
typename std::enable_if
<(FixedListType::max_size() == 2), bool>::type
std::enable_if_t<(FixedListType::max_size() == 2), bool>
is_pair()
{
return true;
@ -94,7 +92,7 @@ is_pair()
template<class FixedListType>
typename std::enable_if<(FixedListType::max_size() != 2), std::string>::type
std::enable_if_t<(FixedListType::max_size() != 2), std::string>
is_pair()
{
return "not really at all";

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2406 |
| \\ / O peration | Version: v2506 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2406 |
| \\ / O peration | Version: v2506 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -92,7 +92,10 @@ int main(int argc, char *argv[])
{
fld[celli] = cellToCoarse[celli];
}
fld /= max(fld);
if (normalise)
{
fld /= max(fld);
}
scalarAgglomeration.correctBoundaryConditions();
scalarAgglomeration.write();

View File

@ -1,3 +1,3 @@
Test-HashTable1.C
Test-HashTable1.cxx
EXE = $(FOAM_USER_APPBIN)/Test-HashTable1

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2017-2023 OpenCFD Ltd.
Copyright (C) 2017-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -37,11 +37,30 @@ License
using namespace Foam;
void checkCanonicalSize(label size)
{
const auto n = HashTableCore::canonicalSize(size);
std::ostringstream buf;
buf.setf(std::ios_base::hex, std::ios_base::basefield);
buf << n;
Info<< "hash-table size of " << size
<< " = " << n << " (0x" << buf.str().c_str() << ')' << nl;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int main()
{
for (label size : { -1, 0, 1, 7, 500, 1024, 1025, 10000, (labelMax-1)} )
{
checkCanonicalSize(size);
}
Info<< nl;
HashTable<scalar> table1
{
{"aaa", 1.0},

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
Copyright (C) 2021-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -42,9 +42,11 @@ Note
#include "Hash.H"
#ifdef FULLDEBUG
#define HashTypeInfo(Args) void info() { std::cerr<< "" Args << "\n"; }
#define HashTypeInfo(Name) \
static constexpr const char* name() noexcept { return Name; } \
void info() const { std::cerr<< name() << " hashing\n"; }
#else
#define HashTypeInfo(Args) void info() {}
#define HashTypeInfo(Name) void info() const {}
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -53,20 +55,36 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class Hash Declaration
Class HashFunc Declaration
\*---------------------------------------------------------------------------*/
template<class T, class SFINAEType=bool>
template<class T>
struct HashFun
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "default"; }
#endif
HashTypeInfo("plain hash")
void info() const
{
#ifdef FULLDEBUG
if constexpr (std::is_base_of_v<std::string, T>)
{
std::cerr<< "std::string hashing\n";
}
else
{
std::cerr<< "default hashing\n";
}
#endif
}
unsigned operator()(const T& obj, unsigned seed=0) const
{
return Foam::Hasher(&obj, sizeof(obj), seed);
if constexpr (std::is_base_of_v<std::string, T>)
{
return Foam::Hasher(obj.data(), obj.size(), seed);
}
else
{
return Foam::Hasher(&obj, sizeof(obj), seed);
}
}
};
@ -76,45 +94,17 @@ struct HashFun
//- Hashing for label
template<> struct HashFun<Foam::label> : Hash<label>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "label"; }
#endif
HashTypeInfo("hash label")
HashTypeInfo("label")
};
//- Hashing for pointers, interpret pointer as a integer type
template<> struct HashFun<void*> : Hash<void *>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "pointer"; }
#endif
HashTypeInfo("hash ptr")
HashTypeInfo("pointer")
};
//- Hashing for string types
template<class StringType>
struct HashFun
<
StringType,
typename std::enable_if
<
std::is_base_of<std::string, StringType>::value, bool
>::type
>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "string"; }
#endif
HashTypeInfo("hash string")
unsigned operator()(const std::string& obj, unsigned seed=0) const
{
return Foam::Hasher(obj.data(), obj.size(), seed);
}
};
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -133,83 +123,56 @@ namespace Foam
template<> struct HashFun<edge> : Hash<edge>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "edge"; }
#endif
HashTypeInfo("hash edge")
HashTypeInfo("edge")
};
template<> struct HashFun<face> : Hash<face>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "face"; }
#endif
HashTypeInfo("hash face")
HashTypeInfo("face")
};
template<> struct HashFun<triFace> : Hash<triFace>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "triFace"; }
#endif
HashTypeInfo("hash triFace")
HashTypeInfo("triFace")
};
template<class T>
struct HashFun<Pair<T>> : Hash<Pair<T>>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "Pair"; }
#endif
HashTypeInfo("hash Pair")
HashTypeInfo("Pair")
};
template<class T1, class T2>
struct HashFun<Tuple2<T1, T2>> : Hash<Tuple2<T1, T2>>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "Tuple2"; }
#endif
HashTypeInfo("hash Tuple2")
HashTypeInfo("Tuple2")
};
template<class T>
struct HashFun<List<T>> : Hash<List<T>>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "List"; }
#endif
HashTypeInfo("hash List")
HashTypeInfo("List")
};
template<class T> struct HashFun<UList<T>> : Hash<UList<T>>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "UList"; }
#endif
HashTypeInfo("hash UList")
HashTypeInfo("UList")
};
template<class T, int SizeMin>
struct HashFun<DynamicList<T, SizeMin>> : Hash<DynamicList<T, SizeMin>>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "DynamicList"; }
#endif
HashTypeInfo("hash DynamicList")
HashTypeInfo("DynamicList")
};
template<class T, unsigned N>
struct HashFun<FixedList<T, N>> : Hash<FixedList<T, N>>
{
#ifdef FULLDEBUG
static constexpr const char* name() noexcept { return "FixedList"; }
#endif
HashTypeInfo("hash FixedList")
HashTypeInfo("FixedList")
};

View File

@ -1,3 +1,3 @@
Test-Hashing2.C
Test-Hashing2.cxx
EXE = $(FOAM_USER_APPBIN)/Test-Hashing2

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2018-2021 OpenCFD Ltd.
Copyright (C) 2018-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -81,7 +81,7 @@ void infoHashString
void reportHashList(const UList<string>& list)
{
Info<< "contiguous = " << is_contiguous<string>::value << nl << nl;
Info<< "contiguous = " << is_contiguous_v<string> << nl << nl;
for (const string& val : list)
{
@ -94,7 +94,7 @@ void reportHashList(const UList<string>& list)
void reportHashList(const UList<label>& list)
{
Info<<"contiguous = " << is_contiguous<label>::value << nl << nl;
Info<<"contiguous = " << is_contiguous_v<label> << nl << nl;
for (const label val : list)
{
@ -113,7 +113,7 @@ void reportHashList(const UList<label>& list)
void reportHashList(const UList<face>& list)
{
Info<<"contiguous = " << is_contiguous<label>::value << nl << nl;
Info<<"contiguous = " << is_contiguous_v<label> << nl << nl;
for (const face& f : list)
{
@ -154,7 +154,7 @@ void reportHashList(const UList<labelList>& list)
void reportHashList(const UList<wordPair>& list)
{
Info<<"contiguous = " << is_contiguous<wordPair>::value << nl << nl;
Info<<"contiguous = " << is_contiguous_v<wordPair> << nl << nl;
for (const wordPair& pr : list)
{
@ -179,7 +179,7 @@ void reportHashList(const UList<wordPair>& list)
void reportHashList(const UList<labelPair>& list)
{
Info<<"contiguous = " << is_contiguous<labelPair>::value << nl << nl;
Info<<"contiguous = " << is_contiguous_v<labelPair> << nl << nl;
for (const labelPair& pr : list)
{
@ -200,7 +200,7 @@ void reportHashList(const UList<labelPair>& list)
void reportHashList(const UList<labelPairPair>& list)
{
Info<<"contiguous = " << is_contiguous<labelPairPair>::value << nl << nl;
Info<<"contiguous = " << is_contiguous_v<labelPairPair> << nl << nl;
for (const labelPairPair& pr : list)
{
@ -221,7 +221,7 @@ void reportHashList(const UList<labelPairPair>& list)
void reportHashList(const UList<edge>& list)
{
Info<<"contiguous = " << is_contiguous<edge>::value << nl << nl;
Info<<"contiguous = " << is_contiguous_v<edge> << nl << nl;
for (const edge& e : list)
{
@ -242,7 +242,7 @@ void reportHashList(const UList<edge>& list)
void reportHashList(const UList<triFace>& list)
{
Info<<"contiguous = " << is_contiguous<triFace>::value << nl << nl;
Info<<"contiguous = " << is_contiguous_v<triFace> << nl << nl;
for (const triFace& f : list)
{
@ -274,9 +274,7 @@ int main(int argc, char *argv[])
Info<< nl << "No " << is.name() << " file found ..." << nl;
}
token tok;
while (is.good() && is.read(tok) && tok.good())
for (token tok; tok.read(is); /*nil*/)
{
const word listType(tok.wordToken());

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2406 |
| \\ / O peration | Version: v2506 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -1,3 +1,3 @@
Test-ICharStream1.C
Test-ICharStream1.cxx
EXE = $(FOAM_USER_APPBIN)/Test-ICharStream1

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2023 OpenCFD Ltd.
Copyright (C) 2017-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -83,12 +83,10 @@ Ostream& printView(Ostream& os, const char* first, const char* last)
}
#if __cplusplus >= 201703L
Ostream& printView(Ostream& os, std::string_view s)
{
return printView(os, s.begin(), s.end());
}
#endif
Ostream& printView(Ostream& os, stdFoam::span<char> s)
@ -138,17 +136,10 @@ void printInfo(const List<char>& buf)
void printTokens(Istream& is)
{
label count = 0;
token t;
while (is.good())
for (token tok; tok.read(is); ++count)
{
is >> t;
if (t.good())
{
++count;
Info<<"token: " << t << endl;
}
Info<< "token: " << tok << nl;
}
Info<< count << " tokens" << endl;
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd.
Copyright (C) 2019-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -213,11 +213,10 @@ int main(int argc, char *argv[])
mesh
);
Info<< "points path: " << io.typeFilePath<labelIOList>() << nl;
Info<< "points path: " << io.typeFilePath<void>() << nl;
Info<< "points path: " << io.typeFilePath<pointIOField>() << nl;
io.resetHeader("bad-points");
Info<< "bad path: " << io.typeFilePath<void>() << nl;
Info<< "bad path: " << io.typeFilePath<labelIOList>() << nl;
}
IOobject io
@ -270,7 +269,7 @@ int main(int argc, char *argv[])
ioOutput.rename(args.executable() + "-labels");
Info<< "write " << ioOutput.objectRelPath() << endl;
{
IOListRef<label>(ioOutput, ints).write();
IOList<label>::writeContents(ioOutput, ints);
}
ioOutput.rename(args.executable() + "-points");

View File

@ -45,7 +45,7 @@ using namespace Foam;
template<class Type>
word report()
{
if (is_globalIOobject<Type>::value)
if constexpr (is_globalIOobject<Type>::value)
{
return "global";
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2023 OpenCFD Ltd.
Copyright (C) 2017-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -73,18 +73,13 @@ Ostream& toString(Ostream& os, const List<char>& list)
void printTokens(Istream& is)
{
label count = 0;
token t;
while (is.good())
{
is >> t;
if (t.good())
{
++count;
Info<< "token: " << t << endl;
}
}
Info<< "stream tokens:" << endl;
label count = 0;
for (token tok; tok.read(is); ++count)
{
Info<< " : " << tok << nl;
}
Info<< count << " tokens" << endl;
}
@ -455,6 +450,12 @@ int main(int argc, char *argv[])
"( const char input \"string\" to tokenize )\n"
"List<label> 5(0 1 2 3 4);";
// printTokens
{
ISpanStream is(charInput);
printTokens(is);
}
string stringInput("( string ; input \"string\" to tokenize )");
List<char> listInput

View File

@ -1,3 +1,3 @@
Test-IjkField.C
Test-IjkField.cxx
EXE = $(FOAM_USER_APPBIN)/Test-IjkField

View File

@ -1,3 +1,3 @@
Test-List.C
Test-List.cxx
EXE = $(FOAM_USER_APPBIN)/Test-List

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2017-2023 OpenCFD Ltd.
Copyright (C) 2017-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -51,10 +51,10 @@ See also
#include "IndirectList.H"
#include "SubList.H"
#include "SliceList.H"
#include "SubField.H"
#include "ListPolicy.H"
#include <list>
#include <numeric>
#include <functional>
// see issue #2083
@ -75,8 +75,6 @@ public:
namespace Detail
{
namespace ListPolicy
{
@ -84,7 +82,6 @@ namespace ListPolicy
template<> struct short_length<short> : std::integral_constant<int,20> {};
} // End namespace ListPolicy
} // End namespace Detail
} // End namespace Foam
@ -118,10 +115,10 @@ Ostream& printListOutputType(const char* what)
{
Info<< what
<< " (contiguous="
<< is_contiguous<T>::value << " no_linebreak="
<< Detail::ListPolicy::no_linebreak<T>::value
<< is_contiguous_v<T> << " no_linebreak="
<< ListPolicy::no_linebreak<T>::value
<< " short_length="
<< Detail::ListPolicy::short_length<T>::value << ')';
<< ListPolicy::short_length<T>::value << ')';
return Info;
}
@ -143,8 +140,46 @@ int main(int argc, char *argv[])
argList::addBoolOption("ListList", "Test list of list functionality");
argList::addBoolOption("flag");
argList::addBoolOption("reserve", "Test ListPolicy for reserve_size");
#include "setRootCase.H"
if (args.found("reserve"))
{
using namespace Foam::ListPolicy;
using control = std::pair<label, label>;
for
(
const auto& tup :
{
control{ 10, 5 },
control{ 20, 25 }
}
)
{
const auto [len, capacity] = tup;
Info<< "test " << tup << nl;
auto size = reserve_size<16,2>(len, capacity);
Info<< " => " << size << " (ratio 2)" << nl;
size = reserve_size<16,3,2>(len, capacity);
Info<< " => " << size << " (ratio 3/2)" << nl;
size = reserve_size<16,13,8>(len, capacity);
Info<< " => " << size << " (ratio " << (13.0/8) << ')' << nl;
size = reserve_size<16,25,16>(len, capacity);
Info<< " => " << size << " (ratio " << (25.0/16) << ')' << nl;
}
Info<< nl << "\nEnd" << endl;
return 0;
}
{
List<label> ident(15);
Foam::identity(ident, 0);
@ -247,6 +282,33 @@ int main(int argc, char *argv[])
};
Info<< "list4: " << list4 << endl;
{
List<scalar> list4Mag = ListOps::create<scalar>
(
list4,
[](const auto& a){ return a.mag(); }
);
const auto equalMag = [](const auto& a, const auto& b)
{
return (Foam::mag(a) == Foam::mag(b));
};
Info<< "list4 (mag): " << list4Mag << endl;
bool same = ListOps::equal(list4, list4Mag, equalMag);
Info<< "mag(list4) == list4(mag): " << same << nl;
SubField<scalar>(list4Mag) *= -1;
same = ListOps::equal(list4, list4Mag, equalMag);
Info<< "mag(list4) == list4(mag): " << same << nl;
SubField<scalar>(list4Mag) *= 1.1;
same = ListOps::equal(list4, list4Mag, equalMag);
Info<< "mag(list4) == list4(mag): " << same << nl;
}
List<vector> list5
{
{5, 3, 1},

View File

@ -1,3 +1,3 @@
Test-List2.C
Test-List2.cxx
EXE = $(FOAM_USER_APPBIN)/Test-List2

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 OpenCFD Ltd.
Copyright (C) 2017-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -35,6 +35,7 @@ Description
#include "FixedList.H"
#include "labelList.H"
#include "vectorList.H"
#include "SubList.H"
#include "ListOps.H"
#include "IFstream.H"
#include "OFstream.H"
@ -200,6 +201,7 @@ int main(int argc, char *argv[])
argList::addBoolOption("order");
argList::addBoolOption("labelList");
argList::addBoolOption("vectorList");
argList::addBoolOption("ulist");
argList args(argc, argv);
@ -261,6 +263,37 @@ int main(int argc, char *argv[])
}
if (args.found("ulist"))
{
using span_type = stdFoam::span<vector>;
using ulist_type = UList<vector>;
ulist_type view1, view2;
span_type span1, span2;
List<vector> list(10, vector::one);
Info<< "List: " << Foam::name(list.data()) << nl;
Info<< "view: " << Foam::name(view1.data()) << nl;
Info<< "span: " << Foam::name(span1.data()) << nl;
view1 = list.slice(4);
span1 = span_type(list.begin(4), list.size()-4);
Info<< "view [4]:" << Foam::name(view1.data()) << nl;
Info<< "span [4]:" << Foam::name(span1.data()) << nl;
view2 = std::move(view1);
span2 = std::move(span1);
Info<< "view old:" << Foam::name(view1.data()) << nl;
Info<< "span old:" << Foam::name(span1.data()) << nl;
Info<< "view [4]:" << Foam::name(view2.data()) << nl;
Info<< "span [4]:" << Foam::name(span2.data()) << nl;
view1 = list.slice(7);
Info<< "view [7]:" << Foam::name(view1.data()) << nl;
}
Info<< nl << "Done" << nl << endl;
return 0;
}

View File

@ -1,3 +1,3 @@
Test-List3.C
Test-List3.cxx
EXE = $(FOAM_USER_APPBIN)/Test-List3

View File

@ -1,3 +1,3 @@
Test-ListRead1.C
Test-ListRead1.cxx
EXE = $(FOAM_USER_APPBIN)/Test-ListRead1

Some files were not shown because too many files have changed in this diff Show More