Skip to content

Commit 07fc53e

Browse files
authored
Merge branch 'develop' into bugfix/su2py-correctness-tools
2 parents 1bde5a4 + dac92cc commit 07fc53e

File tree

108 files changed

+1501
-992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1501
-992
lines changed

.github/workflows/code-style.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v5
1616
- name: Setup python
17-
uses: actions/setup-python@v5
17+
uses: actions/setup-python@v6
1818
with:
1919
python-version: '3.10'
2020
check-latest: true

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ jobs:
3737
run: ./meson.py setup build --optimization=1
3838

3939
- name: Initialize CodeQL
40-
uses: github/codeql-action/init@v3
40+
uses: github/codeql-action/init@v4
4141
with:
4242
languages: ${{ matrix.language }}
4343
queries: +security-and-quality
4444

4545
- name: Autobuild
46-
uses: github/codeql-action/autobuild@v3
46+
uses: github/codeql-action/autobuild@v4
4747
if: ${{ matrix.language == 'python' }}
4848

4949
- name: Build cpp
5050
if: ${{ matrix.language == 'cpp' }}
5151
run: ./ninja -C build
5252

5353
- name: Perform CodeQL Analysis
54-
uses: github/codeql-action/analyze@v3
54+
uses: github/codeql-action/analyze@v4
5555
with:
5656
category: "/language:${{ matrix.language }}"

.github/workflows/regression-arm64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ jobs:
1010
name: Run the jobs on Linux ARM64
1111
uses: './.github/workflows/regression.yml'
1212
with:
13-
runner: 'ARM64'
13+
runner: 'ubuntu-24.04-arm'

