@@ -1318,6 +1318,8 @@ void CIncEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_cont
13181318 const bool streamwise_periodic = (config->GetKind_Streamwise_Periodic () != ENUM_STREAMWISE_PERIODIC::NONE);
13191319 const bool streamwise_periodic_temperature = config->GetStreamwise_Periodic_Temperature ();
13201320
1321+ AD::StartNoSharedReading ();
1322+
13211323 if (body_force) {
13221324
13231325 /* --- Loop over all points ---*/
@@ -1419,12 +1421,16 @@ void CIncEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_cont
14191421 END_SU2_OMP_FOR
14201422 }
14211423
1424+ AD::EndNoSharedReading ();
1425+
14221426 if (axisymmetric) {
14231427
14241428 /* --- For viscous problems, we need an additional gradient. ---*/
14251429
14261430 if (viscous) {
14271431
1432+ AD::StartNoSharedReading ();
1433+
14281434 SU2_OMP_FOR_STAT (omp_chunk_size)
14291435 for (iPoint = 0 ; iPoint < nPoint; iPoint++) {
14301436
@@ -1443,6 +1449,8 @@ void CIncEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_cont
14431449 }
14441450 END_SU2_OMP_FOR
14451451
1452+ AD::EndNoSharedReading ();
1453+
14461454 /* --- Compute the auxiliary variable gradient with GG or WLS. ---*/
14471455
14481456 if (config->GetKind_Gradient_Method () == GREEN_GAUSS) {
@@ -1456,6 +1464,8 @@ void CIncEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_cont
14561464
14571465 /* --- loop over points ---*/
14581466
1467+ AD::StartNoSharedReading ();
1468+
14591469 SU2_OMP_FOR_STAT (omp_chunk_size)
14601470 for (iPoint = 0 ; iPoint < nPointDomain; iPoint++) {
14611471
@@ -1506,10 +1516,14 @@ void CIncEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_cont
15061516
15071517 }
15081518 END_SU2_OMP_FOR
1519+
1520+ AD::EndNoSharedReading ();
15091521 }
15101522
15111523 if (radiation) {
15121524
1525+ AD::StartNoSharedReading ();
1526+
15131527 CNumerics* second_numerics = numerics_container[SOURCE_SECOND_TERM + omp_get_thread_num ()*MAX_TERMS];
15141528
15151529 SU2_OMP_FOR_STAT (omp_chunk_size)
@@ -1550,20 +1564,25 @@ void CIncEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_cont
15501564 }
15511565 END_SU2_OMP_FOR
15521566
1567+ AD::EndNoSharedReading ();
15531568 }
15541569
15551570 if (streamwise_periodic) {
15561571
15571572 /* --- For turbulent streamwise periodic problems w/ energy eq, we need an additional gradient of Eddy viscosity. ---*/
15581573 if (streamwise_periodic_temperature && turbulent) {
15591574
1575+ AD::StartNoSharedReading ();
1576+
15601577 SU2_OMP_FOR_STAT (omp_chunk_size)
15611578 for (iPoint = 0 ; iPoint < nPoint; iPoint++) {
15621579 /* --- Set the auxiliary variable, Eddy viscosity mu_t, for this node. ---*/
15631580 nodes->SetAuxVar (iPoint, 0 , nodes->GetEddyViscosity (iPoint));
15641581 }
15651582 END_SU2_OMP_FOR
15661583
1584+ AD::EndNoSharedReading ();
1585+
15671586 /* --- Compute the auxiliary variable gradient with GG or WLS. ---*/
15681587 if (config->GetKind_Gradient_Method () == GREEN_GAUSS) {
15691588 SetAuxVar_Gradient_GG (geometry, config);
@@ -1577,6 +1596,8 @@ void CIncEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_cont
15771596 /* --- Set delta_p, m_dot, inlet_T, integrated_heat ---*/
15781597 numerics->SetStreamwisePeriodicValues (SPvals);
15791598
1599+ AD::StartNoSharedReading ();
1600+
15801601 /* --- Loop over all points ---*/
15811602 SU2_OMP_FOR_STAT (omp_chunk_size)
15821603 for (iPoint = 0 ; iPoint < nPointDomain; iPoint++) {
@@ -1604,13 +1625,17 @@ void CIncEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_cont
16041625 } // for iPoint
16051626 END_SU2_OMP_FOR
16061627
1628+ AD::EndNoSharedReading ();
1629+
16071630 if (!streamwise_periodic_temperature && energy) {
16081631
16091632 CNumerics* second_numerics = numerics_container[SOURCE_SECOND_TERM + omp_get_thread_num ()*MAX_TERMS];
16101633
16111634 /* --- Set delta_p, m_dot, inlet_T, integrated_heat ---*/
16121635 second_numerics->SetStreamwisePeriodicValues (SPvals);
16131636
1637+ AD::StartNoSharedReading ();
1638+
16141639 /* --- This bit acts as a boundary condition rather than a source term. But logically it fits better here. ---*/
16151640 for (auto iMarker = 0ul ; iMarker < config->GetnMarker_All (); iMarker++) {
16161641
@@ -1646,6 +1671,8 @@ void CIncEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_cont
16461671 }// if periodic inlet boundary
16471672 }// for iMarker
16481673
1674+ AD::EndNoSharedReading ();
1675+
16491676 }// if !streamwise_periodic_temperature
16501677 }// if streamwise_periodic
16511678
@@ -1658,6 +1685,8 @@ void CIncEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_cont
16581685 su2double time = 0.0 ;
16591686 if (config->GetTime_Marching () != TIME_MARCHING::STEADY) time = config->GetPhysicalTime ();
16601687
1688+ AD::StartNoSharedReading ();
1689+
16611690 /* --- Loop over points ---*/
16621691 SU2_OMP_FOR_STAT (omp_chunk_size)
16631692 for (iPoint = 0 ; iPoint < nPointDomain; iPoint++) {
@@ -1679,6 +1708,8 @@ void CIncEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_cont
16791708
16801709 }
16811710 END_SU2_OMP_FOR
1711+
1712+ AD::EndNoSharedReading ();
16821713 }
16831714 }
16841715
0 commit comments