From df6de6ed33b0fe995bdae348a1a7369c62203d32 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 30 Aug 2023 19:56:12 +0200 Subject: [PATCH 1/4] CONFIG: runParallel with --oversubscribe for openmpi - not always required, but useful when running some tutorials locally --- bin/mpirunDebug | 2 +- bin/tools/RunFunctions | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/bin/mpirunDebug b/bin/mpirunDebug index 695c0fae5e..b4fcb976e7 100755 --- a/bin/mpirunDebug +++ b/bin/mpirunDebug @@ -429,7 +429,7 @@ unset cmd case "$WM_MPLIB" in *OPENMPI*) - cmd="mpirun -app $PWD/mpirun.schema > $logFile 2>&1 + "$mpirun" $mpiopts -n "${nProcs:?}" $appRun $appArgs "$@" > $logFile 2>&1 ) else ( - $mpirun -n $nProcs $appRun $appArgs "$@" $logFile 2>&1 + "$mpirun" $mpiopts -n "${nProcs:?}" $appRun $appArgs "$@" $logFile 2>&1 ) fi fi From aa1b6d9cbdd3fe7f120653d3edc4519e724c4566 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 30 Aug 2023 14:54:36 +0200 Subject: [PATCH 2/4] ENH: add ListPolicy uniformity enumeration and algorithm - defines values for EMPTY, UNIFORM, NONUNIFORM and MIXED that allow bitwise OR reduction and provide an algorithm for calculating uniformity ENH: consolidate more efficient uniformity checks in PackedList ENH: improve linebreak handling when outputting small matrices --- .../test/simpleMatrix/Test-simpleMatrix.C | 29 +++- .../containers/Bits/PackedList/PackedList.C | 71 +++++---- .../containers/Bits/PackedList/PackedList.H | 10 +- .../containers/Bits/PackedList/PackedListI.H | 69 +++++++- .../containers/Bits/bitSet/PackedBoolList.H | 4 +- src/OpenFOAM/containers/Bits/bitSet/bitSet.H | 12 +- src/OpenFOAM/containers/Bits/bitSet/bitSetI.H | 85 ++-------- .../containers/Lists/policy/ListPolicy.H | 37 ++++- src/OpenFOAM/matrices/Matrix/MatrixIO.C | 150 +++++++++++------- .../matrices/SquareMatrix/SquareMatrix.H | 3 + .../matrices/SquareMatrix/SquareMatrixI.H | 7 + 11 files changed, 286 insertions(+), 191 deletions(-) diff --git a/applications/test/simpleMatrix/Test-simpleMatrix.C b/applications/test/simpleMatrix/Test-simpleMatrix.C index bd757587a7..1099433823 100644 --- a/applications/test/simpleMatrix/Test-simpleMatrix.C +++ b/applications/test/simpleMatrix/Test-simpleMatrix.C @@ -51,13 +51,30 @@ int main(int argc, char *argv[]) hmm.source()[1] = vector(1.0, 4.0, 3.0); hmm.source()[2] = vector(0.0, 5.0, 2.0); - Info<< hmm << endl; - Info<< hmm.solve() << endl; - Info<< hmm << endl; - Info<< hmm.LUsolve() << endl; - Info<< hmm << endl; + Info<< hmm << nl; + Info<< hmm.solve() << nl; + Info<< hmm << nl; + Info<< hmm.LUsolve() << nl; + Info<< hmm << nl; - Info<< "End\n" << endl; + { + scalarSquareMatrix mat0; + Info<< "empty: " << mat0 << endl; + + mat0.resize_nocopy(1); + mat0 = Identity(); + Info<< "ident (1x1): " << mat0 << endl; + + mat0.resize_nocopy(3); + mat0 = Identity(); + Info<< "ident (3x3): " << mat0 << endl; + + mat0.resize_nocopy(5); + mat0 = Identity(); + Info<< "ident (5x5): " << mat0 << endl; + } + + Info<< "\nEnd\n" << endl; return 0; } diff --git a/src/OpenFOAM/containers/Bits/PackedList/PackedList.C b/src/OpenFOAM/containers/Bits/PackedList/PackedList.C index 0a76e3c93c..caf61ecfc7 100644 --- a/src/OpenFOAM/containers/Bits/PackedList/PackedList.C +++ b/src/OpenFOAM/containers/Bits/PackedList/PackedList.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -102,48 +102,51 @@ bool Foam::PackedList::uniform() const return true; } - // The value of the first element for testing const unsigned int val = get(0); - const label nblocks = num_blocks(size()); - bool identical = true; if (!val) { - // Zero value: can just check block content directly + // No bits set: just check there are no non-zero blocks + // - like bitSet::none() + identical = (-1 == first_block()); + } + else if (val == PackedList::max_value) + { + // All bits set: just check there are no zero blocks + // - like bitSet::all() + identical = (-1 == first_not_block()); + } + else + { + const label nblocks = num_blocks(size()); - for (label blocki = 0; identical && blocki < nblocks; ++blocki) + if (nblocks > 1) { - identical = !blocks_[blocki]; + // Fill value for complete blocks + const unsigned int blockval = repeated_value(val); + + // Check each complete block (nblocks-1) + for (label blocki = 0; identical && blocki < (nblocks-1); ++blocki) + { + identical = (blocks_[blocki] == blockval); + } } - return identical; - } - else if (nblocks > 1) - { - // Fill value for complete blocks - const unsigned int blockval = repeated_value(val); - - // Check each complete block (nblocks-1) - for (label blocki = 0; identical && blocki < (nblocks-1); ++blocki) + // Partial block: check manually + for + ( + label elemi = elem_per_block*(nblocks-1); + identical && elemi < size(); + ++elemi + ) { - identical = (blocks_[blocki] == blockval); + identical = (val == get(elemi)); } } - // Partial block: check manually - for - ( - label elemi = elem_per_block*(nblocks-1); - identical && elemi < size(); - ++elemi - ) - { - identical = (val == get(elemi)); - } - return identical; } @@ -194,16 +197,20 @@ Foam::PackedList::unpack() const "Width of IntType is too small to hold result" ); + List output(size()); + if (empty()) { - return List(0); + return output; } else if (uniform()) { - return List(size(), static_cast(get(0))); + output = static_cast(get(0)); + return output; } - List output(size()); + // NON-UNIFORM and len > 0 + label outi = 0; // Process n-1 complete blocks @@ -215,7 +222,7 @@ Foam::PackedList::unpack() const for (unsigned nget = elem_per_block; nget; --nget, ++outi) { - output[outi] = IntType(blockval & max_value); + output[outi] = IntType(blockval & PackedList::max_value); blockval >>= Width; } } diff --git a/src/OpenFOAM/containers/Bits/PackedList/PackedList.H b/src/OpenFOAM/containers/Bits/PackedList/PackedList.H index eb512faab1..e0e3fc6c6c 100644 --- a/src/OpenFOAM/containers/Bits/PackedList/PackedList.H +++ b/src/OpenFOAM/containers/Bits/PackedList/PackedList.H @@ -221,6 +221,14 @@ protected: //- Copy assignment inline void copyAssign(const PackedList& rhs); + //- Find the first block with a '1' bit + // \return block number or -1 for an list or if all bits are OFF. + inline label first_block() const; + + //- Find the first block with a '0' bit + // \return block number or -1 for an list or if all bits are ON. + inline label first_not_block() const; + public: @@ -292,7 +300,7 @@ public: //- Number of elements that can be stored without reallocating inline label capacity() const noexcept; - //- True if all entries have identical values, and list is non-empty + //- True if all entries have identical values (and list is non-empty) bool uniform() const; //- Test for equality of sizes and the bits set diff --git a/src/OpenFOAM/containers/Bits/PackedList/PackedListI.H b/src/OpenFOAM/containers/Bits/PackedList/PackedListI.H index aac5b0a9cc..abc10644b0 100644 --- a/src/OpenFOAM/containers/Bits/PackedList/PackedListI.H +++ b/src/OpenFOAM/containers/Bits/PackedList/PackedListI.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -147,6 +147,73 @@ inline void Foam::PackedList::copyAssign(const PackedList& rhs) } +template +inline Foam::label Foam::PackedList::first_block() const +{ + if (size()) + { + const label nblocks = num_blocks(size()); + + for (label blocki=0; blocki < nblocks; ++blocki) + { + if (blocks_[blocki]) + { + return blocki; + } + } + } + + return -1; +} + + +template +inline Foam::label Foam::PackedList::first_not_block() const +{ + if (!size()) + { + return -1; + } + + // Check on complement (changes 0 <-> 1). + // If any 1's now appear, there was a 0 bit before + + const label nblocks = num_blocks(size()); + + // Extra bits in the final block? + const unsigned int off = size() % elem_per_block; + + if (!off) + { + for (label blocki=0; blocki < nblocks; ++blocki) + { + if (~(blocks_[blocki])) + { + return blocki; + } + } + } + else + { + for (label blocki=0; blocki < nblocks-1; ++blocki) + { + if (~(blocks_[blocki])) + { + return blocki; + } + } + + // The final block needs masking + if (~(blocks_[nblocks-1]) & mask_lower(off)) + { + return nblocks-1; + } + } + + return -1; +} + + // * * * * * * * * * * * * * * * Specializations * * * * * * * * * * * * * * // namespace Foam diff --git a/src/OpenFOAM/containers/Bits/bitSet/PackedBoolList.H b/src/OpenFOAM/containers/Bits/bitSet/PackedBoolList.H index 801d2fb0ee..55d3a793ab 100644 --- a/src/OpenFOAM/containers/Bits/bitSet/PackedBoolList.H +++ b/src/OpenFOAM/containers/Bits/bitSet/PackedBoolList.H @@ -18,8 +18,8 @@ Description \*---------------------------------------------------------------------------*/ -#ifndef PackedBoolList_H -#define PackedBoolList_H +#ifndef FoamCompat_PackedBoolList_H +#define FoamCompat_PackedBoolList_H #include "bitSet.H" diff --git a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H index 75b7477744..31d08d570f 100644 --- a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H +++ b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H @@ -65,13 +65,6 @@ class bitSet : public PackedList<1> { - // Private Member Functions - - //- Find the first block with a '0' bit - // \return block number or -1 if the set is empty or all bits are on. - inline label first_not_block() const; - - protected: // Logic/Set Operations @@ -138,7 +131,7 @@ public: // Constructors //- Default construct an empty, zero-sized bitSet - inline bitSet() noexcept; + inline constexpr bitSet() noexcept; //- Construct from Istream explicit bitSet(Istream& is); @@ -246,9 +239,6 @@ public: // \note Method name compatibility with boost::dynamic_bitset inline bool none() const; - //- True if all entries have identical values, and the set is non-empty - inline bool uniform() const; - //- Count number of bits set. // \param on can be set to false to count the number of unset bits // instead. diff --git a/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H b/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H index 11c03310f9..7e9eed8739 100644 --- a/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H +++ b/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H @@ -25,56 +25,9 @@ License \*---------------------------------------------------------------------------*/ -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -inline Foam::label Foam::bitSet::first_not_block() const -{ - if (empty()) - { - return -1; - } - - // Use complement to change 0 <-> 1 and check if any 1's now appear - - const label nblocks = num_blocks(size()); - - // Extra bits in the final block? - const unsigned int off = size() % elem_per_block; - - if (!off) - { - for (label blocki=0; blocki < nblocks; ++blocki) - { - if (~(blocks_[blocki])) - { - return blocki; - } - } - } - else - { - for (label blocki=0; blocki < nblocks-1; ++blocki) - { - if (~(blocks_[blocki])) - { - return blocki; - } - } - - // The final block needs masking - if (~(blocks_[nblocks-1]) & mask_lower(off)) - { - return nblocks-1; - } - } - - return -1; -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -inline Foam::bitSet::bitSet() noexcept +inline constexpr Foam::bitSet::bitSet() noexcept : PackedList<1>() {} @@ -313,14 +266,14 @@ inline Foam::bitSet::const_iterator Foam::bitSet::cend() const noexcept inline Foam::label Foam::bitSet::find_first() const { - // Process block-wise, detecting any '1' bits + const label blocki = first_block(); - const label nblocks = num_blocks(size()); - - for (label blocki = 0; blocki < nblocks; ++blocki) + if (blocki >= 0) { label pos = (blocki * elem_per_block); + // Detect first '1' bit within the block + for ( unsigned int blockval = blocks_[blocki]; @@ -348,7 +301,7 @@ inline Foam::label Foam::bitSet::find_first_not() const { label pos = (blocki * elem_per_block); - // Detect first '0' bit by checking the complement. + // Detect first '0' bit within the block (check the complement) // No special masking for the final block, that was already checked // in the first_not_block() call. @@ -461,39 +414,19 @@ inline const Foam::bitSet& Foam::bitSet::null() inline bool Foam::bitSet::all() const { if (empty()) return true; // SIC. boost convention - - return -1 == first_not_block(); + return (-1 == first_not_block()); } inline bool Foam::bitSet::any() const { - if (size()) - { - const label nblocks = num_blocks(size()); - - for (label blocki=0; blocki < nblocks; ++blocki) - { - if (blocks_[blocki]) - { - return true; - } - } - } - - return false; + return (-1 != first_block()); } inline bool Foam::bitSet::none() const { - return !any(); -} - - -inline bool Foam::bitSet::uniform() const -{ - return (size() == 1 || (size() > 1 && (test(0) ? all() : none()))); + return (-1 == first_block()); } diff --git a/src/OpenFOAM/containers/Lists/policy/ListPolicy.H b/src/OpenFOAM/containers/Lists/policy/ListPolicy.H index aa63fc7448..ae4f9bdcb4 100644 --- a/src/OpenFOAM/containers/Lists/policy/ListPolicy.H +++ b/src/OpenFOAM/containers/Lists/policy/ListPolicy.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -88,6 +88,41 @@ template<> struct no_linebreak : std::true_type {}; template<> struct no_linebreak : std::true_type {}; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +//- Classification of list/container uniformity. +//- The values can be used with bit-wise \c or reduction +enum uniformity : unsigned char +{ + EMPTY = 0, //!< An empty container + UNIFORM = 0x1, //!< Container (non-empty) with identical values + NONUNIFORM = 0x2, //!< Container (non-empty) with different values + MIXED = 0x3 //!< Mixed uniform/non-uniform (eg, after reduction) +}; + +//- Algorithm to determine list/container uniformity +template +enum uniformity check_uniformity(InputIt first, InputIt last) +{ + if (first == last) return uniformity::EMPTY; + + // Like std::all_of() with checking against element 0, + // but without using a lambda with auto type (pre C++14) etc. + + const auto& elem0 = *first; + + for ((void)++first; (first != last); (void)++first) + { + if (elem0 != *first) + { + return uniformity::NONUNIFORM; + } + } + + return uniformity::UNIFORM; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace ListPolicy diff --git a/src/OpenFOAM/matrices/Matrix/MatrixIO.C b/src/OpenFOAM/matrices/Matrix/MatrixIO.C index 991dd7edaf..164880fdcc 100644 --- a/src/OpenFOAM/matrices/Matrix/MatrixIO.C +++ b/src/OpenFOAM/matrices/Matrix/MatrixIO.C @@ -146,9 +146,9 @@ Foam::Ostream& Foam::Matrix::writeMatrix ) const { const Matrix& mat = *this; + const label len = mat.size(); // Total size (rows * cols) - // The total size - const label len = mat.size(); + auto iter = mat.cbegin(); // element-wise iterator // Rows, columns size os << mat.nRows() << token::SPACE << mat.nCols(); @@ -163,73 +163,101 @@ Foam::Ostream& Foam::Matrix::writeMatrix os.write(mat.cdata_bytes(), mat.size_bytes()); } } + else if (len > 1 && is_contiguous::value && mat.uniform()) + { + // Two or more entries, and all entries have identical values. + os << token::BEGIN_BLOCK << *iter << token::END_BLOCK; + } + else if + ( + (len <= 1 || !shortLen) + || (len <= shortLen && is_contiguous::value) + ) + { + // Single-line output (entire matrix) + + // Begin matrix + os << token::BEGIN_LIST; + + // Loop over rows + for (label i = 0; i < mat.nRows(); ++i) + { + // Begin row + os << token::BEGIN_LIST; + + // Write row + for (label j = 0; j < mat.nCols(); ++j) + { + if (j) os << token::SPACE; + os << *iter; + ++iter; + } + + // End row + os << token::END_LIST; + } + + // End matrix + os << token::END_LIST; + } + else if + ( + (mat.nCols() <= 1 || !shortLen) + || (mat.nCols() <= shortLen && is_contiguous::value) + ) + { + // Multi-line matrix, single-line rows + + // Begin matrix + os << nl << token::BEGIN_LIST; + + // Loop over rows + for (label i = 0; i < mat.nRows(); ++i) + { + // Begin row + os << nl << token::BEGIN_LIST; + + // Write row + for (label j = 0; j < mat.nCols(); ++j) + { + if (j) os << token::SPACE; + os << *iter; + ++iter; + } + + // End row + os << token::END_LIST; + } + + // End matrix + os << nl << token::END_LIST << nl; + } else { - if (len) + // Multi-line output + + // Begin matrix + os << nl << token::BEGIN_LIST; + + // Loop over rows + for (label i=0; i < mat.nRows(); ++i) { - const Type* v = mat.cdata(); + // Begin row + os << nl << token::BEGIN_LIST; - // Can the contents be considered 'uniform' (ie, identical) - if (len > 1 && is_contiguous::value && mat.uniform()) + // Write row + for (label j = 0; j < mat.nCols(); ++j) { - // Two or more entries, and all entries have identical values. - os << token::BEGIN_BLOCK << v[0] << token::END_BLOCK; + os << nl << *iter; + ++iter; } - else if (len < shortLen && is_contiguous::value) - { - // Write start contents delimiter - os << token::BEGIN_LIST; - label idx = 0; - - // Loop over rows - for (label i = 0; i < mat.nRows(); ++i) - { - os << token::BEGIN_LIST; - - // Write row - for (label j = 0; j < mat.nCols(); ++j) - { - if (j) os << token::SPACE; - os << v[idx++]; - } - - os << token::END_LIST; - } - - // Write end of contents delimiter - os << token::END_LIST; - } - else - { - // Write start contents delimiter - os << nl << token::BEGIN_LIST; - - label idx = 0; - - // Loop over rows - for (label i=0; i < mat.nRows(); ++i) - { - os << nl << token::BEGIN_LIST; - - // Write row - for (label j = 0; j < mat.nCols(); ++j) - { - os << nl << v[idx++]; - } - - os << nl << token::END_LIST; - } - - // Write end of contents delimiter - os << nl << token::END_LIST << nl; - } - } - else - { - // Empty matrix - os << token::BEGIN_LIST << token::END_LIST << nl; + // End row + os << nl << token::END_LIST; } + + // End matrix + os << nl << token::END_LIST << nl; } os.check(FUNCTION_NAME); diff --git a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H index fc0a7313e4..999a9a5751 100644 --- a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H +++ b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H @@ -150,6 +150,9 @@ public: //- Resize the matrix preserving the elements inline void resize(const label m); + //- Resize the matrix \em without preserving existing content + inline void resize_nocopy(const label n); + //- Resize the matrix preserving the elements (compatibility) inline void resize(const label m, const label n); diff --git a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H index d289e9869f..28c8b15742 100644 --- a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H +++ b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H @@ -218,6 +218,13 @@ inline void Foam::SquareMatrix::resize(const label m) } +template +inline void Foam::SquareMatrix::resize_nocopy(const label m) +{ + Matrix, Type>::resize_nocopy(m, m); +} + + template inline void Foam::SquareMatrix::resize(const label m, const label n) { From 0250a1b0bbafd4c1270afed667bc5a0cced41fc2 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 30 Aug 2023 14:54:36 +0200 Subject: [PATCH 3/4] ENH: support List sub-slice searching, use std::find() - support UList shallowCopy with pointer/size (eg, for slicing into or from span) ENH: add SubList::reset() functionality - allows modification of a SubList after construction. Previously a SubList had an immutable location after construction and there was no way to shift or change its location. BUG: missed special handling for DynamicList::readList (fixes #2974) - equivalent to List::readList, in which the stream is temporarily toggled from ASCII to BINARY when reading in a List of char data. This specialization was missed when DynamicList::readList() was fully implemented. --- applications/test/SubField/Test-SubField.C | 40 +++++-- .../containers/Buffers/CircularBuffer.C | 2 + .../containers/Buffers/CircularBuffer.H | 15 ++- .../containers/Buffers/CircularBufferI.H | 7 ++ .../IndirectListBase/IndirectListBase.C | 18 ++- .../IndirectListBase/IndirectListBase.H | 22 ++-- .../IndirectListBase/IndirectListBaseI.H | 5 +- .../Lists/DynamicList/DynamicListIO.C | 21 ++++ .../containers/Lists/FixedList/FixedList.C | 47 +++++--- .../containers/Lists/FixedList/FixedList.H | 30 +++-- .../containers/Lists/FixedList/FixedListI.H | 17 ++- src/OpenFOAM/containers/Lists/List/SubList.H | 45 ++++++- src/OpenFOAM/containers/Lists/List/SubListI.H | 110 +++++++++++++++++- src/OpenFOAM/containers/Lists/List/UList.C | 42 ++++--- src/OpenFOAM/containers/Lists/List/UList.H | 31 +++-- src/OpenFOAM/containers/Lists/List/UListI.H | 24 +++- src/OpenFOAM/containers/Lists/List/UListIO.C | 5 +- .../containers/Lists/List/stdVectorIO.C | 3 +- src/OpenFOAM/fields/Fields/Field/SubField.H | 2 +- 19 files changed, 391 insertions(+), 95 deletions(-) diff --git a/applications/test/SubField/Test-SubField.C b/applications/test/SubField/Test-SubField.C index 4e89c0cda3..0b1b3c64ca 100644 --- a/applications/test/SubField/Test-SubField.C +++ b/applications/test/SubField/Test-SubField.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,6 +37,7 @@ Description #include "scalarField.H" #include "SubField.H" #include "labelRange.H" +#include "ListOps.H" #include using namespace Foam; @@ -57,26 +58,26 @@ int main(int argc, char *argv[]) argList::noFunctionObjects(); { - List ident(25); + List