@@ -103,11 +103,11 @@ contains
103103 real (wp), dimension (num_fluids) :: alpha_k, alpha_rho_k
104104 real (wp), dimension (2 ) :: Re
105105 real (wp) :: rho, gamma, pi_inf, qv
106- real (wp) :: G
106+ real (wp) :: G_local
107107 integer :: j, k, l, i, r
108108
109109 $:GPU_PARALLEL_LOOP(collapse= 3 , private= ' [alpha_K, alpha_rho_K, rho, &
110- & gamma, pi_inf, qv, G , Re, tensora, tensorb]' )
110+ & gamma, pi_inf, qv, G_local , Re, tensora, tensorb]' )
111111 do l = 0 , p
112112 do k = 0 , n
113113 do j = 0 , m
@@ -118,12 +118,12 @@ contains
118118 end do
119119 ! If in simulation, use acc mixture subroutines
120120 call s_convert_species_to_mixture_variables_acc(rho, gamma, pi_inf, qv, alpha_k, &
121- alpha_rho_k, Re, G , Gs)
121+ alpha_rho_k, Re, G_local , Gs)
122122 rho = max (rho, sgm_eps)
123- G = max (G , sgm_eps)
124- !if ( G <= verysmall ) G_K = 0._wp
123+ G_local = max (G_local , sgm_eps)
124+ !if ( G_local <= verysmall ) G_K = 0._wp
125125
126- if (G > verysmall) then
126+ if (G_local > verysmall) then
127127 $:GPU_LOOP(parallelism= ' [seq]' )
128128 do i = 1 , tensor_size
129129 tensora(i) = 0._wp
@@ -190,13 +190,13 @@ contains
190190 btensor%vf(b_size)%sf(j, k, l) = tensorb(tensor_size)
191191 ! STEP 5a : updating the Cauchy stress primitive scalar field
192192 if (hyper_model == 1 ) then
193- call s_neoHookean_cauchy_solver(btensor%vf, q_prim_vf, G , j, k, l)
193+ call s_neoHookean_cauchy_solver(btensor%vf, q_prim_vf, G_local , j, k, l)
194194 elseif (hyper_model == 2 ) then
195- call s_Mooney_Rivlin_cauchy_solver(btensor%vf, q_prim_vf, G , j, k, l)
195+ call s_Mooney_Rivlin_cauchy_solver(btensor%vf, q_prim_vf, G_local , j, k, l)
196196 end if
197197 ! STEP 5b : updating the pressure field
198198 q_prim_vf(E_idx)%sf(j, k, l) = q_prim_vf(E_idx)%sf(j, k, l) - &
199- G * q_prim_vf(xiend + 1 )%sf(j, k, l)/ gamma
199+ G_local * q_prim_vf(xiend + 1 )%sf(j, k, l)/ gamma
200200 ! STEP 5c : updating the Cauchy stress conservative scalar field
201201 $:GPU_LOOP(parallelism= ' [seq]' )
202202 do i = 1 , b_size - 1
@@ -218,11 +218,11 @@ contains
218218 !! calculate the inverse of grad_xi to obtain F, F is a nxn tensor
219219 !! calculate the FFtranspose to obtain the btensor, btensor is nxn tensor
220220 !! btensor is symmetric, save the data space
221- pure subroutine s_neoHookean_cauchy_solver (btensor_in , q_prim_vf , G , j , k , l )
221+ pure subroutine s_neoHookean_cauchy_solver (btensor_in , q_prim_vf , G_param , j , k , l )
222222 $:GPU_ROUTINE(parallelism= ' [seq]' )
223223 type(scalar_field), dimension (sys_size), intent (inout ) :: q_prim_vf
224224 type(scalar_field), dimension (b_size), intent (inout ) :: btensor_in
225- real (wp), intent (in ) :: G
225+ real (wp), intent (in ) :: G_param
226226 integer , intent (in ) :: j, k, l
227227
228228 real (wp) :: trace
@@ -241,7 +241,7 @@ contains
241241 $:GPU_LOOP(parallelism= ' [seq]' )
242242 do i = 1 , b_size - 1
243243 q_prim_vf(strxb + i - 1 )%sf(j, k, l) = &
244- G * btensor_in(i)%sf(j, k, l)/ btensor_in(b_size)%sf(j, k, l)
244+ G_param * btensor_in(i)%sf(j, k, l)/ btensor_in(b_size)%sf(j, k, l)
245245 end do
246246 ! compute the invariant without the elastic modulus
247247 q_prim_vf(xiend + 1 )%sf(j, k, l) = &
@@ -257,11 +257,11 @@ contains
257257 !! calculate the inverse of grad_xi to obtain F, F is a nxn tensor
258258 !! calculate the FFtranspose to obtain the btensor, btensor is nxn tensor
259259 !! btensor is symmetric, save the data space
260- pure subroutine s_Mooney_Rivlin_cauchy_solver (btensor_in , q_prim_vf , G , j , k , l )
260+ pure subroutine s_Mooney_Rivlin_cauchy_solver (btensor_in , q_prim_vf , G_param , j , k , l )
261261 $:GPU_ROUTINE(parallelism= ' [seq]' )
262262 type(scalar_field), dimension (sys_size), intent (inout ) :: q_prim_vf
263263 type(scalar_field), dimension (b_size), intent (inout ) :: btensor_in
264- real (wp), intent (in ) :: G
264+ real (wp), intent (in ) :: G_param
265265 integer , intent (in ) :: j, k, l
266266
267267 real (wp) :: trace
@@ -282,7 +282,7 @@ contains
282282 $:GPU_LOOP(parallelism= ' [seq]' )
283283 do i = 1 , b_size - 1
284284 q_prim_vf(strxb + i - 1 )%sf(j, k, l) = &
285- G * btensor_in(i)%sf(j, k, l)/ btensor_in(b_size)%sf(j, k, l)
285+ G_param * btensor_in(i)%sf(j, k, l)/ btensor_in(b_size)%sf(j, k, l)
286286 end do
287287 ! compute the invariant without the elastic modulus
288288 q_prim_vf(xiend + 1 )%sf(j, k, l) = &
0 commit comments