Skip to content

Commit 2c762d1

Browse files
committed
little cleanup and add new option to config template
1 parent 9e60d30 commit 2c762d1

2 files changed

Lines changed: 5 additions & 13 deletions

File tree

SU2_CFD/src/solvers/CSolver.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,8 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
385385

386386
/*--- Allocate buffers for matrices that need rotation. ---*/
387387

388-
su2double **jacBlock = new su2double*[ICOUNT];
389-
su2double **rotBlock = new su2double*[ICOUNT];
390-
for (iVar = 0; iVar < ICOUNT; iVar++) {
391-
jacBlock[iVar] = new su2double[JCOUNT];
392-
rotBlock[iVar] = new su2double[JCOUNT];
393-
}
388+
su2activematrix jacBlock(ICOUNT,JCOUNT);
389+
su2activematrix rotBlock(ICOUNT,JCOUNT);
394390

395391
/*--- Check to make sure we have created a large enough buffer
396392
for these comms during preprocessing. It will be reallocated whenever
@@ -1207,13 +1203,6 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
12071203
delete [] rotPrim_i;
12081204
delete [] rotPrim_j;
12091205

1210-
for (iVar = 0; iVar < ICOUNT; iVar++) {
1211-
delete [] jacBlock[iVar];
1212-
delete [] rotBlock[iVar];
1213-
}
1214-
delete [] jacBlock;
1215-
delete [] rotBlock;
1216-
12171206
}
12181207

12191208
void CSolver::CompletePeriodicComms(CGeometry *geometry,

config_template.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,9 @@ TIME_DISCRE_ADJFLOW= EULER_IMPLICIT
11021102
% Relaxation coefficient (also for discrete adjoint problems)
11031103
RELAXATION_FACTOR_ADJOINT= 1.0
11041104
%
1105+
% Enable (if != 0) quasi-Newton acceleration/stabilization of discrete adjoints
1106+
QUASI_NEWTON_NUM_SAMPLES= 20
1107+
%
11051108
% Reduction factor of the CFL coefficient in the adjoint problem
11061109
CFL_REDUCTION_ADJFLOW= 0.8
11071110
%

0 commit comments

Comments
 (0)