Skip to content

Commit 5598ad2

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into feature_Sobolev_smoothing_solver
2 parents 347ef7d + 71a0942 commit 5598ad2

536 files changed

Lines changed: 459311 additions & 1749 deletions

File tree

Some content is hidden

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

.github/workflows/regression.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
uses: docker://su2code/test-su2:20200303
9191
with:
9292
# -t <Tutorials-branch> -c <Testcases-branch>
93-
args: -b ${{github.ref}} -t develop -c feature_Sobolev_smoothing_solver -s ${{matrix.testscript}}
93+
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
9494
unit_tests:
9595
runs-on: ubuntu-latest
9696
name: Unit Tests

.lgtm.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
extraction:
2+
cpp:
3+
prepare:
4+
packages:
5+
- libboost-all-dev
6+
configure:
7+
command:
8+
- ./meson.py build --optimization=1
9+
index:
10+
build_command:
11+
- ./ninja -C build
12+
113
path_classifiers:
214
test:
315
- TestCases/*

Common/include/CConfig.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4285,7 +4285,7 @@ class CConfig {
42854285
unsigned short GetRef_Inc_NonDim(void) const { return Ref_Inc_NonDim; }
42864286

42874287
/*!
4288-
* \brief Get the kind of SU2 software component.
4288+
* \brief Set the kind of SU2 software component.
42894289
* \return Kind of the SU2 software component.
42904290
*/
42914291
void SetKind_SU2(SU2_COMPONENT val_kind_su2) { Kind_SU2 = val_kind_su2 ; }

SU2_CFD/src/drivers/CDiscAdjSinglezoneDriver.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,8 @@ void CDiscAdjSinglezoneDriver::DirectRun(RECORDING kind_recording){
434434
}
435435

436436
void CDiscAdjSinglezoneDriver::MainRecording(){
437-
438-
/*--- SetRecording stores the computational graph on one iteration of the direct problem. Calling it with NONE
439-
* as argument ensures that all information from a previous recording is removed. ---*/
437+
/*--- SetRecording stores the computational graph on one iteration of the direct problem. Calling it with
438+
* RECORDING::CLEAR_INDICES as argument ensures that all information from a previous recording is removed. ---*/
440439

441440
SetRecording(RECORDING::CLEAR_INDICES);
442441

@@ -447,9 +446,8 @@ void CDiscAdjSinglezoneDriver::MainRecording(){
447446
}
448447

449448
void CDiscAdjSinglezoneDriver::SecondaryRecording(){
450-
451-
/*--- SetRecording stores the computational graph on one iteration of the direct problem. Calling it with NONE
452-
* as argument ensures that all information from a previous recording is removed. ---*/
449+
/*--- SetRecording stores the computational graph on one iteration of the direct problem. Calling it with
450+
* RECORDING::CLEAR_INDICES as argument ensures that all information from a previous recording is removed. ---*/
453451

454452
SetRecording(RECORDING::CLEAR_INDICES);
455453

SU2_CFD/src/fluid/CMutationTCLib.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,15 @@ CMutationTCLib::CMutationTCLib(const CConfig* config, unsigned short val_nDim):
5959

6060
for(iSpecies = 0; iSpecies < nSpecies; iSpecies++) MolarMass[iSpecies] = 1000* mix->speciesMw(iSpecies); // x1000 to have Molar Mass in kg/kmol
6161

62-
if (mix->hasElectrons()) { nHeavy = nSpecies-1; nEl = 1; }
63-
else { nHeavy = nSpecies; nEl = 0; }
62+
if (mix->hasElectrons()) {
63+
if (config->GetViscous()) {
64+
SU2_MPI::Error("Ionization is not yet operational for a viscous flow in the NEMO solver.", CURRENT_FUNCTION);
65+
} else {
66+
nHeavy = nSpecies-1;
67+
nEl = 1;
68+
}
69+
}
70+
else { nHeavy = nSpecies; nEl = 0; }
6471

6572
}
6673

SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ void CDiscAdjFluidIteration::RegisterInput(CSolver***** solver, CGeometry**** ge
507507
}
508508
}
509509