.github/workflows/regression.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- name: Compress binaries
6666
run: tar -zcvf install_bin.tgz install/*
6767
- name: Upload Binaries
68-
uses: actions/upload-artifact@v4
68+
uses: actions/upload-artifact@v5
6969
with:
7070
name: ${{ matrix.config_set }}
7171
path: install_bin.tgz
@@ -76,7 +76,7 @@ jobs:
7676
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
7777
build_tsan:
7878
name: Build SU2 (tsan)
79-
if: inputs.runner != 'ARM64'
79+
if: ${{ !contains(inputs.runner, 'arm') }}
8080
strategy:
8181
fail-fast: false
8282
matrix:
@@ -108,7 +108,7 @@ jobs:
108108
- name: Compress binaries
109109
run: tar -zcvf install_bin.tgz install/*
110110
- name: Upload Binaries
111-
uses: actions/upload-artifact@v4
111+
uses: actions/upload-artifact@v5
112112
with:
113113
name: ${{ matrix.config_set }}
114114
path: install_bin.tgz
@@ -146,7 +146,7 @@ jobs:
146146
- name: Compress binaries
147147
run: tar -zcvf install_bin.tgz install/*
148148
- name: Upload Binaries
149-
uses: actions/upload-artifact@v4
149+
uses: actions/upload-artifact@v5
150150
with:
151151
name: ${{ matrix.config_set }}
152152
path: install_bin.tgz
@@ -218,7 +218,7 @@ jobs:
218218
entrypoint: /bin/rm
219219
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
220220
discadj_tape_tests:
221-
if: inputs.runner != 'ARM64'
221+
if: ${{ !contains(inputs.runner, 'arm') }}
222222
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
223223
name: Tape Tests
224224
needs: build
@@ -236,7 +236,7 @@ jobs:
236236
entrypoint: /bin/rm
237237
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
238238
- name: Download All artifacts
239-
uses: actions/download-artifact@v4
239+
uses: actions/download-artifact@v5
240240
- name: Uncompress and Move Binaries
241241
run: |
242242
BIN_FOLDER="$PWD/install/bin"
@@ -267,7 +267,7 @@ jobs:
267267
entrypoint: /bin/rm
268268
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
269269
thread_sanitizer_tests:
270-
if: inputs.runner != 'ARM64'
270+
if: ${{ !contains(inputs.runner, 'arm') }}
271271
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
272272
name: Thread Sanitizer Tests
273273
needs: build_tsan

.github/workflows/release-management.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
zip -r ../${{matrix.os_bin}}.zip bin/*
4545
# Uploads binaries as artifacts (just as a backup)
4646
- name: Upload Binaries
47-
uses: actions/upload-artifact@v4
47+
uses: actions/upload-artifact@v5
4848
with:
4949
name: ${{matrix.os_bin}}
5050
path: ${{matrix.os_bin}}.zip

Common/include/CConfig.hpp

Lines changed: 97 additions & 45 deletions
Large diffs are not rendered by default.

Common/include/geometry/CGeometry.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*!
1+
/*!
22
* \file CGeometry.hpp
33
* \brief Headers of the main subroutines for creating the geometrical structure.
44
* The subroutines and functions are in the <i>CGeometry.cpp</i> file.
@@ -51,6 +51,7 @@ extern "C" {
5151
#include <climits>
5252
#include <memory>
5353
#include <unordered_map>
54+
#include <cstdint>
5455

5556
#include "primal_grid/CPrimalGrid.hpp"
5657
#include "dual_grid/CDualGrid.hpp"

Common/include/geometry/primal_grid/CPrimalGrid.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
#pragma once
3030

31+
#include <cstdint>
3132
#include <iostream>
3233
#include <vector>
3334
#include <limits>
3435
#include <cstdlib>
35-
#include <limits>
3636
#include <memory>
3737

3838
#include "../../option_structure.hpp"

Common/include/option_structure.inl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -233,18 +233,19 @@ class COptionEnumList final : public COptionBase {
233233

234234
template <class Type>
235235
class COptionArray final : public COptionBase {
236-
string name; // Identifier for the option
237-
const int size; // Number of elements
238-
Type* field; // Reference to the field
236+
string name; // Identifier for the option
237+
const int size; // Number of elements
238+
const bool allow_fewer; // Allow smaller size
239+
Type* field; // Reference to the field
239240

240241
public:
241-
COptionArray(string option_field_name, const int list_size, Type* option_field)
242-
: name(option_field_name), size(list_size), field(option_field) {}
242+
COptionArray(string option_field_name, const int list_size, const bool allow_fewer, Type* option_field)
243+
: name(std::move(option_field_name)), size(list_size), allow_fewer(allow_fewer), field(option_field) {}
243244

244245
string SetValue(const vector<string>& option_value) override {
245246
COptionBase::SetValue(option_value);
246247
// Check that the size is correct
247-
if (option_value.size() != (unsigned long)this->size) {
248+
if ((option_value.size() < size_t(size) && !allow_fewer) || option_value.size() > size_t(size)) {
248249
string newstring;
249250
newstring.append(this->name);
250251
newstring.append(": wrong number of arguments: ");
@@ -258,7 +259,7 @@ class COptionArray final : public COptionBase {
258259
newstring.append(" found");
259260
return newstring;
260261
}
261-
for (int i = 0; i < this->size; i++) {
262+
for (size_t i = 0; i < option_value.size(); i++) {
262263
istringstream is(option_value[i]);
263264
if (!(is >> field[i])) {
264265
return badValue(" array", this->name);

Common/include/toolboxes/graph_toolbox.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,13 +479,16 @@ T createNaturalColoring(Index_t numInnerIndexes) {
479479
* pattern is returned.
480480
* \param[in] pattern - Sparse pattern to be colored.
481481
* \param[in] groupSize - Size of the outer index groups, default 1.
482+
* \param[in] includeOuterIdx - If the outer indices are the same type of entity as
483+
* the inner indices this must be true. For example, when both are point
484+
* indices, i.e. the pattern is the adjacency matrix.
482485
* \param[in] balanceColors - Try to balance number of indexes per color,
483486
* tends to result in worse locality (thus false by default).
484487
* \param[out] indexColor - Optional, vector with colors given to the outer indices.
485488
* \return Coloring in the same type of the input pattern.
486489
*/
487490
template <typename Color_t = unsigned char, size_t MaxColors = 255, size_t MaxMB = 128, class T>
488-
T colorSparsePattern(const T& pattern, size_t groupSize = 1, bool balanceColors = false,
491+
T colorSparsePattern(const T& pattern, size_t groupSize = 1, bool includeOuterIdx = false, bool balanceColors = false,
489492
std::vector<Color_t>* indexColor = nullptr) {
490493
static_assert(std::is_integral<Color_t>::value, "");
491494
static_assert(std::numeric_limits<Color_t>::max() >= MaxColors, "");
@@ -538,6 +541,11 @@ T colorSparsePattern(const T& pattern, size_t groupSize = 1, bool balanceColors
538541

539542
for (; it != searchOrder.end(); ++it) {
540543
bool free = true;
544+
if (includeOuterIdx) {
545+
for (Index_t k = iOuter; k < grpEnd && free; ++k) {
546+
free = !innerInColor[*it][k];
547+
}
548+
}
541549
/*--- Traverse entire group as a large outer index. ---*/
542550
for (Index_t k = outerPtr[iOuter]; k < outerPtr[grpEnd] && free; ++k) {
543551
free = !innerInColor[*it][innerIdx[k] - minIdx];

0 commit comments

Comments
 (0)