510-
if (kind_recording == RECORDING::MESH_COORDS) {
510+
if (kind_recording == RECORDING::MESH_COORDS || kind_recording == RECORDING::SOLUTION_AND_MESH) {
511511
/*--- Register node coordinates as input ---*/
512512

513513
geometry[iZone][iInst][MESH_0]->RegisterCoordinates();

externals/cgns/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
**********************************************************************
22
https://github.com/CGNS/CGNS/releases,
3-
the source files for CGNS v3.3.0 are bundled and build directly into SU2
3+
the source files for CGNS v4.2.0 are bundled and build directly into SU2
44

55
From the CGNS webpage:
66

externals/cgns/adf/ADF.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ File: ADF.h
5858
ADF core code. These sizes are provided for reference only!
5959
***********************************************************************/
6060
#define ADF_DATA_TYPE_LENGTH 32
61+
#define ADF_CGIO_DATA_TYPE_LENGTH 2
6162
#define ADF_DATE_LENGTH 32
6263
#define ADF_FILENAME_LENGTH 1024
6364
#define ADF_FORMAT_LENGTH 20
@@ -249,6 +250,7 @@ EXTERN void ADF_Put_Name(
249250

250251
EXTERN void ADF_Read_All_Data(
251252
const double ID,
253+
const char *m_data_type,
252254
char *data,
253255
int *error_return ) ;
254256

@@ -269,6 +271,7 @@ EXTERN void ADF_Read_Data(
269271
const cgsize_t m_start[],
270272
const cgsize_t m_end[],
271273
const cgsize_t m_stride[],
274+
const char *m_data_type,
272275
char *data,
273276
int *error_return ) ;
274277

externals/cgns/adf/ADF_interface.c

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ ADFI_chase_link( ID, &LID, &file_index, &block_offset, &node, error_return ) ;
13711371
CHECK_ADF_ABORT( *error_return ) ;
13721372

13731373
/** Copy the blank-filled data-type into a C string **/
1374-
ADFI_string_2_C_string( node.data_type, ADF_DATA_TYPE_LENGTH, data_type,
1374+
ADFI_string_2_C_string( node.data_type, ADF_CGIO_DATA_TYPE_LENGTH, data_type,
13751375
error_return ) ;
13761376
CHECK_ADF_ABORT( *error_return ) ;
13771377

@@ -2601,6 +2601,7 @@ output: int *error_return Error return.
26012601
***********************************************************************/
26022602
void ADF_Read_All_Data(
26032603
const double ID,
2604+
const char *m_data_type,
26042605
char *data,
26052606
int *error_return )
26062607
{
@@ -2629,7 +2630,16 @@ if( data == NULL ) {
26292630
ADFI_chase_link( ID, &LID, &file_index, &block_offset, &node, error_return ) ;
26302631
CHECK_ADF_ABORT( *error_return ) ;
26312632

2633+
/* if it was provided, check to make sure the data types match */
2634+
if( m_data_type != NULL ) {
2635+
if(strncmp(m_data_type, node.data_type, 2) != 0){
2636+
*error_return = INVALID_DATA_TYPE;
2637+
CHECK_ADF_ABORT( *error_return );
2638+
}
2639+
}
2640+
26322641
/** Get datatype size **/
2642+
26332643
ADFI_evaluate_datatype( file_index, node.data_type, &file_bytes, &memory_bytes,
26342644
tokenized_data_type, &file_format, &machine_format, error_return ) ;
26352645
CHECK_ADF_ABORT( *error_return ) ;
@@ -2916,6 +2926,7 @@ void ADF_Read_Data(
29162926
const cgsize_t m_start[],
29172927
const cgsize_t m_end[],
29182928
const cgsize_t m_stride[],
2929+
const char *m_data_type,
29192930
char *data,
29202931
int *error_return )
29212932
{
@@ -2952,6 +2963,14 @@ if( (s_start == NULL) || (s_end == NULL) || (s_stride == NULL) ||
29522963
ADFI_chase_link( ID, &LID, &file_index, &block_offset, &node, error_return ) ;
29532964
CHECK_ADF_ABORT( *error_return ) ;
29542965

2966+
/* if it was provided, check to make sure the data types match */
2967+
if( m_data_type != NULL ) {
2968+
if(strncmp(m_data_type, node.data_type, 2) != 0){
2969+
*error_return = INVALID_DATA_TYPE;
2970+
CHECK_ADF_ABORT( *error_return );
2971+
}
2972+
}
2973+
29552974
/** Get datatype length **/
29562975
ADFI_evaluate_datatype( file_index, node.data_type, &file_bytes, &memory_bytes,
29572976
tokenized_data_type, &disk_format, &machine_format, error_return ) ;

externals/cgns/adf/ADF_internals.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ static void ADFI_convert_integers(
482482
}
483483
}
484484
else {
485-
memcpy(to_data, from_data, size * count);
485+
memcpy(to_data, from_data, (size_t)size * (size_t)count);
486486
}
487487
}
488488
/*------------------------------------------------------------------------------------*/

0 commit comments

Comments
 (0)